diff --git a/views/js/controller/Publish/index.js b/views/js/controller/Publish/index.js index b1015c7b..013a469a 100644 --- a/views/js/controller/Publish/index.js +++ b/views/js/controller/Publish/index.js @@ -18,7 +18,6 @@ */ define([ 'jquery', - 'lodash', 'i18n', 'util/url', 'layout/actions', @@ -26,7 +25,7 @@ define([ 'ui/destination/selector', 'ui/feedback', 'ui/taskQueue/taskQueue' -], function ($, _, __, urlHelper, actionManager, resourceProviderFactory, destinationSelectorFactory, feedback, taskQueue) { +], function ($, __, urlHelper, actionManager, resourceProviderFactory, destinationSelectorFactory, feedback, taskQueue) { 'use strict'; /** @@ -77,7 +76,7 @@ define([ .on('finished', function (result, button) { if (result.task && result.task.report - && _.isArray(result.task.report.children) + && Array.isArray(result.task.report.children) && result.task.report.children.length && result.task.report.children[0]) { if (result.task.report.children[0].data @@ -102,4 +101,4 @@ define([ }); } }; -}); \ No newline at end of file +}); diff --git a/views/js/loader/taoDeliveryRdf.min.js b/views/js/loader/taoDeliveryRdf.min.js index d7ebcd3e..3903f964 100644 --- a/views/js/loader/taoDeliveryRdf.min.js +++ b/views/js/loader/taoDeliveryRdf.min.js @@ -1,2 +1,2 @@ -define("css!taoDeliveryRdfCss/delivery-rdf",[],function(){}),define("taoDeliveryRdf/controller/DeliveryMgmt/editDelivery",["jquery","util/url","ui/modal","css!taoDeliveryRdfCss/delivery-rdf.css"],function($,urlUtil){"use strict";return{start(){$("#exclude-btn").click(function(){const delivery=$(this).data("delivery");$("#testtaker-form").load(urlUtil.route("excludeTesttaker","DeliveryMgmt","taoDeliveryRdf",{uri:delivery}),()=>{$("body").prepend($("#modal-container")),$("#testtaker-form").modal()})})}}}),define("taoDeliveryRdf/controller/DeliveryMgmt/testtaker",["jquery","i18n","helpers","module","layout/section","ui/feedback"],function($,__,helpers,module,section,feedback){"use strict";function switchList(){var target,current=$(this).parent().attr("id");"excludedList"==current?target=$("#assignedList"):"assignedList"==current&&(target=$("#excludedList")),"undefined"!=typeof target&&(target.append(this),this.scrollIntoView())}var timeout,$search=$("#tt-filter"),$list=$("#assignedList"),liveSearch=function(){var pattern=$search.val();clearTimeout(timeout),timeout=setTimeout(function(){filterList(new RegExp(pattern),$list)},300)},filterList=function(regex,list){list.children().each(function(index,element){null===$(element).text().match(regex)?$(element).hide():$(element).show()})};return{start:function(){$("#save-tt").click(function(){var excluded=[];$("#excludedList > li").each(function(index){excluded.push($(this).data("uri"))});var assemblyUri=$("input[name=\"assemblyUri\"]").val();$.ajax({url:helpers._url("saveExcluded","DeliveryMgmt","taoDeliveryRdf"),type:"POST",data:{uri:assemblyUri,excluded:JSON.stringify(excluded)},dataType:"json",success:function(response){response.saved&&(feedback().success(__("Selection saved successfully")),section.loadContentBlock(helpers._url("editDelivery","DeliveryMgmt","taoDeliveryRdf"),{uri:assemblyUri}))}})}),$("#assignedList > li").click(switchList),$("#excludedList > li").click(switchList),$("#close-tt").click(function(){$("#testtaker-form").modal("close")}),$search.keyup(liveSearch).siblings(".ctrl").click(liveSearch)}}}),define("taoDeliveryRdf/util/providers/testsProvider",["jquery","i18n","util/url"],function($,__,urlUtils){"use strict";var providers={listTests(data){return new Promise(function(resolve,reject){$.ajax({url:urlUtils.route("getAvailableTests","DeliveryMgmt","taoDeliveryRdf"),data:{q:data.q,page:data.page},type:"GET",dataType:"JSON"}).done(function(tests){tests?resolve(tests):reject(new Error(__("Unable to load tests")))}).fail(function(){reject(new Error(__("Unable to load tests")))})})}};return providers}),define("taoDeliveryRdf/util/forms/deliveryFormHelper",["jquery","lodash","i18n","ui/filter","ui/feedback","layout/actions","ui/taskQueue/taskQueue","ui/taskQueueButton/standardButton"],function($,_,__,filterFactory,feedback,actionManager,taskQueue,taskCreationButtonFactory){"use strict";const refreshTree=function refreshTree(uriResource){actionManager.trigger("refresh",{uri:uriResource})};return{createSelectorInput(_ref){let{$filterContainer,$inputElement,taskButton,dataProvider,inputPlaceholder=__("Select the test you want to publish to the test-takers"),inputLabel=__("Select the test")}=_ref;return filterFactory($filterContainer,{placeholder:inputPlaceholder,label:inputLabel,width:"64%",quietMillis:1e3}).on("change",function(selection){$inputElement.val(selection),selection?taskButton.enable():taskButton.disable()}).on("request",function(params){dataProvider.list(params.data).then(function(data){params.success(data)}).catch(function(err){params.error(err),feedback().error(err)})}).render("<%- text %>")},replaceSubmitWithTaskButton(_ref2){let{$form,$reportContainer,buttonTitle=__("Publish the test"),buttonLabel=__("Publish")}=_ref2;const $oldSubmitter=$form.find(".form-submitter"),taskCreationButton=taskCreationButtonFactory({type:"info",icon:"delivery",title:buttonTitle,label:buttonLabel,taskQueue:taskQueue,taskCreationUrl:$form.prop("action"),taskCreationData:function getTaskCreationData(){return $form.serializeArray()},taskReportContainer:$reportContainer}).on("finished",function(result){result&&result.task&&result.task.report&&_.isArray(result.task.report.children)&&result.task.report.children.length&&result.task.report.children[0]&&(result.task.report.children[0].data&&result.task.report.children[0].data.uriResource?(feedback().info(__("%s completed",result.task.taskLabel),{encodeHtml:!1}),refreshTree(result.task.report.children[0].data.uriResource)):this.displayReport(result.task.report.children[0],__("Error")))}).on("continue",function(){refreshTree()}).on("error",function(err){feedback().error(err),this.trigger("finished")}).render($oldSubmitter.closest(".form-toolbar")).disable();return $oldSubmitter.replaceWith(taskCreationButton.getElement()),taskCreationButton},setupTaoLocalForm($form,providers){const $reportContainer=$form.closest(".content-block"),$filterContainer=$(".test-select-container",$form),$inputElement=$("#test",$form),taskButton=this.replaceSubmitWithTaskButton({$form,$reportContainer});this.createSelectorInput({$filterContainer,$inputElement,taskButton,dataProvider:{list:providers.listTests}})}}}),define("taoDeliveryRdf/controller/DeliveryMgmt/wizard",["jquery","taoDeliveryRdf/util/providers/testsProvider","taoDeliveryRdf/util/forms/deliveryFormHelper","css!taoDeliveryRdfCss/delivery-rdf.css"],function($,testsProvider,deliveryFormHelper){"use strict";return{start(){const $form=$("#simpleWizard");deliveryFormHelper.setupTaoLocalForm($form,testsProvider)}}}),define("taoDeliveryRdf/controller/Publish/index",["jquery","lodash","i18n","util/url","layout/actions","provider/resources","ui/destination/selector","ui/feedback","ui/taskQueue/taskQueue"],function($,_,__,urlHelper,actionManager,resourceProviderFactory,destinationSelectorFactory,feedback,taskQueue){"use strict";var refreshTree=function refreshTree(uriResource){actionManager.trigger("refresh",{uri:uriResource})};return{start:function start(){var $container=$(".selector-container"),testUri=$container.data("test"),testLabel=$container.data("label"),resourceProvider=resourceProviderFactory();destinationSelectorFactory($container,{title:__("Publish \"%s\" to",testLabel),actionName:__("Publish"),icon:"delivery",taskQueue:taskQueue,taskCreationData:{testUri:testUri},taskCreationUrl:urlHelper.route("publish","Publish","taoDeliveryRdf"),classUri:$container.data("root-class")}).on("query",function(params){var self=this;params.classOnly=!0,resourceProvider.getResources(params,!0).then(function(resources){self.update(resources,params)}).catch(function(err){self.trigger("error",err)})}).on("finished",function(result,button){result.task&&result.task.report&&_.isArray(result.task.report.children)&&result.task.report.children.length&&result.task.report.children[0]&&(result.task.report.children[0].data&&result.task.report.children[0].data.uriResource?(feedback().info(__("%s completed",result.task.taskLabel),{encodeHtml:!1}),refreshTree(result.task.report.children[0].data.uriResource)):button.displayReport(result.task.report.children[0],__("Error")))}).on("continue",function(){refreshTree(testUri)}).on("error",function(err){err&&err.errorMsg&&(err=err.errorMsg),feedback().error(err)})}}}),define("taoDeliveryRdf/controller/routes",[],function(){"use strict";return{DeliveryMgmt:{actions:{editDelivery:"controller/DeliveryMgmt/editDelivery",excludeTesttaker:"controller/DeliveryMgmt/testtaker",wizard:"controller/DeliveryMgmt/wizard"}},Publish:{actions:{index:"controller/Publish/index"}}}}),function(c){var d=document,a="appendChild",i="styleSheet",s=d.createElement("style");s.type="text/css",d.getElementsByTagName("head")[0].appendChild(s),s.styleSheet?s.styleSheet.cssText=c:s.appendChild(d.createTextNode(c))}(".delivery-headings h3{margin-bottom:5px}.delivery-headings h2{margin-bottom:5px}.delivery-headings .label{font-weight:bold}.delivery-headings .label:not(:first-child){margin-left:1em}.xhtml_form .form-toolbar .loading-button{float:right}.ttlist{overflow:auto}.ttlist li{cursor:pointer;border-bottom:1px solid #ddd;padding:3px;background:#f9f8f7}.ttlist li:hover{color:#fff;background:rgba(14,93,145,.8)}.filter-div{text-align:right;position:relative;background:#ddd;padding:1px}.filter-div input{display:block;width:calc(100% - 14px);padding:6px;font-size:14px;font-size:1.4rem;max-width:none}.filter-div span{position:absolute;right:10px;top:8px;opacity:.3}#assignedList,#excludedList{height:267px;border:1px solid #ddd;border-radius:2px;-webkit-border-radius:2px}#assignedList li,#excludedList li{line-height:1.4}#assignedList li .arrow:before,#excludedList li .arrow:before{font-family:\"tao\" !important;speak:never;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\uE60F\"}#assignedList li .arrow{float:right;margin-right:5px}#excludedList{margin-top:43px}#excludedList li .arrow{float:left;margin-left:5px;margin-right:10px}\n\n/*# sourceMappingURL=../../../taoDeliveryRdf/views/css/delivery-rdf.css.map */"),define("taoDeliveryRdf/loader/taoDeliveryRdf.bundle",function(){}); +define("css!taoDeliveryRdfCss/delivery-rdf",[],function(){}),define("taoDeliveryRdf/controller/DeliveryMgmt/editDelivery",["jquery","util/url","ui/modal","css!taoDeliveryRdfCss/delivery-rdf.css"],function($,urlUtil){"use strict";return{start(){$("#exclude-btn").click(function(){const delivery=$(this).data("delivery");$("#testtaker-form").load(urlUtil.route("excludeTesttaker","DeliveryMgmt","taoDeliveryRdf",{uri:delivery}),()=>{$("body").prepend($("#modal-container")),$("#testtaker-form").modal()})})}}}),define("taoDeliveryRdf/controller/DeliveryMgmt/testtaker",["jquery","i18n","helpers","module","layout/section","ui/feedback"],function($,__,helpers,module,section,feedback){"use strict";function switchList(){var target,current=$(this).parent().attr("id");"excludedList"==current?target=$("#assignedList"):"assignedList"==current&&(target=$("#excludedList")),"undefined"!=typeof target&&(target.append(this),this.scrollIntoView())}var timeout,$search=$("#tt-filter"),$list=$("#assignedList"),liveSearch=function(){var pattern=$search.val();clearTimeout(timeout),timeout=setTimeout(function(){filterList(new RegExp(pattern),$list)},300)},filterList=function(regex,list){list.children().each(function(index,element){null===$(element).text().match(regex)?$(element).hide():$(element).show()})};return{start:function(){$("#save-tt").click(function(){var excluded=[];$("#excludedList > li").each(function(index){excluded.push($(this).data("uri"))});var assemblyUri=$("input[name=\"assemblyUri\"]").val();$.ajax({url:helpers._url("saveExcluded","DeliveryMgmt","taoDeliveryRdf"),type:"POST",data:{uri:assemblyUri,excluded:JSON.stringify(excluded)},dataType:"json",success:function(response){response.saved&&(feedback().success(__("Selection saved successfully")),section.loadContentBlock(helpers._url("editDelivery","DeliveryMgmt","taoDeliveryRdf"),{uri:assemblyUri}))}})}),$("#assignedList > li").click(switchList),$("#excludedList > li").click(switchList),$("#close-tt").click(function(){$("#testtaker-form").modal("close")}),$search.keyup(liveSearch).siblings(".ctrl").click(liveSearch)}}}),define("taoDeliveryRdf/util/providers/testsProvider",["jquery","i18n","util/url"],function($,__,urlUtils){"use strict";var providers={listTests(data){return new Promise(function(resolve,reject){$.ajax({url:urlUtils.route("getAvailableTests","DeliveryMgmt","taoDeliveryRdf"),data:{q:data.q,page:data.page},type:"GET",dataType:"JSON"}).done(function(tests){tests?resolve(tests):reject(new Error(__("Unable to load tests")))}).fail(function(){reject(new Error(__("Unable to load tests")))})})}};return providers}),define("taoDeliveryRdf/util/forms/deliveryFormHelper",["jquery","i18n","ui/filter","ui/feedback","layout/actions","ui/taskQueue/taskQueue","ui/taskQueueButton/standardButton"],function($,__,filterFactory,feedback,actionManager,taskQueue,taskCreationButtonFactory){"use strict";const refreshTree=function refreshTree(uriResource){actionManager.trigger("refresh",{uri:uriResource})};return{createSelectorInput(_ref){let{$filterContainer,$inputElement,taskButton,dataProvider,inputPlaceholder=__("Select the test you want to publish to the test-takers"),inputLabel=__("Select the test")}=_ref;return filterFactory($filterContainer,{placeholder:inputPlaceholder,label:inputLabel,width:"64%",quietMillis:1e3}).on("change",function(selection){$inputElement.val(selection),selection?taskButton.enable():taskButton.disable()}).on("request",function(params){dataProvider.list(params.data).then(function(data){params.success(data)}).catch(function(err){params.error(err),feedback().error(err)})}).render("<%- text %>")},replaceSubmitWithTaskButton(_ref2){let{$form,$reportContainer,buttonTitle=__("Publish the test"),buttonLabel=__("Publish")}=_ref2;const $oldSubmitter=$form.find(".form-submitter"),taskCreationButton=taskCreationButtonFactory({type:"info",icon:"delivery",title:buttonTitle,label:buttonLabel,taskQueue:taskQueue,taskCreationUrl:$form.prop("action"),taskCreationData:function getTaskCreationData(){return $form.serializeArray()},taskReportContainer:$reportContainer}).on("finished",function(result){result&&result.task&&result.task.report&&Array.isArray(result.task.report.children)&&result.task.report.children.length&&result.task.report.children[0]&&(result.task.report.children[0].data&&result.task.report.children[0].data.uriResource?(feedback().info(__("%s completed",result.task.taskLabel),{encodeHtml:!1}),refreshTree(result.task.report.children[0].data.uriResource)):this.displayReport(result.task.report.children[0],__("Error")))}).on("continue",function(){refreshTree()}).on("error",function(err){feedback().error(err),this.trigger("finished")}).render($oldSubmitter.closest(".form-toolbar")).disable();return $oldSubmitter.replaceWith(taskCreationButton.getElement()),taskCreationButton},setupTaoLocalForm($form,providers){const $reportContainer=$form.closest(".content-block"),$filterContainer=$(".test-select-container",$form),$inputElement=$("#test",$form),taskButton=this.replaceSubmitWithTaskButton({$form,$reportContainer});this.createSelectorInput({$filterContainer,$inputElement,taskButton,dataProvider:{list:providers.listTests}})}}}),define("taoDeliveryRdf/controller/DeliveryMgmt/wizard",["jquery","taoDeliveryRdf/util/providers/testsProvider","taoDeliveryRdf/util/forms/deliveryFormHelper","css!taoDeliveryRdfCss/delivery-rdf.css"],function($,testsProvider,deliveryFormHelper){"use strict";return{start(){const $form=$("#simpleWizard");deliveryFormHelper.setupTaoLocalForm($form,testsProvider)}}}),define("taoDeliveryRdf/controller/Publish/index",["jquery","i18n","util/url","layout/actions","provider/resources","ui/destination/selector","ui/feedback","ui/taskQueue/taskQueue"],function($,__,urlHelper,actionManager,resourceProviderFactory,destinationSelectorFactory,feedback,taskQueue){"use strict";var refreshTree=function refreshTree(uriResource){actionManager.trigger("refresh",{uri:uriResource})};return{start:function start(){var $container=$(".selector-container"),testUri=$container.data("test"),testLabel=$container.data("label"),resourceProvider=resourceProviderFactory();destinationSelectorFactory($container,{title:__("Publish \"%s\" to",testLabel),actionName:__("Publish"),icon:"delivery",taskQueue:taskQueue,taskCreationData:{testUri:testUri},taskCreationUrl:urlHelper.route("publish","Publish","taoDeliveryRdf"),classUri:$container.data("root-class")}).on("query",function(params){var self=this;params.classOnly=!0,resourceProvider.getResources(params,!0).then(function(resources){self.update(resources,params)}).catch(function(err){self.trigger("error",err)})}).on("finished",function(result,button){result.task&&result.task.report&&Array.isArray(result.task.report.children)&&result.task.report.children.length&&result.task.report.children[0]&&(result.task.report.children[0].data&&result.task.report.children[0].data.uriResource?(feedback().info(__("%s completed",result.task.taskLabel),{encodeHtml:!1}),refreshTree(result.task.report.children[0].data.uriResource)):button.displayReport(result.task.report.children[0],__("Error")))}).on("continue",function(){refreshTree(testUri)}).on("error",function(err){err&&err.errorMsg&&(err=err.errorMsg),feedback().error(err)})}}}),define("taoDeliveryRdf/controller/routes",[],function(){"use strict";return{DeliveryMgmt:{actions:{editDelivery:"controller/DeliveryMgmt/editDelivery",excludeTesttaker:"controller/DeliveryMgmt/testtaker",wizard:"controller/DeliveryMgmt/wizard"}},Publish:{actions:{index:"controller/Publish/index"}}}}),function(c){var d=document,a="appendChild",i="styleSheet",s=d.createElement("style");s.type="text/css",d.getElementsByTagName("head")[0].appendChild(s),s.styleSheet?s.styleSheet.cssText=c:s.appendChild(d.createTextNode(c))}(".delivery-headings h3{margin-bottom:5px}.delivery-headings h2{margin-bottom:5px}.delivery-headings .label{font-weight:bold}.delivery-headings .label:not(:first-child){margin-left:1em}.xhtml_form .form-toolbar .loading-button{float:right}.ttlist{overflow:auto}.ttlist li{cursor:pointer;border-bottom:1px solid #ddd;padding:3px;background:#f9f8f7}.ttlist li:hover{color:#fff;background:rgba(14,93,145,.8)}.filter-div{text-align:right;position:relative;background:#ddd;padding:1px}.filter-div input{display:block;width:calc(100% - 14px);padding:6px;font-size:14px;font-size:1.4rem;max-width:none}.filter-div span{position:absolute;right:10px;top:8px;opacity:.3}#assignedList,#excludedList{height:267px;border:1px solid #ddd;border-radius:2px;-webkit-border-radius:2px}#assignedList li,#excludedList li{line-height:1.4}#assignedList li .arrow:before,#excludedList li .arrow:before{font-family:\"tao\" !important;speak:never;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\uE60F\"}#assignedList li .arrow{float:right;margin-right:5px}#excludedList{margin-top:43px}#excludedList li .arrow{float:left;margin-left:5px;margin-right:10px}\n\n/*# sourceMappingURL=../../../taoDeliveryRdf/views/css/delivery-rdf.css.map */"),define("taoDeliveryRdf/loader/taoDeliveryRdf.bundle",function(){}); //# sourceMappingURL=taoDeliveryRdf.min.js.map \ No newline at end of file diff --git a/views/js/loader/taoDeliveryRdf.min.js.map b/views/js/loader/taoDeliveryRdf.min.js.map index c484a202..2c0aa5bb 100644 --- a/views/js/loader/taoDeliveryRdf.min.js.map +++ b/views/js/loader/taoDeliveryRdf.min.js.map @@ -1 +1 @@ -{"version":3,"names":["define","$","urlUtil","start","click","delivery","data","load","route","uri","prepend","modal","__","helpers","module","section","feedback","switchList","target","current","parent","attr","append","scrollIntoView","timeout","$search","$list","liveSearch","pattern","val","clearTimeout","setTimeout","filterList","RegExp","regex","list","children","each","index","element","text","match","hide","show","excluded","push","assemblyUri","ajax","url","_url","type","JSON","stringify","dataType","success","response","saved","loadContentBlock","keyup","siblings","urlUtils","providers","listTests","Promise","resolve","reject","q","page","done","tests","Error","fail","_","filterFactory","actionManager","taskQueue","taskCreationButtonFactory","refreshTree","uriResource","trigger","createSelectorInput","_ref","$filterContainer","$inputElement","taskButton","dataProvider","inputPlaceholder","inputLabel","placeholder","label","width","quietMillis","on","selection","enable","disable","params","then","catch","err","error","render","replaceSubmitWithTaskButton","_ref2","$form","$reportContainer","buttonTitle","buttonLabel","$oldSubmitter","find","taskCreationButton","icon","title","taskCreationUrl","prop","taskCreationData","getTaskCreationData","serializeArray","taskReportContainer","result","task","report","isArray","length","info","taskLabel","encodeHtml","displayReport","closest","replaceWith","getElement","setupTaoLocalForm","testsProvider","deliveryFormHelper","urlHelper","resourceProviderFactory","destinationSelectorFactory","$container","testUri","testLabel","resourceProvider","actionName","classUri","self","classOnly","getResources","resources","update","button","errorMsg","DeliveryMgmt","actions","editDelivery","excludeTesttaker","wizard","Publish","c","d","document","a","i","s","createElement","getElementsByTagName","appendChild","styleSheet","cssText","createTextNode"],"sources":["css!taoDeliveryRdfCss/delivery-rdf","../controller/DeliveryMgmt/editDelivery.js","../controller/DeliveryMgmt/testtaker.js","../util/providers/testsProvider.js","../util/forms/deliveryFormHelper.js","../controller/DeliveryMgmt/wizard.js","../controller/Publish/index.js","../controller/routes.js","onLayerEnd0.js","module-create.js"],"sourcesContent":["\ndefine('css!taoDeliveryRdfCss/delivery-rdf',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n *\n */\ndefine('taoDeliveryRdf/controller/DeliveryMgmt/editDelivery',[\n 'jquery',\n 'util/url',\n 'ui/modal',\n 'css!taoDeliveryRdfCss/delivery-rdf.css'\n], function ($, urlUtil) {\n 'use strict';\n\n return {\n start(){\n $('#exclude-btn').click(function() {\n const delivery = $(this).data('delivery');\n\n $('#testtaker-form').load(\n urlUtil.route('excludeTesttaker', 'DeliveryMgmt', 'taoDeliveryRdf', {'uri' : delivery}),\n () => {\n $('body').prepend($('#modal-container'));\n $('#testtaker-form').modal();\n }\n );\n });\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2013 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n *\n */\ndefine('taoDeliveryRdf/controller/DeliveryMgmt/testtaker',['jquery', 'i18n', 'helpers', 'module', 'layout/section', 'ui/feedback'], \nfunction ($, __, helpers, module, section, feedback) {\n 'use strict';\n\n\tfunction switchList() {\n\t\tvar current = $(this).parent().attr('id');\n var target; \n\t\tif (current == 'excludedList') {\n\t\t\ttarget = $('#assignedList'); \n\t\t} else if (current == 'assignedList') {\n\t\t\ttarget = $('#excludedList');\n\t\t}\n\t\tif (typeof target !== 'undefined') {\n\t\t\ttarget.append(this);\n\t\t\tthis.scrollIntoView();\n\t\t}\n\t}\n\t\n\tvar $search = $('#tt-filter');\n var $list = $('#assignedList');\n var timeout;\n \n var liveSearch = function(){\n var pattern = $search.val();\n clearTimeout(timeout);\n timeout = setTimeout(function(){\n \tfilterList(new RegExp(pattern), $list);\n }, 300);\n };\n \n var filterList = function(regex, list) {\n \tlist.children().each(function(index, element) {\n \t\tif ($(element).text().match(regex) === null) {\n \t\t\t$(element).hide();\n \t\t} else {\n \t\t\t$(element).show();\n \t\t}\n \t});\n };\n\t\n return {\n start : function(){\n\t $('#save-tt').click(function() {\n\t \tvar excluded = [];\n\t \t$('#excludedList > li').each(function(index) {\n\t \t\texcluded.push($(this).data('uri'));\n\t \t});\n\t \tvar assemblyUri = $('input[name=\"assemblyUri\"]').val();\n\t \t$.ajax({\n\t \t\turl: helpers._url('saveExcluded', 'DeliveryMgmt', 'taoDeliveryRdf'),\n\t\t\t\t\ttype: \"POST\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\turi: assemblyUri,\n\t\t\t\t\t\texcluded: JSON.stringify(excluded)\n\t\t\t\t\t},\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tif (response.saved) {\n feedback().success(__('Selection saved successfully'));\n section.loadContentBlock(helpers._url('editDelivery', 'DeliveryMgmt', 'taoDeliveryRdf'), {uri: assemblyUri});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t });\n \t$('#assignedList > li').click(switchList);\n \t$('#excludedList > li').click(switchList);\n \t\n \t$('#close-tt').click(function() {\n \t\t$('#testtaker-form').modal('close');\n \t});\n \n //trigger the search on keyp and on the magnifer button click\n $search.keyup(liveSearch).siblings('.ctrl').click(liveSearch);\n \t\n }\n };\n});\n\n\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\n/**\n * @author Martin Nicholson \n */\ndefine('taoDeliveryRdf/util/providers/testsProvider',[\n 'jquery',\n 'i18n',\n 'util/url'\n], function ($, __, urlUtils) {\n 'use strict';\n\n var providers = {\n /**\n * List available tests\n * @param {Object} data\n * @returns {Promise}\n */\n listTests(data) {\n return new Promise(function (resolve, reject) {\n $.ajax({\n url: urlUtils.route('getAvailableTests', 'DeliveryMgmt', 'taoDeliveryRdf'),\n data: {\n q: data.q,\n page: data.page\n },\n type: 'GET',\n dataType: 'JSON'\n }).done(function (tests) {\n if (tests) {\n resolve(tests);\n } else {\n reject(new Error(__('Unable to load tests')));\n }\n }).fail(function () {\n reject(new Error(__('Unable to load tests')));\n });\n });\n }\n };\n\n return providers;\n\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\n/**\n * @author Martin Nicholson \n */\ndefine('taoDeliveryRdf/util/forms/deliveryFormHelper',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/filter',\n 'ui/feedback',\n 'layout/actions',\n 'ui/taskQueue/taskQueue',\n 'ui/taskQueueButton/standardButton'\n], function ($, _, __, filterFactory, feedback, actionManager, taskQueue, taskCreationButtonFactory) {\n 'use strict';\n\n /**\n * wrapped the old jstree API used to refresh the tree and optionally select a resource\n * @param {String} [uriResource] - the uri resource node to be selected\n */\n const refreshTree = function refreshTree(uriResource){\n actionManager.trigger('refresh', {\n uri : uriResource\n });\n };\n\n return {\n /**\n * Enhances a hidden form field, rendering a text input with filter, autocomplete and dropdown\n * @param {Object} options\n * @param {jQuery} options.$filterContainer\n * @param {jQuery} options.$inputElement\n * @param {taskQueueButton} options.taskButton - button which submits the form\n * @param {Function} options.dataProvider - provider function which returns a Promise\n * @param {String} options.inputPlaceholder\n * @param {String} options.inputLabel\n * @returns {filter} component which manages the form input\n */\n createSelectorInput({\n $filterContainer,\n $inputElement,\n taskButton,\n dataProvider,\n inputPlaceholder = __('Select the test you want to publish to the test-takers'),\n inputLabel = __('Select the test')\n }) {\n return filterFactory($filterContainer, {\n placeholder: inputPlaceholder,\n label: inputLabel,\n width: '64%',\n quietMillis: 1000\n })\n .on('change', function(selection) {\n $inputElement.val(selection);\n if (selection) {\n taskButton.enable();\n } else {\n taskButton.disable();\n }\n })\n .on('request', function(params) {\n dataProvider\n .list(params.data)\n .then(function(data) {\n params.success(data);\n })\n .catch(function(err) {\n params.error(err);\n feedback().error(err);\n });\n })\n .render('<%- text %>');\n },\n\n /**\n * Replaces rendered submit input with a button that sends a task to taskQueue over AJAX\n * @param {Object} options\n * @param {jQuery} options.$form\n * @param {jQuery} options.$reportContainer\n * @param {Object} options.buttonTitle\n * @param {Object} options.buttonLabel\n * @returns {taskQueueButton}\n */\n replaceSubmitWithTaskButton({\n $form,\n $reportContainer,\n buttonTitle = __('Publish the test'),\n buttonLabel = __('Publish')\n }) {\n //find the old submitter\n const $oldSubmitter = $form.find('.form-submitter');\n //prepare the new component\n const taskCreationButton = taskCreationButtonFactory({\n type : 'info',\n icon : 'delivery',\n title : buttonTitle,\n label : buttonLabel,\n taskQueue : taskQueue,\n taskCreationUrl : $form.prop('action'),\n taskCreationData : function getTaskCreationData(){\n return $form.serializeArray();\n },\n taskReportContainer : $reportContainer\n })\n .on('finished', function(result){\n if (result\n && result.task\n && result.task.report\n && _.isArray(result.task.report.children)\n && result.task.report.children.length\n && result.task.report.children[0]) {\n if(result.task.report.children[0].data\n && result.task.report.children[0].data.uriResource){\n feedback().info(__('%s completed', result.task.taskLabel), { encodeHtml: false });\n refreshTree(result.task.report.children[0].data.uriResource);\n }else{\n this.displayReport(result.task.report.children[0], __('Error'));\n }\n }\n })\n .on('continue', function(){\n refreshTree();\n })\n .on('error', function(err){\n //format and display error message to user\n feedback().error(err);\n this.trigger('finished');\n })\n .render($oldSubmitter.closest('.form-toolbar'))\n .disable();\n\n //replace the old submitter with the new one\n $oldSubmitter.replaceWith(taskCreationButton.getElement());\n\n return taskCreationButton;\n },\n\n /**\n * Set up the wizard form for publishing a TAO Local delivery\n * @param {jQuery} $form\n * @param {Object} providers - contains function(s) for fetching data\n */\n setupTaoLocalForm($form, providers) {\n const $reportContainer = $form.closest('.content-block');\n const $filterContainer = $('.test-select-container', $form);\n const $inputElement = $('#test', $form);\n\n // Replace submit button with taskQueue requester\n const taskButton = this.replaceSubmitWithTaskButton({\n $form,\n $reportContainer\n });\n\n // Enhanced selector input for tests:\n this.createSelectorInput({\n $filterContainer,\n $inputElement,\n taskButton,\n dataProvider: {\n list: providers.listTests\n }\n });\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\n/**\n * @author Martin Nicholson \n */\ndefine('taoDeliveryRdf/controller/DeliveryMgmt/wizard',[\n 'jquery',\n 'taoDeliveryRdf/util/providers/testsProvider',\n 'taoDeliveryRdf/util/forms/deliveryFormHelper',\n 'css!taoDeliveryRdfCss/delivery-rdf.css'\n], function ($, testsProvider, deliveryFormHelper) {\n 'use strict';\n\n return {\n start() {\n const $form = $('#simpleWizard');\n deliveryFormHelper.setupTaoLocalForm($form, testsProvider);\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\ndefine('taoDeliveryRdf/controller/Publish/index',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'util/url',\n 'layout/actions',\n 'provider/resources',\n 'ui/destination/selector',\n 'ui/feedback',\n 'ui/taskQueue/taskQueue'\n], function ($, _, __, urlHelper, actionManager, resourceProviderFactory, destinationSelectorFactory, feedback, taskQueue) {\n 'use strict';\n\n /**\n * wrapped the old jstree API used to refresh the tree and optionally select a resource\n * @param {String} [uriResource] - the uri resource node to be selected\n */\n var refreshTree = function refreshTree(uriResource){\n actionManager.trigger('refresh', {\n uri : uriResource\n });\n };\n\n return {\n start : function start() {\n\n var $container = $('.selector-container');\n var testUri = $container.data('test');\n var testLabel = $container.data('label');\n\n //get the resource provider configured with the action URL\n var resourceProvider = resourceProviderFactory();\n\n //set up a destination selector\n destinationSelectorFactory($container, {\n title : __('Publish \"%s\" to', testLabel),\n actionName : __('Publish'),\n icon : 'delivery',\n taskQueue : taskQueue,\n taskCreationData : {testUri : testUri},\n taskCreationUrl : urlHelper.route('publish', 'Publish', 'taoDeliveryRdf'),\n classUri: $container.data('root-class')\n })\n .on('query', function(params) {\n var self = this;\n\n //asks only classes\n params.classOnly = true;\n resourceProvider\n .getResources(params, true)\n .then(function(resources){\n //ask the server the resources from the component query\n self.update(resources, params);\n })\n .catch(function(err){\n self.trigger('error', err);\n });\n })\n .on('finished', function (result, button) {\n if (result.task\n && result.task.report\n && _.isArray(result.task.report.children)\n && result.task.report.children.length\n && result.task.report.children[0]) {\n if (result.task.report.children[0].data\n && result.task.report.children[0].data.uriResource) {\n feedback().info(__('%s completed', result.task.taskLabel), { encodeHtml: false });\n\n //TODO: redirect to the newly compiled delivery when TAO-5746 is merged\n refreshTree(result.task.report.children[0].data.uriResource);\n } else {\n button.displayReport(result.task.report.children[0], __('Error'));\n }\n }\n })\n .on('continue', function(){\n refreshTree(testUri);\n })\n .on('error', function(err){\n if (err && err.errorMsg) {\n err = err.errorMsg;\n }\n feedback().error(err);\n });\n }\n };\n});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014-2017 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n *\n */\n\n//@see http://forge.taotesting.com/projects/tao/wiki/Front_js\ndefine('taoDeliveryRdf/controller/routes',[],function(){\n 'use strict';\n\n return {\n 'DeliveryMgmt': {\n 'actions' : {\n 'editDelivery' : 'controller/DeliveryMgmt/editDelivery',\n 'excludeTesttaker' : 'controller/DeliveryMgmt/testtaker',\n 'wizard' : 'controller/DeliveryMgmt/wizard'\n }\n },\n 'Publish': {\n 'actions' : {\n 'index' : 'controller/Publish/index'\n }\n }\n };\n});\n\n","\n(function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})\n('.delivery-headings h3{margin-bottom:5px}.delivery-headings h2{margin-bottom:5px}.delivery-headings .label{font-weight:bold}.delivery-headings .label:not(:first-child){margin-left:1em}.xhtml_form .form-toolbar .loading-button{float:right}.ttlist{overflow:auto}.ttlist li{cursor:pointer;border-bottom:1px solid #ddd;padding:3px;background:#f9f8f7}.ttlist li:hover{color:#fff;background:rgba(14,93,145,.8)}.filter-div{text-align:right;position:relative;background:#ddd;padding:1px}.filter-div input{display:block;width:calc(100% - 14px);padding:6px;font-size:14px;font-size:1.4rem;max-width:none}.filter-div span{position:absolute;right:10px;top:8px;opacity:.3}#assignedList,#excludedList{height:267px;border:1px solid #ddd;border-radius:2px;-webkit-border-radius:2px}#assignedList li,#excludedList li{line-height:1.4}#assignedList li .arrow:before,#excludedList li .arrow:before{font-family:\\\"tao\\\" !important;speak:never;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\\\"\\\"}#assignedList li .arrow{float:right;margin-right:5px}#excludedList{margin-top:43px}#excludedList li .arrow{float:left;margin-left:5px;margin-right:10px}\\n\\n/*# sourceMappingURL=../../../taoDeliveryRdf/views/css/delivery-rdf.css.map */');\n","\ndefine(\"taoDeliveryRdf/loader/taoDeliveryRdf.bundle\", function(){});\n"],"mappings":"AACAA,MAAA,uDCkBAA,MAAA,wDACA,SACA,WACA,WACA,yCACA,UAAAC,CAAA,CAAAC,OAAA,EACA,aAEA,OACAC,MAAA,EACAF,CAAA,iBAAAG,KAAA,YACA,MAAAC,QAAA,CAAAJ,CAAA,OAAAK,IAAA,aAEAL,CAAA,oBAAAM,IAAA,CACAL,OAAA,CAAAM,KAAA,qDAAAC,GAAA,CAAAJ,QAAA,GACA,KACAJ,CAAA,SAAAS,OAAA,CAAAT,CAAA,sBACAA,CAAA,oBAAAU,KAAA,EACA,CACA,CACA,EACA,CACA,CACA,GCvBAX,MAAA,wHACA,SAAAC,CAAA,CAAAW,EAAA,CAA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OAAA,EACAJ,OAAA,EACAjH,KAAA,2BACA,CACA,CACA,CACA,GCrCA,SAAAsH,CAAA,MAAAC,CAAA,CAAAC,QAAA,CAAAC,CAAA,eAAAC,CAAA,cAAAC,CAAA,CAAAJ,CAAA,CAAAK,aAAA,UAAAD,CAAA,CAAA/G,IAAA,YAAA2G,CAAA,CAAAM,oBAAA,YAAAC,WAAA,CAAAH,CAAA,EAAAA,CAAA,CAAAI,UAAA,CAAAJ,CAAA,CAAAI,UAAA,CAAAC,OAAA,CAAAV,CAAA,CAAAK,CAAA,CAAAG,WAAA,CAAAP,CAAA,CAAAU,cAAA,CAAAX,CAAA,IACA,uxCCDA5J,MAAA"} \ No newline at end of file +{"version":3,"names":["define","$","urlUtil","start","click","delivery","data","load","route","uri","prepend","modal","__","helpers","module","section","feedback","switchList","target","current","parent","attr","append","scrollIntoView","timeout","$search","$list","liveSearch","pattern","val","clearTimeout","setTimeout","filterList","RegExp","regex","list","children","each","index","element","text","match","hide","show","excluded","push","assemblyUri","ajax","url","_url","type","JSON","stringify","dataType","success","response","saved","loadContentBlock","keyup","siblings","urlUtils","providers","listTests","Promise","resolve","reject","q","page","done","tests","Error","fail","filterFactory","actionManager","taskQueue","taskCreationButtonFactory","refreshTree","uriResource","trigger","createSelectorInput","_ref","$filterContainer","$inputElement","taskButton","dataProvider","inputPlaceholder","inputLabel","placeholder","label","width","quietMillis","on","selection","enable","disable","params","then","catch","err","error","render","replaceSubmitWithTaskButton","_ref2","$form","$reportContainer","buttonTitle","buttonLabel","$oldSubmitter","find","taskCreationButton","icon","title","taskCreationUrl","prop","taskCreationData","getTaskCreationData","serializeArray","taskReportContainer","result","task","report","Array","isArray","length","info","taskLabel","encodeHtml","displayReport","closest","replaceWith","getElement","setupTaoLocalForm","testsProvider","deliveryFormHelper","urlHelper","resourceProviderFactory","destinationSelectorFactory","$container","testUri","testLabel","resourceProvider","actionName","classUri","self","classOnly","getResources","resources","update","button","errorMsg","DeliveryMgmt","actions","editDelivery","excludeTesttaker","wizard","Publish","c","d","document","a","i","s","createElement","getElementsByTagName","appendChild","styleSheet","cssText","createTextNode"],"sources":["css!taoDeliveryRdfCss/delivery-rdf","../controller/DeliveryMgmt/editDelivery.js","../controller/DeliveryMgmt/testtaker.js","../util/providers/testsProvider.js","../util/forms/deliveryFormHelper.js","../controller/DeliveryMgmt/wizard.js","../controller/Publish/index.js","../controller/routes.js","onLayerEnd0.js","module-create.js"],"sourcesContent":["\ndefine('css!taoDeliveryRdfCss/delivery-rdf',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n *\n */\ndefine('taoDeliveryRdf/controller/DeliveryMgmt/editDelivery',[\n 'jquery',\n 'util/url',\n 'ui/modal',\n 'css!taoDeliveryRdfCss/delivery-rdf.css'\n], function ($, urlUtil) {\n 'use strict';\n\n return {\n start(){\n $('#exclude-btn').click(function() {\n const delivery = $(this).data('delivery');\n\n $('#testtaker-form').load(\n urlUtil.route('excludeTesttaker', 'DeliveryMgmt', 'taoDeliveryRdf', {'uri' : delivery}),\n () => {\n $('body').prepend($('#modal-container'));\n $('#testtaker-form').modal();\n }\n );\n });\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2013 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n *\n */\ndefine('taoDeliveryRdf/controller/DeliveryMgmt/testtaker',['jquery', 'i18n', 'helpers', 'module', 'layout/section', 'ui/feedback'], \nfunction ($, __, helpers, module, section, feedback) {\n 'use strict';\n\n\tfunction switchList() {\n\t\tvar current = $(this).parent().attr('id');\n var target; \n\t\tif (current == 'excludedList') {\n\t\t\ttarget = $('#assignedList'); \n\t\t} else if (current == 'assignedList') {\n\t\t\ttarget = $('#excludedList');\n\t\t}\n\t\tif (typeof target !== 'undefined') {\n\t\t\ttarget.append(this);\n\t\t\tthis.scrollIntoView();\n\t\t}\n\t}\n\t\n\tvar $search = $('#tt-filter');\n var $list = $('#assignedList');\n var timeout;\n \n var liveSearch = function(){\n var pattern = $search.val();\n clearTimeout(timeout);\n timeout = setTimeout(function(){\n \tfilterList(new RegExp(pattern), $list);\n }, 300);\n };\n \n var filterList = function(regex, list) {\n \tlist.children().each(function(index, element) {\n \t\tif ($(element).text().match(regex) === null) {\n \t\t\t$(element).hide();\n \t\t} else {\n \t\t\t$(element).show();\n \t\t}\n \t});\n };\n\t\n return {\n start : function(){\n\t $('#save-tt').click(function() {\n\t \tvar excluded = [];\n\t \t$('#excludedList > li').each(function(index) {\n\t \t\texcluded.push($(this).data('uri'));\n\t \t});\n\t \tvar assemblyUri = $('input[name=\"assemblyUri\"]').val();\n\t \t$.ajax({\n\t \t\turl: helpers._url('saveExcluded', 'DeliveryMgmt', 'taoDeliveryRdf'),\n\t\t\t\t\ttype: \"POST\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\turi: assemblyUri,\n\t\t\t\t\t\texcluded: JSON.stringify(excluded)\n\t\t\t\t\t},\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tif (response.saved) {\n feedback().success(__('Selection saved successfully'));\n section.loadContentBlock(helpers._url('editDelivery', 'DeliveryMgmt', 'taoDeliveryRdf'), {uri: assemblyUri});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t });\n \t$('#assignedList > li').click(switchList);\n \t$('#excludedList > li').click(switchList);\n \t\n \t$('#close-tt').click(function() {\n \t\t$('#testtaker-form').modal('close');\n \t});\n \n //trigger the search on keyp and on the magnifer button click\n $search.keyup(liveSearch).siblings('.ctrl').click(liveSearch);\n \t\n }\n };\n});\n\n\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\n/**\n * @author Martin Nicholson \n */\ndefine('taoDeliveryRdf/util/providers/testsProvider',[\n 'jquery',\n 'i18n',\n 'util/url'\n], function ($, __, urlUtils) {\n 'use strict';\n\n var providers = {\n /**\n * List available tests\n * @param {Object} data\n * @returns {Promise}\n */\n listTests(data) {\n return new Promise(function (resolve, reject) {\n $.ajax({\n url: urlUtils.route('getAvailableTests', 'DeliveryMgmt', 'taoDeliveryRdf'),\n data: {\n q: data.q,\n page: data.page\n },\n type: 'GET',\n dataType: 'JSON'\n }).done(function (tests) {\n if (tests) {\n resolve(tests);\n } else {\n reject(new Error(__('Unable to load tests')));\n }\n }).fail(function () {\n reject(new Error(__('Unable to load tests')));\n });\n });\n }\n };\n\n return providers;\n\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\n/**\n * @author Martin Nicholson \n */\ndefine('taoDeliveryRdf/util/forms/deliveryFormHelper',[\n 'jquery',\n 'i18n',\n 'ui/filter',\n 'ui/feedback',\n 'layout/actions',\n 'ui/taskQueue/taskQueue',\n 'ui/taskQueueButton/standardButton'\n], function ($, __, filterFactory, feedback, actionManager, taskQueue, taskCreationButtonFactory) {\n 'use strict';\n\n /**\n * wrapped the old jstree API used to refresh the tree and optionally select a resource\n * @param {String} [uriResource] - the uri resource node to be selected\n */\n const refreshTree = function refreshTree(uriResource){\n actionManager.trigger('refresh', {\n uri : uriResource\n });\n };\n\n return {\n /**\n * Enhances a hidden form field, rendering a text input with filter, autocomplete and dropdown\n * @param {Object} options\n * @param {jQuery} options.$filterContainer\n * @param {jQuery} options.$inputElement\n * @param {taskQueueButton} options.taskButton - button which submits the form\n * @param {Function} options.dataProvider - provider function which returns a Promise\n * @param {String} options.inputPlaceholder\n * @param {String} options.inputLabel\n * @returns {filter} component which manages the form input\n */\n createSelectorInput({\n $filterContainer,\n $inputElement,\n taskButton,\n dataProvider,\n inputPlaceholder = __('Select the test you want to publish to the test-takers'),\n inputLabel = __('Select the test')\n }) {\n return filterFactory($filterContainer, {\n placeholder: inputPlaceholder,\n label: inputLabel,\n width: '64%',\n quietMillis: 1000\n })\n .on('change', function(selection) {\n $inputElement.val(selection);\n if (selection) {\n taskButton.enable();\n } else {\n taskButton.disable();\n }\n })\n .on('request', function(params) {\n dataProvider\n .list(params.data)\n .then(function(data) {\n params.success(data);\n })\n .catch(function(err) {\n params.error(err);\n feedback().error(err);\n });\n })\n .render('<%- text %>');\n },\n\n /**\n * Replaces rendered submit input with a button that sends a task to taskQueue over AJAX\n * @param {Object} options\n * @param {jQuery} options.$form\n * @param {jQuery} options.$reportContainer\n * @param {Object} options.buttonTitle\n * @param {Object} options.buttonLabel\n * @returns {taskQueueButton}\n */\n replaceSubmitWithTaskButton({\n $form,\n $reportContainer,\n buttonTitle = __('Publish the test'),\n buttonLabel = __('Publish')\n }) {\n //find the old submitter\n const $oldSubmitter = $form.find('.form-submitter');\n //prepare the new component\n const taskCreationButton = taskCreationButtonFactory({\n type : 'info',\n icon : 'delivery',\n title : buttonTitle,\n label : buttonLabel,\n taskQueue : taskQueue,\n taskCreationUrl : $form.prop('action'),\n taskCreationData : function getTaskCreationData(){\n return $form.serializeArray();\n },\n taskReportContainer : $reportContainer\n })\n .on('finished', function(result){\n if (result\n && result.task\n && result.task.report\n && Array.isArray(result.task.report.children)\n && result.task.report.children.length\n && result.task.report.children[0]) {\n if(result.task.report.children[0].data\n && result.task.report.children[0].data.uriResource){\n feedback().info(__('%s completed', result.task.taskLabel), { encodeHtml: false });\n refreshTree(result.task.report.children[0].data.uriResource);\n }else{\n this.displayReport(result.task.report.children[0], __('Error'));\n }\n }\n })\n .on('continue', function(){\n refreshTree();\n })\n .on('error', function(err){\n //format and display error message to user\n feedback().error(err);\n this.trigger('finished');\n })\n .render($oldSubmitter.closest('.form-toolbar'))\n .disable();\n\n //replace the old submitter with the new one\n $oldSubmitter.replaceWith(taskCreationButton.getElement());\n\n return taskCreationButton;\n },\n\n /**\n * Set up the wizard form for publishing a TAO Local delivery\n * @param {jQuery} $form\n * @param {Object} providers - contains function(s) for fetching data\n */\n setupTaoLocalForm($form, providers) {\n const $reportContainer = $form.closest('.content-block');\n const $filterContainer = $('.test-select-container', $form);\n const $inputElement = $('#test', $form);\n\n // Replace submit button with taskQueue requester\n const taskButton = this.replaceSubmitWithTaskButton({\n $form,\n $reportContainer\n });\n\n // Enhanced selector input for tests:\n this.createSelectorInput({\n $filterContainer,\n $inputElement,\n taskButton,\n dataProvider: {\n list: providers.listTests\n }\n });\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\n/**\n * @author Martin Nicholson \n */\ndefine('taoDeliveryRdf/controller/DeliveryMgmt/wizard',[\n 'jquery',\n 'taoDeliveryRdf/util/providers/testsProvider',\n 'taoDeliveryRdf/util/forms/deliveryFormHelper',\n 'css!taoDeliveryRdfCss/delivery-rdf.css'\n], function ($, testsProvider, deliveryFormHelper) {\n 'use strict';\n\n return {\n start() {\n const $form = $('#simpleWizard');\n deliveryFormHelper.setupTaoLocalForm($form, testsProvider);\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n */\ndefine('taoDeliveryRdf/controller/Publish/index',[\n 'jquery',\n 'i18n',\n 'util/url',\n 'layout/actions',\n 'provider/resources',\n 'ui/destination/selector',\n 'ui/feedback',\n 'ui/taskQueue/taskQueue'\n], function ($, __, urlHelper, actionManager, resourceProviderFactory, destinationSelectorFactory, feedback, taskQueue) {\n 'use strict';\n\n /**\n * wrapped the old jstree API used to refresh the tree and optionally select a resource\n * @param {String} [uriResource] - the uri resource node to be selected\n */\n var refreshTree = function refreshTree(uriResource){\n actionManager.trigger('refresh', {\n uri : uriResource\n });\n };\n\n return {\n start : function start() {\n\n var $container = $('.selector-container');\n var testUri = $container.data('test');\n var testLabel = $container.data('label');\n\n //get the resource provider configured with the action URL\n var resourceProvider = resourceProviderFactory();\n\n //set up a destination selector\n destinationSelectorFactory($container, {\n title : __('Publish \"%s\" to', testLabel),\n actionName : __('Publish'),\n icon : 'delivery',\n taskQueue : taskQueue,\n taskCreationData : {testUri : testUri},\n taskCreationUrl : urlHelper.route('publish', 'Publish', 'taoDeliveryRdf'),\n classUri: $container.data('root-class')\n })\n .on('query', function(params) {\n var self = this;\n\n //asks only classes\n params.classOnly = true;\n resourceProvider\n .getResources(params, true)\n .then(function(resources){\n //ask the server the resources from the component query\n self.update(resources, params);\n })\n .catch(function(err){\n self.trigger('error', err);\n });\n })\n .on('finished', function (result, button) {\n if (result.task\n && result.task.report\n && Array.isArray(result.task.report.children)\n && result.task.report.children.length\n && result.task.report.children[0]) {\n if (result.task.report.children[0].data\n && result.task.report.children[0].data.uriResource) {\n feedback().info(__('%s completed', result.task.taskLabel), { encodeHtml: false });\n\n //TODO: redirect to the newly compiled delivery when TAO-5746 is merged\n refreshTree(result.task.report.children[0].data.uriResource);\n } else {\n button.displayReport(result.task.report.children[0], __('Error'));\n }\n }\n })\n .on('continue', function(){\n refreshTree(testUri);\n })\n .on('error', function(err){\n if (err && err.errorMsg) {\n err = err.errorMsg;\n }\n feedback().error(err);\n });\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program 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 this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014-2017 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n *\n */\n\n//@see http://forge.taotesting.com/projects/tao/wiki/Front_js\ndefine('taoDeliveryRdf/controller/routes',[],function(){\n 'use strict';\n\n return {\n 'DeliveryMgmt': {\n 'actions' : {\n 'editDelivery' : 'controller/DeliveryMgmt/editDelivery',\n 'excludeTesttaker' : 'controller/DeliveryMgmt/testtaker',\n 'wizard' : 'controller/DeliveryMgmt/wizard'\n }\n },\n 'Publish': {\n 'actions' : {\n 'index' : 'controller/Publish/index'\n }\n }\n };\n});\n\n","\n(function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})\n('.delivery-headings h3{margin-bottom:5px}.delivery-headings h2{margin-bottom:5px}.delivery-headings .label{font-weight:bold}.delivery-headings .label:not(:first-child){margin-left:1em}.xhtml_form .form-toolbar .loading-button{float:right}.ttlist{overflow:auto}.ttlist li{cursor:pointer;border-bottom:1px solid #ddd;padding:3px;background:#f9f8f7}.ttlist li:hover{color:#fff;background:rgba(14,93,145,.8)}.filter-div{text-align:right;position:relative;background:#ddd;padding:1px}.filter-div input{display:block;width:calc(100% - 14px);padding:6px;font-size:14px;font-size:1.4rem;max-width:none}.filter-div span{position:absolute;right:10px;top:8px;opacity:.3}#assignedList,#excludedList{height:267px;border:1px solid #ddd;border-radius:2px;-webkit-border-radius:2px}#assignedList li,#excludedList li{line-height:1.4}#assignedList li .arrow:before,#excludedList li .arrow:before{font-family:\\\"tao\\\" !important;speak:never;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\\\"\\\"}#assignedList li .arrow{float:right;margin-right:5px}#excludedList{margin-top:43px}#excludedList li .arrow{float:left;margin-left:5px;margin-right:10px}\\n\\n/*# sourceMappingURL=../../../taoDeliveryRdf/views/css/delivery-rdf.css.map */');\n","\ndefine(\"taoDeliveryRdf/loader/taoDeliveryRdf.bundle\", function(){});\n"],"mappings":"AACAA,MAAA,uDCkBAA,MAAA,wDACA,SACA,WACA,WACA,yCACA,UAAAC,CAAA,CAAAC,OAAA,EACA,aAEA,OACAC,MAAA,EACAF,CAAA,iBAAAG,KAAA,YACA,MAAAC,QAAA,CAAAJ,CAAA,OAAAK,IAAA,aAEAL,CAAA,oBAAAM,IAAA,CACAL,OAAA,CAAAM,KAAA,qDAAAC,GAAA,CAAAJ,QAAA,GACA,KACAJ,CAAA,SAAAS,OAAA,CAAAT,CAAA,sBACAA,CAAA,oBAAAU,KAAA,EACA,CACA,CACA,EACA,CACA,CACA,GCvBAX,MAAA,wHACA,SAAAC,CAAA,CAAAW,EAAA,CAAAC,OAAA,CAAAC,MAAA,CAAAC,OAAA,CAAAC,QAAA,EACA,aAEA,SAAAC,WAAA,KAEA,CAAAC,MAAA,CADAC,OAAA,CAAAlB,CAAA,OAAAmB,MAAA,GAAAC,IAAA,OAEA,gBAAAF,OAAA,CACAD,MAAA,CAAAjB,CAAA,kBACA,gBAAAkB,OAAA,GACAD,MAAA,CAAAjB,CAAA,mBAEA,oBAAAiB,MAAA,GACAA,MAAA,CAAAI,MAAA,OACA,KAAAC,cAAA,GAEA,IAIA,CAAAC,OAAA,CAFAC,OAAA,CAAAxB,CAAA,eACA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MAAA"} \ No newline at end of file diff --git a/views/js/util/forms/deliveryFormHelper.js b/views/js/util/forms/deliveryFormHelper.js index 24a1621e..741f6528 100644 --- a/views/js/util/forms/deliveryFormHelper.js +++ b/views/js/util/forms/deliveryFormHelper.js @@ -21,14 +21,13 @@ */ define([ 'jquery', - 'lodash', 'i18n', 'ui/filter', 'ui/feedback', 'layout/actions', 'ui/taskQueue/taskQueue', 'ui/taskQueueButton/standardButton' -], function ($, _, __, filterFactory, feedback, actionManager, taskQueue, taskCreationButtonFactory) { +], function ($, __, filterFactory, feedback, actionManager, taskQueue, taskCreationButtonFactory) { 'use strict'; /** @@ -123,7 +122,7 @@ define([ if (result && result.task && result.task.report - && _.isArray(result.task.report.children) + && Array.isArray(result.task.report.children) && result.task.report.children.length && result.task.report.children[0]) { if(result.task.report.children[0].data