// Start Pope Tech Accessibility Guide var popeTechKey='BqbjNb0DogGISDNqiOc54JPk1TIss3NR';(function(a){function b(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 c(a){return a&&("TeacherEnrollment"===a||"TaEnrollment"===a||"DesignerEnrollment"===a)}function d(){var a=window.location.pathname;return!!(-1!==a.indexOf("/edit")||-1!==a.indexOf("/new")||-1!==a.indexOf("/syllabus")||a.match(/\/courses\/[0-9]+\/pages\/?$/)||a.match(/\/courses\/[0-9]+\/?$/))}function e(){return f()||g()}function f(){var a=/\/courses\/[0-9]+\/pages\/?$/,b=window.location.pathname;return console.log("Check for pages url",window.location.pathname),console.log(a.test(b)),a.test(b)}function g(){var a=window.location.pathname;return console.log("Check for courses url",window.location.pathname),console.log("/courses"===a),"/courses"===a}function h(){var a=/\/accounts\/[0-9]+\/external_tools\/[0-9]+\/?$/,b=/\/courses\/[0-9]+\/external_tools\/[0-9]+\/?$/,c=window.location.pathname;return console.log("Check for external tool url",window.location.pathname),console.log(a.test(c)||b.test(c)),a.test(c)||b.test(c)}function i(f){for(var g=0;g /** // @name Global Nav - Custom Links // @namespace https://github.com/robert-carroll/ccsd-canvas // **/ (function () { 'use strict'; // configure links const links = []; //alert(ENV.current_user_roles); // if the user is not a teacher, admin, or root_admin; user, student, observer only if (!['teacher', 'admin'].some(a => ENV.current_user_roles.includes(a))){ // links for user, student, observer links.push({ title: 'Student Support', icon_svg: ` `, href: 'https://swccd.instructure.com/courses/38777', target: '_blank' }); } else { links.push({ title: 'Student Support', icon_svg: ` `, href: 'https://swccd.instructure.com/courses/38777', target: '_blank' }); // links for teacher, admin, root_admin links.push({ title: 'Faculty Resources', icon_svg: ` `, href: 'https://swccd.instructure.com/courses/54562', target: '_blank' }); } // leave this alone const globalNavCustomLinks = (links) => { let gnci_svg = (svg, tidle) => { svg.setAttribute('id', `global_nav_${tidle}_svg`); svg.setAttribute('class', 'ic-icon-svg menu-item__icon ic-icon-svg--apps svg-icon-help ic-icon-svg-custom-tray'); if (svg.getAttribute('height') > '26px') { svg.removeAttribute('height') } if (svg.getAttribute('width') > '26px') { svg.removeAttribute('width') } } links.forEach(link => { // selector id from link title const tidle = link.title.replace(/\W/g, '_').toLowerCase(); // global nav icon var icon = $('
  • ', { id: `global_nav_${tidle}_link`, class: `ic-app-header__menu-list-item`, html: ` ` }); // instructure icon if (/^icon-[a-z]/.test(link.icon_svg) == true) { icon.find(`.svg-${tidle}-holder`).append($('
    ', { id: `global_nav_${tidle}_svg`, class: 'menu-item-icon-container', html: `
    `, role: 'presentation' })); // externally hosted svg } else if (/^http/.test(link.icon_svg)) { icon.find(`.svg-${tidle}-holder`).load(link.icon_svg, function () { let svg = $(this).find('svg')[0]; gnci_svg(svg, tidle); }); // inline/script svg } else if (/^ 0) { let style = document.createElement('style'); style.setAttribute('data-global-nav-custom-css', 'set'); document.head.appendChild(style); let sheet = style.sheet; Object.keys(styles).forEach(function (key) { sheet.insertRule(`${key} { ${styles[key]} }`, sheet.cssRules.length); }); } } })(); // add links to menu globalNavCustomLinks(links); })(); (function() { window.prontoInit = {"ixn":"canvas","cid":227,"version":"1.0"}; var script = document.createElement('script'); script.src = `https://chat.trypronto.com/js/embedded.js?cb=${Math.round(new Date().getTime() / 1000)}`; document.body.appendChild(script); })(); const TENANT_ID = "swccd-beta"; /** * Adds a script to the document body. * @returns {Promise} 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)); });