/** // @name Global Nav - Custom Links // @namespace https://github.com/robert-carroll/ccsd-canvas // **/ (function () { 'use strict'; // configure links const links = [ { title: 'Campus Resources', icon_svg: 'icon-star', href: 'https://www.ltcc.edu/campusresources/', target: '' }, // ready for another { title: 'Report A Concern', icon_svg: 'icon-notepad', href: 'https://cm.maxient.com/reporting.php?LakeTahoeCC', target: '' }, // ready for another ]; // leave this alone const globalNavCustomLinks=e=>{let t=(e,t)=>{e.setAttribute("id",`global_nav_${t}_svg`),e.setAttribute("class","ic-icon-svg menu-item__icon ic-icon-svg--apps svg-icon-help ic-icon-svg-custom-tray"),e.getAttribute("height")>"26px"&&e.removeAttribute("height"),e.getAttribute("width")>"26px"&&e.removeAttribute("width")};e.forEach(e=>{const i=e.title.replace(/\W/g,"_").toLowerCase();var n=$("
  • ",{id:`global_nav_${i}_link`,class:"ic-app-header__menu-list-item",html:`\n \n `});if(1==/^icon-[a-z]/.test(e.icon_svg))n.find(`.svg-${i}-holder`).append($("
    ",{id:`global_nav_${i}_svg`,class:"menu-item-icon-container",html:`
    `,role:"presentation"}));else if(/^http/.test(e.icon_svg))n.find(`.svg-${i}-holder`).load(e.icon_svg,(function(){let e=$(this).find("svg")[0];t(e,i)}));else if(/^0){let t=document.createElement("style");t.setAttribute("data-global-nav-custom-css","set"),document.head.appendChild(t);let i=t.sheet;Object.keys(e).forEach((function(t){i.insertRule(`${t} { ${e[t]} }`,i.cssRules.length)}))}}}(); // add links to menu globalNavCustomLinks(links); })(); /*EvaluationKIT START*/var evalkit_jshosted = document.createElement('script');evalkit_jshosted.setAttribute('type', 'text/javascript');evalkit_jshosted.setAttribute('src', 'https://ltcc.evaluationkit.com/canvas/js');document.getElementsByTagName('head')[0].appendChild(evalkit_jshosted);/*EvaluationKIT END*/ // Start Pope Tech Accessibility Guide /* ba - 10-04-24 disable Popetech (function(){function a(a,b){var c=document.createElement("script");c.type="text/javascript",c.readyState?c.onreadystatechange=function(){("loaded"===c.readyState||"complete"===c.readyState)&&(c.onreadystatechange=null,b())}:c.onload=function(){b()},c.src=a,document.getElementsByTagName("head")[0].appendChild(c)}function b(a){return a&&("TeacherEnrollment"===a||"TaEnrollment"===a||"DesignerEnrollment"===a)}var c="username",d="enrollments";if(-1!==window.location.href.indexOf("/login/canvas"))return localStorage.removeItem(`${"pt-instructor-guide"}.${c}`),localStorage.removeItem(`${"pt-instructor-guide"}.${"uuid"}`),localStorage.removeItem(`${"pt-instructor-guide"}.${"settings"}`),void localStorage.removeItem(`${"pt-instructor-guide"}.${d}`);if(-1!==window.location.href.indexOf("?login_success=1"))return localStorage.removeItem(`${"pt-instructor-guide"}.${c}`),void $.get("/api/v1/users/self",function(a){localStorage.setItem(`${"pt-instructor-guide"}.${c}`,a.name)});var e=window.location.pathname;if(-1!==e.indexOf("/edit")||-1!==e.indexOf("/new")||-1!==e.indexOf("/syllabus")||e.match(/\/courses\/[0-9]+\/pages\/?$/)||e.match(/\/courses\/[0-9]+\/?$/)){var f=localStorage.getItem(`${"pt-instructor-guide"}.${d}`);if(null===f)$.get("/api/v1/users/self/enrollments?type[]=DesignerEnrollment&type[]=TaEnrollment&type[]=TeacherEnrollment",function(c){for(var e=0;e} A promise that resolves when the script is loaded successfully, or rejects with an error if the script fails to load. */ function addScript() { const s3ScriptUrl = `https://s3.us-west-1.amazonaws.com/ddl.public/${TENANT_ID}/gradeExportButton.js`; return new Promise((resolve, reject) => { const script = document.createElement("script"); script.setAttribute("charset", "UTF-8"); script.setAttribute("src", s3ScriptUrl); script.onload = () => resolve(); script.onerror = (error) => reject(error); document.body.appendChild(script); }); } document.addEventListener("DOMContentLoaded", () => { addScript() .then(() => { if (window.addScript) { console.log('Loaded Insights script successfully'); } else { console.error('Insights script did not load correctly'); } }) .catch((error) => console.error('Error loading Insights script:', error)); }); //////////////////////////////////////////////////// // DESIGNPLUS CONFIG // //////////////////////////////////////////////////// DpPrimary = { lms: 'canvas', templateCourse: '13370', hideButton: true, enableWizard: false, hideLti: false, extendedCourse: '', // added in sub-account theme sharedCourse: '', // added from localStorage courseFormats: [], canvasRoles: [], canvasUsers: [], canvasCourseIds: [], plugins: [], excludedModules: [], includedModules: [], lang: 'en', } // merge with extended/shared customizations config DpConfig = { ...DpPrimary, ...(window.DpConfig ?? {}) } $(function () { const uriPrefix = (location.href.includes('.beta.')) ? 'beta.' : ''; const toolsUri = (DpConfig.toolsUri) ? DpConfig.toolsUri : `https://${uriPrefix}designplus.ciditools.com/`; $.getScript(`${toolsUri}js/controller.js`); }); //////////////////////////////////////////////////// // END DESIGNPLUS CONFIG // ////////////////////////////////////////////////////