diff --git a/CHANGELOG.md b/CHANGELOG.md index a8c3b6e2..4290202b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### Date: 2024-February-05 +### Release: v2024020501 + +#### Issue with PeerMark, Rubric, and QuickMark in Moodle 4.3 fixed +In the previous plugin release we resolved an issue with the EULA modal not launching for students. It has since been discovered that all modals in the plugin were affected by the same issue. This update resolves the issues that users have found with launching the PeerMark, Rubric, and QuickMark managers. + ### Date: 2023-December-19 ### Release: v2023121901 diff --git a/amd/build/modal_peermark_manager_launch.min.js b/amd/build/modal_peermark_manager_launch.min.js index abffa562..b4639f4d 100644 --- a/amd/build/modal_peermark_manager_launch.min.js +++ b/amd/build/modal_peermark_manager_launch.min.js @@ -1,3 +1,2 @@ -define("plagiarism_turnitin/modal_peermark_manager_launch",["jquery","core/ajax","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","core/modal_events"],(function($,Ajax,Notification,CustomEvents,Modal,ModalRegistry,ModalEvents){var registered=!1,SELECTORS_HIDE_BUTTON='[data-action="hide"]',SELECTORS_MODAL='[data-region="modal"]',ModalPeermarkManagerLaunch=function(root){Modal.call(this,root)};function refreshPeermarkAssignments(){$.ajax({type:"POST",url:M.cfg.wwwroot+"/plagiarism/turnitin/ajax.php",dataType:"json",data:{action:"refresh_peermark_assignments",cmid:$('input[name="coursemodule"]').val(),sesskey:M.cfg.sesskey}})}return ModalPeermarkManagerLaunch.TYPE="plagiarism_turnitin-modal_peermark_manager_launch",(ModalPeermarkManagerLaunch.prototype=Object.create(Modal.prototype)).constructor=ModalPeermarkManagerLaunch,ModalPeermarkManagerLaunch.prototype.registerEventListeners=function(){Modal.prototype.registerEventListeners.call(this),this.getModal().on(CustomEvents.events.activate,SELECTORS_HIDE_BUTTON,function(e,data){var cancelEvent=$.Event(ModalEvents.cancel);this.getRoot().trigger(cancelEvent,this),cancelEvent.isDefaultPrevented()||(this.hide(),data.originalEvent.preventDefault(),refreshPeermarkAssignments())}.bind(this)),this.getRoot().click(function(e){$(e.target).closest(SELECTORS_MODAL).length||refreshPeermarkAssignments()}.bind(this))},registered||(ModalRegistry.register(ModalPeermarkManagerLaunch.TYPE,ModalPeermarkManagerLaunch,"plagiarism_turnitin/modal_peermark_manager_launch"),registered=!0),ModalPeermarkManagerLaunch})); - -//# sourceMappingURL=modal_peermark_manager_launch.min.js.map \ No newline at end of file +define("plagiarism_turnitin/modal_peermark_manager_launch",["jquery","core/ajax","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","core/modal_events"],function($,Ajax,Notification,CustomEvents,Modal,ModalRegistry,ModalEvents){var registered=false;var SELECTORS={HIDE_BUTTON:'[data-action="hide"]',MODAL:'[data-region="modal"]'};var ModalPeermarkManagerLaunch=function(root){Modal.call(this,root)};ModalPeermarkManagerLaunch.TYPE="plagiarism_turnitin-modal_peermark_manager_launch";ModalPeermarkManagerLaunch.TEMPLATE="plagiarism_turnitin/modal_peermark_manager_launch";ModalPeermarkManagerLaunch.prototype=Object.create(Modal.prototype);ModalPeermarkManagerLaunch.prototype.constructor=ModalPeermarkManagerLaunch;ModalPeermarkManagerLaunch.prototype.registerEventListeners=function(){Modal.prototype.registerEventListeners.call(this);this.getModal().on(CustomEvents.events.activate,SELECTORS.HIDE_BUTTON,function(e,data){var cancelEvent=$.Event(ModalEvents.cancel);this.getRoot().trigger(cancelEvent,this);if(!cancelEvent.isDefaultPrevented()){this.hide();data.originalEvent.preventDefault();refreshPeermarkAssignments()}}.bind(this));this.getRoot().click(function(e){if(!$(e.target).closest(SELECTORS.MODAL).length){refreshPeermarkAssignments()}}.bind(this))};function refreshPeermarkAssignments(){$.ajax({type:"POST",url:M.cfg.wwwroot+"/plagiarism/turnitin/ajax.php",dataType:"json",data:{action:"refresh_peermark_assignments",cmid:$('input[name="coursemodule"]').val(),sesskey:M.cfg.sesskey}})}if(!registered){ModalRegistry.register(ModalPeermarkManagerLaunch.TYPE,ModalPeermarkManagerLaunch,"plagiarism_turnitin/modal_peermark_manager_launch");registered=true}return ModalPeermarkManagerLaunch}); +//# sourcemappingURL=modal_peermark_manager_launch.min.js.map \ No newline at end of file diff --git a/amd/build/modal_peermark_manager_launch.min.js.map b/amd/build/modal_peermark_manager_launch.min.js.map index ab085729..7a26a01f 100644 --- a/amd/build/modal_peermark_manager_launch.min.js.map +++ b/amd/build/modal_peermark_manager_launch.min.js.map @@ -1 +1 @@ -{"version":3,"file":"modal_peermark_manager_launch.min.js","sources":["../src/modal_peermark_manager_launch.js"],"sourcesContent":["/**\n * Javascript controller for the Peermark Manager launcher\n *\n * @copyright Turnitin\n * @author 2019 David Winn \n * @module plagiarism_turnitin/modal_peermark_manager_launch\n */\n\ndefine(\n [\n 'jquery',\n 'core/ajax',\n 'core/notification',\n 'core/custom_interaction_events',\n 'core/modal',\n 'core/modal_registry',\n 'core/modal_events'\n ],\n function($, Ajax, Notification, CustomEvents, Modal, ModalRegistry, ModalEvents) {\n\n var registered = false;\n var SELECTORS = {\n HIDE_BUTTON: '[data-action=\"hide\"]',\n MODAL: '[data-region=\"modal\"]'\n };\n\n /**\n * Constructor for the Modal.\n *\n * @param {object} root The root jQuery element for the modal\n */\n var ModalPeermarkManagerLaunch = function(root) {\n Modal.call(this, root);\n };\n\n ModalPeermarkManagerLaunch.TYPE = 'plagiarism_turnitin-modal_peermark_manager_launch';\n ModalPeermarkManagerLaunch.prototype = Object.create(Modal.prototype);\n ModalPeermarkManagerLaunch.prototype.constructor = ModalPeermarkManagerLaunch;\n\n /**\n * Set up all of the event handling for the modal.\n *\n * @method registerEventListeners\n */\n ModalPeermarkManagerLaunch.prototype.registerEventListeners = function() {\n // Apply parent event listeners.\n Modal.prototype.registerEventListeners.call(this);\n\n // On cancel, then hide the modal.\n this.getModal().on(CustomEvents.events.activate, SELECTORS.HIDE_BUTTON, function(e, data) {\n var cancelEvent = $.Event(ModalEvents.cancel);\n this.getRoot().trigger(cancelEvent, this);\n\n if (!cancelEvent.isDefaultPrevented()) {\n this.hide();\n data.originalEvent.preventDefault();\n\n refreshPeermarkAssignments();\n }\n }.bind(this));\n\n // On clicking outside the modal, refresh the Peermark assignments.\n this.getRoot().click(function(e) {\n if (!$(e.target).closest(SELECTORS.MODAL).length) {\n refreshPeermarkAssignments();\n }\n }.bind(this));\n };\n\n /**\n * Method to refresh peermark assignments.\n */\n function refreshPeermarkAssignments() {\n $.ajax({\n type: \"POST\",\n url: M.cfg.wwwroot + \"/plagiarism/turnitin/ajax.php\",\n dataType: \"json\",\n data: {\n action: \"refresh_peermark_assignments\",\n cmid: $('input[name=\"coursemodule\"]').val(),\n sesskey: M.cfg.sesskey\n }\n });\n }\n\n // Automatically register with the modal registry the first time this module is imported so that\n // you can create modals of this type using the modal factory.\n if (!registered) {\n ModalRegistry.register(ModalPeermarkManagerLaunch.TYPE,\n ModalPeermarkManagerLaunch,\n 'plagiarism_turnitin/modal_peermark_manager_launch');\n registered = true;\n }\n\n return ModalPeermarkManagerLaunch;\n }\n);"],"names":["define","$","Ajax","Notification","CustomEvents","Modal","ModalRegistry","ModalEvents","registered","SELECTORS","ModalPeermarkManagerLaunch","root","call","this","refreshPeermarkAssignments","ajax","type","url","M","cfg","wwwroot","dataType","data","action","cmid","val","sesskey","TYPE","prototype","Object","create","constructor","registerEventListeners","getModal","on","events","activate","e","cancelEvent","Event","cancel","getRoot","trigger","isDefaultPrevented","hide","originalEvent","preventDefault","bind","click","target","closest","length","register"],"mappings":"AAQAA,2DACI,CACI,SACA,YACA,oBACA,iCACA,aACA,sBACA,sBAEJ,SAASC,EAAGC,KAAMC,aAAcC,aAAcC,MAAOC,cAAeC,iBAE5DC,YAAa,EACbC,sBACa,uBADbA,gBAEO,wBAQPC,2BAA6B,SAASC,MACtCN,MAAMO,KAAKC,KAAMF,gBAwCZG,6BACLb,EAAEc,KAAK,CACHC,KAAM,OACNC,IAAKC,EAAEC,IAAIC,QAAU,gCACrBC,SAAU,OACVC,KAAM,CACFC,OAAQ,+BACRC,KAAMvB,EAAE,8BAA8BwB,MACtCC,QAASR,EAAEC,IAAIO,kBA7C3BhB,2BAA2BiB,KAAO,qDAClCjB,2BAA2BkB,UAAYC,OAAOC,OAAOzB,MAAMuB,YACtBG,YAAcrB,2BAOnDA,2BAA2BkB,UAAUI,uBAAyB,WAE1D3B,MAAMuB,UAAUI,uBAAuBpB,KAAKC,WAGvCoB,WAAWC,GAAG9B,aAAa+B,OAAOC,SAAU3B,sBAAuB,SAAS4B,EAAGf,UAC5EgB,YAAcrC,EAAEsC,MAAMhC,YAAYiC,aACjCC,UAAUC,QAAQJ,YAAazB,MAE/ByB,YAAYK,4BACRC,OACLtB,KAAKuB,cAAcC,iBAEnBhC,+BAENiC,KAAKlC,YAGF4B,UAAUO,MAAM,SAASX,GACrBpC,EAAEoC,EAAEY,QAAQC,QAAQzC,iBAAiB0C,QACtCrC,8BAENiC,KAAKlC,QAqBNL,aACDF,cAAc8C,SAAS1C,2BAA2BiB,KAC9CjB,2BACA,qDACJF,YAAa,GAGVE"} \ No newline at end of file +{"version":3,"sources":["src/modal_peermark_manager_launch.js"],"names":["define","$","Ajax","Notification","CustomEvents","Modal","ModalRegistry","ModalEvents","registered","SELECTORS","HIDE_BUTTON","MODAL","ModalPeermarkManagerLaunch","root","call","this","TYPE","TEMPLATE","prototype","Object","create","constructor","registerEventListeners","getModal","on","events","activate","e","data","cancelEvent","Event","cancel","getRoot","trigger","isDefaultPrevented","hide","originalEvent","preventDefault","refreshPeermarkAssignments","bind","click","target","closest","length","ajax","type","url","M","cfg","wwwroot","dataType","action","cmid","val","sesskey","register"],"mappings":"AAQAA,OACI,CACI,SACA,YACA,oBACA,iCACA,aACA,sBACA,qBAEJ,SAASC,EAAGC,KAAMC,aAAcC,aAAcC,MAAOC,cAAeC,aAEhE,IAAIC,WAAa,MACjB,IAAIC,UAAY,CACZC,YAAa,uBACbC,MAAO,uBACX,EAOA,IAAIC,2BAA6B,SAASC,MACtCR,MAAMS,KAAKC,KAAMF,IAAI,CACzB,EAEAD,2BAA2BI,KAAO,oDAClCJ,2BAA2BK,SAAW,oDACtCL,2BAA2BM,UAAYC,OAAOC,OAAOf,MAAMa,SAAS,EACpEN,2BAA2BM,UAAUG,YAAcT,2BAOnDA,2BAA2BM,UAAUI,uBAAyB,WAE1DjB,MAAMa,UAAUI,uBAAuBR,KAAKC,IAAI,EAGhDA,KAAKQ,SAAS,EAAEC,GAAGpB,aAAaqB,OAAOC,SAAUjB,UAAUC,YAAa,SAASiB,EAAGC,MAChF,IAAIC,YAAc5B,EAAE6B,MAAMvB,YAAYwB,MAAM,EAC5ChB,KAAKiB,QAAQ,EAAEC,QAAQJ,YAAad,IAAI,EAExC,GAAI,CAACc,YAAYK,mBAAmB,EAAG,CACnCnB,KAAKoB,KAAK,EACVP,KAAKQ,cAAcC,eAAe,EAElCC,2BAA2B,CAC/B,CACJ,EAAEC,KAAKxB,IAAI,CAAC,EAGZA,KAAKiB,QAAQ,EAAEQ,MAAM,SAASb,GAC1B,GAAI,CAAC1B,EAAE0B,EAAEc,MAAM,EAAEC,QAAQjC,UAAUE,KAAK,EAAEgC,OAAQ,CAC9CL,2BAA2B,CAC/B,CACJ,EAAEC,KAAKxB,IAAI,CAAC,CAChB,EAKA,SAASuB,6BACLrC,EAAE2C,KAAK,CACHC,KAAM,OACNC,IAAKC,EAAEC,IAAIC,QAAU,gCACrBC,SAAU,OACVtB,KAAM,CACFuB,OAAQ,+BACRC,KAAMnD,EAAE,4BAA4B,EAAEoD,IAAI,EAC1CC,QAASP,EAAEC,IAAIM,OACnB,CACJ,CAAC,CACL,CAIA,GAAI,CAAC9C,WAAY,CACbF,cAAciD,SAAS3C,2BAA2BI,KAC9CJ,2BACA,mDAAmD,EACvDJ,WAAa,IACjB,CAEA,OAAOI,0BACX,CACJ"} \ No newline at end of file diff --git a/amd/build/modal_peermark_reviews_launch.min.js b/amd/build/modal_peermark_reviews_launch.min.js index 67c49f14..9d193914 100644 --- a/amd/build/modal_peermark_reviews_launch.min.js +++ b/amd/build/modal_peermark_reviews_launch.min.js @@ -1,3 +1,2 @@ -define("plagiarism_turnitin/modal_peermark_reviews_launch",["jquery","core/ajax","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","core/modal_events"],(function($,Ajax,Notification,CustomEvents,Modal,ModalRegistry,ModalEvents){var registered=!1,SELECTORS_HIDE_BUTTON='[data-action="hide"]',ModalPeermarkReviewsLaunch=function(root){Modal.call(this,root)};return ModalPeermarkReviewsLaunch.TYPE="plagiarism_turnitin-modal_peermark_reviews_launch",(ModalPeermarkReviewsLaunch.prototype=Object.create(Modal.prototype)).constructor=ModalPeermarkReviewsLaunch,ModalPeermarkReviewsLaunch.prototype.registerEventListeners=function(){Modal.prototype.registerEventListeners.call(this),this.getModal().on(CustomEvents.events.activate,SELECTORS_HIDE_BUTTON,function(e,data){var cancelEvent=$.Event(ModalEvents.cancel);this.getRoot().trigger(cancelEvent,this),cancelEvent.isDefaultPrevented()||(this.hide(),data.originalEvent.preventDefault())}.bind(this))},registered||(ModalRegistry.register(ModalPeermarkReviewsLaunch.TYPE,ModalPeermarkReviewsLaunch,"plagiarism_turnitin/modal_peermark_reviews_launch"),registered=!0),ModalPeermarkReviewsLaunch})); - +define("plagiarism_turnitin/modal_peermark_reviews_launch",["jquery","core/ajax","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","core/modal_events"],function($,Ajax,Notification,CustomEvents,Modal,ModalRegistry,ModalEvents){var registered=false;var SELECTORS={HIDE_BUTTON:'[data-action="hide"]',MODAL:'[data-region="modal"]'};var ModalPeermarkReviewsLaunch=function(root){Modal.call(this,root)};ModalPeermarkReviewsLaunch.TYPE="plagiarism_turnitin-modal_peermark_reviews_launch";ModalPeermarkReviewsLaunch.TEMPLATE="plagiarism_turnitin/modal_peermark_reviews_launch";ModalPeermarkReviewsLaunch.prototype=Object.create(Modal.prototype);ModalPeermarkReviewsLaunch.prototype.constructor=ModalPeermarkReviewsLaunch;ModalPeermarkReviewsLaunch.prototype.registerEventListeners=function(){Modal.prototype.registerEventListeners.call(this);this.getModal().on(CustomEvents.events.activate,SELECTORS.HIDE_BUTTON,function(e,data){var cancelEvent=$.Event(ModalEvents.cancel);this.getRoot().trigger(cancelEvent,this);if(!cancelEvent.isDefaultPrevented()){this.hide();data.originalEvent.preventDefault()}}.bind(this))};if(!registered){ModalRegistry.register(ModalPeermarkReviewsLaunch.TYPE,ModalPeermarkReviewsLaunch,"plagiarism_turnitin/modal_peermark_reviews_launch");registered=true}return ModalPeermarkReviewsLaunch}); //# sourceMappingURL=modal_peermark_reviews_launch.min.js.map \ No newline at end of file diff --git a/amd/build/modal_peermark_reviews_launch.min.js.map b/amd/build/modal_peermark_reviews_launch.min.js.map index 2c94b996..f5d73c4d 100644 --- a/amd/build/modal_peermark_reviews_launch.min.js.map +++ b/amd/build/modal_peermark_reviews_launch.min.js.map @@ -1 +1 @@ -{"version":3,"file":"modal_peermark_reviews_launch.min.js","sources":["../src/modal_peermark_reviews_launch.js"],"sourcesContent":["/**\n * Javascript controller for Peermark Reviews launcher\n *\n * @copyright Turnitin\n * @author 2019 David Winn \n * @module plagiarism_turnitin/modal_peermark_reviews_launch\n */\n\ndefine(\n [\n 'jquery',\n 'core/ajax',\n 'core/notification',\n 'core/custom_interaction_events',\n 'core/modal',\n 'core/modal_registry',\n 'core/modal_events'\n ],\n function($, Ajax, Notification, CustomEvents, Modal, ModalRegistry, ModalEvents) {\n\n var registered = false;\n var SELECTORS = {\n HIDE_BUTTON: '[data-action=\"hide\"]',\n MODAL: '[data-region=\"modal\"]'\n };\n\n /**\n * Constructor for the Modal.\n *\n * @param {object} root The root jQuery element for the modal\n */\n var ModalPeermarkReviewsLaunch = function(root) {\n Modal.call(this, root);\n };\n\n ModalPeermarkReviewsLaunch.TYPE = 'plagiarism_turnitin-modal_peermark_reviews_launch';\n ModalPeermarkReviewsLaunch.prototype = Object.create(Modal.prototype);\n ModalPeermarkReviewsLaunch.prototype.constructor = ModalPeermarkReviewsLaunch;\n\n /**\n * Set up all of the event handling for the modal.\n *\n * @method registerEventListeners\n */\n ModalPeermarkReviewsLaunch.prototype.registerEventListeners = function() {\n // Apply parent event listeners.\n Modal.prototype.registerEventListeners.call(this);\n\n // On cancel, then hide the modal.\n this.getModal().on(CustomEvents.events.activate, SELECTORS.HIDE_BUTTON, function(e, data) {\n var cancelEvent = $.Event(ModalEvents.cancel);\n this.getRoot().trigger(cancelEvent, this);\n\n if (!cancelEvent.isDefaultPrevented()) {\n this.hide();\n data.originalEvent.preventDefault();\n }\n }.bind(this));\n };\n\n // Automatically register with the modal registry the first time this module is imported so that\n // you can create modals of this type using the modal factory.\n if (!registered) {\n ModalRegistry.register(ModalPeermarkReviewsLaunch.TYPE,\n ModalPeermarkReviewsLaunch,\n 'plagiarism_turnitin/modal_peermark_reviews_launch');\n registered = true;\n }\n\n return ModalPeermarkReviewsLaunch;\n }\n);"],"names":["define","$","Ajax","Notification","CustomEvents","Modal","ModalRegistry","ModalEvents","registered","SELECTORS","ModalPeermarkReviewsLaunch","root","call","this","TYPE","prototype","Object","create","constructor","registerEventListeners","getModal","on","events","activate","e","data","cancelEvent","Event","cancel","getRoot","trigger","isDefaultPrevented","hide","originalEvent","preventDefault","bind","register"],"mappings":"AAQAA,2DACI,CACI,SACA,YACA,oBACA,iCACA,aACA,sBACA,sBAEJ,SAASC,EAAGC,KAAMC,aAAcC,aAAcC,MAAOC,cAAeC,iBAE5DC,YAAa,EACbC,sBACa,uBASbC,2BAA6B,SAASC,MACtCN,MAAMO,KAAKC,KAAMF,cAGrBD,2BAA2BI,KAAO,qDAClCJ,2BAA2BK,UAAYC,OAAOC,OAAOZ,MAAMU,YACtBG,YAAcR,2BAOnDA,2BAA2BK,UAAUI,uBAAyB,WAE1Dd,MAAMU,UAAUI,uBAAuBP,KAAKC,WAGvCO,WAAWC,GAAGjB,aAAakB,OAAOC,SAAUd,sBAAuB,SAASe,EAAGC,UAC5EC,YAAczB,EAAE0B,MAAMpB,YAAYqB,aACjCC,UAAUC,QAAQJ,YAAab,MAE/Ba,YAAYK,4BACRC,OACLP,KAAKQ,cAAcC,mBAEzBC,KAAKtB,QAKNL,aACDF,cAAc8B,SAAS1B,2BAA2BI,KAC9CJ,2BACA,qDACJF,YAAa,GAGVE"} \ No newline at end of file +{"version":3,"sources":["src/modal_peermark_reviews_launch.js"],"names":["define","$","Ajax","Notification","CustomEvents","Modal","ModalRegistry","ModalEvents","registered","SELECTORS","HIDE_BUTTON","MODAL","ModalPeermarkReviewsLaunch","root","call","this","TYPE","TEMPLATE","prototype","Object","create","constructor","registerEventListeners","getModal","on","events","activate","e","data","cancelEvent","Event","cancel","getRoot","trigger","isDefaultPrevented","hide","originalEvent","preventDefault","bind","register"],"mappings":"AAQAA,OACI,CACI,SACA,YACA,oBACA,iCACA,aACA,sBACA,qBAEJ,SAASC,EAAGC,KAAMC,aAAcC,aAAcC,MAAOC,cAAeC,aAEhE,IAAIC,WAAa,MACjB,IAAIC,UAAY,CACZC,YAAa,uBACbC,MAAO,uBACX,EAOA,IAAIC,2BAA6B,SAASC,MACtCR,MAAMS,KAAKC,KAAMF,IAAI,CACzB,EAEAD,2BAA2BI,KAAO,oDAClCJ,2BAA2BK,SAAW,oDACtCL,2BAA2BM,UAAYC,OAAOC,OAAOf,MAAMa,SAAS,EACpEN,2BAA2BM,UAAUG,YAAcT,2BAOnDA,2BAA2BM,UAAUI,uBAAyB,WAE1DjB,MAAMa,UAAUI,uBAAuBR,KAAKC,IAAI,EAGhDA,KAAKQ,SAAS,EAAEC,GAAGpB,aAAaqB,OAAOC,SAAUjB,UAAUC,YAAa,SAASiB,EAAGC,MAChF,IAAIC,YAAc5B,EAAE6B,MAAMvB,YAAYwB,MAAM,EAC5ChB,KAAKiB,QAAQ,EAAEC,QAAQJ,YAAad,IAAI,EAExC,GAAI,CAACc,YAAYK,mBAAmB,EAAG,CACnCnB,KAAKoB,KAAK,EACVP,KAAKQ,cAAcC,eAAe,CACtC,CACJ,EAAEC,KAAKvB,IAAI,CAAC,CAChB,EAIA,GAAI,CAACP,WAAY,CACbF,cAAciC,SAAS3B,2BAA2BI,KAC9CJ,2BACA,mDAAmD,EACvDJ,WAAa,IACjB,CAEA,OAAOI,0BACX,CACJ"} \ No newline at end of file diff --git a/amd/build/modal_quickmark_launch.min.js b/amd/build/modal_quickmark_launch.min.js index c89d1174..937e6689 100644 --- a/amd/build/modal_quickmark_launch.min.js +++ b/amd/build/modal_quickmark_launch.min.js @@ -1,3 +1,2 @@ -define("plagiarism_turnitin/modal_quickmark_launch",["jquery","core/ajax","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","core/modal_events"],(function($,Ajax,Notification,CustomEvents,Modal,ModalRegistry,ModalEvents){var registered=!1,SELECTORS_HIDE_BUTTON='[data-action="hide"]',ModalQuickmarkLaunch=function(root){Modal.call(this,root)};return ModalQuickmarkLaunch.TYPE="plagiarism_turnitin-modal_quickmark_launch",(ModalQuickmarkLaunch.prototype=Object.create(Modal.prototype)).constructor=ModalQuickmarkLaunch,ModalQuickmarkLaunch.prototype.registerEventListeners=function(){Modal.prototype.registerEventListeners.call(this),this.getModal().on(CustomEvents.events.activate,SELECTORS_HIDE_BUTTON,function(e,data){var cancelEvent=$.Event(ModalEvents.cancel);this.getRoot().trigger(cancelEvent,this),cancelEvent.isDefaultPrevented()||(this.hide(),data.originalEvent.preventDefault())}.bind(this))},registered||(ModalRegistry.register(ModalQuickmarkLaunch.TYPE,ModalQuickmarkLaunch,"plagiarism_turnitin/modal_quickmark_launch"),registered=!0),ModalQuickmarkLaunch})); - +define("plagiarism_turnitin/modal_quickmark_launch",["jquery","core/ajax","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","core/modal_events"],function($,Ajax,Notification,CustomEvents,Modal,ModalRegistry,ModalEvents){var registered=false;var SELECTORS={HIDE_BUTTON:'[data-action="hide"]',MODAL:'[data-region="modal"]'};var ModalQuickmarkLaunch=function(root){Modal.call(this,root)};ModalQuickmarkLaunch.TYPE="plagiarism_turnitin-modal_quickmark_launch";ModalQuickmarkLaunch.TEMPLATE="plagiarism_turnitin/modal_quickmark_launch";ModalQuickmarkLaunch.prototype=Object.create(Modal.prototype);ModalQuickmarkLaunch.prototype.constructor=ModalQuickmarkLaunch;ModalQuickmarkLaunch.prototype.registerEventListeners=function(){Modal.prototype.registerEventListeners.call(this);this.getModal().on(CustomEvents.events.activate,SELECTORS.HIDE_BUTTON,function(e,data){var cancelEvent=$.Event(ModalEvents.cancel);this.getRoot().trigger(cancelEvent,this);if(!cancelEvent.isDefaultPrevented()){this.hide();data.originalEvent.preventDefault()}}.bind(this))};if(!registered){ModalRegistry.register(ModalQuickmarkLaunch.TYPE,ModalQuickmarkLaunch,"plagiarism_turnitin/modal_quickmark_launch");registered=true}return ModalQuickmarkLaunch}); //# sourceMappingURL=modal_quickmark_launch.min.js.map \ No newline at end of file diff --git a/amd/build/modal_quickmark_launch.min.js.map b/amd/build/modal_quickmark_launch.min.js.map index abf085cb..5c10a2d9 100644 --- a/amd/build/modal_quickmark_launch.min.js.map +++ b/amd/build/modal_quickmark_launch.min.js.map @@ -1 +1 @@ -{"version":3,"file":"modal_quickmark_launch.min.js","sources":["../src/modal_quickmark_launch.js"],"sourcesContent":["/**\n * Javascript controller for Quickmark launcher\n *\n * @copyright Turnitin\n * @author 2019 David Winn \n * @module plagiarism_turnitin/modal_quickmark_launch\n */\n\ndefine(\n [\n 'jquery',\n 'core/ajax',\n 'core/notification',\n 'core/custom_interaction_events',\n 'core/modal',\n 'core/modal_registry',\n 'core/modal_events'\n ],\n function($, Ajax, Notification, CustomEvents, Modal, ModalRegistry, ModalEvents) {\n\n var registered = false;\n var SELECTORS = {\n HIDE_BUTTON: '[data-action=\"hide\"]',\n MODAL: '[data-region=\"modal\"]'\n };\n\n /**\n * Constructor for the Modal.\n *\n * @param {object} root The root jQuery element for the modal\n */\n var ModalQuickmarkLaunch = function(root) {\n Modal.call(this, root);\n };\n\n ModalQuickmarkLaunch.TYPE = 'plagiarism_turnitin-modal_quickmark_launch';\n ModalQuickmarkLaunch.prototype = Object.create(Modal.prototype);\n ModalQuickmarkLaunch.prototype.constructor = ModalQuickmarkLaunch;\n\n /**\n * Set up all of the event handling for the modal.\n *\n * @method registerEventListeners\n */\n ModalQuickmarkLaunch.prototype.registerEventListeners = function() {\n // Apply parent event listeners.\n Modal.prototype.registerEventListeners.call(this);\n\n // On cancel, then hide the modal.\n this.getModal().on(CustomEvents.events.activate, SELECTORS.HIDE_BUTTON, function(e, data) {\n var cancelEvent = $.Event(ModalEvents.cancel);\n this.getRoot().trigger(cancelEvent, this);\n\n if (!cancelEvent.isDefaultPrevented()) {\n this.hide();\n data.originalEvent.preventDefault();\n }\n }.bind(this));\n };\n\n // Automatically register with the modal registry the first time this module is imported so that\n // you can create modals of this type using the modal factory.\n if (!registered) {\n ModalRegistry.register(ModalQuickmarkLaunch.TYPE, ModalQuickmarkLaunch, 'plagiarism_turnitin/modal_quickmark_launch');\n registered = true;\n }\n\n return ModalQuickmarkLaunch;\n }\n);"],"names":["define","$","Ajax","Notification","CustomEvents","Modal","ModalRegistry","ModalEvents","registered","SELECTORS","ModalQuickmarkLaunch","root","call","this","TYPE","prototype","Object","create","constructor","registerEventListeners","getModal","on","events","activate","e","data","cancelEvent","Event","cancel","getRoot","trigger","isDefaultPrevented","hide","originalEvent","preventDefault","bind","register"],"mappings":"AAQAA,oDACI,CACI,SACA,YACA,oBACA,iCACA,aACA,sBACA,sBAEJ,SAASC,EAAGC,KAAMC,aAAcC,aAAcC,MAAOC,cAAeC,iBAE5DC,YAAa,EACbC,sBACa,uBASbC,qBAAuB,SAASC,MAChCN,MAAMO,KAAKC,KAAMF,cAGrBD,qBAAqBI,KAAO,8CAC5BJ,qBAAqBK,UAAYC,OAAOC,OAAOZ,MAAMU,YACtBG,YAAcR,qBAO7CA,qBAAqBK,UAAUI,uBAAyB,WAEpDd,MAAMU,UAAUI,uBAAuBP,KAAKC,WAGvCO,WAAWC,GAAGjB,aAAakB,OAAOC,SAAUd,sBAAuB,SAASe,EAAGC,UAC5EC,YAAczB,EAAE0B,MAAMpB,YAAYqB,aACjCC,UAAUC,QAAQJ,YAAab,MAE/Ba,YAAYK,4BACRC,OACLP,KAAKQ,cAAcC,mBAEzBC,KAAKtB,QAKNL,aACDF,cAAc8B,SAAS1B,qBAAqBI,KAAMJ,qBAAsB,8CACxEF,YAAa,GAGVE"} \ No newline at end of file +{"version":3,"sources":["src/modal_quickmark_launch.js"],"names":["define","$","Ajax","Notification","CustomEvents","Modal","ModalRegistry","ModalEvents","registered","SELECTORS","HIDE_BUTTON","MODAL","ModalQuickmarkLaunch","root","call","this","TYPE","TEMPLATE","prototype","Object","create","constructor","registerEventListeners","getModal","on","events","activate","e","data","cancelEvent","Event","cancel","getRoot","trigger","isDefaultPrevented","hide","originalEvent","preventDefault","bind","register"],"mappings":"AAQAA,OACI,CACI,SACA,YACA,oBACA,iCACA,aACA,sBACA,qBAEJ,SAASC,EAAGC,KAAMC,aAAcC,aAAcC,MAAOC,cAAeC,aAEhE,IAAIC,WAAa,MACjB,IAAIC,UAAY,CACZC,YAAa,uBACbC,MAAO,uBACX,EAOA,IAAIC,qBAAuB,SAASC,MAChCR,MAAMS,KAAKC,KAAMF,IAAI,CACzB,EAEAD,qBAAqBI,KAAO,6CAC5BJ,qBAAqBK,SAAW,6CAChCL,qBAAqBM,UAAYC,OAAOC,OAAOf,MAAMa,SAAS,EAC9DN,qBAAqBM,UAAUG,YAAcT,qBAO7CA,qBAAqBM,UAAUI,uBAAyB,WAEpDjB,MAAMa,UAAUI,uBAAuBR,KAAKC,IAAI,EAGhDA,KAAKQ,SAAS,EAAEC,GAAGpB,aAAaqB,OAAOC,SAAUjB,UAAUC,YAAa,SAASiB,EAAGC,MAChF,IAAIC,YAAc5B,EAAE6B,MAAMvB,YAAYwB,MAAM,EAC5ChB,KAAKiB,QAAQ,EAAEC,QAAQJ,YAAad,IAAI,EAExC,GAAI,CAACc,YAAYK,mBAAmB,EAAG,CACnCnB,KAAKoB,KAAK,EACVP,KAAKQ,cAAcC,eAAe,CACtC,CACJ,EAAEC,KAAKvB,IAAI,CAAC,CAChB,EAIA,GAAI,CAACP,WAAY,CACbF,cAAciC,SAAS3B,qBAAqBI,KAAMJ,qBAAsB,4CAA4C,EACpHJ,WAAa,IACjB,CAEA,OAAOI,oBACX,CACJ"} \ No newline at end of file diff --git a/amd/build/modal_rubric_manager_launch.min.js b/amd/build/modal_rubric_manager_launch.min.js index 4ac313fa..c12020c5 100644 --- a/amd/build/modal_rubric_manager_launch.min.js +++ b/amd/build/modal_rubric_manager_launch.min.js @@ -1,3 +1,2 @@ -define("plagiarism_turnitin/modal_rubric_manager_launch",["jquery","core/ajax","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","core/modal_events"],(function($,Ajax,Notification,CustomEvents,Modal,ModalRegistry,ModalEvents){var registered=!1,SELECTORS_HIDE_BUTTON='[data-action="hide"]',SELECTORS_MODAL='[data-region="modal"]',ModalRubricManagerLaunch=function(root){Modal.call(this,root)};function refreshRubricSelect(){var currentRubric=$("#id_plagiarism_rubric").val();$.ajax({dataType:"json",type:"POST",url:"../plagiarism/turnitin/ajax.php",data:{action:"refresh_rubric_select",assignment:$('input[name="instance"]').val(),modulename:$('input[name="modulename"]').val(),course:$('input[name="course"]').val()},success:function(data){$($("#id_plagiarism_rubric")).empty();var options=data;$.each(options,(function(i,val){if($.isNumeric(i)||""===i)$($("#id_plagiarism_rubric")).append($("");optgroup.attr("label",i),$.each(val,(function(j,rubric){var option=$("");option.val(j),option.text(rubric),optgroup.append(option)})),$("#id_plagiarism_rubric").append(optgroup)}})),$('#id_plagiarism_rubric option[value="'+currentRubric+'"]').attr("selected","selected")}})}return ModalRubricManagerLaunch.TYPE="plagiarism_turnitin-modal_rubric_manager_launch",(ModalRubricManagerLaunch.prototype=Object.create(Modal.prototype)).constructor=ModalRubricManagerLaunch,ModalRubricManagerLaunch.prototype.registerEventListeners=function(){Modal.prototype.registerEventListeners.call(this),this.getModal().on(CustomEvents.events.activate,SELECTORS_HIDE_BUTTON,function(e,data){var cancelEvent=$.Event(ModalEvents.cancel);this.getRoot().trigger(cancelEvent,this),cancelEvent.isDefaultPrevented()||(this.hide(),data.originalEvent.preventDefault(),refreshRubricSelect())}.bind(this)),this.getRoot().click(function(e){$(e.target).closest(SELECTORS_MODAL).length||refreshRubricSelect()}.bind(this))},registered||(ModalRegistry.register(ModalRubricManagerLaunch.TYPE,ModalRubricManagerLaunch,"plagiarism_turnitin/modal_rubric_manager_launch"),registered=!0),ModalRubricManagerLaunch})); - +define("plagiarism_turnitin/modal_rubric_manager_launch",["jquery","core/ajax","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","core/modal_events"],function($,Ajax,Notification,CustomEvents,Modal,ModalRegistry,ModalEvents){var registered=false;var SELECTORS={HIDE_BUTTON:'[data-action="hide"]',MODAL:'[data-region="modal"]'};var ModalRubricManagerLaunch=function(root){Modal.call(this,root)};ModalRubricManagerLaunch.TYPE="plagiarism_turnitin-modal_rubric_manager_launch";ModalRubricManagerLaunch.TEMPLATE="plagiarism_turnitin/modal_rubric_manager_launch";ModalRubricManagerLaunch.prototype=Object.create(Modal.prototype);ModalRubricManagerLaunch.prototype.constructor=ModalRubricManagerLaunch;ModalRubricManagerLaunch.prototype.registerEventListeners=function(){Modal.prototype.registerEventListeners.call(this);this.getModal().on(CustomEvents.events.activate,SELECTORS.HIDE_BUTTON,function(e,data){var cancelEvent=$.Event(ModalEvents.cancel);this.getRoot().trigger(cancelEvent,this);if(!cancelEvent.isDefaultPrevented()){this.hide();data.originalEvent.preventDefault();refreshRubricSelect()}}.bind(this));this.getRoot().click(function(e){if(!$(e.target).closest(SELECTORS.MODAL).length){refreshRubricSelect()}}.bind(this))};function refreshRubricSelect(){var currentRubric=$("#id_plagiarism_rubric").val();$.ajax({dataType:"json",type:"POST",url:"../plagiarism/turnitin/ajax.php",data:{action:"refresh_rubric_select",assignment:$('input[name="instance"]').val(),modulename:$('input[name="modulename"]').val(),course:$('input[name="course"]').val()},success:function(data){$($("#id_plagiarism_rubric")).empty();var options=data;$.each(options,function(i,val){if(!$.isNumeric(i)&&i!==""){var optgroup=$("");optgroup.attr("label",i);$.each(val,function(j,rubric){var option=$("");option.val(j);option.text(rubric);optgroup.append(option)});$("#id_plagiarism_rubric").append(optgroup)}else{$($("#id_plagiarism_rubric")).append($("