first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
define("enrol_lti/content_select",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0;_exports.init=()=>{document.addEventListener("change",(e=>{if(e.target.matches("input[type='checkbox'][name^='modules']")){const value=e.target.value,gradecheckbox=document.querySelector("input[type='checkbox'][name^='grades'][value='"+value+"']");gradecheckbox&&(gradecheckbox.checked=e.target.checked)}if(e.target.matches("input[type='checkbox'][name^='grades']")){const value=e.target.value,modcheckbox=document.querySelector("input[type='checkbox'][name^='modules'][value='"+value+"']");e.target.checked&&(modcheckbox.checked=!0)}}))}}));
//# sourceMappingURL=content_select.min.js.map
@@ -0,0 +1 @@
{"version":3,"file":"content_select.min.js","sources":["../src/content_select.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n/**\n * Module providing checkbox autoselection behaviour to the table on the select content deep linking view, launch_deeplink.php.\n *\n * @module enrol_lti/content_select\n * @copyright 2021 Jake Dallimore <jrhdallimore@gmail.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n// Register the checkbox change events allowing the automatic selection/deselection of the\n// 'add to gradebook' and 'add to course' checkboxes when selecting an activity/resource.\nconst registerEventHandlers = () => {\n document.addEventListener('change', e => {\n if (e.target.matches(\"input[type='checkbox'][name^='modules']\")) {\n const value = e.target.value;\n const gradecheckbox = document.querySelector(\"input[type='checkbox'][name^='grades'][value='\" + value + \"']\");\n if (gradecheckbox) {\n gradecheckbox.checked = e.target.checked;\n }\n }\n\n if (e.target.matches(\"input[type='checkbox'][name^='grades']\")) {\n const value = e.target.value;\n const modcheckbox = document.querySelector(\"input[type='checkbox'][name^='modules'][value='\" + value + \"']\");\n if (e.target.checked) {\n modcheckbox.checked = true;\n }\n }\n });\n};\n\nexport const init = () => {\n registerEventHandlers();\n};\n"],"names":["document","addEventListener","e","target","matches","value","gradecheckbox","querySelector","checked","modcheckbox"],"mappings":"6JA2CoB,KAnBhBA,SAASC,iBAAiB,UAAUC,OAC5BA,EAAEC,OAAOC,QAAQ,2CAA4C,OACvDC,MAAQH,EAAEC,OAAOE,MACjBC,cAAgBN,SAASO,cAAc,iDAAmDF,MAAQ,MACpGC,gBACAA,cAAcE,QAAUN,EAAEC,OAAOK,YAIrCN,EAAEC,OAAOC,QAAQ,0CAA2C,OACtDC,MAAQH,EAAEC,OAAOE,MACjBI,YAAcT,SAASO,cAAc,kDAAoDF,MAAQ,MACnGH,EAAEC,OAAOK,UACTC,YAAYD,SAAU"}
+11
View File
@@ -0,0 +1,11 @@
define("enrol_lti/tool_endpoints",["exports","core/copy_to_clipboard"],(function(_exports,_copy_to_clipboard){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0;
/**
* Module supporting the dynamic and manual registration URLs in the tool registration admin setting.
*
* @module enrol_lti/tool_endpoints
* @copyright 2021 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
const SELECTORS_URL_VALUE='[id^="lti_tool_endpoint_url_"]',focusURLHandler=event=>{const triggerElement=event.target.closest(SELECTORS_URL_VALUE);null!==triggerElement&&(event.preventDefault(),triggerElement.select())};_exports.init=()=>{document.addEventListener("focusin",focusURLHandler)}}));
//# sourceMappingURL=tool_endpoints.min.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tool_endpoints.min.js","sources":["../src/tool_endpoints.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n/**\n * Module supporting the dynamic and manual registration URLs in the tool registration admin setting.\n *\n * @module enrol_lti/tool_endpoints\n * @copyright 2021 Jake Dallimore <jrhdallimore@gmail.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\nimport 'core/copy_to_clipboard';\n\n/**\n * DOM Selectors.\n * @type {{URL_VALUE: string}}\n */\nconst SELECTORS = {\n URL_VALUE: '[id^=\"lti_tool_endpoint_url_\"]',\n};\n\n/**\n * Focus handler for the registration URL field, enabling auto select of text on click.\n *\n * @param {Event} event a click event.\n */\nconst focusURLHandler = (event) => {\n const triggerElement = event.target.closest(SELECTORS.URL_VALUE);\n if (triggerElement === null) {\n return;\n }\n event.preventDefault();\n\n triggerElement.select();\n};\n\n/**\n * Initialise the tool registration page, attaching handlers, etc.\n */\nexport const init = () => {\n // Event delegation supporting the select on focus behaviour (with text selection permitted on subsequent clicks).\n document.addEventListener('focusin', focusURLHandler);\n};\n"],"names":["SELECTORS","focusURLHandler","event","triggerElement","target","closest","preventDefault","select","document","addEventListener"],"mappings":";;;;;;;;MA2BMA,oBACS,iCAQTC,gBAAmBC,cACfC,eAAiBD,MAAME,OAAOC,QAAQL,qBACrB,OAAnBG,iBAGJD,MAAMI,iBAENH,eAAeI,yBAMC,KAEhBC,SAASC,iBAAiB,UAAWR"}
+46
View File
@@ -0,0 +1,46 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Module providing checkbox autoselection behaviour to the table on the select content deep linking view, launch_deeplink.php.
*
* @module enrol_lti/content_select
* @copyright 2021 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// Register the checkbox change events allowing the automatic selection/deselection of the
// 'add to gradebook' and 'add to course' checkboxes when selecting an activity/resource.
const registerEventHandlers = () => {
document.addEventListener('change', e => {
if (e.target.matches("input[type='checkbox'][name^='modules']")) {
const value = e.target.value;
const gradecheckbox = document.querySelector("input[type='checkbox'][name^='grades'][value='" + value + "']");
if (gradecheckbox) {
gradecheckbox.checked = e.target.checked;
}
}
if (e.target.matches("input[type='checkbox'][name^='grades']")) {
const value = e.target.value;
const modcheckbox = document.querySelector("input[type='checkbox'][name^='modules'][value='" + value + "']");
if (e.target.checked) {
modcheckbox.checked = true;
}
}
});
};
export const init = () => {
registerEventHandlers();
};
+53
View File
@@ -0,0 +1,53 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Module supporting the dynamic and manual registration URLs in the tool registration admin setting.
*
* @module enrol_lti/tool_endpoints
* @copyright 2021 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import 'core/copy_to_clipboard';
/**
* DOM Selectors.
* @type {{URL_VALUE: string}}
*/
const SELECTORS = {
URL_VALUE: '[id^="lti_tool_endpoint_url_"]',
};
/**
* Focus handler for the registration URL field, enabling auto select of text on click.
*
* @param {Event} event a click event.
*/
const focusURLHandler = (event) => {
const triggerElement = event.target.closest(SELECTORS.URL_VALUE);
if (triggerElement === null) {
return;
}
event.preventDefault();
triggerElement.select();
};
/**
* Initialise the tool registration page, attaching handlers, etc.
*/
export const init = () => {
// Event delegation supporting the select on focus behaviour (with text selection permitted on subsequent clicks).
document.addEventListener('focusin', focusURLHandler);
};