From bb48dd845d10d562d008596c7e67436cc61aeb72 Mon Sep 17 00:00:00 2001 From: Pawel Korczak Date: Mon, 23 Oct 2023 08:12:13 +0200 Subject: [PATCH 1/4] feature: remove lodash --- views/js/component/results/areaBroker.js | 5 ++--- views/js/component/results/list.js | 12 ++++++------ views/js/controller/inspectResults.js | 10 ++++------ views/js/controller/resultTable.js | 20 ++++++++------------ 4 files changed, 20 insertions(+), 27 deletions(-) diff --git a/views/js/component/results/areaBroker.js b/views/js/component/results/areaBroker.js index 312e4678..a1ff21b0 100644 --- a/views/js/component/results/areaBroker.js +++ b/views/js/component/results/areaBroker.js @@ -19,9 +19,8 @@ * @author Jean-Sébastien Conan */ define([ - 'lodash', 'ui/areaBroker' -], function (_, areaBroker) { +], function (areaBroker) { 'use strict'; var requireAreas = [ @@ -38,5 +37,5 @@ define([ * @returns {broker} the broker * @throws {TypeError} without a valid container */ - return _.partial(areaBroker, requireAreas); + return areaBroker.bind(null, requireAreas); }); diff --git a/views/js/component/results/list.js b/views/js/component/results/list.js index ccedac62..f1911512 100644 --- a/views/js/component/results/list.js +++ b/views/js/component/results/list.js @@ -57,8 +57,8 @@ define([ function pluginRun(method) { var execStack = []; - _.forEach(plugins, function (plugin) { - if (_.isFunction(plugin[method])) { + plugins.forEach(function (plugin) { + if (typeof plugin[method] === 'function') { execStack.push(plugin[method]()); } }); @@ -69,10 +69,10 @@ define([ if (!_.isPlainObject(config)) { throw new TypeError('The configuration is required'); } - if (!_.isString(config.classUri) || !config.classUri) { + if (typeof config.classUri !== 'string' || !config.classUri) { throw new TypeError('The class URI is required'); } - if (!_.isString(config.dataUrl) || !config.dataUrl) { + if (typeof config.dataUrl !== 'string' || !config.dataUrl) { throw new TypeError('The service URL is required'); } if (!_.isPlainObject(config.model) && !_.isArray(config.model)) { @@ -117,7 +117,7 @@ define([ }; } - if (_.isFunction(action)) { + if (typeof action === 'function') { descriptor.action = action; } if (!descriptor.label) { @@ -162,7 +162,7 @@ define([ 'list': $('.list', this.$component) }); - _.forEach(pluginFactories, function (pluginFactory) { + pluginFactories.forEach(function (pluginFactory) { var plugin = pluginFactory(self, areaBroker); plugins[plugin.getName()] = plugin; }); diff --git a/views/js/controller/inspectResults.js b/views/js/controller/inspectResults.js index 2d197f5a..522dbe3d 100644 --- a/views/js/controller/inspectResults.js +++ b/views/js/controller/inspectResults.js @@ -4,7 +4,6 @@ */ define([ 'jquery', - 'lodash', 'i18n', 'module', 'core/logger', @@ -19,7 +18,6 @@ define([ 'ui/taskQueueButton/treeButton' ], function ( $, - _, __, module, loggerFactory, @@ -89,7 +87,7 @@ define([ loadingBar.start(); - _.forEach(config.plugins, function (plugin) { + config.plugins.forEach((plugin) => { if (plugin && plugin.module) { if (plugin.exclude) { resultsPluginsLoader.remove(plugin.module); @@ -129,7 +127,7 @@ define([ }).render($('#results-csv-export')); binder.register('export_csv', function remove(actionContext) { - const data = _.pick(actionContext, ['uri', 'classUri', 'id']); + const data = (({ uri, classUri, id }) => ({ uri, classUri, id }))(actionContext); const uniqueValue = data.uri || data.classUri || ''; taskButton .setTaskConfig({ @@ -148,7 +146,7 @@ define([ }).render($('#results-sql-export')); binder.register('export_sql', function remove(actionContext) { - const data = _.pick(actionContext, ['uri', 'classUri', 'id']); + const data = (({ uri, classUri, id }) => ({ uri, classUri, id }))(actionContext); const uniqueValue = data.uri || data.classUri || ''; taskButtonExportSQL .setTaskConfig({ @@ -160,7 +158,7 @@ define([ } binder.register('open_url', function (actionContext) { - const data = _.pick(actionContext, ['uri', 'classUri', 'id']); + const data = (({ uri, classUri, id }) => ({ uri, classUri, id }))(actionContext); request(this.url, data, 'POST') .then(response => { diff --git a/views/js/controller/resultTable.js b/views/js/controller/resultTable.js index 312018ad..15379faf 100644 --- a/views/js/controller/resultTable.js +++ b/views/js/controller/resultTable.js @@ -121,11 +121,7 @@ define([ }).done(function (response) { if (response && response.columns) { if (action === 'remove') { - columns = _.reject(columns, function (col) { - return _.find(response.columns, function (resCol) { - return _.isEqual(col, resCol); - }); - }); + columns = columns.filter(col => !response.columns.some(resCol => _.isEqual(col, resCol))); } else { if (typeof response.first !== 'undefined' && response.first === true) { columns = response.columns.concat(columns); @@ -134,7 +130,7 @@ define([ } } } - if (_.isFunction(done)) { + if (typeof done === 'function') { done(); } }).always(function () { @@ -150,10 +146,10 @@ define([ var model = []; //set up model from columns - _.forEach(columns, function (col) { + columns.forEach(function (col) { var colId = col.prop ? (col.prop + '_' + col.contextType) : (col.contextId + '_' + col.variableIdentifier); - if(col.columnId){ - colId= col.columnId + if (col.columnId) { + colId = col.columnId; } model.push({ id: colId, @@ -168,7 +164,7 @@ define([ .data('ui.datatable', null) .off('load.datatable') .on('load.datatable', function () { - if (_.isFunction(done)) { + if (typeof done === 'function') { done(); done = ''; } @@ -215,8 +211,8 @@ define([ var url = $elt.data('url'); e.preventDefault(); buildGrid(url, action, function () { - _.forEach(groups[group], function ($btn) { - $btn.toggleClass('hidden'); + groups[group].forEach(function ($btn) { + $btn.classList.toggle('hidden'); }); }); }); From 371f79387981c624b7ebe4c97b2ba9a02e409384 Mon Sep 17 00:00:00 2001 From: Pawel Korczak Date: Thu, 4 Jan 2024 13:43:46 +0100 Subject: [PATCH 2/4] fix: forEach wrong usage --- views/js/controller/inspectResults.js | 4 +++- views/js/controller/resultTable.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/views/js/controller/inspectResults.js b/views/js/controller/inspectResults.js index 522dbe3d..e4e62196 100644 --- a/views/js/controller/inspectResults.js +++ b/views/js/controller/inspectResults.js @@ -4,6 +4,7 @@ */ define([ 'jquery', + 'lodash', 'i18n', 'module', 'core/logger', @@ -18,6 +19,7 @@ define([ 'ui/taskQueueButton/treeButton' ], function ( $, + _, __, module, loggerFactory, @@ -87,7 +89,7 @@ define([ loadingBar.start(); - config.plugins.forEach((plugin) => { + _.forEach(config.plugins, function (plugin) { if (plugin && plugin.module) { if (plugin.exclude) { resultsPluginsLoader.remove(plugin.module); diff --git a/views/js/controller/resultTable.js b/views/js/controller/resultTable.js index 15379faf..1ff98721 100644 --- a/views/js/controller/resultTable.js +++ b/views/js/controller/resultTable.js @@ -146,7 +146,7 @@ define([ var model = []; //set up model from columns - columns.forEach(function (col) { + _.forEach(columns, function (col) { var colId = col.prop ? (col.prop + '_' + col.contextType) : (col.contextId + '_' + col.variableIdentifier); if (col.columnId) { colId = col.columnId; From 5faedf13a01d3430a5125d3fa79dd9ce819ebf66 Mon Sep 17 00:00:00 2001 From: Pawel Korczak Date: Tue, 30 Jan 2024 12:37:33 +0100 Subject: [PATCH 3/4] fix: user lodash forEach --- views/js/component/results/list.js | 4 ++-- views/js/controller/resultTable.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/views/js/component/results/list.js b/views/js/component/results/list.js index f1911512..4a3e6fb1 100644 --- a/views/js/component/results/list.js +++ b/views/js/component/results/list.js @@ -57,7 +57,7 @@ define([ function pluginRun(method) { var execStack = []; - plugins.forEach(function (plugin) { + _.forEach(plugins, function (plugin) { if (typeof plugin[method] === 'function') { execStack.push(plugin[method]()); } @@ -162,7 +162,7 @@ define([ 'list': $('.list', this.$component) }); - pluginFactories.forEach(function (pluginFactory) { + _.forEach(pluginFactories, function (pluginFactory) { var plugin = pluginFactory(self, areaBroker); plugins[plugin.getName()] = plugin; }); diff --git a/views/js/controller/resultTable.js b/views/js/controller/resultTable.js index 1ff98721..0f3d8a3f 100644 --- a/views/js/controller/resultTable.js +++ b/views/js/controller/resultTable.js @@ -211,8 +211,8 @@ define([ var url = $elt.data('url'); e.preventDefault(); buildGrid(url, action, function () { - groups[group].forEach(function ($btn) { - $btn.classList.toggle('hidden'); + _.forEach(groups[group], function ($btn) { + $btn.toggleClass('hidden'); }); }); }); From 2890156e786300132a4b0c9da5c1bdd2dae187e6 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 1 Feb 2024 19:12:30 +0100 Subject: [PATCH 4/4] chore: bundle assets --- views/js/loader/taoOutcomeUi.min.js | 2 +- views/js/loader/taoOutcomeUi.min.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/js/loader/taoOutcomeUi.min.js b/views/js/loader/taoOutcomeUi.min.js index 2ae40ad9..b59036f8 100644 --- a/views/js/loader/taoOutcomeUi.min.js +++ b/views/js/loader/taoOutcomeUi.min.js @@ -1,2 +1,2 @@ -define("taoOutcomeUi/plugins/results/action/view",["i18n","layout/actions/binder","core/plugin","util/url"],function(__,binder,pluginFactory,urlHelper){"use strict";return pluginFactory({name:"view",init:function init(){var resultsList=this.getHost(),action={binding:"load",url:urlHelper.route("viewResult","Results","taoOutcomeUi")};resultsList.addAction({id:"view",label:__("View"),icon:"view",action:function viewResults(id){var context={id:id,classUri:resultsList.getClassUri()};binder.exec(action,context)}})}})}),define("taoOutcomeUi/plugins/results/action/delete",["jquery","i18n","uri","core/plugin","util/url","util/encode","ui/dialog/confirm","ui/feedback"],function($,__,uri,pluginFactory,urlHelper,encode,dialogConfirm,feedback){"use strict";return pluginFactory({name:"delete",init:function init(){var resultsList=this.getHost();resultsList.addAction({id:"delete",label:__("Delete"),icon:"delete",action:function deleteResults(id){dialogConfirm(__("Please confirm deletion"),function(){$.ajax({url:urlHelper.route("delete","Results","taoOutcomeUi"),type:"POST",data:{uri:uri.encode(id)},dataType:"json"}).done(function(response){response.deleted?(feedback().success(__("Result has been deleted")),resultsList.refresh()):(feedback().error(__("Something went wrong...")+"
"+encode.html(response.error),{encodeHtml:!1}),resultsList.trigger("error",response.error))}).fail(function(err){feedback().error(__("Something went wrong...")),resultsList.trigger("error",err)})})}})}})}),define("taoOutcomeUi/plugins/results/action/download",["jquery","i18n","core/plugin","util/url","jquery.fileDownload"],function($,__,pluginFactory,urlHelper){"use strict";return pluginFactory({name:"download",init:function init(){var resultsList=this.getHost();resultsList.addAction({id:"download",label:__("Export Results"),icon:"export",action:function downloadResults(id){$.fileDownload(urlHelper.route("downloadXML","Results","taoOutcomeUi"),{failMessageHtml:__("Unexpected error occurred when generating your report. Please contact your system administrator."),httpMethod:"GET",data:{id:id,delivery:resultsList.getClassUri()}})}})}})}),define("taoOutcomeUi/component/results/pluginsLoader",["core/pluginLoader","taoOutcomeUi/plugins/results/action/view","taoOutcomeUi/plugins/results/action/delete","taoOutcomeUi/plugins/results/action/download"],function(pluginLoader,actionView,actionDelete,actionDownload){"use strict";return pluginLoader({action:[actionView,actionDelete,actionDownload]})}),define("taoOutcomeUi/component/results/areaBroker",["lodash","ui/areaBroker"],function(_,areaBroker){"use strict";var requireAreas=["list"];return _.partial(areaBroker,requireAreas)}),define("tpl!taoOutcomeUi/component/results/list",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
\n
\n
"})}),define("taoOutcomeUi/component/results/list",["jquery","i18n","lodash","uri","core/promise","ui/component","taoOutcomeUi/component/results/areaBroker","tpl!taoOutcomeUi/component/results/list","ui/datatable"],function($,__,_,uri,Promise,component,resultsAreaBroker,listTpl){"use strict";function resultsListFactory(config,pluginFactories){function pluginRun(method){var execStack=[];return _.forEach(plugins,function(plugin){_.isFunction(plugin[method])&&execStack.push(plugin[method]())}),Promise.all(execStack)}var resultsList,areaBroker,classUri,plugins={},actions=[];if(!_.isPlainObject(config))throw new TypeError("The configuration is required");if(!_.isString(config.classUri)||!config.classUri)throw new TypeError("The class URI is required");if(!_.isString(config.dataUrl)||!config.dataUrl)throw new TypeError("The service URL is required");if(!_.isPlainObject(config.model)&&!_.isArray(config.model))throw new TypeError("The data model is required");return classUri=uri.decode(config.classUri),resultsList=component({refresh:function refresh(){return areaBroker.getListArea().datatable("refresh"),this},addAction:function addAction(name,action){var descriptor;return _.isPlainObject(name)?descriptor=name:_.isPlainObject(action)?(descriptor=action,action.id=name):descriptor={id:name,label:name},_.isFunction(action)&&(descriptor.action=action),descriptor.label||(descriptor.label=descriptor.id),actions.push(descriptor),this},getConfig:function getConfig(){return this.config},getClassUri:function getClassUri(){return classUri},getActions:function getActions(){return actions}}),resultsList.before("render",function onRender(){var self=this;return areaBroker=resultsAreaBroker(this.$component,{list:$(".list",this.$component)}),_.forEach(pluginFactories,function(pluginFactory){var plugin=pluginFactory(self,areaBroker);plugins[plugin.getName()]=plugin}),pluginRun("init").then(function(){return pluginRun("render")}).then(function(){areaBroker.getListArea().empty().on("query.datatable",function(){self.setState("loading",!0).trigger("loading")}).on("load.datatable",function(){self.setState("loading",!1).trigger("loaded")}).datatable({url:self.config.dataUrl,model:self.config.model,actions:actions,filter:self.config.searchable,labels:{filter:__("Search by delivery results")}})}).catch(function(err){return self.trigger("error",err),Promise.reject(err)})}).before("destroy",function onDestroy(){var self=this;return pluginRun("destroy").then(function(){areaBroker.getListArea().empty()}).catch(function(err){self.trigger("error",err)})}).setTemplate(listTpl).init(config)}return resultsListFactory}),define("taoOutcomeUi/controller/inspectResults",["jquery","lodash","i18n","module","core/logger","core/dataProvider/request","util/url","layout/actions/binder","layout/loading-bar","ui/feedback","ui/taskQueue/taskQueue","taoOutcomeUi/component/results/pluginsLoader","taoOutcomeUi/component/results/list","ui/taskQueueButton/treeButton"],function($,_,__,module,loggerFactory,request,urlHelper,binder,loadingBar,feedback,taskQueue,resultsPluginsLoader,resultsListFactory,treeTaskButtonFactory){"use strict";function reportError(err){loadingBar.stop(),logger.error(err),err instanceof Error&&feedback().error(err.message)}const logger=loggerFactory("controller/inspectResults");return{start:function(){const config=module.config()||{},$container=$("#inspect-result"),classUri=$container.data("uri"),searchContainer=$(".action-bar .search-area");if(searchContainer.data("show-result")){const action={binding:"load",url:urlHelper.route("viewResult","Results","taoOutcomeUi")},context={id:searchContainer.data("show-result"),classUri};return searchContainer.removeData("show-result"),void binder.exec(action,context)}const listConfig={dataUrl:urlHelper.route("getResults","Results","taoOutcomeUi",{classUri:classUri}),model:config.dataModel,searchable:config.searchable,classUri:classUri};let taskButton,taskButtonExportSQL;loadingBar.start(),_.forEach(config.plugins,function(plugin){plugin&&plugin.module&&(plugin.exclude?resultsPluginsLoader.remove(plugin.module):resultsPluginsLoader.add(plugin))}),$container.length?resultsPluginsLoader.load().then(function(){resultsListFactory(listConfig,resultsPluginsLoader.getPlugins()).on("error",reportError).on("success",function(message){feedback().success(message)}).before("loading",function(){loadingBar.start()}).after("loaded",function(){loadingBar.stop()}).render($(".inspect-results-grid",$container))}).catch(reportError):loadingBar.stop(),taskButton=treeTaskButtonFactory({replace:!0,icon:"export",label:__("Export CSV"),taskQueue:taskQueue}).render($("#results-csv-export")),binder.register("export_csv",function remove(actionContext){const data=_.pick(actionContext,["uri","classUri","id"]),uniqueValue=data.uri||data.classUri||"";taskButton.setTaskConfig({taskCreationUrl:this.url,taskCreationData:{uri:uniqueValue}}).start()}),$("#results-sql-export").length&&(taskButtonExportSQL=treeTaskButtonFactory({replace:!0,icon:"export",label:__("Export SQL"),taskQueue:taskQueue}).render($("#results-sql-export")),binder.register("export_sql",function remove(actionContext){const data=_.pick(actionContext,["uri","classUri","id"]),uniqueValue=data.uri||data.classUri||"";taskButtonExportSQL.setTaskConfig({taskCreationUrl:this.url,taskCreationData:{uri:uniqueValue}}).start()})),binder.register("open_url",function(actionContext){const data=_.pick(actionContext,["uri","classUri","id"]);request(this.url,data,"POST").then(response=>{const url=response.url;url?window.open(url,"_blank"):feedback().info(__("The URL does not exist."))}).catch(reportError)})}}}),define("tpl!taoOutcomeUi/controller/resultModal",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
\n\n
"})}),define("taoOutcomeUi/controller/resultsMonitoring",["jquery","lodash","i18n","util/url","uri","ui/feedback","util/locale","util/encode","layout/loading-bar","layout/actions/binder","ui/dialog/confirm","tpl!taoOutcomeUi/controller/resultModal","ui/datatable"],function($,_,__,url,uri,feedback,locale,encode,loadingBar,binder,dialogConfirm,resultModalTpl){"use strict";function getNumRows(){var lineHeight=30,searchPagination=70,$upperElem=$(".content-container h2"),topSpace=$upperElem.offset().top+$upperElem.height()+parseInt($upperElem.css("margin-bottom"),10)+30+searchPagination,availableHeight=$window.height()-topSpace-$("footer.dark-bar").outerHeight();return window.MSInputMethodContext||document.documentMode||window.StyleMedia?Math.min(Math.floor(availableHeight/30),25):25}function getRequestErrorMessage(xhr){loadingBar.start();var message="";try{var responseJSON=$.parseJSON(xhr.responseText);message=responseJSON.message?responseJSON.message:xhr.responseText}catch(e){message=xhr.responseText}return message}function viewResult(rowId){var res=parseRowId(rowId);loadingBar.start(),$.ajax({url:url.route("viewResult","Results","taoOutcomeUi",{id:res[0],classUri:res[1]}),type:"GET",success:function(result){var $container=$(resultModalTpl()).append(result);$resultsListContainer.append($container),$container.modal({startClosed:!1,minWidth:450,top:50}),$container.css({"max-height":$window.height()-80+"px",overflow:"auto"}),$container.on("click",function(e){var $target=$(e.target),$element=null;if($target.is("a")&&$target.hasClass("preview")?$element=$target:$target.is("span")&&$target.parent().hasClass("preview")&&($element=$target.parent()),$element){var $modalContainer=$element.parents(".modal");$modalContainer.length&&$modalContainer.trigger("closed.modal"),$(".preview-overlay").css({zIndex:$container.modal().css("z-index")+1})}}),$container.on("closed.modal",function(){$container.modal("destroy"),$(".modal-bg").remove(),$(this).remove()}),loadingBar.stop()},error:function(xhr,err){var message=getRequestErrorMessage(xhr);feedback().error(message,{encodeHtml:!1}),loadingBar.stop()}})}function checkValidItem(){return!this.start_time}function downloadResult(rowId){var res=parseRowId(rowId);$.fileDownload(url.route("downloadXML","Results","taoOutcomeUi"),{failMessageHtml:__("Unexpected error occurred when generating your report. Please contact your system administrator."),httpMethod:"GET",data:{id:res[0],delivery:res[1]}})}function parseRowId(rowId){return rowId.split("|")}var $resultsListContainer=$(".results-list-container"),$window=$(window);return{start:function(){var $contentBlock=$resultsListContainer.parents(".content-block"),resizeContainer=function(){var padding=$contentBlock.innerHeight()-$contentBlock.height();$contentBlock.height($window.height()-$("footer.dark-bar").outerHeight()-$("header.dark-bar").outerHeight()-$(".tab-container").outerHeight()-$(".action-bar.content-action-bar").outerHeight()-padding)};$window.on("resize",_.debounce(resizeContainer,300)),resizeContainer(),$resultsListContainer.datatable({url:url.route("data","ResultsMonitoring","taoOutcomeUi"),filter:!0,labels:{filter:__("Search by results")},model:[{id:"delivery",label:__("Delivery"),sortable:!1},{id:"deliveryResultIdentifier",label:__("Delivery Execution"),sortable:!1},{id:"userName",label:__("Test Taker"),sortable:!1},{id:"start_time",label:__("Start Time"),sortable:!1}],paginationStrategyTop:"simple",paginationStrategyBottom:"pages",rows:getNumRows(),sortby:"result_id",sortorder:"desc",actions:{view:{id:"view",label:__("View"),icon:"external",action:viewResult,disabled:checkValidItem},download:{id:"download",title:__("Download result"),icon:"download",label:__("Download"),action:downloadResult,disabled:checkValidItem}}})}}}),define("taoOutcomeUi/controller/resultTable",["jquery","lodash","i18n","module","util/url","ui/feedback","ui/taskQueue/taskQueue","ui/taskQueueButton/standardButton","ui/dateRange/dateRange","layout/loading-bar","ui/datatable"],function($,_,__,module,urlUtil,feedback,taskQueue,standardTaskButtonFactory,dateRangeFactory,loadingBar){"use strict";var resulTableController={start:function start(){var conf=module.config(),$container=$(".result-table"),$filterField=$(".result-filter",$container),$filterButtonsContainer=$(".filter-buttons",$container),$tableContainer=$(".result-table-container",$container),$dateStartRangeContainer=$(".de-start-range",$container),$dateEndRangeContainer=$(".de-end-range",$container),filter=conf.filter||"lastSubmitted",deStartFrom="",deStartTo="",deEndFrom="",deEndTo="",uri=conf.uri||"",columns=[],groups={},filterDeStartRange=dateRangeFactory($dateStartRangeContainer,{startPicker:{setup:"datetime",format:"YYYY-MM-DD HH:mm:ss",field:{name:"periodStart"}},endPicker:{setup:"datetime",format:"YYYY-MM-DD HH:mm:ss",field:{name:"periodEnd"}}}).on("change",function(v){console.log("changed",v)}).on("render",function(){$("button",$dateStartRangeContainer).hide()}),filterDeEndRange=dateRangeFactory($dateEndRangeContainer,{startPicker:{setup:"datetime",format:"YYYY-MM-DD HH:mm:ss",field:{name:"periodStart"}},endPicker:{setup:"datetime",format:"YYYY-MM-DD HH:mm:ss",field:{name:"periodEnd"}}}).on("render",function(){$("button",$dateEndRangeContainer).hide()}),buildGrid=function buildGrid(url,action,done){loadingBar.start(),$.ajax({url:url,dataType:"json",data:{filter:filter,uri:uri},type:"GET"}).done(function(response){response&&response.columns&&("remove"===action?columns=_.reject(columns,function(col){return _.find(response.columns,function(resCol){return _.isEqual(col,resCol)})}):"undefined"!=typeof response.first&&!0===response.first?columns=response.columns.concat(columns):columns=columns.concat(response.columns)),_.isFunction(done)&&done()}).always(function(){loadingBar.stop()})},_buildTable=function _buildTable(done){var model=[];_.forEach(columns,function(col){var colId=col.prop?col.prop+"_"+col.contextType:col.contextId+"_"+col.variableIdentifier;col.columnId&&(colId=col.columnId),model.push({id:colId,label:col.label,sortable:!1})}),$tableContainer.empty().data("ui.datatable",null).off("load.datatable").on("load.datatable",function(){_.isFunction(done)&&(done(),done="")}).datatable({url:urlUtil.route("feedDataTable","ResultTable","taoOutcomeUi",{filter:filter,startfrom:deStartFrom,startto:deStartTo,endfrom:deEndFrom,endto:deEndTo}),querytype:"POST",params:{columns:JSON.stringify(columns),_search:!1,uri:uri},model:model})},filterChanged=function filterChanged(){filter=$filterField.select2("val"),deStartFrom=filterDeStartRange.getStart(),deStartTo=filterDeStartRange.getEnd(),deEndFrom=filterDeEndRange.getStart(),deEndTo=filterDeEndRange.getEnd(),_buildTable()};$("[data-group]",$container).each(function(){var $elt=$(this),group=$elt.data("group"),action=$elt.data("action");groups[group]=groups[group]||{},groups[group][action]=$elt}),$container.on("click","[data-group]",function(e){var $elt=$(this),group=$elt.data("group"),action=$elt.data("action"),url=$elt.data("url");e.preventDefault(),buildGrid(url,action,function(){_.forEach(groups[group],function($btn){$btn.toggleClass("hidden")})})}),buildGrid(urlUtil.route("getTestTakerColumns","ResultTable","taoOutcomeUi",{filter:filter})),$filterField.select2({minimumResultsForSearch:-1}).select2("val",filter),$(".result-filter-btn",$container).click(function(){filterChanged()}),standardTaskButtonFactory({type:"info",icon:"export",title:__("Export CSV File"),label:__("Export CSV File"),taskQueue:taskQueue,taskCreationUrl:urlUtil.route("export","ResultTable","taoOutcomeUi"),taskCreationData:function getTaskRequestData(){return{filter:filter,columns:JSON.stringify(columns),uri:uri,startfrom:deStartFrom,startto:deStartTo,endfrom:deEndFrom,endto:deEndTo}}}).on("error",function(err){feedback().error(err)}).render($filterButtonsContainer),conf.allowSqlExport&&standardTaskButtonFactory({type:"info",icon:"export",title:__("Export SQL File"),label:__("Export SQL File"),taskQueue:taskQueue,taskCreationUrl:urlUtil.route("exportSQL","ResultTable","taoOutcomeUi"),taskCreationData:function getTaskRequestData(){return filterChanged(),{filter:filter,columns:JSON.stringify(columns),uri:uri,startfrom:deStartFrom,startto:deStartTo,endfrom:deEndFrom,endto:deEndTo}}}).on("error",function(err){feedback().error(err)}).render($filterButtonsContainer)}};return resulTableController}),define("taoOutcomeUi/controller/routes",[],function(){"use strict";return{Results:{actions:{viewResult:"controller/viewResult",index:"controller/inspectResults"}},ResultTable:{actions:{index:"controller/resultTable"}},ResultsMonitoring:{actions:{index:"controller/resultsMonitoring"}}}}),define("taoOutcomeUi/controller/viewResult",["module","jquery","i18n","util/url","core/logger","core/request","layout/section","taoItems/previewer/factory","ui/dialog/confirm","uri","ui/feedback","core/router","jquery.fileDownload"],function(module,$,__,urlHelper,loggerFactory,request,section,previewerFactory,dialogConfirm,uriHelper,feedback,router){"use strict";function requestFileContent(variableUri,deliveryUri){return request({url:dataUrl,method:"POST",data:{variableUri,deliveryUri}}).then(response=>{const{data,name,mime}=response;return{data,name,mime}})}function refineFileResponse(response,deliveryUri){const{file}=response&&response.base||{};return file&&file.uri&&!file.data?requestFileContent(file.uri,deliveryUri).then(fileData=>{fileData&&fileData.data?response.base.file=fileData:response.base=null}).catch(e=>logger.error(e)):Promise.resolve()}function refineItemState(state,deliveryUri){if(!state)return Promise.resolve(state);const filePromises=Object.keys(state).map(identifier=>{const{response}=state[identifier];return refineFileResponse(response,deliveryUri)});return Promise.all(filePromises).then(()=>state)}const logger=loggerFactory("taoOutcomeUi/viewResults"),downloadUrl=urlHelper.route("getFile","Results","taoOutcomeUi"),dataUrl=urlHelper.route("getVariableFile","Results","taoOutcomeUi"),viewResultController={start(){const conf=module.config(),deliveryUri=conf.classUri,$container=$("#view-result"),$resultFilterField=$(".result-filter",$container),$classFilterField=$("[name=\"class-filter\"]",$container);let classFilter=JSON.parse(conf.filterTypes)||[];for(let i in $resultFilterField.select2({minimumResultsForSearch:-1}).select2("val",conf.filterSubmission||"all"),classFilter)$(`[value = "${classFilter[i]}"]`).prop("checked","checked");$(".result-filter-btn",$container).click(()=>{classFilter=[""],$classFilterField.each(function(){$(this).prop("checked")&&classFilter.push($(this).val())}),section.loadContentBlock(urlHelper.route("viewResult","Results","taoOutcomeUi"),{id:conf.id,classUri:conf.classUri,filterSubmission:$resultFilterField.select2("val"),filterTypes:classFilter})}),$("#xmlDownload",$container).on("click",function(){$.fileDownload(urlHelper.route("downloadXML","Results","taoOutcomeUi"),{failMessageHtml:__("Unexpected error occurred when generating your report. Please contact your system administrator."),httpMethod:"GET",data:{id:conf.id,delivery:conf.classUri}})}),$("[id^=fileDownload]",$container).on("click",function(){const variableUri=$(this).val();$.fileDownload(downloadUrl,{httpMethod:"POST",data:{variableUri,deliveryUri}})}),$(".delete",$container).on("click",function(){dialogConfirm(__("Please confirm deletion"),function(){$.ajax({url:urlHelper.route("delete","Results","taoOutcomeUi"),type:"POST",data:{uri:uriHelper.encode(conf.id)},dataType:"json"}).done(function(response){response.deleted?(feedback().success(__("Result has been deleted")),router.dispatch("tao/Main/index")):feedback().error(__("Something went wrong...")+"
"+encode.html(response.error),{encodeHtml:!1})}).fail(function(){feedback().error(__("Something went wrong..."))})})}),$(".print",$container).on("click",function(){window.print()}),$(".preview",$container).on("click",function(e){const $btn=$(this),deliveryId=$btn.data("deliveryId"),resultId=$btn.data("resultId"),itemDefinition=$btn.data("definition");let uri=$btn.data("uri");const type=$btn.data("type");e.preventDefault(),$btn.prop("disabled")||($btn.prop("disabled",!0).addClass("disabled"),deliveryId&&resultId&&itemDefinition&&(uri={uri:uri,resultId:resultId,itemDefinition:itemDefinition,deliveryUri:deliveryId}),Promise.resolve($btn.data("state")).then(state=>refineItemState(state,deliveryUri)).then(state=>{$btn.removeProp("disabled").removeClass("disabled"),previewerFactory(type,uri,state,{view:"reviewRenderer",fullPage:!0})}).catch(err=>logger.error(err)))})}};return viewResultController}),define("taoOutcomeUi/loader/taoOutcomeUi.bundle",function(){}),define("taoOutcomeUi/loader/taoOutcomeUi.min",["taoItems/loader/taoItems.min"],function(){}); +define("taoOutcomeUi/plugins/results/action/view",["i18n","layout/actions/binder","core/plugin","util/url"],function(__,binder,pluginFactory,urlHelper){"use strict";return pluginFactory({name:"view",init:function init(){var resultsList=this.getHost(),action={binding:"load",url:urlHelper.route("viewResult","Results","taoOutcomeUi")};resultsList.addAction({id:"view",label:__("View"),icon:"view",action:function viewResults(id){var context={id:id,classUri:resultsList.getClassUri()};binder.exec(action,context)}})}})}),define("taoOutcomeUi/plugins/results/action/delete",["jquery","i18n","uri","core/plugin","util/url","util/encode","ui/dialog/confirm","ui/feedback"],function($,__,uri,pluginFactory,urlHelper,encode,dialogConfirm,feedback){"use strict";return pluginFactory({name:"delete",init:function init(){var resultsList=this.getHost();resultsList.addAction({id:"delete",label:__("Delete"),icon:"delete",action:function deleteResults(id){dialogConfirm(__("Please confirm deletion"),function(){$.ajax({url:urlHelper.route("delete","Results","taoOutcomeUi"),type:"POST",data:{uri:uri.encode(id)},dataType:"json"}).done(function(response){response.deleted?(feedback().success(__("Result has been deleted")),resultsList.refresh()):(feedback().error(__("Something went wrong...")+"
"+encode.html(response.error),{encodeHtml:!1}),resultsList.trigger("error",response.error))}).fail(function(err){feedback().error(__("Something went wrong...")),resultsList.trigger("error",err)})})}})}})}),define("taoOutcomeUi/plugins/results/action/download",["jquery","i18n","core/plugin","util/url","jquery.fileDownload"],function($,__,pluginFactory,urlHelper){"use strict";return pluginFactory({name:"download",init:function init(){var resultsList=this.getHost();resultsList.addAction({id:"download",label:__("Export Results"),icon:"export",action:function downloadResults(id){$.fileDownload(urlHelper.route("downloadXML","Results","taoOutcomeUi"),{failMessageHtml:__("Unexpected error occurred when generating your report. Please contact your system administrator."),httpMethod:"GET",data:{id:id,delivery:resultsList.getClassUri()}})}})}})}),define("taoOutcomeUi/component/results/pluginsLoader",["core/pluginLoader","taoOutcomeUi/plugins/results/action/view","taoOutcomeUi/plugins/results/action/delete","taoOutcomeUi/plugins/results/action/download"],function(pluginLoader,actionView,actionDelete,actionDownload){"use strict";return pluginLoader({action:[actionView,actionDelete,actionDownload]})}),define("taoOutcomeUi/component/results/areaBroker",["ui/areaBroker"],function(areaBroker){"use strict";var requireAreas=["list"];return areaBroker.bind(null,requireAreas)}),define("tpl!taoOutcomeUi/component/results/list",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
\n
\n
"})}),define("taoOutcomeUi/component/results/list",["jquery","i18n","lodash","uri","core/promise","ui/component","taoOutcomeUi/component/results/areaBroker","tpl!taoOutcomeUi/component/results/list","ui/datatable"],function($,__,_,uri,Promise,component,resultsAreaBroker,listTpl){"use strict";function resultsListFactory(config,pluginFactories){function pluginRun(method){var execStack=[];return _.forEach(plugins,function(plugin){"function"==typeof plugin[method]&&execStack.push(plugin[method]())}),Promise.all(execStack)}var resultsList,areaBroker,classUri,plugins={},actions=[];if(!_.isPlainObject(config))throw new TypeError("The configuration is required");if("string"!=typeof config.classUri||!config.classUri)throw new TypeError("The class URI is required");if("string"!=typeof config.dataUrl||!config.dataUrl)throw new TypeError("The service URL is required");if(!_.isPlainObject(config.model)&&!_.isArray(config.model))throw new TypeError("The data model is required");return classUri=uri.decode(config.classUri),resultsList=component({refresh:function refresh(){return areaBroker.getListArea().datatable("refresh"),this},addAction:function addAction(name,action){var descriptor;return _.isPlainObject(name)?descriptor=name:_.isPlainObject(action)?(descriptor=action,action.id=name):descriptor={id:name,label:name},"function"==typeof action&&(descriptor.action=action),descriptor.label||(descriptor.label=descriptor.id),actions.push(descriptor),this},getConfig:function getConfig(){return this.config},getClassUri:function getClassUri(){return classUri},getActions:function getActions(){return actions}}),resultsList.before("render",function onRender(){var self=this;return areaBroker=resultsAreaBroker(this.$component,{list:$(".list",this.$component)}),_.forEach(pluginFactories,function(pluginFactory){var plugin=pluginFactory(self,areaBroker);plugins[plugin.getName()]=plugin}),pluginRun("init").then(function(){return pluginRun("render")}).then(function(){areaBroker.getListArea().empty().on("query.datatable",function(){self.setState("loading",!0).trigger("loading")}).on("load.datatable",function(){self.setState("loading",!1).trigger("loaded")}).datatable({url:self.config.dataUrl,model:self.config.model,actions:actions,filter:self.config.searchable,labels:{filter:__("Search by delivery results")}})}).catch(function(err){return self.trigger("error",err),Promise.reject(err)})}).before("destroy",function onDestroy(){var self=this;return pluginRun("destroy").then(function(){areaBroker.getListArea().empty()}).catch(function(err){self.trigger("error",err)})}).setTemplate(listTpl).init(config)}return resultsListFactory}),define("taoOutcomeUi/controller/inspectResults",["jquery","lodash","i18n","module","core/logger","core/dataProvider/request","util/url","layout/actions/binder","layout/loading-bar","ui/feedback","ui/taskQueue/taskQueue","taoOutcomeUi/component/results/pluginsLoader","taoOutcomeUi/component/results/list","ui/taskQueueButton/treeButton"],function($,_,__,module,loggerFactory,request,urlHelper,binder,loadingBar,feedback,taskQueue,resultsPluginsLoader,resultsListFactory,treeTaskButtonFactory){"use strict";function reportError(err){loadingBar.stop(),logger.error(err),err instanceof Error&&feedback().error(err.message)}const logger=loggerFactory("controller/inspectResults");return{start:function(){const config=module.config()||{},$container=$("#inspect-result"),classUri=$container.data("uri"),searchContainer=$(".action-bar .search-area");if(searchContainer.data("show-result")){const action={binding:"load",url:urlHelper.route("viewResult","Results","taoOutcomeUi")},context={id:searchContainer.data("show-result"),classUri};return searchContainer.removeData("show-result"),void binder.exec(action,context)}const listConfig={dataUrl:urlHelper.route("getResults","Results","taoOutcomeUi",{classUri:classUri}),model:config.dataModel,searchable:config.searchable,classUri:classUri};let taskButton,taskButtonExportSQL;loadingBar.start(),_.forEach(config.plugins,function(plugin){plugin&&plugin.module&&(plugin.exclude?resultsPluginsLoader.remove(plugin.module):resultsPluginsLoader.add(plugin))}),$container.length?resultsPluginsLoader.load().then(function(){resultsListFactory(listConfig,resultsPluginsLoader.getPlugins()).on("error",reportError).on("success",function(message){feedback().success(message)}).before("loading",function(){loadingBar.start()}).after("loaded",function(){loadingBar.stop()}).render($(".inspect-results-grid",$container))}).catch(reportError):loadingBar.stop(),taskButton=treeTaskButtonFactory({replace:!0,icon:"export",label:__("Export CSV"),taskQueue:taskQueue}).render($("#results-csv-export")),binder.register("export_csv",function remove(actionContext){const data=(_ref=>{let{uri,classUri,id}=_ref;return{uri,classUri,id}})(actionContext),uniqueValue=data.uri||data.classUri||"";taskButton.setTaskConfig({taskCreationUrl:this.url,taskCreationData:{uri:uniqueValue}}).start()}),$("#results-sql-export").length&&(taskButtonExportSQL=treeTaskButtonFactory({replace:!0,icon:"export",label:__("Export SQL"),taskQueue:taskQueue}).render($("#results-sql-export")),binder.register("export_sql",function remove(actionContext){const data=(_ref2=>{let{uri,classUri,id}=_ref2;return{uri,classUri,id}})(actionContext),uniqueValue=data.uri||data.classUri||"";taskButtonExportSQL.setTaskConfig({taskCreationUrl:this.url,taskCreationData:{uri:uniqueValue}}).start()})),binder.register("open_url",function(actionContext){const data=(_ref3=>{let{uri,classUri,id}=_ref3;return{uri,classUri,id}})(actionContext);request(this.url,data,"POST").then(response=>{const url=response.url;url?window.open(url,"_blank"):feedback().info(__("The URL does not exist."))}).catch(reportError)})}}}),define("tpl!taoOutcomeUi/controller/resultModal",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
\n\n
"})}),define("taoOutcomeUi/controller/resultsMonitoring",["jquery","lodash","i18n","util/url","uri","ui/feedback","util/locale","util/encode","layout/loading-bar","layout/actions/binder","ui/dialog/confirm","tpl!taoOutcomeUi/controller/resultModal","ui/datatable"],function($,_,__,url,uri,feedback,locale,encode,loadingBar,binder,dialogConfirm,resultModalTpl){"use strict";function getNumRows(){var lineHeight=30,searchPagination=70,$upperElem=$(".content-container h2"),topSpace=$upperElem.offset().top+$upperElem.height()+parseInt($upperElem.css("margin-bottom"),10)+30+searchPagination,availableHeight=$window.height()-topSpace-$("footer.dark-bar").outerHeight();return window.MSInputMethodContext||document.documentMode||window.StyleMedia?Math.min(Math.floor(availableHeight/30),25):25}function getRequestErrorMessage(xhr){loadingBar.start();var message="";try{var responseJSON=$.parseJSON(xhr.responseText);message=responseJSON.message?responseJSON.message:xhr.responseText}catch(e){message=xhr.responseText}return message}function viewResult(rowId){var res=parseRowId(rowId);loadingBar.start(),$.ajax({url:url.route("viewResult","Results","taoOutcomeUi",{id:res[0],classUri:res[1]}),type:"GET",success:function(result){var $container=$(resultModalTpl()).append(result);$resultsListContainer.append($container),$container.modal({startClosed:!1,minWidth:450,top:50}),$container.css({"max-height":$window.height()-80+"px",overflow:"auto"}),$container.on("click",function(e){var $target=$(e.target),$element=null;if($target.is("a")&&$target.hasClass("preview")?$element=$target:$target.is("span")&&$target.parent().hasClass("preview")&&($element=$target.parent()),$element){var $modalContainer=$element.parents(".modal");$modalContainer.length&&$modalContainer.trigger("closed.modal"),$(".preview-overlay").css({zIndex:$container.modal().css("z-index")+1})}}),$container.on("closed.modal",function(){$container.modal("destroy"),$(".modal-bg").remove(),$(this).remove()}),loadingBar.stop()},error:function(xhr,err){var message=getRequestErrorMessage(xhr);feedback().error(message,{encodeHtml:!1}),loadingBar.stop()}})}function checkValidItem(){return!this.start_time}function downloadResult(rowId){var res=parseRowId(rowId);$.fileDownload(url.route("downloadXML","Results","taoOutcomeUi"),{failMessageHtml:__("Unexpected error occurred when generating your report. Please contact your system administrator."),httpMethod:"GET",data:{id:res[0],delivery:res[1]}})}function parseRowId(rowId){return rowId.split("|")}var $resultsListContainer=$(".results-list-container"),$window=$(window);return{start:function(){var $contentBlock=$resultsListContainer.parents(".content-block"),resizeContainer=function(){var padding=$contentBlock.innerHeight()-$contentBlock.height();$contentBlock.height($window.height()-$("footer.dark-bar").outerHeight()-$("header.dark-bar").outerHeight()-$(".tab-container").outerHeight()-$(".action-bar.content-action-bar").outerHeight()-padding)};$window.on("resize",_.debounce(resizeContainer,300)),resizeContainer(),$resultsListContainer.datatable({url:url.route("data","ResultsMonitoring","taoOutcomeUi"),filter:!0,labels:{filter:__("Search by results")},model:[{id:"delivery",label:__("Delivery"),sortable:!1},{id:"deliveryResultIdentifier",label:__("Delivery Execution"),sortable:!1},{id:"userName",label:__("Test Taker"),sortable:!1},{id:"start_time",label:__("Start Time"),sortable:!1}],paginationStrategyTop:"simple",paginationStrategyBottom:"pages",rows:getNumRows(),sortby:"result_id",sortorder:"desc",actions:{view:{id:"view",label:__("View"),icon:"external",action:viewResult,disabled:checkValidItem},download:{id:"download",title:__("Download result"),icon:"download",label:__("Download"),action:downloadResult,disabled:checkValidItem}}})}}}),define("taoOutcomeUi/controller/resultTable",["jquery","lodash","i18n","module","util/url","ui/feedback","ui/taskQueue/taskQueue","ui/taskQueueButton/standardButton","ui/dateRange/dateRange","layout/loading-bar","ui/datatable"],function($,_,__,module,urlUtil,feedback,taskQueue,standardTaskButtonFactory,dateRangeFactory,loadingBar){"use strict";var resulTableController={start:function start(){var conf=module.config(),$container=$(".result-table"),$filterField=$(".result-filter",$container),$filterButtonsContainer=$(".filter-buttons",$container),$tableContainer=$(".result-table-container",$container),$dateStartRangeContainer=$(".de-start-range",$container),$dateEndRangeContainer=$(".de-end-range",$container),filter=conf.filter||"lastSubmitted",deStartFrom="",deStartTo="",deEndFrom="",deEndTo="",uri=conf.uri||"",columns=[],groups={},filterDeStartRange=dateRangeFactory($dateStartRangeContainer,{startPicker:{setup:"datetime",format:"YYYY-MM-DD HH:mm:ss",field:{name:"periodStart"}},endPicker:{setup:"datetime",format:"YYYY-MM-DD HH:mm:ss",field:{name:"periodEnd"}}}).on("change",function(v){console.log("changed",v)}).on("render",function(){$("button",$dateStartRangeContainer).hide()}),filterDeEndRange=dateRangeFactory($dateEndRangeContainer,{startPicker:{setup:"datetime",format:"YYYY-MM-DD HH:mm:ss",field:{name:"periodStart"}},endPicker:{setup:"datetime",format:"YYYY-MM-DD HH:mm:ss",field:{name:"periodEnd"}}}).on("render",function(){$("button",$dateEndRangeContainer).hide()}),buildGrid=function buildGrid(url,action,done){loadingBar.start(),$.ajax({url:url,dataType:"json",data:{filter:filter,uri:uri},type:"GET"}).done(function(response){response&&response.columns&&("remove"===action?columns=columns.filter(col=>!response.columns.some(resCol=>_.isEqual(col,resCol))):"undefined"!=typeof response.first&&!0===response.first?columns=response.columns.concat(columns):columns=columns.concat(response.columns)),"function"==typeof done&&done()}).always(function(){loadingBar.stop()})},_buildTable=function _buildTable(done){var model=[];_.forEach(columns,function(col){var colId=col.prop?col.prop+"_"+col.contextType:col.contextId+"_"+col.variableIdentifier;col.columnId&&(colId=col.columnId),model.push({id:colId,label:col.label,sortable:!1})}),$tableContainer.empty().data("ui.datatable",null).off("load.datatable").on("load.datatable",function(){"function"==typeof done&&(done(),done="")}).datatable({url:urlUtil.route("feedDataTable","ResultTable","taoOutcomeUi",{filter:filter,startfrom:deStartFrom,startto:deStartTo,endfrom:deEndFrom,endto:deEndTo}),querytype:"POST",params:{columns:JSON.stringify(columns),_search:!1,uri:uri},model:model})},filterChanged=function filterChanged(){filter=$filterField.select2("val"),deStartFrom=filterDeStartRange.getStart(),deStartTo=filterDeStartRange.getEnd(),deEndFrom=filterDeEndRange.getStart(),deEndTo=filterDeEndRange.getEnd(),_buildTable()};$("[data-group]",$container).each(function(){var $elt=$(this),group=$elt.data("group"),action=$elt.data("action");groups[group]=groups[group]||{},groups[group][action]=$elt}),$container.on("click","[data-group]",function(e){var $elt=$(this),group=$elt.data("group"),action=$elt.data("action"),url=$elt.data("url");e.preventDefault(),buildGrid(url,action,function(){_.forEach(groups[group],function($btn){$btn.toggleClass("hidden")})})}),buildGrid(urlUtil.route("getTestTakerColumns","ResultTable","taoOutcomeUi",{filter:filter})),$filterField.select2({minimumResultsForSearch:-1}).select2("val",filter),$(".result-filter-btn",$container).click(function(){filterChanged()}),standardTaskButtonFactory({type:"info",icon:"export",title:__("Export CSV File"),label:__("Export CSV File"),taskQueue:taskQueue,taskCreationUrl:urlUtil.route("export","ResultTable","taoOutcomeUi"),taskCreationData:function getTaskRequestData(){return{filter:filter,columns:JSON.stringify(columns),uri:uri,startfrom:deStartFrom,startto:deStartTo,endfrom:deEndFrom,endto:deEndTo}}}).on("error",function(err){feedback().error(err)}).render($filterButtonsContainer),conf.allowSqlExport&&standardTaskButtonFactory({type:"info",icon:"export",title:__("Export SQL File"),label:__("Export SQL File"),taskQueue:taskQueue,taskCreationUrl:urlUtil.route("exportSQL","ResultTable","taoOutcomeUi"),taskCreationData:function getTaskRequestData(){return filterChanged(),{filter:filter,columns:JSON.stringify(columns),uri:uri,startfrom:deStartFrom,startto:deStartTo,endfrom:deEndFrom,endto:deEndTo}}}).on("error",function(err){feedback().error(err)}).render($filterButtonsContainer)}};return resulTableController}),define("taoOutcomeUi/controller/routes",[],function(){"use strict";return{Results:{actions:{viewResult:"controller/viewResult",index:"controller/inspectResults"}},ResultTable:{actions:{index:"controller/resultTable"}},ResultsMonitoring:{actions:{index:"controller/resultsMonitoring"}}}}),define("taoOutcomeUi/controller/viewResult",["module","jquery","i18n","util/url","core/logger","core/request","layout/section","taoItems/previewer/factory","ui/dialog/confirm","uri","ui/feedback","core/router","jquery.fileDownload"],function(module,$,__,urlHelper,loggerFactory,request,section,previewerFactory,dialogConfirm,uriHelper,feedback,router){"use strict";function requestFileContent(variableUri,deliveryUri){return request({url:dataUrl,method:"POST",data:{variableUri,deliveryUri}}).then(response=>{const{data,name,mime}=response;return{data,name,mime}})}function refineFileResponse(response,deliveryUri){const{file}=response&&response.base||{};return file&&file.uri&&!file.data?requestFileContent(file.uri,deliveryUri).then(fileData=>{fileData&&fileData.data?response.base.file=fileData:response.base=null}).catch(e=>logger.error(e)):Promise.resolve()}function refineItemState(state,deliveryUri){if(!state)return Promise.resolve(state);const filePromises=Object.keys(state).map(identifier=>{const{response}=state[identifier];return refineFileResponse(response,deliveryUri)});return Promise.all(filePromises).then(()=>state)}const logger=loggerFactory("taoOutcomeUi/viewResults"),downloadUrl=urlHelper.route("getFile","Results","taoOutcomeUi"),dataUrl=urlHelper.route("getVariableFile","Results","taoOutcomeUi"),viewResultController={start(){const conf=module.config(),deliveryUri=conf.classUri,$container=$("#view-result"),$resultFilterField=$(".result-filter",$container),$classFilterField=$("[name=\"class-filter\"]",$container);let classFilter=JSON.parse(conf.filterTypes)||[];for(let i in $resultFilterField.select2({minimumResultsForSearch:-1}).select2("val",conf.filterSubmission||"all"),classFilter)$(`[value = "${classFilter[i]}"]`).prop("checked","checked");$(".result-filter-btn",$container).click(()=>{classFilter=[""],$classFilterField.each(function(){$(this).prop("checked")&&classFilter.push($(this).val())}),section.loadContentBlock(urlHelper.route("viewResult","Results","taoOutcomeUi"),{id:conf.id,classUri:conf.classUri,filterSubmission:$resultFilterField.select2("val"),filterTypes:classFilter})}),$("#xmlDownload",$container).on("click",function(){$.fileDownload(urlHelper.route("downloadXML","Results","taoOutcomeUi"),{failMessageHtml:__("Unexpected error occurred when generating your report. Please contact your system administrator."),httpMethod:"GET",data:{id:conf.id,delivery:conf.classUri}})}),$("[id^=fileDownload]",$container).on("click",function(){const variableUri=$(this).val();$.fileDownload(downloadUrl,{httpMethod:"POST",data:{variableUri,deliveryUri}})}),$(".delete",$container).on("click",function(){dialogConfirm(__("Please confirm deletion"),function(){$.ajax({url:urlHelper.route("delete","Results","taoOutcomeUi"),type:"POST",data:{uri:uriHelper.encode(conf.id)},dataType:"json"}).done(function(response){response.deleted?(feedback().success(__("Result has been deleted")),router.dispatch("tao/Main/index")):feedback().error(__("Something went wrong...")+"
"+encode.html(response.error),{encodeHtml:!1})}).fail(function(){feedback().error(__("Something went wrong..."))})})}),$(".print",$container).on("click",function(){window.print()}),$(".preview",$container).on("click",function(e){const $btn=$(this),deliveryId=$btn.data("deliveryId"),resultId=$btn.data("resultId"),itemDefinition=$btn.data("definition");let uri=$btn.data("uri");const type=$btn.data("type");e.preventDefault(),$btn.prop("disabled")||($btn.prop("disabled",!0).addClass("disabled"),deliveryId&&resultId&&itemDefinition&&(uri={uri:uri,resultId:resultId,itemDefinition:itemDefinition,deliveryUri:deliveryId}),Promise.resolve($btn.data("state")).then(state=>refineItemState(state,deliveryUri)).then(state=>{$btn.removeProp("disabled").removeClass("disabled"),previewerFactory(type,uri,state,{view:"reviewRenderer",fullPage:!0})}).catch(err=>logger.error(err)))})}};return viewResultController}),define("taoOutcomeUi/loader/taoOutcomeUi.bundle",function(){}),define("taoOutcomeUi/loader/taoOutcomeUi.min",["taoItems/loader/taoItems.min"],function(){}); //# sourceMappingURL=taoOutcomeUi.min.js.map \ No newline at end of file diff --git a/views/js/loader/taoOutcomeUi.min.js.map b/views/js/loader/taoOutcomeUi.min.js.map index d440198c..0dda773d 100644 --- a/views/js/loader/taoOutcomeUi.min.js.map +++ b/views/js/loader/taoOutcomeUi.min.js.map @@ -1 +1 @@ -{"version":3,"names":["define","__","binder","pluginFactory","urlHelper","name","init","resultsList","getHost","action","binding","url","route","addAction","id","label","icon","viewResults","context","classUri","getClassUri","exec","$","uri","encode","dialogConfirm","feedback","deleteResults","ajax","type","data","dataType","done","response","deleted","success","refresh","error","html","encodeHtml","trigger","fail","err","downloadResults","fileDownload","failMessageHtml","httpMethod","delivery","pluginLoader","actionView","actionDelete","actionDownload","_","areaBroker","requireAreas","partial","hb","template","Handlebars","depth0","helpers","partials","compilerInfo","merge","Promise","component","resultsAreaBroker","listTpl","resultsListFactory","config","pluginFactories","pluginRun","method","execStack","forEach","plugins","plugin","isFunction","push","all","actions","isPlainObject","TypeError","isString","dataUrl","model","isArray","decode","getListArea","datatable","descriptor","getConfig","getActions","before","onRender","self","$component","list","getName","then","empty","on","setState","filter","searchable","labels","catch","reject","onDestroy","setTemplate","module","loggerFactory","request","loadingBar","taskQueue","resultsPluginsLoader","treeTaskButtonFactory","reportError","stop","logger","Error","message","start","$container","searchContainer","removeData","listConfig","dataModel","taskButton","taskButtonExportSQL","exclude","remove","add","length","load","getPlugins","after","render","replace","register","actionContext","pick","uniqueValue","setTaskConfig","taskCreationUrl","taskCreationData","window","open","info","locale","resultModalTpl","getNumRows","lineHeight","searchPagination","$upperElem","topSpace","offset","top","height","parseInt","css","availableHeight","$window","outerHeight","MSInputMethodContext","document","documentMode","StyleMedia","Math","min","floor","getRequestErrorMessage","xhr","responseJSON","parseJSON","responseText","e","viewResult","rowId","res","parseRowId","result","append","$resultsListContainer","modal","startClosed","minWidth","\"max-height\"","overflow","$target","target","$element","is","hasClass","parent","$modalContainer","parents","zIndex","checkValidItem","start_time","downloadResult","split","$contentBlock","resizeContainer","padding","innerHeight","debounce","sortable","paginationStrategyTop","paginationStrategyBottom","rows","sortby","sortorder","view","disabled","download","title","urlUtil","standardTaskButtonFactory","dateRangeFactory","resulTableController","conf","$filterField","$filterButtonsContainer","$tableContainer","$dateStartRangeContainer","$dateEndRangeContainer","deStartFrom","deStartTo","deEndFrom","deEndTo","columns","groups","filterDeStartRange","startPicker","setup","format","field","endPicker","v","console","log","hide","filterDeEndRange","buildGrid","col","find","resCol","isEqual","first","concat","always","_buildTable","colId","prop","contextType","contextId","variableIdentifier","columnId","off","startfrom","startto","endfrom","endto","querytype","params","JSON","stringify","_search","filterChanged","select2","getStart","getEnd","each","$elt","group","preventDefault","$btn","toggleClass","minimumResultsForSearch","click","getTaskRequestData","allowSqlExport","Results","index","ResultTable","ResultsMonitoring","section","previewerFactory","uriHelper","router","requestFileContent","variableUri","deliveryUri","mime","refineFileResponse","file","base","fileData","resolve","refineItemState","state","filePromises","Object","keys","map","identifier","downloadUrl","viewResultController","$resultFilterField","$classFilterField","classFilter","parse","filterTypes","i","filterSubmission","val","loadContentBlock","dispatch","print","deliveryId","resultId","itemDefinition","addClass","removeProp","removeClass","fullPage"],"sources":["/github/workspace/tao/views/build/config-wrap-start-default.js","../plugins/results/action/view.js","../plugins/results/action/delete.js","../plugins/results/action/download.js","../component/results/pluginsLoader.js","../component/results/areaBroker.js","../component/results/list!tpl","../component/results/list.js","../controller/inspectResults.js","../controller/resultModal!tpl","../controller/resultsMonitoring.js","../controller/resultTable.js","../controller/routes.js","../controller/viewResult.js","module-create.js","/github/workspace/tao/views/build/config-wrap-end-default.js"],"sourcesContent":["\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/plugins/results/action/view',[\n 'i18n',\n 'layout/actions/binder',\n 'core/plugin',\n 'util/url'\n], function (__, binder, pluginFactory, urlHelper) {\n 'use strict';\n\n /**\n * Will add a \"View\" button on each line of the list of results\n */\n return pluginFactory({\n name: 'view',\n\n init: function init() {\n var resultsList = this.getHost();\n var action = {\n binding: 'load',\n url: urlHelper.route('viewResult', 'Results', 'taoOutcomeUi')\n };\n\n // this action will be available for each displayed line in the list\n resultsList.addAction({\n id: 'view',\n label: __('View'),\n icon: 'view',\n action: function viewResults(id) {\n var context = {\n id: id,\n classUri: resultsList.getClassUri()\n };\n\n binder.exec(action, context);\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/plugins/results/action/delete',[\n 'jquery',\n 'i18n',\n 'uri',\n 'core/plugin',\n 'util/url',\n 'util/encode',\n 'ui/dialog/confirm',\n 'ui/feedback'\n], function ($, __, uri, pluginFactory, urlHelper, encode, dialogConfirm, feedback) {\n 'use strict';\n\n /**\n * Will add a \"Delete\" button on each line of the list of results\n */\n return pluginFactory({\n name: 'delete',\n\n init: function init() {\n var resultsList = this.getHost();\n\n // this action will be available for each displayed line in the list\n resultsList.addAction({\n id: 'delete',\n label: __('Delete'),\n icon: 'delete',\n action: function deleteResults(id) {\n // prompt a confirmation dialog and then delete the result\n dialogConfirm(__('Please confirm deletion'), function () {\n $.ajax({\n url: urlHelper.route('delete', 'Results', 'taoOutcomeUi'),\n type: \"POST\",\n data: {\n uri: uri.encode(id)\n },\n dataType: 'json'\n }).done(function (response) {\n if (response.deleted) {\n feedback().success(__('Result has been deleted'));\n resultsList.refresh();\n } else {\n feedback().error(__('Something went wrong...') + '
' + encode.html(response.error), {encodeHtml: false});\n resultsList.trigger('error', response.error);\n }\n }).fail(function (err) {\n feedback().error(__('Something went wrong...'));\n resultsList.trigger('error', err);\n });\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/plugins/results/action/download',[\n 'jquery',\n 'i18n',\n 'core/plugin',\n 'util/url',\n 'jquery.fileDownload'\n], function ($, __, pluginFactory, urlHelper) {\n 'use strict';\n\n /**\n * Will add a \"Download\" button on each line of the list of results\n */\n return pluginFactory({\n name: 'download',\n\n init: function init() {\n var resultsList = this.getHost();\n\n // this action will be available for each displayed line in the list\n resultsList.addAction({\n id: 'download',\n label: __('Export Results'),\n icon: 'export',\n action: function downloadResults(id) {\n $.fileDownload(urlHelper.route('downloadXML', 'Results', 'taoOutcomeUi'), {\n failMessageHtml: __(\"Unexpected error occurred when generating your report. Please contact your system administrator.\"),\n httpMethod: 'GET',\n data: {\n id: id,\n delivery: resultsList.getClassUri()\n }\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/component/results/pluginsLoader',[\n 'core/pluginLoader',\n 'taoOutcomeUi/plugins/results/action/view',\n 'taoOutcomeUi/plugins/results/action/delete',\n 'taoOutcomeUi/plugins/results/action/download'\n], function (pluginLoader, actionView, actionDelete, actionDownload) {\n 'use strict';\n\n /**\n * Instantiates the plugin loader with all the required plugins configured\n */\n return pluginLoader({\n action: [actionView, actionDelete, actionDownload]\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/component/results/areaBroker',[\n 'lodash',\n 'ui/areaBroker'\n], function (_, areaBroker) {\n 'use strict';\n\n var requireAreas = [\n 'list'\n ];\n\n /**\n * Creates an area broker with the required areas for the list of results\n *\n * @see ui/areaBroker\n *\n * @param {jQueryElement|HTMLElement|String} $container - the main container\n * @param {Object} mapping - keys are the area names, values are jQueryElement\n * @returns {broker} the broker\n * @throws {TypeError} without a valid container\n */\n return _.partial(areaBroker, requireAreas);\n});\n\n","\ndefine('tpl!taoOutcomeUi/component/results/list', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
\\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/component/results/list',[\n 'jquery',\n 'i18n',\n 'lodash',\n 'uri',\n 'core/promise',\n 'ui/component',\n 'taoOutcomeUi/component/results/areaBroker',\n 'tpl!taoOutcomeUi/component/results/list',\n 'ui/datatable'\n], function ($, __, _, uri, Promise, component, resultsAreaBroker, listTpl) {\n 'use strict';\n\n /**\n * Component that lists all the results entry points for a particular delivery\n *\n * @param {Object} config\n * @param {String} config.classUri\n * @param {String} config.dataUrl\n * @param {Object} config.model\n * @param {Array} pluginFactories\n * @returns {resultsList}\n */\n function resultsListFactory(config, pluginFactories) {\n var resultsList;\n var areaBroker;\n var plugins = {};\n var actions = [];\n var classUri;\n\n /**\n * Calls a method from each plugins\n *\n * @param {String} method - the name of the method to run\n * @returns {Promise} Resolved when all plugins are done\n */\n function pluginRun(method) {\n var execStack = [];\n\n _.forEach(plugins, function (plugin) {\n if (_.isFunction(plugin[method])) {\n execStack.push(plugin[method]());\n }\n });\n\n return Promise.all(execStack);\n }\n\n if (!_.isPlainObject(config)) {\n throw new TypeError('The configuration is required');\n }\n if (!_.isString(config.classUri) || !config.classUri) {\n throw new TypeError('The class URI is required');\n }\n if (!_.isString(config.dataUrl) || !config.dataUrl) {\n throw new TypeError('The service URL is required');\n }\n if (!_.isPlainObject(config.model) && !_.isArray(config.model)) {\n throw new TypeError('The data model is required');\n }\n\n classUri = uri.decode(config.classUri);\n\n /**\n *\n * @typedef {resultsList}\n */\n resultsList = component({\n\n /**\n * Refreshes the list\n * @returns {resultsList} chains\n */\n refresh: function refresh() {\n areaBroker.getListArea().datatable('refresh');\n return this;\n },\n\n /**\n * Add a line action\n * @param {String|Object} name\n * @param {Function|Object} [action]\n * @returns {resultsList} chains\n */\n addAction: function addAction(name, action) {\n var descriptor;\n\n if (_.isPlainObject(name)) {\n descriptor = name;\n } else if (_.isPlainObject(action)) {\n descriptor = action;\n action.id = name;\n } else {\n descriptor = {\n id: name,\n label: name\n };\n }\n\n if (_.isFunction(action)) {\n descriptor.action = action;\n }\n if (!descriptor.label) {\n descriptor.label = descriptor.id;\n }\n\n actions.push(descriptor);\n\n return this;\n },\n\n /**\n * Gives an access to the config\n * @returns {Object}\n */\n getConfig: function getConfig() {\n return this.config;\n },\n\n /**\n * Gets the class URI\n * @returns {String}\n */\n getClassUri: function getClassUri() {\n return classUri;\n },\n\n /**\n * Gets the registered actions\n * @returns {Array}\n */\n getActions: function getActions() {\n return actions;\n }\n });\n\n return resultsList\n .before('render', function onRender() {\n var self = this;\n\n areaBroker = resultsAreaBroker(this.$component, {\n 'list': $('.list', this.$component)\n });\n\n _.forEach(pluginFactories, function (pluginFactory) {\n var plugin = pluginFactory(self, areaBroker);\n plugins[plugin.getName()] = plugin;\n });\n\n return pluginRun('init')\n .then(function() {\n return pluginRun('render');\n })\n .then(function () {\n areaBroker.getListArea()\n .empty()\n .on('query.datatable', function () {\n self.setState('loading', true)\n .trigger('loading');\n })\n .on('load.datatable', function () {\n self.setState('loading', false)\n .trigger('loaded');\n })\n .datatable({\n url: self.config.dataUrl,\n model: self.config.model,\n actions: actions,\n filter: self.config.searchable,\n labels: {\n filter: __('Search by delivery results')\n }\n });\n })\n .catch(function (err) {\n self.trigger('error', err);\n return Promise.reject(err);\n });\n })\n .before('destroy', function onDestroy() {\n var self = this;\n\n return pluginRun('destroy')\n .then(function () {\n areaBroker.getListArea().empty();\n })\n .catch(function (err) {\n self.trigger('error', err);\n });\n })\n .setTemplate(listTpl)\n .init(config);\n }\n\n return resultsListFactory;\n});\n\n","/**\n * @author Bertrand Chevrier \n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/controller/inspectResults',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'module',\n 'core/logger',\n 'core/dataProvider/request',\n 'util/url',\n 'layout/actions/binder',\n 'layout/loading-bar',\n 'ui/feedback',\n 'ui/taskQueue/taskQueue',\n 'taoOutcomeUi/component/results/pluginsLoader',\n 'taoOutcomeUi/component/results/list',\n 'ui/taskQueueButton/treeButton'\n], function (\n $,\n _,\n __,\n module,\n loggerFactory,\n request,\n urlHelper,\n binder,\n loadingBar,\n feedback,\n taskQueue,\n resultsPluginsLoader,\n resultsListFactory,\n treeTaskButtonFactory\n) {\n 'use strict';\n\n const logger = loggerFactory('controller/inspectResults');\n\n /**\n * Take care of errors\n * @param err\n */\n function reportError(err) {\n loadingBar.stop();\n\n logger.error(err);\n\n if (err instanceof Error) {\n feedback().error(err.message);\n }\n }\n\n /**\n * @exports taoOutcomeUi/controller/resultTable\n */\n return {\n /**\n * Controller entry point\n */\n start: function () {\n const config = module.config() || {};\n const $container = $('#inspect-result');\n const classUri = $container.data('uri');\n const searchContainer = $('.action-bar .search-area');\n if (searchContainer.data('show-result')) {\n const action = {\n binding: 'load',\n url: urlHelper.route('viewResult', 'Results', 'taoOutcomeUi')\n };\n const context = {\n id: searchContainer.data('show-result'),\n classUri\n };\n searchContainer.removeData('show-result');\n binder.exec(action, context);\n return;\n }\n const listConfig = {\n dataUrl: urlHelper.route('getResults', 'Results', 'taoOutcomeUi', {\n classUri: classUri\n }),\n model: config.dataModel,\n searchable: config.searchable,\n classUri: classUri\n };\n let taskButton;\n let taskButtonExportSQL;\n\n loadingBar.start();\n\n _.forEach(config.plugins, function (plugin) {\n if (plugin && plugin.module) {\n if (plugin.exclude) {\n resultsPluginsLoader.remove(plugin.module);\n } else {\n resultsPluginsLoader.add(plugin);\n }\n }\n });\n\n if ($container.length) {\n resultsPluginsLoader\n .load()\n .then(function () {\n resultsListFactory(listConfig, resultsPluginsLoader.getPlugins())\n .on('error', reportError)\n .on('success', function (message) {\n feedback().success(message);\n })\n .before('loading', function () {\n loadingBar.start();\n })\n .after('loaded', function () {\n loadingBar.stop();\n })\n .render($('.inspect-results-grid', $container));\n })\n .catch(reportError);\n } else {\n loadingBar.stop();\n }\n\n taskButton = treeTaskButtonFactory({\n replace: true,\n icon: 'export',\n label: __('Export CSV'),\n taskQueue: taskQueue\n }).render($('#results-csv-export'));\n\n binder.register('export_csv', function remove(actionContext) {\n const data = _.pick(actionContext, ['uri', 'classUri', 'id']);\n const uniqueValue = data.uri || data.classUri || '';\n taskButton\n .setTaskConfig({\n taskCreationUrl: this.url,\n taskCreationData: { uri: uniqueValue }\n })\n .start();\n });\n\n if ($('#results-sql-export').length) {\n taskButtonExportSQL = treeTaskButtonFactory({\n replace: true,\n icon: 'export',\n label: __('Export SQL'),\n taskQueue: taskQueue\n }).render($('#results-sql-export'));\n\n binder.register('export_sql', function remove(actionContext) {\n const data = _.pick(actionContext, ['uri', 'classUri', 'id']);\n const uniqueValue = data.uri || data.classUri || '';\n taskButtonExportSQL\n .setTaskConfig({\n taskCreationUrl: this.url,\n taskCreationData: { uri: uniqueValue }\n })\n .start();\n });\n }\n\n binder.register('open_url', function (actionContext) {\n const data = _.pick(actionContext, ['uri', 'classUri', 'id']);\n\n request(this.url, data, 'POST')\n .then(response => {\n const url = response.url;\n\n if (url) {\n window.open(url, '_blank');\n } else {\n feedback().info(__('The URL does not exist.'));\n }\n })\n .catch(reportError);\n });\n }\n };\n});\n\n","\ndefine('tpl!taoOutcomeUi/controller/resultModal', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
\\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 ;\n */\n/**\n * @author Aleksej Tikhanovich, \n */\n\ndefine('taoOutcomeUi/controller/resultsMonitoring',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'util/url',\n 'uri',\n 'ui/feedback',\n 'util/locale',\n 'util/encode',\n 'layout/loading-bar',\n 'layout/actions/binder',\n 'ui/dialog/confirm',\n 'tpl!taoOutcomeUi/controller/resultModal',\n 'ui/datatable'\n], function ($, _, __, url, uri, feedback, locale, encode, loadingBar, binder, dialogConfirm, resultModalTpl) {\n 'use strict';\n\n var $resultsListContainer = $('.results-list-container');\n var $window = $(window);\n\n /**\n * Internet Explorer and Edge will not open the detail view when the table row was below originally below the fold.\n * This is not cause by a too low container or some sort of overlay. As a workaround they get just as many rows\n * as they can handle in one fold.\n * @returns {number}\n */\n function getNumRows() {\n var lineHeight = 30;\n var searchPagination = 70;\n var $upperElem = $('.content-container h2');\n var topSpace = $upperElem.offset().top\n + $upperElem.height()\n + parseInt($upperElem.css('margin-bottom'), 10)\n + lineHeight\n + searchPagination;\n var availableHeight = $window.height() - topSpace - $('footer.dark-bar').outerHeight();\n if(!window.MSInputMethodContext && !document.documentMode && !window.StyleMedia) {\n return 25;\n }\n return Math.min(Math.floor(availableHeight / lineHeight), 25);\n }\n\n\n\n function getRequestErrorMessage (xhr) {\n loadingBar.start();\n var message = '';\n try {\n var responseJSON = $.parseJSON(xhr.responseText);\n if (responseJSON.message) {\n message = responseJSON.message;\n } else {\n message = xhr.responseText;\n }\n } catch (e) {\n message = xhr.responseText;\n }\n return message;\n }\n\n function viewResult(rowId) {\n var res = parseRowId(rowId);\n loadingBar.start();\n $.ajax({\n url : url.route('viewResult', 'Results', 'taoOutcomeUi', {id : res[0], classUri: res[1]}),\n type : 'GET',\n success : function (result) {\n\n var $container = $(resultModalTpl()).append(result);\n $resultsListContainer.append($container);\n $container.modal({\n startClosed : false,\n minWidth : 450,\n top: 50\n });\n $container.css({'max-height': $window.height() - 80 + 'px', 'overflow': 'auto'});\n $container.on('click', function(e) {\n var $target = $(e.target);\n var $element = null;\n\n if ($target.is('a') && $target.hasClass(\"preview\")) {\n $element = $target;\n } else {\n if ($target.is('span') && $target.parent().hasClass(\"preview\")) {\n $element = $target.parent();\n }\n }\n\n if ($element) {\n // the trigger button might itself be inside a modal, in this case close that modal before doing anything else\n // only one modal should be open\n var $modalContainer = $element.parents('.modal');\n if ($modalContainer.length) {\n $modalContainer.trigger('closed.modal');\n }\n $('.preview-overlay').css({ zIndex: $container.modal().css('z-index') + 1 });\n }\n });\n $container\n .on('closed.modal', function(){\n $container.modal('destroy');\n $('.modal-bg').remove();\n $(this).remove();\n });\n loadingBar.stop();\n },\n error : function (xhr, err) {\n var message = getRequestErrorMessage(xhr);\n feedback().error(message, {encodeHtml : false});\n loadingBar.stop();\n }\n });\n }\n\n function checkValidItem() {\n if (!this.start_time) {\n return true\n }\n return false;\n }\n\n function downloadResult(rowId) {\n var res = parseRowId(rowId);\n $.fileDownload(url.route('downloadXML', 'Results', 'taoOutcomeUi'), {\n failMessageHtml: __(\"Unexpected error occurred when generating your report. Please contact your system administrator.\"),\n httpMethod: 'GET',\n data: {\n id: res[0],\n delivery: res[1]\n }\n });\n }\n\n function parseRowId(rowId) {\n return rowId.split(\"|\");\n }\n\n return {\n start: function () {\n var $contentBlock = $resultsListContainer.parents(\".content-block\");\n\n var resizeContainer = function() {\n var padding = $contentBlock.innerHeight() - $contentBlock.height();\n\n //calculate height for contentArea\n $contentBlock.height(\n $window.height()\n - $(\"footer.dark-bar\").outerHeight()\n - $(\"header.dark-bar\").outerHeight()\n - $(\".tab-container\").outerHeight()\n - $(\".action-bar.content-action-bar\").outerHeight()\n - padding\n );\n };\n\n $window.on('resize', _.debounce(resizeContainer, 300));\n resizeContainer();\n\n $resultsListContainer\n .datatable({\n url: url.route('data', 'ResultsMonitoring', 'taoOutcomeUi'),\n filter: true,\n labels: {\n filter: __('Search by results')\n },\n model: [{\n id: 'delivery',\n label: __('Delivery'),\n sortable: false\n }, {\n id: 'deliveryResultIdentifier',\n label: __('Delivery Execution'),\n sortable: false,\n }, {\n id: 'userName',\n label: __('Test Taker'),\n sortable: false\n }, {\n id: 'start_time',\n label: __('Start Time'),\n sortable: false\n }],\n paginationStrategyTop: 'simple',\n paginationStrategyBottom: 'pages',\n rows: getNumRows(),\n sortby: 'result_id',\n sortorder: 'desc',\n actions : {\n 'view' : {\n id: 'view',\n label: __('View'),\n icon: 'external',\n action: viewResult,\n disabled: checkValidItem\n },\n 'download' :{\n id : 'download',\n title : __('Download result'),\n icon : 'download',\n label : __('Download'),\n action: downloadResult,\n disabled: checkValidItem\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) 2014-2022 (original work) Open Assessment Technologies SA;\n */\n\n/**\n * @author Bertrand Chevrier \n */\ndefine('taoOutcomeUi/controller/resultTable',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'module',\n 'util/url',\n 'ui/feedback',\n 'ui/taskQueue/taskQueue',\n 'ui/taskQueueButton/standardButton',\n 'ui/dateRange/dateRange',\n 'layout/loading-bar',\n 'ui/datatable'\n], function($, _, __, module, urlUtil, feedback, taskQueue, standardTaskButtonFactory, dateRangeFactory, loadingBar) {\n 'use strict';\n\n /**\n * @exports taoOutcomeUi/controller/resultTable\n */\n var resulTableController = {\n\n /**\n * Controller entry point\n */\n start : function start() {\n\n var conf = module.config();\n var $container = $(\".result-table\");\n var $filterField = $('.result-filter', $container);\n var $filterButtonsContainer = $('.filter-buttons', $container);\n var $tableContainer = $('.result-table-container', $container);\n var $dateStartRangeContainer = $('.de-start-range', $container);\n var $dateEndRangeContainer = $('.de-end-range', $container);\n var filter = conf.filter || 'lastSubmitted';\n var deStartFrom = '';\n var deStartTo = '';\n var deEndFrom = '';\n var deEndTo = '';\n var uri = conf.uri || '';\n //keep columns through calls\n var columns = [];\n var groups = {};\n\n //setup the date range pickers\n var filterDeStartRange = dateRangeFactory($dateStartRangeContainer, {\n startPicker: {\n setup: 'datetime',\n format: 'YYYY-MM-DD HH:mm:ss',\n field: {\n name: 'periodStart',\n }\n },\n endPicker: {\n setup: 'datetime',\n format: 'YYYY-MM-DD HH:mm:ss',\n field: {\n name: 'periodEnd'\n }\n }\n })\n .on('change', function (v) {\n console.log('changed', v)\n })\n .on('render', function () {\n $('button', $dateStartRangeContainer).hide();\n });\n\n var filterDeEndRange = dateRangeFactory($dateEndRangeContainer, {\n startPicker: {\n setup: 'datetime',\n format: 'YYYY-MM-DD HH:mm:ss',\n field: {\n name: 'periodStart',\n }\n },\n endPicker: {\n setup: 'datetime',\n format: 'YYYY-MM-DD HH:mm:ss',\n field: {\n name: 'periodEnd'\n }\n }\n })\n .on('render', function () {\n $('button', $dateEndRangeContainer).hide();\n });\n\n /**\n * Load columns to rebuild the datatable dynamically\n * @param {String} url - the URL that retrieve the columns\n * @param {String} [action = 'add'] - 'add' or 'remove' the retrieved columns\n * @param {Function} done - once the datatable is loaded\n */\n var buildGrid = function buildGrid(url, action, done) {\n loadingBar.start();\n $.ajax({\n url: url,\n dataType: 'json',\n data: {filter: filter, uri: uri},\n type: 'GET'\n }).done(function (response) {\n if (response && response.columns) {\n if (action === 'remove') {\n columns = _.reject(columns, function (col) {\n return _.find(response.columns, function (resCol) {\n return _.isEqual(col, resCol);\n });\n });\n } else {\n if (typeof response.first !== 'undefined' && response.first === true) {\n columns = response.columns.concat(columns);\n } else {\n columns = columns.concat(response.columns);\n }\n }\n }\n if (_.isFunction(done)) {\n done();\n }\n }).always(function () {\n loadingBar.stop();\n });\n };\n\n /**\n * Rebuild the datatable\n * @param {Function} done - once the datatable is loaded\n */\n var _buildTable = function _buildTable(done) {\n var model = [];\n\n //set up model from columns\n _.forEach(columns, function (col) {\n var colId = col.prop ? (col.prop + '_' + col.contextType) : (col.contextId + '_' + col.variableIdentifier);\n if(col.columnId){\n colId= col.columnId\n }\n model.push({\n id: colId,\n label: col.label,\n sortable: false\n });\n });\n\n //re-build the datatable\n $tableContainer\n .empty()\n .data('ui.datatable', null)\n .off('load.datatable')\n .on('load.datatable', function () {\n if (_.isFunction(done)) {\n done();\n done = '';\n }\n })\n .datatable({\n url: urlUtil.route('feedDataTable', 'ResultTable', 'taoOutcomeUi',\n {\n filter: filter,\n startfrom: deStartFrom,\n startto: deStartTo,\n endfrom: deEndFrom,\n endto: deEndTo\n }),\n querytype: 'POST',\n params: {columns: JSON.stringify(columns), '_search': false, uri: uri},\n model: model\n });\n };\n\n var filterChanged = function filterChanged() {\n filter = $filterField.select2('val');\n deStartFrom = filterDeStartRange.getStart();\n deStartTo = filterDeStartRange.getEnd();\n deEndFrom = filterDeEndRange.getStart();\n deEndTo = filterDeEndRange.getEnd();\n //rebuild the current table\n _buildTable();\n };\n\n //group button to toggle them\n $('[data-group]', $container).each(function () {\n var $elt = $(this);\n var group = $elt.data('group');\n var action = $elt.data('action');\n groups[group] = groups[group] || {};\n groups[group][action] = $elt;\n });\n\n //regarding button data, we rebuild the table\n $container.on('click', '[data-group]', function (e) {\n var $elt = $(this);\n var group = $elt.data('group');\n var action = $elt.data('action');\n var url = $elt.data('url');\n e.preventDefault();\n buildGrid(url, action, function () {\n _.forEach(groups[group], function ($btn) {\n $btn.toggleClass('hidden');\n });\n });\n });\n\n //default table\n buildGrid(urlUtil.route('getTestTakerColumns', 'ResultTable', 'taoOutcomeUi', {filter: filter}));\n\n //setup the filtering\n $filterField.select2({\n minimumResultsForSearch: -1\n }).select2('val', filter);\n\n $('.result-filter-btn', $container)\n .click(function () {\n filterChanged();\n });\n\n //instantiate the task creation button\n standardTaskButtonFactory({\n type: 'info',\n icon: 'export',\n title: __('Export CSV File'),\n label: __('Export CSV File'),\n taskQueue: taskQueue,\n taskCreationUrl: urlUtil.route('export', 'ResultTable', 'taoOutcomeUi'),\n taskCreationData: function getTaskRequestData() {\n return {\n filter: filter,\n columns: JSON.stringify(columns),\n uri: uri,\n startfrom: deStartFrom,\n startto: deStartTo,\n endfrom: deEndFrom,\n endto: deEndTo\n };\n }\n }).on('error', function (err) {\n feedback().error(err);\n }).render($filterButtonsContainer);\n\n if (conf.allowSqlExport) {\n standardTaskButtonFactory({\n type: 'info',\n icon: 'export',\n title: __('Export SQL File'),\n label: __('Export SQL File'),\n taskQueue: taskQueue,\n taskCreationUrl: urlUtil.route('exportSQL', 'ResultTable', 'taoOutcomeUi'),\n taskCreationData: function getTaskRequestData() {\n filterChanged();\n return {\n filter: filter,\n columns: JSON.stringify(columns),\n uri: uri,\n startfrom: deStartFrom,\n startto: deStartTo,\n endfrom: deEndFrom,\n endto: deEndTo\n };\n }\n }).on('error', function (err) {\n feedback().error(err);\n }).render($filterButtonsContainer);\n }\n }\n };\n return resulTableController;\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 (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('taoOutcomeUi/controller/routes',[],function(){\n 'use strict';\n\n return {\n 'Results': {\n 'actions': {\n 'viewResult' : 'controller/viewResult',\n 'index' : 'controller/inspectResults'\n }\n },\n 'ResultTable': {\n 'actions': {\n 'index' : 'controller/resultTable'\n }\n },\n 'ResultsMonitoring': {\n 'actions': {\n 'index': 'controller/resultsMonitoring'\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-2021 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Bertrand Chevrier \n */\ndefine('taoOutcomeUi/controller/viewResult',[\n 'module',\n 'jquery',\n 'i18n',\n 'util/url',\n 'core/logger',\n 'core/request',\n 'layout/section',\n 'taoItems/previewer/factory',\n 'ui/dialog/confirm',\n 'uri',\n 'ui/feedback',\n 'core/router',\n 'jquery.fileDownload'\n], function (\n module,\n $,\n __,\n urlHelper,\n loggerFactory,\n request,\n section,\n previewerFactory,\n dialogConfirm,\n uriHelper,\n feedback,\n router\n) {\n 'use strict';\n\n const logger = loggerFactory('taoOutcomeUi/viewResults');\n const downloadUrl = urlHelper.route('getFile', 'Results', 'taoOutcomeUi');\n const dataUrl = urlHelper.route('getVariableFile', 'Results', 'taoOutcomeUi');\n\n /**\n * Requests a file content given the URIs\n * @param {String} variableUri - The URI of a variable\n * @param {String} deliveryUri - The URI of a delivery\n * @returns {Promise}\n */\n function requestFileContent(variableUri, deliveryUri) {\n return request({\n url: dataUrl,\n method: 'POST',\n data: { variableUri, deliveryUri }\n })\n .then(response => {\n // The response may contain more than the expected data,\n // like the success status, which is not relevant here.\n // Hence this rewriting.\n const { data, name, mime } = response;\n return { data, name, mime };\n });\n }\n\n /**\n * Makes sure the response contains the file data if it is a file record\n * @param {Object} response\n * @param {String} deliveryUri\n * @returns {Promise}\n */\n function refineFileResponse(response, deliveryUri) {\n const { file } = response && response.base || {};\n if (file && file.uri && !file.data) {\n return requestFileContent(file.uri, deliveryUri)\n .then(fileData => {\n if (fileData && fileData.data) {\n response.base.file = fileData;\n } else {\n response.base = null;\n }\n })\n .catch(e => logger.error(e));\n }\n return Promise.resolve();\n }\n\n /**\n * Makes sure the item state contains the file data in the response if it is a file record\n * @param {Object} state\n * @param {String} deliveryUri\n * @returns {Promise}\n */\n function refineItemState(state, deliveryUri) {\n if (!state) {\n return Promise.resolve(state);\n }\n\n const filePromises = Object.keys(state).map(identifier => {\n const { response } = state[identifier];\n return refineFileResponse(response, deliveryUri);\n });\n return Promise.all(filePromises).then(() => state);\n }\n\n /**\n * @exports taoOutcomeUi/controller/viewResult\n */\n const viewResultController = {\n\n /**\n * Controller entry point\n */\n start(){\n const conf = module.config();\n const deliveryUri = conf.classUri;\n const $container = $('#view-result');\n const $resultFilterField = $('.result-filter', $container);\n const $classFilterField = $('[name=\"class-filter\"]', $container);\n let classFilter = JSON.parse(conf.filterTypes) || [];\n\n //set up filter field\n $resultFilterField.select2({\n minimumResultsForSearch : -1\n }).select2('val', conf.filterSubmission || 'all');\n\n for (let i in classFilter) {\n $(`[value = \"${classFilter[i]}\"]`).prop('checked', 'checked');\n }\n\n $('.result-filter-btn', $container).click(() => {\n classFilter = [''];\n $classFilterField.each(function () {\n if ($(this).prop('checked')) {\n classFilter.push($(this).val());\n }\n });\n section.loadContentBlock(\n urlHelper.route('viewResult', 'Results', 'taoOutcomeUi'),\n {\n id: conf.id,\n classUri: conf.classUri,\n filterSubmission: $resultFilterField.select2('val'),\n filterTypes: classFilter\n }\n );\n });\n\n\n //bind the xml download button\n $('#xmlDownload', $container).on('click', function () {\n $.fileDownload(urlHelper.route('downloadXML', 'Results', 'taoOutcomeUi'), {\n failMessageHtml: __(\"Unexpected error occurred when generating your report. Please contact your system administrator.\"),\n httpMethod: 'GET',\n data: {\n id: conf.id,\n delivery: conf.classUri\n }\n });\n });\n\n // bind the file download button\n $('[id^=fileDownload]', $container).on('click', function () {\n const variableUri = $(this).val();\n $.fileDownload(downloadUrl, {\n httpMethod: 'POST',\n data: {\n variableUri,\n deliveryUri\n }\n });\n });\n\n //bind the download buttons\n $('.delete', $container).on('click', function () {\n dialogConfirm(__('Please confirm deletion'), function () {\n $.ajax({\n url: urlHelper.route('delete', 'Results', 'taoOutcomeUi'),\n type: \"POST\",\n data: {\n uri: uriHelper.encode(conf.id)\n },\n dataType: 'json'\n }).done(function (response) {\n if (response.deleted) {\n feedback().success(__('Result has been deleted'));\n // Hack to go back to the list of results\n router.dispatch('tao/Main/index');\n } else {\n feedback().error(__('Something went wrong...') + '
' + encode.html(response.error), {encodeHtml: false});\n }\n }).fail(function () {\n feedback().error(__('Something went wrong...'));\n });\n });\n });\n\n $('.print', $container).on('click', function () {\n window.print();\n });\n\n $('.preview', $container).on('click', function (e) {\n const $btn = $(this);\n const deliveryId = $btn.data('deliveryId');\n const resultId = $btn.data('resultId');\n const itemDefinition = $btn.data('definition');\n let uri = $btn.data('uri');\n const type = $btn.data('type');\n e.preventDefault();\n if ($btn.prop('disabled')) {\n return;\n }\n $btn.prop('disabled', true).addClass('disabled');\n\n if (deliveryId && resultId && itemDefinition) {\n uri = {\n uri: uri,\n resultId: resultId,\n itemDefinition: itemDefinition,\n deliveryUri: deliveryId\n };\n }\n\n Promise.resolve($btn.data('state'))\n .then(state => refineItemState(state, deliveryUri))\n .then(state => {\n $btn.removeProp('disabled').removeClass('disabled');\n previewerFactory(type, uri, state, {\n view: 'reviewRenderer',\n fullPage: true\n });\n })\n .catch(err => logger.error(err));\n });\n\n }\n };\n\n return viewResultController;\n});\n\n","\ndefine(\"taoOutcomeUi/loader/taoOutcomeUi.bundle\", function(){});\n","define(\"taoOutcomeUi/loader/taoOutcomeUi.min\", [\"taoItems/loader/taoItems.min\"], function(){});\n"],"mappings":"ACoBAA,MAAA,6CACA,OACA,wBACA,cACA,WACA,UAAAC,EAAA,CAAAC,MAAA,CAAAC,aAAA,CAAAC,SAAA,EACA,aAKA,OAAAD,aAAA,EACAE,IAAA,QAEAC,IAAA,UAAAA,KAAA,KACA,CAAAC,WAAA,MAAAC,OAAA,GACAC,MAAA,EACAC,OAAA,QACAC,GAAA,CAAAP,SAAA,CAAAQ,KAAA,uCACA,EAGAL,WAAA,CAAAM,SAAA,EACAC,EAAA,QACAC,KAAA,CAAAd,EAAA,SACAe,IAAA,QACAP,MAAA,UAAAQ,YAAAH,EAAA,EACA,IAAAI,OAAA,EACAJ,EAAA,CAAAA,EAAA,CACAK,QAAA,CAAAZ,WAAA,CAAAa,WAAA,EACA,EAEAlB,MAAA,CAAAmB,IAAA,CAAAZ,MAAA,CAAAS,OAAA,CACA,CACA,EACA,CACA,EACA,GCrCAlB,MAAA,+CACA,SACA,OACA,MACA,cACA,WACA,cACA,oBACA,cACA,UAAAsB,CAAA,CAAArB,EAAA,CAAAsB,GAAA,CAAApB,aAAA,CAAAC,SAAA,CAAAoB,MAAA,CAAAC,aAAA,CAAAC,QAAA,EACA,aAKA,OAAAvB,aAAA,EACAE,IAAA,UAEAC,IAAA,UAAAA,KAAA,EACA,IAAAC,WAAA,MAAAC,OAAA,GAGAD,WAAA,CAAAM,SAAA,EACAC,EAAA,UACAC,KAAA,CAAAd,EAAA,WACAe,IAAA,UACAP,MAAA,UAAAkB,cAAAb,EAAA,EAEAW,aAAA,CAAAxB,EAAA,uCACAqB,CAAA,CAAAM,IAAA,EACAjB,GAAA,CA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AAA,CAAAnQ,IAAA,CAAAN,GAAA,CAAAsR,KAAA,EACAxF,IAAA,kBACAiH,QAAA,GACA,EACA,GACA5N,KAAA,CAAAhE,GAAA,EAAA6E,MAAA,CAAAlF,KAAA,CAAAK,GAAA,GACA,EAEA,CACA,EAEA,OAAA0Q,oBACA,GCxPApT,MAAA,yDACAA,MCFA"} \ No newline at end of file +{"version":3,"names":["define","__","binder","pluginFactory","urlHelper","name","init","resultsList","getHost","action","binding","url","route","addAction","id","label","icon","viewResults","context","classUri","getClassUri","exec","$","uri","encode","dialogConfirm","feedback","deleteResults","ajax","type","data","dataType","done","response","deleted","success","refresh","error","html","encodeHtml","trigger","fail","err","downloadResults","fileDownload","failMessageHtml","httpMethod","delivery","pluginLoader","actionView","actionDelete","actionDownload","areaBroker","requireAreas","bind","hb","template","Handlebars","depth0","helpers","partials","compilerInfo","merge","_","Promise","component","resultsAreaBroker","listTpl","resultsListFactory","config","pluginFactories","pluginRun","method","execStack","forEach","plugins","plugin","push","all","actions","isPlainObject","TypeError","dataUrl","model","isArray","decode","getListArea","datatable","descriptor","getConfig","getActions","before","onRender","self","$component","list","getName","then","empty","on","setState","filter","searchable","labels","catch","reject","onDestroy","setTemplate","module","loggerFactory","request","loadingBar","taskQueue","resultsPluginsLoader","treeTaskButtonFactory","reportError","stop","logger","Error","message","start","$container","searchContainer","removeData","listConfig","dataModel","taskButton","taskButtonExportSQL","exclude","remove","add","length","load","getPlugins","after","render","replace","register","actionContext","_ref","uniqueValue","setTaskConfig","taskCreationUrl","taskCreationData","_ref2","_ref3","window","open","info","locale","resultModalTpl","getNumRows","lineHeight","searchPagination","$upperElem","topSpace","offset","top","height","parseInt","css","availableHeight","$window","outerHeight","MSInputMethodContext","document","documentMode","StyleMedia","Math","min","floor","getRequestErrorMessage","xhr","responseJSON","parseJSON","responseText","e","viewResult","rowId","res","parseRowId","result","append","$resultsListContainer","modal","startClosed","minWidth","\"max-height\"","overflow","$target","target","$element","is","hasClass","parent","$modalContainer","parents","zIndex","checkValidItem","start_time","downloadResult","split","$contentBlock","resizeContainer","padding","innerHeight","debounce","sortable","paginationStrategyTop","paginationStrategyBottom","rows","sortby","sortorder","view","disabled","download","title","urlUtil","standardTaskButtonFactory","dateRangeFactory","resulTableController","conf","$filterField","$filterButtonsContainer","$tableContainer","$dateStartRangeContainer","$dateEndRangeContainer","deStartFrom","deStartTo","deEndFrom","deEndTo","columns","groups","filterDeStartRange","startPicker","setup","format","field","endPicker","v","console","log","hide","filterDeEndRange","buildGrid","col","some","resCol","isEqual","first","concat","always","_buildTable","colId","prop","contextType","contextId","variableIdentifier","columnId","off","startfrom","startto","endfrom","endto","querytype","params","JSON","stringify","_search","filterChanged","select2","getStart","getEnd","each","$elt","group","preventDefault","$btn","toggleClass","minimumResultsForSearch","click","getTaskRequestData","allowSqlExport","Results","index","ResultTable","ResultsMonitoring","section","previewerFactory","uriHelper","router","requestFileContent","variableUri","deliveryUri","mime","refineFileResponse","file","base","fileData","resolve","refineItemState","state","filePromises","Object","keys","map","identifier","downloadUrl","viewResultController","$resultFilterField","$classFilterField","classFilter","parse","filterTypes","i","filterSubmission","val","loadContentBlock","dispatch","print","deliveryId","resultId","itemDefinition","addClass","removeProp","removeClass","fullPage"],"sources":["/github/workspace/tao/views/build/config-wrap-start-default.js","../plugins/results/action/view.js","../plugins/results/action/delete.js","../plugins/results/action/download.js","../component/results/pluginsLoader.js","../component/results/areaBroker.js","../component/results/list!tpl","../component/results/list.js","../controller/inspectResults.js","../controller/resultModal!tpl","../controller/resultsMonitoring.js","../controller/resultTable.js","../controller/routes.js","../controller/viewResult.js","module-create.js","/github/workspace/tao/views/build/config-wrap-end-default.js"],"sourcesContent":["\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/plugins/results/action/view',[\n 'i18n',\n 'layout/actions/binder',\n 'core/plugin',\n 'util/url'\n], function (__, binder, pluginFactory, urlHelper) {\n 'use strict';\n\n /**\n * Will add a \"View\" button on each line of the list of results\n */\n return pluginFactory({\n name: 'view',\n\n init: function init() {\n var resultsList = this.getHost();\n var action = {\n binding: 'load',\n url: urlHelper.route('viewResult', 'Results', 'taoOutcomeUi')\n };\n\n // this action will be available for each displayed line in the list\n resultsList.addAction({\n id: 'view',\n label: __('View'),\n icon: 'view',\n action: function viewResults(id) {\n var context = {\n id: id,\n classUri: resultsList.getClassUri()\n };\n\n binder.exec(action, context);\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/plugins/results/action/delete',[\n 'jquery',\n 'i18n',\n 'uri',\n 'core/plugin',\n 'util/url',\n 'util/encode',\n 'ui/dialog/confirm',\n 'ui/feedback'\n], function ($, __, uri, pluginFactory, urlHelper, encode, dialogConfirm, feedback) {\n 'use strict';\n\n /**\n * Will add a \"Delete\" button on each line of the list of results\n */\n return pluginFactory({\n name: 'delete',\n\n init: function init() {\n var resultsList = this.getHost();\n\n // this action will be available for each displayed line in the list\n resultsList.addAction({\n id: 'delete',\n label: __('Delete'),\n icon: 'delete',\n action: function deleteResults(id) {\n // prompt a confirmation dialog and then delete the result\n dialogConfirm(__('Please confirm deletion'), function () {\n $.ajax({\n url: urlHelper.route('delete', 'Results', 'taoOutcomeUi'),\n type: \"POST\",\n data: {\n uri: uri.encode(id)\n },\n dataType: 'json'\n }).done(function (response) {\n if (response.deleted) {\n feedback().success(__('Result has been deleted'));\n resultsList.refresh();\n } else {\n feedback().error(__('Something went wrong...') + '
' + encode.html(response.error), {encodeHtml: false});\n resultsList.trigger('error', response.error);\n }\n }).fail(function (err) {\n feedback().error(__('Something went wrong...'));\n resultsList.trigger('error', err);\n });\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/plugins/results/action/download',[\n 'jquery',\n 'i18n',\n 'core/plugin',\n 'util/url',\n 'jquery.fileDownload'\n], function ($, __, pluginFactory, urlHelper) {\n 'use strict';\n\n /**\n * Will add a \"Download\" button on each line of the list of results\n */\n return pluginFactory({\n name: 'download',\n\n init: function init() {\n var resultsList = this.getHost();\n\n // this action will be available for each displayed line in the list\n resultsList.addAction({\n id: 'download',\n label: __('Export Results'),\n icon: 'export',\n action: function downloadResults(id) {\n $.fileDownload(urlHelper.route('downloadXML', 'Results', 'taoOutcomeUi'), {\n failMessageHtml: __(\"Unexpected error occurred when generating your report. Please contact your system administrator.\"),\n httpMethod: 'GET',\n data: {\n id: id,\n delivery: resultsList.getClassUri()\n }\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/component/results/pluginsLoader',[\n 'core/pluginLoader',\n 'taoOutcomeUi/plugins/results/action/view',\n 'taoOutcomeUi/plugins/results/action/delete',\n 'taoOutcomeUi/plugins/results/action/download'\n], function (pluginLoader, actionView, actionDelete, actionDownload) {\n 'use strict';\n\n /**\n * Instantiates the plugin loader with all the required plugins configured\n */\n return pluginLoader({\n action: [actionView, actionDelete, actionDownload]\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/component/results/areaBroker',[\n 'ui/areaBroker'\n], function (areaBroker) {\n 'use strict';\n\n var requireAreas = [\n 'list'\n ];\n\n /**\n * Creates an area broker with the required areas for the list of results\n *\n * @see ui/areaBroker\n *\n * @param {jQueryElement|HTMLElement|String} $container - the main container\n * @param {Object} mapping - keys are the area names, values are jQueryElement\n * @returns {broker} the broker\n * @throws {TypeError} without a valid container\n */\n return areaBroker.bind(null, requireAreas);\n});\n\n","\ndefine('tpl!taoOutcomeUi/component/results/list', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
\\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) 2017 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/component/results/list',[\n 'jquery',\n 'i18n',\n 'lodash',\n 'uri',\n 'core/promise',\n 'ui/component',\n 'taoOutcomeUi/component/results/areaBroker',\n 'tpl!taoOutcomeUi/component/results/list',\n 'ui/datatable'\n], function ($, __, _, uri, Promise, component, resultsAreaBroker, listTpl) {\n 'use strict';\n\n /**\n * Component that lists all the results entry points for a particular delivery\n *\n * @param {Object} config\n * @param {String} config.classUri\n * @param {String} config.dataUrl\n * @param {Object} config.model\n * @param {Array} pluginFactories\n * @returns {resultsList}\n */\n function resultsListFactory(config, pluginFactories) {\n var resultsList;\n var areaBroker;\n var plugins = {};\n var actions = [];\n var classUri;\n\n /**\n * Calls a method from each plugins\n *\n * @param {String} method - the name of the method to run\n * @returns {Promise} Resolved when all plugins are done\n */\n function pluginRun(method) {\n var execStack = [];\n\n _.forEach(plugins, function (plugin) {\n if (typeof plugin[method] === 'function') {\n execStack.push(plugin[method]());\n }\n });\n\n return Promise.all(execStack);\n }\n\n if (!_.isPlainObject(config)) {\n throw new TypeError('The configuration is required');\n }\n if (typeof config.classUri !== 'string' || !config.classUri) {\n throw new TypeError('The class URI is required');\n }\n if (typeof config.dataUrl !== 'string' || !config.dataUrl) {\n throw new TypeError('The service URL is required');\n }\n if (!_.isPlainObject(config.model) && !_.isArray(config.model)) {\n throw new TypeError('The data model is required');\n }\n\n classUri = uri.decode(config.classUri);\n\n /**\n *\n * @typedef {resultsList}\n */\n resultsList = component({\n\n /**\n * Refreshes the list\n * @returns {resultsList} chains\n */\n refresh: function refresh() {\n areaBroker.getListArea().datatable('refresh');\n return this;\n },\n\n /**\n * Add a line action\n * @param {String|Object} name\n * @param {Function|Object} [action]\n * @returns {resultsList} chains\n */\n addAction: function addAction(name, action) {\n var descriptor;\n\n if (_.isPlainObject(name)) {\n descriptor = name;\n } else if (_.isPlainObject(action)) {\n descriptor = action;\n action.id = name;\n } else {\n descriptor = {\n id: name,\n label: name\n };\n }\n\n if (typeof action === 'function') {\n descriptor.action = action;\n }\n if (!descriptor.label) {\n descriptor.label = descriptor.id;\n }\n\n actions.push(descriptor);\n\n return this;\n },\n\n /**\n * Gives an access to the config\n * @returns {Object}\n */\n getConfig: function getConfig() {\n return this.config;\n },\n\n /**\n * Gets the class URI\n * @returns {String}\n */\n getClassUri: function getClassUri() {\n return classUri;\n },\n\n /**\n * Gets the registered actions\n * @returns {Array}\n */\n getActions: function getActions() {\n return actions;\n }\n });\n\n return resultsList\n .before('render', function onRender() {\n var self = this;\n\n areaBroker = resultsAreaBroker(this.$component, {\n 'list': $('.list', this.$component)\n });\n\n _.forEach(pluginFactories, function (pluginFactory) {\n var plugin = pluginFactory(self, areaBroker);\n plugins[plugin.getName()] = plugin;\n });\n\n return pluginRun('init')\n .then(function() {\n return pluginRun('render');\n })\n .then(function () {\n areaBroker.getListArea()\n .empty()\n .on('query.datatable', function () {\n self.setState('loading', true)\n .trigger('loading');\n })\n .on('load.datatable', function () {\n self.setState('loading', false)\n .trigger('loaded');\n })\n .datatable({\n url: self.config.dataUrl,\n model: self.config.model,\n actions: actions,\n filter: self.config.searchable,\n labels: {\n filter: __('Search by delivery results')\n }\n });\n })\n .catch(function (err) {\n self.trigger('error', err);\n return Promise.reject(err);\n });\n })\n .before('destroy', function onDestroy() {\n var self = this;\n\n return pluginRun('destroy')\n .then(function () {\n areaBroker.getListArea().empty();\n })\n .catch(function (err) {\n self.trigger('error', err);\n });\n })\n .setTemplate(listTpl)\n .init(config);\n }\n\n return resultsListFactory;\n});\n\n","/**\n * @author Bertrand Chevrier \n * @author Jean-Sébastien Conan \n */\ndefine('taoOutcomeUi/controller/inspectResults',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'module',\n 'core/logger',\n 'core/dataProvider/request',\n 'util/url',\n 'layout/actions/binder',\n 'layout/loading-bar',\n 'ui/feedback',\n 'ui/taskQueue/taskQueue',\n 'taoOutcomeUi/component/results/pluginsLoader',\n 'taoOutcomeUi/component/results/list',\n 'ui/taskQueueButton/treeButton'\n], function (\n $,\n _,\n __,\n module,\n loggerFactory,\n request,\n urlHelper,\n binder,\n loadingBar,\n feedback,\n taskQueue,\n resultsPluginsLoader,\n resultsListFactory,\n treeTaskButtonFactory\n) {\n 'use strict';\n\n const logger = loggerFactory('controller/inspectResults');\n\n /**\n * Take care of errors\n * @param err\n */\n function reportError(err) {\n loadingBar.stop();\n\n logger.error(err);\n\n if (err instanceof Error) {\n feedback().error(err.message);\n }\n }\n\n /**\n * @exports taoOutcomeUi/controller/resultTable\n */\n return {\n /**\n * Controller entry point\n */\n start: function () {\n const config = module.config() || {};\n const $container = $('#inspect-result');\n const classUri = $container.data('uri');\n const searchContainer = $('.action-bar .search-area');\n if (searchContainer.data('show-result')) {\n const action = {\n binding: 'load',\n url: urlHelper.route('viewResult', 'Results', 'taoOutcomeUi')\n };\n const context = {\n id: searchContainer.data('show-result'),\n classUri\n };\n searchContainer.removeData('show-result');\n binder.exec(action, context);\n return;\n }\n const listConfig = {\n dataUrl: urlHelper.route('getResults', 'Results', 'taoOutcomeUi', {\n classUri: classUri\n }),\n model: config.dataModel,\n searchable: config.searchable,\n classUri: classUri\n };\n let taskButton;\n let taskButtonExportSQL;\n\n loadingBar.start();\n\n _.forEach(config.plugins, function (plugin) {\n if (plugin && plugin.module) {\n if (plugin.exclude) {\n resultsPluginsLoader.remove(plugin.module);\n } else {\n resultsPluginsLoader.add(plugin);\n }\n }\n });\n\n if ($container.length) {\n resultsPluginsLoader\n .load()\n .then(function () {\n resultsListFactory(listConfig, resultsPluginsLoader.getPlugins())\n .on('error', reportError)\n .on('success', function (message) {\n feedback().success(message);\n })\n .before('loading', function () {\n loadingBar.start();\n })\n .after('loaded', function () {\n loadingBar.stop();\n })\n .render($('.inspect-results-grid', $container));\n })\n .catch(reportError);\n } else {\n loadingBar.stop();\n }\n\n taskButton = treeTaskButtonFactory({\n replace: true,\n icon: 'export',\n label: __('Export CSV'),\n taskQueue: taskQueue\n }).render($('#results-csv-export'));\n\n binder.register('export_csv', function remove(actionContext) {\n const data = (({ uri, classUri, id }) => ({ uri, classUri, id }))(actionContext);\n const uniqueValue = data.uri || data.classUri || '';\n taskButton\n .setTaskConfig({\n taskCreationUrl: this.url,\n taskCreationData: { uri: uniqueValue }\n })\n .start();\n });\n\n if ($('#results-sql-export').length) {\n taskButtonExportSQL = treeTaskButtonFactory({\n replace: true,\n icon: 'export',\n label: __('Export SQL'),\n taskQueue: taskQueue\n }).render($('#results-sql-export'));\n\n binder.register('export_sql', function remove(actionContext) {\n const data = (({ uri, classUri, id }) => ({ uri, classUri, id }))(actionContext);\n const uniqueValue = data.uri || data.classUri || '';\n taskButtonExportSQL\n .setTaskConfig({\n taskCreationUrl: this.url,\n taskCreationData: { uri: uniqueValue }\n })\n .start();\n });\n }\n\n binder.register('open_url', function (actionContext) {\n const data = (({ uri, classUri, id }) => ({ uri, classUri, id }))(actionContext);\n\n request(this.url, data, 'POST')\n .then(response => {\n const url = response.url;\n\n if (url) {\n window.open(url, '_blank');\n } else {\n feedback().info(__('The URL does not exist.'));\n }\n })\n .catch(reportError);\n });\n }\n };\n});\n\n","\ndefine('tpl!taoOutcomeUi/controller/resultModal', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
\\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 ;\n */\n/**\n * @author Aleksej Tikhanovich, \n */\n\ndefine('taoOutcomeUi/controller/resultsMonitoring',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'util/url',\n 'uri',\n 'ui/feedback',\n 'util/locale',\n 'util/encode',\n 'layout/loading-bar',\n 'layout/actions/binder',\n 'ui/dialog/confirm',\n 'tpl!taoOutcomeUi/controller/resultModal',\n 'ui/datatable'\n], function ($, _, __, url, uri, feedback, locale, encode, loadingBar, binder, dialogConfirm, resultModalTpl) {\n 'use strict';\n\n var $resultsListContainer = $('.results-list-container');\n var $window = $(window);\n\n /**\n * Internet Explorer and Edge will not open the detail view when the table row was below originally below the fold.\n * This is not cause by a too low container or some sort of overlay. As a workaround they get just as many rows\n * as they can handle in one fold.\n * @returns {number}\n */\n function getNumRows() {\n var lineHeight = 30;\n var searchPagination = 70;\n var $upperElem = $('.content-container h2');\n var topSpace = $upperElem.offset().top\n + $upperElem.height()\n + parseInt($upperElem.css('margin-bottom'), 10)\n + lineHeight\n + searchPagination;\n var availableHeight = $window.height() - topSpace - $('footer.dark-bar').outerHeight();\n if(!window.MSInputMethodContext && !document.documentMode && !window.StyleMedia) {\n return 25;\n }\n return Math.min(Math.floor(availableHeight / lineHeight), 25);\n }\n\n\n\n function getRequestErrorMessage (xhr) {\n loadingBar.start();\n var message = '';\n try {\n var responseJSON = $.parseJSON(xhr.responseText);\n if (responseJSON.message) {\n message = responseJSON.message;\n } else {\n message = xhr.responseText;\n }\n } catch (e) {\n message = xhr.responseText;\n }\n return message;\n }\n\n function viewResult(rowId) {\n var res = parseRowId(rowId);\n loadingBar.start();\n $.ajax({\n url : url.route('viewResult', 'Results', 'taoOutcomeUi', {id : res[0], classUri: res[1]}),\n type : 'GET',\n success : function (result) {\n\n var $container = $(resultModalTpl()).append(result);\n $resultsListContainer.append($container);\n $container.modal({\n startClosed : false,\n minWidth : 450,\n top: 50\n });\n $container.css({'max-height': $window.height() - 80 + 'px', 'overflow': 'auto'});\n $container.on('click', function(e) {\n var $target = $(e.target);\n var $element = null;\n\n if ($target.is('a') && $target.hasClass(\"preview\")) {\n $element = $target;\n } else {\n if ($target.is('span') && $target.parent().hasClass(\"preview\")) {\n $element = $target.parent();\n }\n }\n\n if ($element) {\n // the trigger button might itself be inside a modal, in this case close that modal before doing anything else\n // only one modal should be open\n var $modalContainer = $element.parents('.modal');\n if ($modalContainer.length) {\n $modalContainer.trigger('closed.modal');\n }\n $('.preview-overlay').css({ zIndex: $container.modal().css('z-index') + 1 });\n }\n });\n $container\n .on('closed.modal', function(){\n $container.modal('destroy');\n $('.modal-bg').remove();\n $(this).remove();\n });\n loadingBar.stop();\n },\n error : function (xhr, err) {\n var message = getRequestErrorMessage(xhr);\n feedback().error(message, {encodeHtml : false});\n loadingBar.stop();\n }\n });\n }\n\n function checkValidItem() {\n if (!this.start_time) {\n return true\n }\n return false;\n }\n\n function downloadResult(rowId) {\n var res = parseRowId(rowId);\n $.fileDownload(url.route('downloadXML', 'Results', 'taoOutcomeUi'), {\n failMessageHtml: __(\"Unexpected error occurred when generating your report. Please contact your system administrator.\"),\n httpMethod: 'GET',\n data: {\n id: res[0],\n delivery: res[1]\n }\n });\n }\n\n function parseRowId(rowId) {\n return rowId.split(\"|\");\n }\n\n return {\n start: function () {\n var $contentBlock = $resultsListContainer.parents(\".content-block\");\n\n var resizeContainer = function() {\n var padding = $contentBlock.innerHeight() - $contentBlock.height();\n\n //calculate height for contentArea\n $contentBlock.height(\n $window.height()\n - $(\"footer.dark-bar\").outerHeight()\n - $(\"header.dark-bar\").outerHeight()\n - $(\".tab-container\").outerHeight()\n - $(\".action-bar.content-action-bar\").outerHeight()\n - padding\n );\n };\n\n $window.on('resize', _.debounce(resizeContainer, 300));\n resizeContainer();\n\n $resultsListContainer\n .datatable({\n url: url.route('data', 'ResultsMonitoring', 'taoOutcomeUi'),\n filter: true,\n labels: {\n filter: __('Search by results')\n },\n model: [{\n id: 'delivery',\n label: __('Delivery'),\n sortable: false\n }, {\n id: 'deliveryResultIdentifier',\n label: __('Delivery Execution'),\n sortable: false,\n }, {\n id: 'userName',\n label: __('Test Taker'),\n sortable: false\n }, {\n id: 'start_time',\n label: __('Start Time'),\n sortable: false\n }],\n paginationStrategyTop: 'simple',\n paginationStrategyBottom: 'pages',\n rows: getNumRows(),\n sortby: 'result_id',\n sortorder: 'desc',\n actions : {\n 'view' : {\n id: 'view',\n label: __('View'),\n icon: 'external',\n action: viewResult,\n disabled: checkValidItem\n },\n 'download' :{\n id : 'download',\n title : __('Download result'),\n icon : 'download',\n label : __('Download'),\n action: downloadResult,\n disabled: checkValidItem\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) 2014-2022 (original work) Open Assessment Technologies SA;\n */\n\n/**\n * @author Bertrand Chevrier \n */\ndefine('taoOutcomeUi/controller/resultTable',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'module',\n 'util/url',\n 'ui/feedback',\n 'ui/taskQueue/taskQueue',\n 'ui/taskQueueButton/standardButton',\n 'ui/dateRange/dateRange',\n 'layout/loading-bar',\n 'ui/datatable'\n], function($, _, __, module, urlUtil, feedback, taskQueue, standardTaskButtonFactory, dateRangeFactory, loadingBar) {\n 'use strict';\n\n /**\n * @exports taoOutcomeUi/controller/resultTable\n */\n var resulTableController = {\n\n /**\n * Controller entry point\n */\n start : function start() {\n\n var conf = module.config();\n var $container = $(\".result-table\");\n var $filterField = $('.result-filter', $container);\n var $filterButtonsContainer = $('.filter-buttons', $container);\n var $tableContainer = $('.result-table-container', $container);\n var $dateStartRangeContainer = $('.de-start-range', $container);\n var $dateEndRangeContainer = $('.de-end-range', $container);\n var filter = conf.filter || 'lastSubmitted';\n var deStartFrom = '';\n var deStartTo = '';\n var deEndFrom = '';\n var deEndTo = '';\n var uri = conf.uri || '';\n //keep columns through calls\n var columns = [];\n var groups = {};\n\n //setup the date range pickers\n var filterDeStartRange = dateRangeFactory($dateStartRangeContainer, {\n startPicker: {\n setup: 'datetime',\n format: 'YYYY-MM-DD HH:mm:ss',\n field: {\n name: 'periodStart',\n }\n },\n endPicker: {\n setup: 'datetime',\n format: 'YYYY-MM-DD HH:mm:ss',\n field: {\n name: 'periodEnd'\n }\n }\n })\n .on('change', function (v) {\n console.log('changed', v)\n })\n .on('render', function () {\n $('button', $dateStartRangeContainer).hide();\n });\n\n var filterDeEndRange = dateRangeFactory($dateEndRangeContainer, {\n startPicker: {\n setup: 'datetime',\n format: 'YYYY-MM-DD HH:mm:ss',\n field: {\n name: 'periodStart',\n }\n },\n endPicker: {\n setup: 'datetime',\n format: 'YYYY-MM-DD HH:mm:ss',\n field: {\n name: 'periodEnd'\n }\n }\n })\n .on('render', function () {\n $('button', $dateEndRangeContainer).hide();\n });\n\n /**\n * Load columns to rebuild the datatable dynamically\n * @param {String} url - the URL that retrieve the columns\n * @param {String} [action = 'add'] - 'add' or 'remove' the retrieved columns\n * @param {Function} done - once the datatable is loaded\n */\n var buildGrid = function buildGrid(url, action, done) {\n loadingBar.start();\n $.ajax({\n url: url,\n dataType: 'json',\n data: {filter: filter, uri: uri},\n type: 'GET'\n }).done(function (response) {\n if (response && response.columns) {\n if (action === 'remove') {\n columns = columns.filter(col => !response.columns.some(resCol => _.isEqual(col, resCol)));\n } else {\n if (typeof response.first !== 'undefined' && response.first === true) {\n columns = response.columns.concat(columns);\n } else {\n columns = columns.concat(response.columns);\n }\n }\n }\n if (typeof done === 'function') {\n done();\n }\n }).always(function () {\n loadingBar.stop();\n });\n };\n\n /**\n * Rebuild the datatable\n * @param {Function} done - once the datatable is loaded\n */\n var _buildTable = function _buildTable(done) {\n var model = [];\n\n //set up model from columns\n _.forEach(columns, function (col) {\n var colId = col.prop ? (col.prop + '_' + col.contextType) : (col.contextId + '_' + col.variableIdentifier);\n if (col.columnId) {\n colId = col.columnId;\n }\n model.push({\n id: colId,\n label: col.label,\n sortable: false\n });\n });\n\n //re-build the datatable\n $tableContainer\n .empty()\n .data('ui.datatable', null)\n .off('load.datatable')\n .on('load.datatable', function () {\n if (typeof done === 'function') {\n done();\n done = '';\n }\n })\n .datatable({\n url: urlUtil.route('feedDataTable', 'ResultTable', 'taoOutcomeUi',\n {\n filter: filter,\n startfrom: deStartFrom,\n startto: deStartTo,\n endfrom: deEndFrom,\n endto: deEndTo\n }),\n querytype: 'POST',\n params: {columns: JSON.stringify(columns), '_search': false, uri: uri},\n model: model\n });\n };\n\n var filterChanged = function filterChanged() {\n filter = $filterField.select2('val');\n deStartFrom = filterDeStartRange.getStart();\n deStartTo = filterDeStartRange.getEnd();\n deEndFrom = filterDeEndRange.getStart();\n deEndTo = filterDeEndRange.getEnd();\n //rebuild the current table\n _buildTable();\n };\n\n //group button to toggle them\n $('[data-group]', $container).each(function () {\n var $elt = $(this);\n var group = $elt.data('group');\n var action = $elt.data('action');\n groups[group] = groups[group] || {};\n groups[group][action] = $elt;\n });\n\n //regarding button data, we rebuild the table\n $container.on('click', '[data-group]', function (e) {\n var $elt = $(this);\n var group = $elt.data('group');\n var action = $elt.data('action');\n var url = $elt.data('url');\n e.preventDefault();\n buildGrid(url, action, function () {\n _.forEach(groups[group], function ($btn) {\n $btn.toggleClass('hidden');\n });\n });\n });\n\n //default table\n buildGrid(urlUtil.route('getTestTakerColumns', 'ResultTable', 'taoOutcomeUi', {filter: filter}));\n\n //setup the filtering\n $filterField.select2({\n minimumResultsForSearch: -1\n }).select2('val', filter);\n\n $('.result-filter-btn', $container)\n .click(function () {\n filterChanged();\n });\n\n //instantiate the task creation button\n standardTaskButtonFactory({\n type: 'info',\n icon: 'export',\n title: __('Export CSV File'),\n label: __('Export CSV File'),\n taskQueue: taskQueue,\n taskCreationUrl: urlUtil.route('export', 'ResultTable', 'taoOutcomeUi'),\n taskCreationData: function getTaskRequestData() {\n return {\n filter: filter,\n columns: JSON.stringify(columns),\n uri: uri,\n startfrom: deStartFrom,\n startto: deStartTo,\n endfrom: deEndFrom,\n endto: deEndTo\n };\n }\n }).on('error', function (err) {\n feedback().error(err);\n }).render($filterButtonsContainer);\n\n if (conf.allowSqlExport) {\n standardTaskButtonFactory({\n type: 'info',\n icon: 'export',\n title: __('Export SQL File'),\n label: __('Export SQL File'),\n taskQueue: taskQueue,\n taskCreationUrl: urlUtil.route('exportSQL', 'ResultTable', 'taoOutcomeUi'),\n taskCreationData: function getTaskRequestData() {\n filterChanged();\n return {\n filter: filter,\n columns: JSON.stringify(columns),\n uri: uri,\n startfrom: deStartFrom,\n startto: deStartTo,\n endfrom: deEndFrom,\n endto: deEndTo\n };\n }\n }).on('error', function (err) {\n feedback().error(err);\n }).render($filterButtonsContainer);\n }\n }\n };\n return resulTableController;\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 (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('taoOutcomeUi/controller/routes',[],function(){\n 'use strict';\n\n return {\n 'Results': {\n 'actions': {\n 'viewResult' : 'controller/viewResult',\n 'index' : 'controller/inspectResults'\n }\n },\n 'ResultTable': {\n 'actions': {\n 'index' : 'controller/resultTable'\n }\n },\n 'ResultsMonitoring': {\n 'actions': {\n 'index': 'controller/resultsMonitoring'\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-2021 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Bertrand Chevrier \n */\ndefine('taoOutcomeUi/controller/viewResult',[\n 'module',\n 'jquery',\n 'i18n',\n 'util/url',\n 'core/logger',\n 'core/request',\n 'layout/section',\n 'taoItems/previewer/factory',\n 'ui/dialog/confirm',\n 'uri',\n 'ui/feedback',\n 'core/router',\n 'jquery.fileDownload'\n], function (\n module,\n $,\n __,\n urlHelper,\n loggerFactory,\n request,\n section,\n previewerFactory,\n dialogConfirm,\n uriHelper,\n feedback,\n router\n) {\n 'use strict';\n\n const logger = loggerFactory('taoOutcomeUi/viewResults');\n const downloadUrl = urlHelper.route('getFile', 'Results', 'taoOutcomeUi');\n const dataUrl = urlHelper.route('getVariableFile', 'Results', 'taoOutcomeUi');\n\n /**\n * Requests a file content given the URIs\n * @param {String} variableUri - The URI of a variable\n * @param {String} deliveryUri - The URI of a delivery\n * @returns {Promise}\n */\n function requestFileContent(variableUri, deliveryUri) {\n return request({\n url: dataUrl,\n method: 'POST',\n data: { variableUri, deliveryUri }\n })\n .then(response => {\n // The response may contain more than the expected data,\n // like the success status, which is not relevant here.\n // Hence this rewriting.\n const { data, name, mime } = response;\n return { data, name, mime };\n });\n }\n\n /**\n * Makes sure the response contains the file data if it is a file record\n * @param {Object} response\n * @param {String} deliveryUri\n * @returns {Promise}\n */\n function refineFileResponse(response, deliveryUri) {\n const { file } = response && response.base || {};\n if (file && file.uri && !file.data) {\n return requestFileContent(file.uri, deliveryUri)\n .then(fileData => {\n if (fileData && fileData.data) {\n response.base.file = fileData;\n } else {\n response.base = null;\n }\n })\n .catch(e => logger.error(e));\n }\n return Promise.resolve();\n }\n\n /**\n * Makes sure the item state contains the file data in the response if it is a file record\n * @param {Object} state\n * @param {String} deliveryUri\n * @returns {Promise}\n */\n function refineItemState(state, deliveryUri) {\n if (!state) {\n return Promise.resolve(state);\n }\n\n const filePromises = Object.keys(state).map(identifier => {\n const { response } = state[identifier];\n return refineFileResponse(response, deliveryUri);\n });\n return Promise.all(filePromises).then(() => state);\n }\n\n /**\n * @exports taoOutcomeUi/controller/viewResult\n */\n const viewResultController = {\n\n /**\n * Controller entry point\n */\n start(){\n const conf = module.config();\n const deliveryUri = conf.classUri;\n const $container = $('#view-result');\n const $resultFilterField = $('.result-filter', $container);\n const $classFilterField = $('[name=\"class-filter\"]', $container);\n let classFilter = JSON.parse(conf.filterTypes) || [];\n\n //set up filter field\n $resultFilterField.select2({\n minimumResultsForSearch : -1\n }).select2('val', conf.filterSubmission || 'all');\n\n for (let i in classFilter) {\n $(`[value = \"${classFilter[i]}\"]`).prop('checked', 'checked');\n }\n\n $('.result-filter-btn', $container).click(() => {\n classFilter = [''];\n $classFilterField.each(function () {\n if ($(this).prop('checked')) {\n classFilter.push($(this).val());\n }\n });\n section.loadContentBlock(\n urlHelper.route('viewResult', 'Results', 'taoOutcomeUi'),\n {\n id: conf.id,\n classUri: conf.classUri,\n filterSubmission: $resultFilterField.select2('val'),\n filterTypes: classFilter\n }\n );\n });\n\n\n //bind the xml download button\n $('#xmlDownload', $container).on('click', function () {\n $.fileDownload(urlHelper.route('downloadXML', 'Results', 'taoOutcomeUi'), {\n failMessageHtml: __(\"Unexpected error occurred when generating your report. Please contact your system administrator.\"),\n httpMethod: 'GET',\n data: {\n id: conf.id,\n delivery: conf.classUri\n }\n });\n });\n\n // bind the file download button\n $('[id^=fileDownload]', $container).on('click', function () {\n const variableUri = $(this).val();\n $.fileDownload(downloadUrl, {\n httpMethod: 'POST',\n data: {\n variableUri,\n deliveryUri\n }\n });\n });\n\n //bind the download buttons\n $('.delete', $container).on('click', function () {\n dialogConfirm(__('Please confirm deletion'), function () {\n $.ajax({\n url: urlHelper.route('delete', 'Results', 'taoOutcomeUi'),\n type: \"POST\",\n data: {\n uri: uriHelper.encode(conf.id)\n },\n dataType: 'json'\n }).done(function (response) {\n if (response.deleted) {\n feedback().success(__('Result has been deleted'));\n // Hack to go back to the list of results\n router.dispatch('tao/Main/index');\n } else {\n feedback().error(__('Something went wrong...') + '
' + encode.html(response.error), {encodeHtml: false});\n }\n }).fail(function () {\n feedback().error(__('Something went wrong...'));\n });\n });\n });\n\n $('.print', $container).on('click', function () {\n window.print();\n });\n\n $('.preview', $container).on('click', function (e) {\n const $btn = $(this);\n const deliveryId = $btn.data('deliveryId');\n const resultId = $btn.data('resultId');\n const itemDefinition = $btn.data('definition');\n let uri = $btn.data('uri');\n const type = $btn.data('type');\n e.preventDefault();\n if ($btn.prop('disabled')) {\n return;\n }\n $btn.prop('disabled', true).addClass('disabled');\n\n if (deliveryId && resultId && itemDefinition) {\n uri = {\n uri: uri,\n resultId: resultId,\n itemDefinition: itemDefinition,\n deliveryUri: deliveryId\n };\n }\n\n Promise.resolve($btn.data('state'))\n .then(state => refineItemState(state, deliveryUri))\n .then(state => {\n $btn.removeProp('disabled').removeClass('disabled');\n previewerFactory(type, uri, state, {\n view: 'reviewRenderer',\n fullPage: true\n });\n })\n .catch(err => logger.error(err));\n });\n\n }\n };\n\n return viewResultController;\n});\n\n","\ndefine(\"taoOutcomeUi/loader/taoOutcomeUi.bundle\", function(){});\n","define(\"taoOutcomeUi/loader/taoOutcomeUi.min\", [\"taoItems/loader/taoItems.min\"], function(){});\n"],"mappings":"ACoBAA,MAAA,6CACA,OACA,wBACA,cACA,WACA,UAAAC,EAAA,CAAAC,MAAA,CAAAC,aAAA,CAAAC,SAAA,EACA,aAKA,OAAAD,aAAA,EACAE,IAAA,QAEAC,IAAA,UAAAA,KAAA,KACA,CAAAC,WAAA,MAAAC,OAAA,GACAC,MAAA,EACAC,OAAA,QACAC,GAAA,CAAAP,SAAA,CAAAQ,KAAA,uCACA,EAGAL,WAAA,CAAAM,SAAA,EACAC,EAAA,QACAC,KAAA,CAAAd,EAAA,SACAe,IAAA,QACAP,MAAA,UAAAQ,YAAA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