\n\n\n'})}),define("taoClientDiagnostic/controller/Diagnostic/diagnostic",["jquery","i18n","helpers","layout/loading-bar","ui/actionbar","ui/feedback","taoClientDiagnostic/tools/diagnostic/diagnostic","tpl!taoClientDiagnostic/templates/diagnostic/main"],function($,__,helpers,loadingBar,actionbar,feedback,diagnosticFactory,diagnosticTpl){"use strict";var cssScope=".diagnostic-runner";loadingBar.start();var taoDiagnosticRunnerCtlr={
start:function(){function installTester(workstation){diagnosticFactory(config).setTemplate(diagnosticTpl).on("render",function(){var self=this;this.controls.$workstation=this.getElement().find('[data-control="workstation"]').on("keypress",function(e){13===e.which&&(e.preventDefault(),self.run())}).val(workstation)}).on("start",function(){this.config.storeParams=this.config.storeParams||{},this.config.storeParams.workstation=this.controls.$workstation.val(),this.controls.$workstation.prop("disabled",!0),loadingBar.start()}).on("end",function(){this.controls.$workstation.removeProp("disabled"),loadingBar.stop()}).on("render",function(){loadingBar.stop()}).render($list);
-}var $container=$(cssScope),$list=$container.find(".list"),$panel=$(".panel"),config=$container.data("config"),indexUrl=helpers._url("index","Diagnostic","taoClientDiagnostic"),workstationUrl=helpers._url("workstation","DiagnosticChecker","taoClientDiagnostic");actionbar({renderTo:$panel,buttons:[{id:"back",icon:"step-backward",title:__("Return to the list"),label:__("List of readiness checks"),action:function(){window.location.href=indexUrl}}]}),$.get(workstationUrl,"json").done(function(data){installTester(data&&data.workstation)}).fail(function(){feedback().error(__("Unable to get the workstation name!")),installTester()})}};return taoDiagnosticRunnerCtlr}),
-define("taoClientDiagnostic/controller/Diagnostic/index",["jquery","i18n","helpers","layout/loading-bar","util/encode","ui/feedback","ui/dialog","taoClientDiagnostic/tools/diagnostic/status","ui/datatable"],function($,__,helpers,loadingBar,encode,feedback,dialog,statusFactory){"use strict";function formatNumber(number,digits){var nb=void 0===digits?2:Math.max(0,parseInt(digits,10)),factor=Math.pow(10,nb)||1;return Math.round(number*factor)/factor}var cssScope=".diagnostic-index";loadingBar.start();var taoDiagnosticCtlr={start:function(){function request(url,selection,message){selection&&selection.length&&(loadingBar.start(),$.ajax({url:url,data:{id:selection},
-dataType:"json",type:"POST",error:function(){loadingBar.stop()}}).done(function(response){loadingBar.stop(),response&&response.success?(message&&feedback().success(message),$list.datatable("refresh")):feedback().error(__("Something went wrong ...")+" "+encode.html(response.error),{encodeHtml:!1})}))}function remove(selection){request(removeUrl,selection,__("The readiness check result have been removed"))}var $container=$(cssScope),$list=$container.find(".list"),dataset=$container.data("set"),config=$container.data("config")||{},installedExtension=$container.data("installedextension")||!1,diagnosticUrl=helpers._url("diagnostic","Diagnostic","taoClientDiagnostic"),removeUrl=helpers._url("remove","Diagnostic","taoClientDiagnostic"),serviceUrl=helpers._url("diagnosticData","Diagnostic","taoClientDiagnostic"),performancesConfig=config.performances||{},performancesOptimal=performancesConfig.optimal,performancesRange=Math.abs(performancesOptimal-performancesConfig.threshold),diagnosticStatus=statusFactory(),tools=[],actions=[],model=[];
+}var $container=$(cssScope),extension=$container.data("extension")||"taoClientDiagnostic",$list=$container.find(".list"),$panel=$(".panel"),config=$container.data("config"),indexUrl=helpers._url("index","Diagnostic",extension),workstationUrl=helpers._url("workstation","DiagnosticChecker",extension);actionbar({renderTo:$panel,buttons:[{id:"back",icon:"step-backward",title:__("Return to the list"),label:__("List of readiness checks"),action:function(){window.location.href=indexUrl}}]}),$.get(workstationUrl,"json").done(function(data){installTester(data&&data.workstation)}).fail(function(){feedback().error(__("Unable to get the workstation name!")),installTester();
+})}};return taoDiagnosticRunnerCtlr}),define("taoClientDiagnostic/controller/Diagnostic/index",["jquery","i18n","helpers","layout/loading-bar","util/encode","ui/feedback","ui/dialog","taoClientDiagnostic/tools/diagnostic/status","ui/datatable"],function($,__,helpers,loadingBar,encode,feedback,dialog,statusFactory){"use strict";function formatNumber(number,digits){var nb=void 0===digits?2:Math.max(0,parseInt(digits,10)),factor=Math.pow(10,nb)||1;return Math.round(number*factor)/factor}var cssScope=".diagnostic-index";loadingBar.start();var taoDiagnosticCtlr={start:function(){function request(url,selection,message){selection&&selection.length&&(loadingBar.start(),
+$.ajax({url:url,data:{id:selection},dataType:"json",type:"POST",error:function(){loadingBar.stop()}}).done(function(response){loadingBar.stop(),response&&response.success?(message&&feedback().success(message),$list.datatable("refresh")):feedback().error(__("Something went wrong ...")+" "+encode.html(response.error),{encodeHtml:!1})}))}function remove(selection){request(removeUrl,selection,__("The readiness check result have been removed"))}var $container=$(cssScope),extension=$container.data("extension")||"taoClientDiagnostic",$list=$container.find(".list"),dataset=$container.data("set"),config=$container.data("config")||{},installedExtension=$container.data("installedextension")||!1,diagnosticUrl=helpers._url("diagnostic","Diagnostic",extension),removeUrl=helpers._url("remove","Diagnostic",extension),serviceUrl=helpers._url("diagnosticData","Diagnostic",extension),performancesConfig=config.performances||{},performancesOptimal=performancesConfig.optimal,performancesRange=Math.abs(performancesOptimal-performancesConfig.threshold),diagnosticStatus=statusFactory(),tools=[],actions=[],model=[];
tools.push({id:"refresh",icon:"reset",title:__("Refresh the page"),label:__("Refresh"),action:function(){$list.datatable("refresh")}}),tools.push({id:"launch",icon:"play",title:__("Launch another readiness check"),label:__("Launch readiness check"),action:function(){window.location.href=diagnosticUrl}}),installedExtension&&tools.push({id:"lti",icon:"play",title:__("Try a test delivery"),label:__("Try a test delivery"),action:function(){window.location.href=deliveryUrl}}),tools.push({id:"remove",icon:"remove",title:__("Remove the selected readiness check results"),label:__("Remove"),massAction:!0,action:function(selection){dialog({message:__("The selected readiness check results will be removed. Continue ?"),
autoRender:!0,autoDestroy:!0,onOkBtn:function(){remove(selection)}})}}),actions.push({id:"remove",icon:"remove",title:__("Remove the readiness check result?"),action:function(id){dialog({autoRender:!0,autoDestroy:!0,message:__("The readiness check result will be removed. Continue ?"),onOkBtn:function(){remove([id])}})}}),model.push({id:"workstation",label:__("Workstation")}),model.push({id:"os",label:__("OS")}),model.push({id:"browser",label:__("Browser")}),model.push({id:"performance",label:__("Performances"),transform:function(value){var cursor=performancesRange-value+performancesOptimal,status=diagnosticStatus.getStatus(cursor/performancesRange*100,"performances");
return status.feedback.message}}),model.push({id:"bandwidth",label:__("Bandwidth"),transform:function(value){var bandwidth=formatNumber(value);return value>100&&(bandwidth="> 100"),bandwidth}}),model.push({id:"date",label:__("Date")}),$list.on("query.datatable",function(){loadingBar.start()}).on("load.datatable",function(){loadingBar.stop()}).datatable({url:serviceUrl,status:{empty:__("No readiness checks have been done!"),available:__("Readiness checks already done"),loading:__("Loading")},tools:tools,actions:actions,selectable:!0,model:model},dataset)}};return taoDiagnosticCtlr}),function(c){var d=document,a="appendChild",i="styleSheet",s=d.createElement("style");
diff --git a/views/js/controllers.min.js.map b/views/js/controllers.min.js.map
index 4ff2dbcd..7b45bc3c 100644
--- a/views/js/controllers.min.js.map
+++ b/views/js/controllers.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["routes.js","../tools/message.js","Authenticator/login.js","../tools/diagnostic/status.js","../tools/fixedDecimals.js","../tools/stats.js","../../taoQtiItem/qtiItem/core/qtiClasses.js","../../taoQtiItem/qtiItem/helper/util.js","../../taoQtiItem/qtiItem/helper/rendererConfig.js","../../taoQtiItem/qtiItem/core/Element.js","../../taoQtiItem/qtiItem/core/Loader.js","../../taoQtiItem/qtiItem/helper/interactionHelper.js","../../taoQtiItem/qtiRunner/core/Renderer.js","../../taoItems/assets/manager.js","../../taoItems/assets/strategies.js","../../taoQtiItem/portableElementRegistry/factory/factory.js","../../taoQtiItem/qtiCreator/helper/qtiElements.js","../../taoQtiItem/portableElementRegistry/factory/ciRegistry.js","../../taoQtiItem/portableElementRegistry/ciRegistry.js","../../taoQtiItem/portableElementRegistry/factory/icRegistry.js","../../taoQtiItem/portableElementRegistry/icRegistry.js","../../taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy.js","../../taoQtiItem/qtiCommonRenderer/renderers/config.js","../../taoQtiItem/qtiCommonRenderer/renderers/Renderer.js","../tools/performances/tester.js","../tools/bandwidth/tester.js","../tools/upload/tester.js","../tools/getconfig.js","../tools/browser/tester.js","../tools/diagnostic/tpl/main!tpl","../tools/diagnostic/tpl/result!tpl","../../taoClientDiagnosticCss/diagnostics!css","../tools/diagnostic/diagnostic.js","CompatibilityChecker/diagnostics.js","../templates/diagnostic/main!tpl","Diagnostic/diagnostic.js","Diagnostic/index.js","../../../../../../../../../../../../onLayerEnd0.js"],"names":["define","Authenticator","actions","login","CompatibilityChecker","index","Diagnostic","diagnostic","$","feedback","showMessages","container","$feedbackBox","data","error","showMessage","start","_","__","diagnosticStatusFactory","thresholds","performances","performancesThresholds","bandwidth","bandwidthThresholds","upload","uploadThresholds","summary","summaryThresholds","getThresholds","name","this","getStatus","percentage","len","i","step","status","Math","max","min","round","parseInt","isString","isArray","length","threshold","quality","clone","message","type","fixedDecimals","value","decimals","shift","pow","abs","Number","stats","list","fieldName","variance","avg","med","middle","getValue","results","sum","sum2","MAX_VALUE","count","values","isFunction","item","forEach","undefined","push","diff","sqrt","sort","floor","ceil","average","median","key","_container","assessmentItem","responseProcessing","_simpleFeedbackRule","stylesheet","math","img","object","outcomeDeclaration","responseDeclaration","rubricBlock","associableHotspot","gap","gapImg","gapText","hotspotChoice","hottext","inlineChoice","simpleAssociableChoice","simpleChoice","associateInteraction","choiceInteraction","endAttemptInteraction","extendedTextInteraction","gapMatchInteraction","graphicAssociateInteraction","graphicGapMatchInteraction","graphicOrderInteraction","hotspotInteraction","hottextInteraction","inlineChoiceInteraction","matchInteraction","mediaInteraction","orderInteraction","prompt","selectPointInteraction","sliderInteraction","textEntryInteraction","uploadInteraction","feedbackBlock","feedbackInline","modalFeedback","customInteraction","infoControl","include","util","buildSerial","prefix","id","chars","charAt","random","buildId","usedIds","suffix","exists","TypeError","getUsedIds","contains","buildIdentifier","useSuffix","getUsedIdentifiers","isUndefined","replace","findInCollection","element","collectionNames","searchedSerial","found","Error","each","collectionName","collection","split","nameToken","elt","parent","find","addMarkupNamespace","markup","ns","$0","$1","$2","$3","$4","indexOf","removeMarkupNamespaces","getMarkupUsedNamespaces","namespaces","original","slash","node","uniq","rendererConfigHelper","getOptionsFromArguments","args","options","placeholder","subclass","renderer","arg","isRenderer","isPlainObject","console","log","Class","rendererConfig","_instances","Element","extend","qtiClass","serial","relatedItem","init","attributes","metaData","match","setAttributes","initContainer","arguments","initObject","is","getSerial","elts","getComposingElements","attr","prop","document","trigger","removeData","removeAttr","removeAttributes","getAttributes","attrNames","append","getBody","getObject","v","isA","getUsedClasses","ret","composingElts","location","getRelatedItem","setRelatedItem","recursive","setRenderer","getRenderer","render","_renderer","tplData","defaultData","tag","body","resolveUrl","merge","getData","rendering","renderTpl","replaceWith","postRender","altClassName","postRenderers","compact","getContainer","$scope","toArray","arr","isEmpty","addClass","className","clazz","_containClass","hasClass","removeClass","regex","RegExp","trim","toggleClass","state","isset","issetElement","unset","unsetElement","allClassStr","test","qtiElement","getElementBySerial","composingElements","qtiClasses","loadPortableCustomElementData","portableElement","typeIdentifier","entryPoint","properties","libraries","Loader","classesLocation","qti","setClassesLocation","getRequiredClasses","union","loadRequiredClasses","callback","reload","requiredClasses","required","requiredClass","_this","require","QtiClass","prototype","call","getLoadedClasses","keys","loadItemData","Qti","loadContainer","outcomes","outcome","buildOutcome","addOutcomeDeclaration","feedbacks","buildElement","addModalFeedback","stylesheets","addStylesheet","responses","response","buildResponse","addResponseDeclaration","feedbackRules","forIn","fbData","buildSimpleFeedbackRule","setResponseProcessing","buildResponseProcessing","setNamespaces","setSchemaLocations","schemaLocations","setApipAccessibility","apipAccessibility","loadAndBuildElement","loadElement","loadElementData","loadElements","allElements","elementData","template","howMatch","defaultValue","correctResponse","correctResponses","size","mapping","mapEntries","areaMapping","mappingAttributes","feedbackRule","setCondition","condition","comparedValue","feedbackOutcome","feedbackThen","modalFeedbacks","feedbackElse","comparedOutcome","rp","processingType","xml","bodyObject","bodyData","elements","eltData","setElement","defaults","bdy","loadObjectData","loadInteractionData","loadChoiceData","loadMathData","loadPicData","interaction","buildInteractionChoices","loadPciData","choices","set","matchSet","choice","addChoice","gapImgs","addGapImg","val","text","_alt","setMathML","mathML","annotations","encoding","setAnnotation","pci","pic","convertChoices","outputType","c","findChoices","inputType","getChoice","getChoiceByIdentifier","shuffleChoices","r","f","j","n","k","tmp","serialToIdentifier","choiceSerial","Handlebars","Promise","interactionHelper","themeLoader","getDocumentBaseUrl","window","protocol","host","pathname","_isValidRenderer","valid","classCorrect","_renderableClasses","pos","slice","subClass","_renderableSubclasses","_dependencies","_defaults","Renderer","_locations","_renderers","shuffledChoices","_getClassRenderer","setOption","setOptions","opts","getOption","getCustomMessage","elementName","messageKey","messages","compile","getAssetManager","assetManager","getThemeLoader","qtiSubclass","res","decorators","isObject","before","after","renderDirect","tpl","setResponse","qtiInteraction","$container","getResponse","resetResponse","getState","setState","destroy","getLoadedRenderers","register","renderersLocations","load","self","themes","base","available","theme","path","intersection","reqClass","deps","requiredSubClasses","unload","setShuffledChoices","identificationType","pluck","getShuffledChoices","reshuffle","returnedType","getChoices","getRenderers","getLocations","url","resolve","getAbsoluteUrl","relUrl","warn","absUrl","runtimeLocations","runtimeLocation","baseUrl","build","defaultOptions","NewRenderer","apply","urlUtil","assetManagerFactory","strategies","cache","parseUrl","_strategies","addStrategy","strategy","handle","setStrategies","newStrategies","setData","resolved","inputUrl","hasOwnProperty","parse","result","resolveBy","clearCache","prependToUrl","slashcat","directory","encodeURIComponent","file","isRelative","itemCssNoCache","bust","Date","now","external","isAbsolute","toString","base64","isBase64","taomedia","eventifier","_requirejs","methods","_loaded","__providers","_registry","get","version","last","registerProvider","moduleName","resetProviders","loadProviders","reject","providerLoadingStack","provider","getAllVersions","all","versions","map","getRuntime","assign","runtime","label","getCreator","creator","getBaseUrl","loadRuntimes","loadPromise","then","loadStack","requireConfigAliases","reduce","acc","_pcis","config","paths","catch","err","loadCreators","requiredCreators","pciModel","hook","creators","creatorHook","getTypeIdentifier","findIndex","module","QtiElements","classes","itemBody","parents","abstract","atomicBlock","atomicInline","simpleBlock","simpleInline","flowStatic","blockStatic","inlineStatic","flow","tableCell","caption","xhtml","col","colgroup","div","dl","dt","dd","hr","li","ol","ul","param","table","tbody","tfoot","thead","td","th","tr","a","abbr","acronym","b","big","cite","code","dfn","em","kbd","q","samp","small","span","strong","sub","sup","tt","var","blockquote","address","h1","h2","h3","h4","h5","h6","p","pre","br","textRun","blockInteraction","inlineInteraction","printedVariable","templateElement","templateBlock","templateInline","drawingInteraction","graphicInteraction","containable","children","getAllowedContainersElements","getAllowedContainers","jqSelector","substring","filter","getParentClasses","aClass","model","intersect","getChildClasses","getAllowedContents","checked","contain","child","isAllowedClass","qtiContainerClass","qtiContentClass","allowedClasses","cacheType","isBlock","isInline","topClass","getAvailableAuthoringElements","description","icon","short","tags","portableElementRegistry","qtiElements","getAuthoringData","on","ciRegistry","registry","providers","icRegistry","getBaseUrlByIdentifier","source","relative","fullmatch","relPath","context","assetStrategies","portableAssetStrategy","itemThemes","moduleConfig","root_url","locations","simpleChoice.choiceInteraction","simpleChoice.orderInteraction","simpleAssociableChoice.matchInteraction","simpleAssociableChoice.associateInteraction","enableDragAndDrop","associate","associateDragAndDrop","gapMatch","gapMatchDragAndDrop","graphicGapMatch","graphicGapMatchDragAndDrop","order","orderDragAndDrop","async","helpers","loadItem","done","qtiJsonFile","urlTokens","extension","fullpath","s","contexts","loader","itemData","duration","end","performance","appendTo","remove","_second","_defaultTimeout","_defaultOccurrencesCount","_defaultSamples","_sampleBaseId","performancesTester","samples","occurrences","timeout","idx","_samples","sample","nb","tests","cb","partial","iterations","series","measures","_kilo","_mega","_downloadData","10KB","100KB","1MB","10MB","download","timeoutId","request","XMLHttpRequest","open","setRequestHeader","onload","bytes","seconds","speed","clearTimeout","onerror","delay","send","bandwidthTester","bind","urlHelper","generateStr","possible","route","str","ajax","xhr","startTime","addEventListener","evt","lengthComputable","passedTime","time","loaded","uploadTester","jqXHR","omit","getConfig","getTesterUrl","action","controller","navigator","screen","params","e","ua","userAgent","ActiveXObject","opera","chrome","createElement","Worker","applicationCache","history","pushState","documentElement","webkitRequestFullScreen","w","width","h","height","_url","browserTester","initConfig","success","hb","depth0","partials","program1","stack1","helper","buffer","header","hash","functionType","escapeExpression","program3","info","compilerInfo","title","inverse","noop","fn","program","button","legend","program2","program4","wide","program5","program7","program9","helperMissing","program10","details","component","statusFactory","mainTpl","resultTpl","diagnosticFactory","setTemplate","controls","$start","$component","$status","$results","run","$btn","closest","$result","$details","actionStore","actionCheck","_defaultsBrowser","_defaultsBandwidth","unit","ideal","_defaultsPerformances","optimal","changeStatus","html","store","post","storeParams","checkBrowser","browser","information","browserVersion","os","osVersion","addResult","checkPerformances","range","cursor","performancesMin","performancesMax","performancesAverage","checkBandwidth","bandwidthMin","bandwidthMax","bandwidthAverage","bandwidthUnit","testTakers","maxTestTakers","st","checkUpload","avgSpeed","totalSpeed","maxSpeed","uploadAvg","uploadMax","$indicator","fadeIn","animate","left","outerWidth","prepare","empty","finish","doCheck","method","scores","total","loadingBar","$contentArea","stop","actionbar","diagnosticTpl","cssScope","taoDiagnosticRunnerCtlr","installTester","workstation","$workstation","getElement","which","preventDefault","removeProp","$list","$panel","indexUrl","workstationUrl","renderTo","buttons","href","fail","encode","dialog","formatNumber","number","digits","factor","taoDiagnosticCtlr","selection","dataType","datatable","encodeHtml","removeUrl","dataset","installedExtension","diagnosticUrl","serviceUrl","performancesConfig","performancesOptimal","performancesRange","diagnosticStatus","tools","deliveryUrl","massAction","autoRender","autoDestroy","onOkBtn","transform","loading","selectable","d","getElementsByTagName","cssText","createTextNode"],"mappings":"AAAAA,OAAA,yCACAC,eACAC,SACAC,MAAA,mCAGAC,sBACAF,SACAG,MAAA,gDAGAC,YACAJ,SACAG,MAAA,8BACAE,WAAA,uCCUAP,OAAA,qCACA,SACA,eACA,SAAAQ,EAAAC,UACA,YAMA,SAAAC,cAAAC,WACA,GAAAC,cAAAJ,EAAAG,UAEAC,cAAAC,KAAA,UACAJ,WAAAK,MAAAF,aAAAC,KAAA,UAEAD,aAAAC,KAAA,YACAJ,WAAAK,MAAAF,aAAAC,KAAA,YAOA,MAAAH,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,GAAA4qB,EAAA5qB,GAAAm6B,QAAAhkB,EAAAyU,EAAA7G,GAAAkW,EAAAG,eAAAjkB,KACA","file":"routes.js.map","sourcesContent":["define('taoClientDiagnostic/controller/routes',{\n 'Authenticator' : {\n 'actions' : {\n 'login' : 'controller/Authenticator/login'\n }\n },\n 'CompatibilityChecker' : {\n 'actions' : {\n 'index' : 'controller/CompatibilityChecker/diagnostics'\n }\n },\n 'Diagnostic' : {\n 'actions' : {\n 'index' : 'controller/Diagnostic/index',\n 'diagnostic' : 'controller/Diagnostic/diagnostic'\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n *\n * @author Camille Moyon \n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/message',[\n 'jquery',\n 'ui/feedback'\n], function ($, feedback) {\n 'use strict';\n\n /**\n * Displays the messages set into a markup\n * @param {String|jQuery|HTMLElement} container\n */\n function showMessages(container) {\n var $feedbackBox = $(container);\n\n if ($feedbackBox.data('error')) {\n feedback().error($feedbackBox.data('error'));\n }\n if ($feedbackBox.data('message')) {\n feedback().error($feedbackBox.data('message'));\n }\n }\n\n /**\n * @exports\n */\n return showMessages;\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n *\n * @author Camille Moyon \n */\ndefine('taoClientDiagnostic/controller/Authenticator/login',[\n 'jquery',\n 'taoClientDiagnostic/tools/message'\n], function ($, showMessage) {\n 'use strict';\n\n /**\n * @exports\n */\n return {\n start: function() {\n showMessage('#feedback-box');\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) 2016 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n * @author dieter \n */\ndefine('taoClientDiagnostic/tools/diagnostic/status',[\n 'jquery',\n 'lodash',\n 'i18n'\n], function ($, _, __) {\n 'use strict';\n\n /**\n * A list of thresholds for performances check\n * @type {Array}\n */\n var performancesThresholds = [{\n threshold: 0,\n message: __('Very slow performances'),\n type: 'error'\n }, {\n threshold: 33,\n message: __('Average performances'),\n type: 'warning'\n }, {\n threshold: 66,\n message: __('Good performances'),\n type: 'success'\n }];\n\n /**\n * A list of thresholds for bandwidth check\n * @type {Array}\n */\n var bandwidthThresholds = [{\n threshold: 0,\n message: __('Low bandwidth'),\n type: 'error'\n }, {\n threshold: 33,\n message: __('Average bandwidth'),\n type: 'warning'\n }, {\n threshold: 66,\n message: __('Good bandwidth'),\n type: 'success'\n }];\n\n /**\n * A list of thresholds for bandwidth check\n * @type {Array}\n */\n var uploadThresholds = [{\n threshold: 0,\n message: __('Low upload speed'),\n type: 'error'\n }, {\n threshold: 33,\n message: __('Average upload speed'),\n type: 'warning'\n }, {\n threshold: 66,\n message: __('Good upload speed'),\n type: 'success'\n }];\n\n /**\n * A list of thresholds for summary\n * @type {Array}\n */\n var summaryThresholds = [{\n threshold: 0,\n message: __('Your system requires a compatibility update, please contact your system administrator.'),\n type: 'error'\n }, {\n threshold: 33,\n message: __('Your system is not optimal, please contact your system administrator.'),\n type: 'warning'\n }, {\n threshold: 66,\n message: __('Your system is fully compliant.'),\n type: 'success'\n }];\n\n /**\n * Gets a diagnostic factory manager\n * @returns {Object}\n */\n function diagnosticStatusFactory() {\n return {\n /**\n * The list of known thresholds by context\n */\n thresholds: {\n performances: performancesThresholds,\n bandwidth: bandwidthThresholds,\n upload: uploadThresholds,\n summary: summaryThresholds\n },\n\n /**\n * Gets the thresholds for a particular context\n * @param {String} name\n * @returns {Array}\n */\n getThresholds: function getThresholds(name) {\n return this.thresholds[name];\n },\n\n /**\n * Gets the correct status message for a given percentage\n * @param {Number} percentage\n * @param {Array|String} thresholds\n * @returns {Object}\n */\n getStatus: function getStatus(percentage, thresholds) {\n var len, feedback, i, step, status;\n\n // the percentage is between 0 and 100 and obviously must be a number\n percentage = Math.max(0, Math.min(100, Math.round(parseInt(percentage, 10))));\n\n if (_.isString(thresholds)) {\n thresholds = this.getThresholds(thresholds);\n }\n\n // grab a feedback related to the percentage in the thresholds list\n if (thresholds) {\n if (!_.isArray(thresholds)) {\n thresholds = [thresholds];\n }\n\n len = thresholds.length;\n feedback = thresholds[0];\n for (i = 1; i < len; i++) {\n step = thresholds[i];\n if (step && percentage >= step.threshold) {\n feedback = step;\n } else {\n break;\n }\n }\n }\n\n // need a structure compatible with the handlebars template\n status = {\n percentage: percentage,\n quality: {}\n };\n\n if (feedback) {\n status.feedback = _.clone(feedback);\n }\n\n return status;\n }\n };\n }\n\n return diagnosticStatusFactory;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/fixedDecimals',[],function () {\n 'use strict';\n\n /**\n * Rounds a value to a fixed number of decimals\n * @param {Number} value The value to round\n * @param {Number} decimals The number of decimal\n * @returns {Number}\n */\n var fixedDecimals = function fixedDecimals(value, decimals) {\n var shift = Math.pow(10, Math.abs(decimals || 1));\n return Math.round(Number(value) * shift) / shift || 0;\n };\n\n return fixedDecimals;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/stats',[\n 'lodash',\n 'taoClientDiagnostic/tools/fixedDecimals'\n], function (_, fixedDecimals) {\n 'use strict';\n\n /**\n * Computes some stats on a list from a particular field\n * @param {Array|Object} list The list to compute stats on\n * @param {String|Function} fieldName The name of the field to process, or a callback method returning the value\n * @param {Number} [decimals] Optional number of fixed decimals for values\n * @returns {Object}\n */\n var stats = function stats(list, fieldName, decimals) {\n var sum = 0;\n var sum2 = 0;\n var min = Number.MAX_VALUE;\n var max = 0;\n var variance;\n var count = 0;\n var values = [];\n var avg;\n var med;\n var middle;\n var getValue;\n var results;\n\n if (_.isFunction(fieldName)) {\n getValue = fieldName;\n } else {\n getValue = function(item) {\n return item && item[fieldName] || 0;\n };\n }\n\n // process 1st pass stats: compute sum, min and max values\n _.forEach(list, function(item) {\n var value;\n if (undefined !== item) {\n value = getValue(item);\n values.push(value);\n min = Math.min(min, value);\n max = Math.max(max, value);\n sum += value;\n count++;\n }\n });\n\n // compute the average value\n avg = sum / (count || 1);\n\n // process 2nd pass stats: compute variance\n _.forEach(values, function(value) {\n var diff = value - avg;\n sum2 += diff * diff;\n });\n\n // compute de standard variance\n variance = count > 1 ? Math.sqrt(sum2 / (count - 1)) : 0;\n\n // compute the median value\n values.sort();\n middle = count / 2;\n med = (values[Math.floor(middle)] + values[Math.ceil(middle)]) / 2;\n\n results = {\n min : min,\n max : max,\n sum : sum,\n count : count,\n average : avg,\n median : med,\n variance : variance\n };\n\n if (decimals) {\n _.forEach(results, function(value, key) {\n results[key] = fixedDecimals(value, decimals);\n });\n }\n\n results.values = list;\n return results;\n };\n\n return stats;\n});\n\n","define('taoQtiItem/qtiItem/core/qtiClasses',[], function(){\n return {\n '_container' : 'taoQtiItem/qtiItem/core/Container',\n 'assessmentItem' : 'taoQtiItem/qtiItem/core/Item',\n 'responseProcessing' : 'taoQtiItem/qtiItem/core/ResponseProcessing',\n '_simpleFeedbackRule' : 'taoQtiItem/qtiItem/core/response/SimpleFeedbackRule',\n 'stylesheet' : 'taoQtiItem/qtiItem/core/Stylesheet',\n 'math' : 'taoQtiItem/qtiItem/core/Math',\n 'img' : 'taoQtiItem/qtiItem/core/Img',\n 'object' : 'taoQtiItem/qtiItem/core/Object',\n 'outcomeDeclaration' : 'taoQtiItem/qtiItem/core/variables/OutcomeDeclaration',\n 'responseDeclaration' : 'taoQtiItem/qtiItem/core/variables/ResponseDeclaration',\n 'rubricBlock' : 'taoQtiItem/qtiItem/core/RubricBlock',\n 'associableHotspot' : 'taoQtiItem/qtiItem/core/choices/AssociableHotspot',\n 'gap' : 'taoQtiItem/qtiItem/core/choices/Gap',\n 'gapImg' : 'taoQtiItem/qtiItem/core/choices/GapImg',\n 'gapText' : 'taoQtiItem/qtiItem/core/choices/GapText',\n 'hotspotChoice' : 'taoQtiItem/qtiItem/core/choices/HotspotChoice',\n 'hottext' : 'taoQtiItem/qtiItem/core/choices/Hottext',\n 'inlineChoice' : 'taoQtiItem/qtiItem/core/choices/InlineChoice',\n 'simpleAssociableChoice' : 'taoQtiItem/qtiItem/core/choices/SimpleAssociableChoice',\n 'simpleChoice' : 'taoQtiItem/qtiItem/core/choices/SimpleChoice',\n 'associateInteraction' : 'taoQtiItem/qtiItem/core/interactions/AssociateInteraction',\n 'choiceInteraction' : 'taoQtiItem/qtiItem/core/interactions/ChoiceInteraction',\n 'endAttemptInteraction' : 'taoQtiItem/qtiItem/core/interactions/EndAttemptInteraction',\n 'extendedTextInteraction' : 'taoQtiItem/qtiItem/core/interactions/ExtendedTextInteraction',\n 'gapMatchInteraction' : 'taoQtiItem/qtiItem/core/interactions/GapMatchInteraction',\n 'graphicAssociateInteraction' : 'taoQtiItem/qtiItem/core/interactions/GraphicAssociateInteraction',\n 'graphicGapMatchInteraction' : 'taoQtiItem/qtiItem/core/interactions/GraphicGapMatchInteraction',\n 'graphicOrderInteraction' : 'taoQtiItem/qtiItem/core/interactions/GraphicOrderInteraction',\n 'hotspotInteraction' : 'taoQtiItem/qtiItem/core/interactions/HotspotInteraction',\n 'hottextInteraction' : 'taoQtiItem/qtiItem/core/interactions/HottextInteraction',\n 'inlineChoiceInteraction' : 'taoQtiItem/qtiItem/core/interactions/InlineChoiceInteraction',\n 'matchInteraction' : 'taoQtiItem/qtiItem/core/interactions/MatchInteraction',\n 'mediaInteraction' : 'taoQtiItem/qtiItem/core/interactions/MediaInteraction',\n 'orderInteraction' : 'taoQtiItem/qtiItem/core/interactions/OrderInteraction',\n 'prompt' : 'taoQtiItem/qtiItem/core/interactions/Prompt',\n 'selectPointInteraction' : 'taoQtiItem/qtiItem/core/interactions/SelectPointInteraction',\n 'sliderInteraction' : 'taoQtiItem/qtiItem/core/interactions/SliderInteraction',\n 'textEntryInteraction' : 'taoQtiItem/qtiItem/core/interactions/TextEntryInteraction',\n 'uploadInteraction' : 'taoQtiItem/qtiItem/core/interactions/UploadInteraction',\n 'feedbackBlock' : 'taoQtiItem/qtiItem/core/feedbacks/FeedbackBlock',\n 'feedbackInline' : 'taoQtiItem/qtiItem/core/feedbacks/FeedbackInline',\n 'modalFeedback' : 'taoQtiItem/qtiItem/core/feedbacks/ModalFeedback',\n 'customInteraction' : 'taoQtiItem/qtiItem/core/interactions/CustomInteraction',\n 'infoControl' : 'taoQtiItem/qtiItem/core/PortableInfoControl',\n 'include' : 'taoQtiItem/qtiItem/core/Include'\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) 2015 (original work) Open Assessment Technologies SA\n *\n */\n\n/**\n * Common basic util functions\n */\ndefine('taoQtiItem/qtiItem/helper/util',['lodash'], function(_){\n 'use strict';\n\n var util = {\n\n buildSerial : function buildSerial(prefix){\n var id = prefix || '';\n var chars = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n for(var i = 0; i < 22; i++){\n id += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return id;\n },\n\n /**\n * Generates an id for a Qti element (the generation is different from identifier)\n * @param {Object} item - the element related item\n * @param {String} prefix - identifier prefix\n * @returns {String} the identifier\n * @throws {TypeError} if there is no item\n */\n buildId : function buildId(item, prefix){\n var id;\n var usedIds;\n var i = 1;\n var suffix = '';\n var exists = false;\n\n if(!item){\n throw new TypeError('A item is required to generate a unique identifier');\n }\n\n usedIds = item.getUsedIds();\n\n do{\n exists = false;\n id = prefix + suffix;\n if(_.contains(usedIds, id)){\n exists = true;\n suffix = '_' + i;\n i++;\n }\n } while(exists);\n\n return id;\n },\n\n /**\n * Generates an identifier for a Qti element\n * @param {Object} item - the element related item\n * @param {String} prefix - identifier prefix\n * @param {Boolean} [useSuffix = true] - add a \"_ + index\" to the identifier\n * @returns {String} the identifier\n * @throws {TypeError} if there is no item\n */\n buildIdentifier : function buildIdentifier(item, prefix, useSuffix){\n\n var id;\n var usedIds;\n var suffix = '';\n var i = 1;\n var exists = false;\n\n if(!item){\n throw new TypeError('A item is required to generate a unique identifier');\n }\n\n if(!prefix){\n throw new TypeError('Prefix is required to build an identifier');\n }\n\n usedIds = item.getUsedIdentifiers();\n useSuffix = _.isUndefined(useSuffix) ? true : useSuffix;\n\n if(prefix){\n prefix = prefix.replace(/_[0-9]+$/ig, '_') //detect incremental id of type choice_12, response_3, etc.\n .replace(/[^a-zA-Z0-9_]/ig, '_')\n .replace(/(_)+/ig, '_');\n if(useSuffix){\n suffix = '_' + i;\n }\n }\n\n do{\n exists = false;\n id = prefix + suffix;\n if(usedIds[id]){\n exists = true;\n suffix = '_' + i;\n i++;\n }\n } while(exists);\n\n return id;\n },\n\n findInCollection : function findInCollection(element, collectionNames, searchedSerial){\n\n var found = null;\n\n if(_.isString(collectionNames)){\n collectionNames = [collectionNames];\n }\n\n if(_.isArray(collectionNames)){\n\n _.each(collectionNames, function(collectionName){\n\n //get collection to search in (resolving case like interaction.choices.0\n var collection = element;\n _.each(collectionName.split('.'), function(nameToken){\n collection = collection[nameToken];\n });\n var elt = collection[searchedSerial];\n\n if(elt){\n found = {'parent' : element, 'element' : elt};\n return false;//break the each loop\n }\n\n //search inside each elements:\n _.each(collection, function(elt){\n\n if(_.isFunction(elt.find)){\n found = elt.find(searchedSerial);\n if(found){\n return false;//break the each loop\n }\n }\n\n });\n\n if(found){\n return false;//break the each loop\n }\n\n });\n\n }else{\n\n throw new Error('invalid argument : collectionNames must be an array or a string');\n }\n\n return found;\n },\n addMarkupNamespace : function addMarkupNamespace(markup, ns){\n if(ns) {\n markup = markup.replace(/<(\\/)?([a-z:]+)(\\s?)([^><]*)>/g, function($0, $1, $2, $3, $4){\n if($2.indexOf(':')>0){\n return $0;\n }\n $1 = $1 || '';\n $3 = $3 || '';\n return '<'+ $1 + ns + ':'+$2+$3+$4+'>';\n });\n return markup;\n }\n return markup;\n\n },\n removeMarkupNamespaces : function removeMarkupNamespace(markup){\n return markup.replace(/<(\\/)?(\\w*):([^>]*)>/g, '<$1$3>');\n },\n getMarkupUsedNamespaces : function getMarkupUsedNamespaces(markup){\n var namespaces = [];\n markup.replace(/<(\\/)?(\\w*):([^>]*)>/g, function(original, slash, ns, node){\n namespaces.push(ns);\n return '<'+slash+node+'>';\n });\n return _.uniq(namespaces);\n }\n };\n\n return util;\n});\n\n","define('taoQtiItem/qtiItem/helper/rendererConfig',['lodash', 'jquery'], function(_, $){\n\n var rendererConfigHelper = {};\n\n rendererConfigHelper.getOptionsFromArguments = function(args){\n\n var options = {\n data : {},\n placeholder : null,\n subclass : '',\n renderer : null\n };\n \n _.each(args, function(arg){\n if(arg){\n if(arg.isRenderer){\n options.renderer = arg;\n }else if(arg instanceof $ && arg.length){\n options.placeholder = arg;\n }else if(_.isString(arg)){\n options.subclass = arg;\n }else if(_.isPlainObject(arg)){\n options.data = arg;\n }else{\n console.log('invalid arg', arg, args);\n }\n }\n });\n \n return options;\n };\n \n return rendererConfigHelper;\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) 2015 (original work) Open Assessment Technologies SA\n *\n */\ndefine('taoQtiItem/qtiItem/core/Element',[\n 'jquery',\n 'lodash',\n 'class',\n 'taoQtiItem/qtiItem/helper/util',\n 'taoQtiItem/qtiItem/helper/rendererConfig'\n], function($, _, Class, util, rendererConfig){\n 'use strict';\n\n var _instances = {};\n\n var Element = Class.extend({\n qtiClass : '',\n serial : '',\n relatedItem : null,\n init : function(serial, attributes){\n\n //init own attributes\n this.attributes = {};\n\n //system properties, for item creator internal use only\n this.metaData = {};\n\n //init call in the format init(attributes)\n if(typeof (serial) === 'object'){\n attributes = serial;\n serial = '';\n }\n\n if(!serial){\n serial = util.buildSerial(this.qtiClass + '_');\n }\n\n if(serial && (typeof serial !== 'string' || !serial.match(/^[a-z_0-9]*$/i))){\n throw 'invalid QTI serial : (' + (typeof serial) + ') ' + serial;\n }\n\n if(!_instances[serial]){\n _instances[serial] = this;\n this.serial = serial;\n this.setAttributes(attributes || {});\n }else{\n throw 'a QTI Element with the same serial already exists ' + serial;\n }\n\n if(typeof this.initContainer === 'function'){\n this.initContainer(arguments[2] || '');\n }\n if(typeof this.initObject === 'function'){\n this.initObject();\n }\n },\n is : function(qtiClass){\n return (qtiClass === this.qtiClass);\n },\n placeholder : function(){\n return '{{' + this.serial + '}}';\n },\n getSerial : function(){\n return this.serial;\n },\n getUsedIdentifiers : function(){\n var usedIds = {};\n var elts = this.getComposingElements();\n for(var i in elts){\n var elt = elts[i];\n var id = elt.attr('identifier');\n if(id){\n //warning: simplistic implementation, allow only one unique identifier in the item no matter the element class/type\n usedIds[id] = elt;\n }\n }\n return usedIds;\n },\n\n /**\n * Get the ids in use. (id is different from identifier)\n * @returns {Array} of the ids in use\n */\n getUsedIds : function getUsedIds(){\n var usedIds = [];\n _.forEach(this.getComposingElements(), function(elt){\n var id = elt.attr('id');\n if(id && !_.contains(usedIds, id)){\n usedIds.push(id);\n }\n });\n return usedIds;\n },\n\n attr : function(name, value){\n if(name){\n if(value !== undefined){\n this.attributes[name] = value;\n }else{\n if(typeof (name) === 'object'){\n for(var prop in name){\n this.attr(prop, name[prop]);\n }\n }else if(typeof (name) === 'string'){\n if(this.attributes[name] === undefined){\n return undefined;\n }else{\n return this.attributes[name];\n }\n }\n }\n }\n return this;\n },\n data : function(name, value){\n if(name){\n if(value !== undefined){\n this.metaData[name] = value;\n $(document).trigger('metaChange.qti-widget', {element : this, key : name, value : value});\n }else{\n if(typeof (name) === 'object'){\n for(var prop in name){\n this.data(prop, name[prop]);\n }\n }else if(typeof (name) === 'string'){\n if(this.metaData[name] === undefined){\n return undefined;\n }else{\n return this.metaData[name];\n }\n }\n }\n }\n return this;\n },\n removeData : function(name){\n delete this.metaData[name];\n return this;\n },\n removeAttr : function(name){\n return this.removeAttributes(name);\n },\n setAttributes : function(attributes){\n this.attributes = attributes;\n return this;\n },\n getAttributes : function(){\n return _.clone(this.attributes);\n },\n removeAttributes : function(attrNames){\n if(typeof (attrNames) === 'string'){\n attrNames = [attrNames];\n }\n for(var i in attrNames){\n delete this.attributes[attrNames[i]];\n }\n return this;\n },\n getComposingElements : function(){\n var elts = {};\n function append(element){\n elts[element.getSerial()] = element;//pass individual object by ref, instead of the whole list(object)\n elts = _.extend(elts, element.getComposingElements());\n }\n if(typeof this.initContainer === 'function'){\n append(this.getBody());\n }\n if(typeof this.initObject === 'function'){\n append(this.getObject());\n }\n _.each(this.metaData, function(v){\n if(Element.isA(v, '_container')){\n append(v);\n }else if(_.isArray(v)){\n _.each(v, function(v){\n if(Element.isA(v, '_container')){\n append(v);\n }\n });\n }\n });\n return elts;\n },\n getUsedClasses : function(){\n\n var ret = [this.qtiClass],\n composingElts = this.getComposingElements();\n\n _.each(composingElts, function(elt){\n ret.push(elt.qtiClass);\n });\n\n return _.uniq(ret);\n },\n find : function(serial){\n\n var found = null;\n\n if(typeof this.initObject === 'function'){\n var object = this.getObject();\n if(object.serial === serial){\n found = {'parent' : this, 'element' : object, 'location' : 'object'};\n }\n }\n\n if(!found && typeof this.initContainer === 'function'){\n found = this.getBody().find(serial, this);\n }\n\n return found;\n },\n parent : function(){\n var item = this.getRelatedItem();\n if(item){\n var found = item.find(this.getSerial());\n if(found){\n return found.parent;\n }\n }\n return null;\n },\n setRelatedItem : function(item, recursive){\n\n recursive = (typeof recursive === 'undefined') ? true : recursive;\n\n if(Element.isA(item, 'assessmentItem')){\n this.relatedItem = item;\n var composingElts = this.getComposingElements();\n for(var i in composingElts){\n composingElts[i].setRelatedItem(item, false);\n }\n }\n\n },\n getRelatedItem : function(){\n var ret = null;\n if(Element.isA(this.relatedItem, 'assessmentItem')){\n ret = this.relatedItem;\n }\n return ret;\n },\n setRenderer : function(renderer){\n if(renderer && renderer.isRenderer){\n this.renderer = renderer;\n var elts = this.getComposingElements();\n for(var serial in elts){\n elts[serial].setRenderer(renderer);\n }\n }else{\n throw 'invalid qti rendering engine';\n }\n },\n getRenderer : function(){\n return this.renderer;\n },\n render : function(){\n\n var args = rendererConfig.getOptionsFromArguments(arguments);\n var _renderer = args.renderer || this.getRenderer();\n\n var tplData = {},\n defaultData = {\n 'tag' : this.qtiClass,\n 'serial' : this.serial,\n 'attributes' : this.getAttributes()\n };\n\n if(!_renderer){\n throw 'render: no renderer found for the element ' + this.qtiClass + ':' + this.serial;\n }\n\n if(typeof this.initContainer === 'function'){\n //allow body to have a different renderer if it has its own renderer set\n defaultData.body = this.getBody().render(args.renderer);\n }\n if(typeof this.initObject === 'function'){\n defaultData.object = {\n attributes : this.object.getAttributes()\n };\n defaultData.object.attributes.data = _renderer.resolveUrl(this.object.attr('data'));\n }\n\n tplData = _.merge(defaultData, args.data || {});\n tplData = _renderer.getData(this, tplData, args.subclass);\n var rendering = _renderer.renderTpl(this, tplData, args.subclass);\n if(args.placeholder){\n args.placeholder.replaceWith(rendering);\n }\n\n return rendering;\n },\n postRender : function(data, altClassName, renderer){\n\n var postRenderers = [];\n var _renderer = renderer || this.getRenderer();\n\n if(typeof this.initContainer === 'function'){\n //allow body to have a different renderer if it has its own renderer set\n postRenderers = this.getBody().postRender({}, '', renderer);\n }\n\n if(_renderer){\n postRenderers.push(_renderer.postRender(this, data, altClassName));\n }else{\n throw 'postRender: no renderer found for the element ' + this.qtiClass + ':' + this.serial;\n }\n\n return _.compact(postRenderers);\n },\n getContainer : function($scope, subclass){\n var renderer = this.getRenderer();\n if(renderer){\n return renderer.getContainer(this, $scope, subclass);\n }else{\n throw 'getContainer: no renderer found for the element ' + this.qtiClass + ':' + this.serial;\n }\n },\n toArray : function(){\n var arr = {\n serial : this.serial,\n type : this.qtiClass,\n attributes : this.getAttributes()\n };\n\n if(typeof this.initContainer === 'function'){\n arr.body = this.getBody().toArray();\n }\n if(typeof this.initObject === 'function'){\n arr.object = this.object.toArray();\n }\n\n return arr;\n },\n isEmpty : function(){\n //tells whether the element should be considered empty or not, from the rendering point of view\n return false;\n },\n addClass : function(className){\n var clazz = this.attr('class') || '';\n if(!_containClass(clazz, className)){\n this.attr('class', clazz + (clazz.length ? ' ' : '') + className);\n }\n },\n hasClass : function(className){\n return _containClass(this.attr('class'), className);\n },\n removeClass : function(className){\n\n var clazz = this.attr('class') || '';\n if(clazz){\n\n var regex = new RegExp('(?:^|\\\\s)' + className + '(?:\\\\s|$)');\n clazz = clazz.replace(regex, ' ').trim();\n\n if(clazz){\n this.attr('class', clazz);\n }else{\n this.removeAttr('class');\n }\n }\n },\n /**\n * Add or remove class. Setting the optional state will force addition/removal.\n * State is here to keep the jQuery syntax\n *\n * @param {String} className\n * @param {Boolean} [state]\n */\n toggleClass : function(className, state) {\n\n if(typeof state === 'boolean') {\n return state ? this.addClass(className) : this.removeClass(className);\n }\n\n if(this.hasClass(className)) {\n return this.removeClass(className);\n }\n return this.addClass(className);\n },\n isset : function(){\n return Element.issetElement(this.serial);\n },\n unset : function(){\n return Element.unsetElement(this.serial);\n }\n });\n\n var _containClass = function(allClassStr, className){\n var regex = new RegExp('(?:^|\\\\s)' + className + '(?:\\\\s|$)', '');\n return allClassStr && regex.test(allClassStr);\n };\n\n //helpers\n Element.isA = function(qtiElement, qtiClass){\n return (qtiElement instanceof Element && qtiElement.is(qtiClass));\n };\n\n Element.getElementBySerial = function(serial){\n return _instances[serial];\n };\n\n Element.issetElement = function(serial){\n return !!_instances[serial];\n };\n\n /**\n * Unset a registered element from it's serial\n * @param {String} serial - the element serial\n * @returns {Boolean} true if unset\n */\n Element.unsetElement = function(serial){\n\n var element = Element.getElementBySerial(serial);\n\n if(element){\n\n var composingElements = element.getComposingElements();\n _.each(composingElements, function(elt){\n delete _instances[elt.serial];\n });\n delete _instances[element.serial];\n\n return true;\n }\n return false;\n };\n\n return Element;\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) 2015 (original work) Open Assessment Technologies SA ;\n *\n */\n//@todo : move this to the ../helper directory\ndefine('taoQtiItem/qtiItem/core/Loader',['lodash', 'class', 'taoQtiItem/qtiItem/core/qtiClasses', 'taoQtiItem/qtiItem/core/Element'], function(_, Class, qtiClasses, Element){\n\n var Loader = Class.extend({\n init : function(item, classesLocation){\n\n this.qti = {}; //loaded qti classes are store here\n this.classesLocation = {};\n\n this.item = item || null;//starts either from scratch or with an existing item object\n this.setClassesLocation(classesLocation || qtiClasses);//load default location for qti classes model\n },\n setClassesLocation : function(qtiClasses){\n _.extend(this.classesLocation, qtiClasses);\n return this;\n },\n getRequiredClasses : function(data){\n var ret = [];\n for(var i in data){\n if(i === 'qtiClass' && data[i] !== '_container' && i !== 'relatedItem'){//although a _container is a concrete class in TAO, it is not defined in QTI standard\n ret.push(data[i]);\n }else if(typeof(data[i]) === 'object' && i !== 'responseRules'){ //responseRules should'nt be part of the parsing\n ret = _.union(ret, this.getRequiredClasses(data[i]));\n }\n }\n return ret;\n },\n loadRequiredClasses : function(data, callback, reload){\n\n var requiredClasses = this.getRequiredClasses(data, reload), required = [];\n\n for(var i in requiredClasses){\n var requiredClass = requiredClasses[i];\n if(this.classesLocation[requiredClass]){\n required.push(this.classesLocation[requiredClass]);\n }else{\n throw new Error('missing qti class location declaration : ' + requiredClass);\n }\n }\n\n var _this = this;\n require(required, function(){\n _.each(arguments, function(QtiClass){\n _this.qti[QtiClass.prototype.qtiClass] = QtiClass;\n });\n callback.call(_this, _this.qti);\n });\n },\n getLoadedClasses : function(){\n return _.keys(this.qti);\n },\n loadItemData : function(data, callback){\n\n var _this = this;\n _this.loadRequiredClasses(data, function(Qti){\n var i;\n if(typeof(data) === 'object' && data.qtiClass === 'assessmentItem'){\n\n //unload an item from it's serial (in case of a reload)\n if(data.serial){\n Element.unsetElement(data.serial);\n }\n\n _this.item = new Qti.assessmentItem(data.serial, data.attributes || {});\n _this.loadContainer(_this.item.getBody(), data.body);\n\n for(i in data.outcomes){\n var outcome = _this.buildOutcome(data.outcomes[i]);\n if(outcome){\n _this.item.addOutcomeDeclaration(outcome);\n }\n }\n for(i in data.feedbacks){\n var feedback = _this.buildElement(data.feedbacks[i]);\n if(feedback){\n _this.item.addModalFeedback(feedback);\n }\n }\n for(i in data.stylesheets){\n var stylesheet = _this.buildElement(data.stylesheets[i]);\n if(stylesheet){\n _this.item.addStylesheet(stylesheet);\n }\n }\n \n //important : build responses after all modal feedbacks and outcomes has been loaded, because the simple feedback rules need to reference them\n for(i in data.responses){\n var response = _this.buildResponse(data.responses[i]);\n if(response){\n _this.item.addResponseDeclaration(response);\n\n var feedbackRules = data.responses[i].feedbackRules;\n if(feedbackRules){\n _.forIn(feedbackRules, function(fbData, serial){\n response.feedbackRules[serial] = _this.buildSimpleFeedbackRule(fbData, response);\n });\n }\n }\n }\n \n if(data.responseProcessing){\n _this.item.setResponseProcessing(_this.buildResponseProcessing(data.responseProcessing));\n }\n _this.item.setNamespaces(data.namespaces);\n _this.item.setSchemaLocations(data.schemaLocations);\n _this.item.setApipAccessibility(data.apipAccessibility);\n }\n\n if(typeof(callback) === 'function'){\n callback.call(_this, _this.item);\n }\n });\n },\n loadAndBuildElement : function(data, callback){\n\n var _this = this;\n\n _this.loadRequiredClasses(data, function(Qti){\n\n var element = _this.buildElement(data);\n\n if(typeof(callback) === 'function'){\n callback.call(_this, element);\n }\n });\n },\n loadElement : function(element, data, callback){\n\n var _this = this;\n this.loadRequiredClasses(data, function(){\n _this.loadElementData(element, data);\n if(typeof(callback) === 'function'){\n callback.call(_this, element);\n }\n });\n },\n /**\n * Load ALL given elements into existing loaded item\n *\n * @todo to be renamed to loadItemElements\n * @param {object} data\n * @param {function} callback\n * @returns {undefined}\n */\n loadElements : function(data, callback){\n\n var _this = this;\n\n if(_this.item){\n\n this.loadRequiredClasses(data, function(){\n\n var allElements = _this.item.getComposingElements();\n\n for(var i in data){\n var elementData = data[i];\n if(elementData && elementData.qtiClass && elementData.serial){\n //find and update element\n if(allElements[elementData.serial]){\n _this.loadElementData(allElements[elementData.serial], elementData);\n }\n }\n }\n\n if(typeof(callback) === 'function'){\n callback.call(_this, _this.item);\n }\n });\n }else{\n throw 'QtiLoader : cannot load elements in empty item';\n }\n\n },\n buildResponse : function(data){\n\n var response = this.buildElement(data);\n\n response.template = data.howMatch || null;\n response.defaultValue = data.defaultValue || null;\n response.correctResponse = data.correctResponses || null;\n\n if(_.size(data.mapping)){\n response.mapEntries = data.mapping;\n }else if(_.size(data.areaMapping)){\n response.mapEntries = data.areaMapping;\n }else{\n response.mapEntries = {};\n }\n\n response.mappingAttributes = data.mappingAttributes || {};\n\n return response;\n },\n buildSimpleFeedbackRule : function(data, response){\n\n var feedbackRule = this.buildElement(data);\n \n feedbackRule.setCondition(response, data.condition, data.comparedValue || null);\n \n// feedbackRule.comparedOutcome = this.item.responses[data.comparedOutcome] || null;\n feedbackRule.feedbackOutcome = this.item.outcomes[data.feedbackOutcome] || null;\n feedbackRule.feedbackThen = this.item.modalFeedbacks[data.feedbackThen] || null;\n feedbackRule.feedbackElse = this.item.modalFeedbacks[data.feedbackElse] || null;\n \n //associate the compared outcome to the feedbacks if applicable\n var response = feedbackRule.comparedOutcome;\n if(feedbackRule.feedbackThen){\n feedbackRule.feedbackThen.data('relatedResponse', response);\n }\n if(feedbackRule.feedbackElse){\n feedbackRule.feedbackElse.data('relatedResponse', response);\n }\n \n return feedbackRule;\n },\n buildOutcome : function(data){\n var outcome = this.buildElement(data);\n outcome.defaultValue = data.defaultValue || null;\n return outcome;\n },\n buildResponseProcessing : function(data){\n var rp = this.buildElement(data);\n if(data && data.processingType){\n if(data.processingType === 'custom'){\n rp.xml = data.data;\n rp.processingType = 'custom';\n }else{\n rp.processingType = 'templateDriven';\n }\n }\n return rp;\n },\n loadContainer : function(bodyObject, bodyData){\n if(!Element.isA(bodyObject, '_container')){\n throw 'bodyObject must be a QTI Container';\n }\n\n if(bodyData && typeof bodyData.body === 'string' && (typeof bodyData.elements === 'array' || typeof bodyData.elements === 'object')){\n for(var serial in bodyData.elements){\n var eltData = bodyData.elements[serial];\n //check if class is loaded:\n var element = this.buildElement(eltData);\n if(element){\n bodyObject.setElement(element, bodyData.body);\n }\n }\n bodyObject.body(bodyData.body);\n }else{\n throw 'wrong bodydata format';\n }\n },\n buildElement : function(elementData){\n var elt = null;\n if(elementData && elementData.qtiClass && elementData.serial){\n var className = elementData.qtiClass;\n if(this.qti[className]){\n elt = new this.qti[className](elementData.serial);\n this.loadElementData(elt, elementData);\n }else{\n throw 'the qti element class does not exist: ' + className;\n }\n }else{\n throw 'wrong elementData format';\n }\n return elt;\n },\n loadElementData : function(element, data){\n\n //merge attributes when loading element data\n var attributes = _.defaults(data.attributes || {}, element.attributes || {});\n element.setAttributes(attributes);\n\n if(element.body && data.body){\n if(element.bdy){\n this.loadContainer(element.getBody(), data.body);\n }\n }\n\n if(element.object && data.object){\n if(element.object){\n this.loadObjectData(element.object, data.object);\n }\n }\n\n if(Element.isA(element, 'interaction')){\n this.loadInteractionData(element, data);\n }else if(Element.isA(element, 'choice')){\n this.loadChoiceData(element, data);\n }else if(Element.isA(element, 'math')){\n this.loadMathData(element, data);\n }else if(Element.isA(element, 'infoControl')){\n this.loadPicData(element, data);\n }\n\n return element;\n },\n loadInteractionData : function(interaction, data){\n if(Element.isA(interaction, 'blockInteraction')){\n if(data.prompt){\n this.loadContainer(interaction.prompt.getBody(), data.prompt);\n }\n }\n\n this.buildInteractionChoices(interaction, data);\n\n if(Element.isA(interaction, 'customInteraction')){\n this.loadPciData(interaction, data);\n }\n },\n buildInteractionChoices : function(interaction, data){\n\n //note: Qti.ContainerInteraction (Qti.GapMatchInteraction and Qti.HottextInteraction) has already been parsed by builtElement(interacionData);\n if(data.choices){\n if(Element.isA(interaction, 'matchInteraction')){\n for(var set = 0; set < 2; set++){\n if(!data.choices[set]){\n throw 'missing match set #' + set;\n }\n var matchSet = data.choices[set];\n for(var serial in matchSet){\n var choice = this.buildElement(matchSet[serial]);\n if(choice){\n interaction.addChoice(choice, set);\n }\n }\n }\n }else{\n for(var serial in data.choices){\n var choice = this.buildElement(data.choices[serial]);\n if(choice){\n interaction.addChoice(choice);\n }\n }\n }\n\n if(Element.isA(interaction, 'graphicGapMatchInteraction')){\n if(data.gapImgs){\n for(var serial in data.gapImgs){\n var gapImg = this.buildElement(data.gapImgs[serial]);\n if(gapImg){\n interaction.addGapImg(gapImg);\n }\n }\n }\n }\n\n }\n\n },\n loadChoiceData : function(choice, data){\n if(Element.isA(choice, 'textVariableChoice')){\n choice.val(data.text);\n }else if(Element.isA(choice, 'gapImg')){\n //has already been taken care of in buildElement()\n }else if(Element.isA(choice, 'containerChoice')){\n //has already been taken care of in buildElement()\n }\n },\n loadObjectData : function(object, data){\n object.setAttributes(data.attributes);\n //@todo: manage object like a container\n if(data._alt){\n if(data._alt.qtiClass === 'object'){\n object._alt = Loader.buildElement(data._alt);\n }else{\n object._alt = data._alt;\n }\n }\n },\n loadMathData : function(math, data){\n math.ns = data.ns || {};\n math.setMathML(data.mathML || '');\n _.forIn(data.annotations || {}, function(value, encoding){\n math.setAnnotation(encoding, value);\n });\n },\n loadPciData : function(pci, data){\n loadPortableCustomElementData(pci, data);\n },\n loadPicData : function(pic, data){\n loadPortableCustomElementData(pic, data);\n }\n });\n\n function loadPortableCustomElementData(portableElement, data){\n portableElement.typeIdentifier = data.typeIdentifier;\n portableElement.markup = data.markup;\n portableElement.entryPoint = data.entryPoint;\n portableElement.properties = data.properties;\n portableElement.libraries = data.libraries;\n }\n\n return Loader;\n});\n\n","/**\n * Common helper functions\n */\ndefine('taoQtiItem/qtiItem/helper/interactionHelper',['lodash', 'taoQtiItem/qtiItem/core/Element'], function(_, Element){\n return {\n convertChoices : function(choices, outputType){\n\n var ret = [], _this = this;\n\n _.each(choices, function(c){\n if(Element.isA(c, 'choice')){\n switch(outputType){\n case 'serial':\n ret.push(c.getSerial());\n break;\n case 'identifier':\n ret.push(c.id());\n break;\n default:\n ret.push(c);\n }\n\n }else if(_.isArray(c)){\n ret.push(_this.convertChoices(c, outputType));\n }\n });\n\n return ret;\n },\n findChoices : function(interaction, choices, inputType){\n\n var ret = [], _this = this;\n\n _.each(choices, function(c){\n var choice;\n if(_.isString(c)){\n if(inputType === 'serial'){\n choice = interaction.getChoice(c);\n if(choice){\n ret.push(choice);\n }\n }else if(inputType === 'identifier'){\n choice = interaction.getChoiceByIdentifier(c);\n if(choice){\n ret.push(choice);\n }\n }else{\n ret.push(c);\n }\n }else if(_.isArray(c)){\n ret.push(_this.findChoices(interaction, c, inputType));\n }else{\n ret.push(c);\n }\n });\n\n return ret;\n },\n shuffleChoices : function(choices){\n var r = [], //returned array\n f = {}, //fixed choices array\n j = 0;\n\n for(var i in choices){\n if(Element.isA(choices[i], 'choice')){\n var choice = choices[i];\n if(choice.attr('fixed')){\n f[j] = choice;\n }\n r.push(choice);\n j++;\n }else{\n throw 'invalid element in array: is not a qti choice';\n }\n }\n\n for(var n = 0; n < r.length - 1; n++){\n if(f[n]){\n continue;\n }\n var k = -1;\n do{\n k = n + Math.floor(Math.random() * (r.length - n));\n }while(f[k]);\n var tmp = r[k];\n r[k] = r[n];\n r[n] = tmp;\n }\n\n return r;\n },\n serialToIdentifier : function(interaction, choiceSerial){\n var choice = interaction.getChoice(choiceSerial);\n if(choice){\n return choice.id();\n }else{\n return '';\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 (original work) Open Assessment Technlogies SA (under the project TAO-PRODUCT);\n *\n */\n\n/**\n * A factory to create a QTI renderer.\n *\n * @author Sam Sipasseuth \n * @author Bertrand Chevrier \n */\ndefine('taoQtiItem/qtiRunner/core/Renderer',[\n 'lodash',\n 'jquery',\n 'handlebars',\n 'core/promise',\n 'taoQtiItem/qtiItem/core/Element',\n 'taoQtiItem/qtiItem/helper/interactionHelper',\n 'ui/themeLoader'\n], function(_, $, Handlebars, Promise, Element, interactionHelper, themeLoader){\n 'use strict';\n\n var _isValidRenderer = function(renderer){\n\n var valid = true;\n\n if(typeof (renderer) !== 'object'){\n return false;\n }\n\n var classCorrect = false;\n if(renderer.qtiClass){\n if(_.indexOf(_renderableClasses, renderer.qtiClass) >= 0){\n classCorrect = true;\n }else{\n var pos = renderer.qtiClass.indexOf('.');\n if(pos > 0){\n var qtiClass = renderer.qtiClass.slice(0, pos);\n var subClass = renderer.qtiClass.slice(pos + 1);\n if(_renderableSubclasses[qtiClass] && _.indexOf(_renderableSubclasses[qtiClass], subClass) >= 0){\n classCorrect = true;\n }\n }\n }\n }\n if(!classCorrect){\n valid = false;\n throw new Error('invalid qti class name in renderer declaration : ' + renderer.qtiClass);\n }\n\n if(!renderer.template){\n valid = false;\n throw new Error('missing template in renderer declaration : ' + renderer.qtiClass);\n }\n\n return valid;\n };\n\n var _renderableClasses = [\n '_container',\n 'assessmentItem',\n 'stylesheet',\n 'responseDeclaration',\n 'outcomeDeclaration',\n 'responseProcessing',\n '_simpleFeedbackRule',\n 'img',\n 'math',\n 'object',\n 'modalFeedback',\n 'rubricBlock',\n 'associateInteraction',\n 'choiceInteraction',\n 'extendedTextInteraction',\n 'gapMatchInteraction',\n 'graphicAssociateInteraction',\n 'graphicGapMatchInteraction',\n 'graphicOrderInteraction',\n 'hotspotInteraction',\n 'hottextInteraction',\n 'inlineChoiceInteraction',\n 'matchInteraction',\n 'mediaInteraction',\n 'orderInteraction',\n 'selectPointInteraction',\n 'sliderInteraction',\n 'textEntryInteraction',\n 'uploadInteraction',\n 'endAttemptInteraction',\n 'customInteraction',\n 'prompt',\n 'associableHotspot',\n 'gap',\n 'gapImg',\n 'gapText',\n 'hotspotChoice',\n 'hottext',\n 'inlineChoice',\n 'simpleAssociableChoice',\n 'simpleChoice',\n 'infoControl',\n 'include'\n ];\n\n /**\n * The list of qti element dependencies. It is used internally to load dependent qti classes\n */\n var _dependencies = {\n assessmentItem : ['stylesheet', '_container', 'prompt', 'modalFeedback'],\n rubricBlock : ['_container'],\n associateInteraction : ['simpleAssociableChoice'],\n choiceInteraction : ['simpleChoice'],\n gapMatchInteraction : ['gap', 'gapText'],\n graphicAssociateInteraction : ['associableHotspot'],\n graphicGapMatchInteraction : ['associableHotspot', 'gapImg'],\n graphicOrderInteraction : ['hotspotChoice'],\n hotspotInteraction : ['hotspotChoice'],\n hottextInteraction : ['hottext'],\n inlineChoiceInteraction : ['inlineChoice'],\n matchInteraction : ['simpleAssociableChoice'],\n orderInteraction : ['simpleChoice']\n };\n\n /**\n * The list of supported qti subclasses.\n */\n var _renderableSubclasses = {\n 'simpleAssociableChoice' : ['associateInteraction', 'matchInteraction'],\n 'simpleChoice' : ['choiceInteraction', 'orderInteraction']\n };\n\n /**\n * List of the default properties for the item\n */\n var _defaults = {\n shuffleChoices : true\n };\n\n /**\n * Get the location of the document, useful to define a baseUrl for the required context\n * @returns {String}\n */\n function getDocumentBaseUrl(){\n return window.location.protocol + '//' + window.location.host + window.location.pathname.replace(/([^\\/]*)$/, '');\n }\n\n /**\n * The built Renderer class\n * @constructor\n * @param {Object} [options] - the renderer options\n * @param {AssetManager} [options.assetManager] - The renderer needs an AssetManager to resolve URLs (see {@link taoItems/assets/manager})\n * @param {Boolean} [options.shuffleChoices = true] - Does the renderer take care of the shuffling\n * @param {Object} [options.decorators] - to set up rendering decorator\n * @param {preRenderDecorator} [options.decorators.before] - to set up a pre decorator\n * @param {postRenderDecorator} [options.decorators.after] - to set up a post decorator\n */\n var Renderer = function(options){\n\n /**\n * Store the registered renderer location\n */\n var _locations = {};\n\n /**\n * Store loaded renderers\n */\n var _renderers = {};\n\n options = _.defaults(options || {}, _defaults);\n\n this.isRenderer = true;\n\n this.name = '';\n\n //store shuffled choice here\n this.shuffledChoices = [];\n\n /**\n * Get the actual renderer of the give qti class or subclass:\n * e.g. simplceChoice, simpleChoice.choiceInteraction, simpleChoice.orderInteraction\n */\n var _getClassRenderer = function(qtiClass){\n var ret = null;\n if(_renderers[qtiClass]){\n ret = _renderers[qtiClass];\n }else{\n var pos = qtiClass.indexOf('.');\n if(pos > 0){\n qtiClass = qtiClass.slice(0, pos);\n if(_renderers[qtiClass]){\n ret = _renderers[qtiClass];\n }\n }\n }\n return ret;\n };\n\n /**\n * Set the renderer options\n * @param {String} key - the name of the option\n * @param {*} value - the option vallue\n * @returns {Renderer} for chaining\n */\n this.setOption = function(key, value){\n if(typeof (key) === 'string'){\n options[key] = value;\n }\n return this;\n };\n\n /**\n * Set the renderer options\n * @param {Object} opts - the options\n * @returns {Renderer} for chaining\n */\n this.setOptions = function(opts){\n options = _.extend(options, opts);\n return this;\n };\n\n /**\n * Get the renderer option\n * @param {String} key - the name of the option\n * @returns {*|null} the option vallue\n */\n this.getOption = function(key){\n if(typeof (key) === 'string' && options[key]){\n return options[key];\n }\n return null;\n };\n\n this.getCustomMessage = function getCustomMessage(elementName, messageKey){\n var messages = this.getOption('messages');\n if(messages &&\n elementName &&\n messages[elementName] &&\n _.isString(messages[elementName][messageKey])){\n //currently not translatable but potentially could be if the need raises\n return Handlebars.compile(messages[elementName][messageKey]);\n }else{\n return null;\n }\n };\n\n /**\n * Get the bound assetManager\n * @returns {AssetManager} the assetManager\n */\n this.getAssetManager = function getAssetManager(){\n return options.assetManager;\n };\n\n /**\n * Get the bound theme loader\n * @returns {Object} the themeLoader\n */\n this.getThemeLoader = function getThemeLoader(){\n return this.themeLoader;\n };\n\n\n /**\n * Renders the template\n * @param {Object} element - the QTI model element\n * @param {Object} data - the data to give to the template\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the template results\n * @throws {Error} if the renderer is not set or has no template bound\n */\n this.renderTpl = function(element, data, qtiSubclass){\n\n var res;\n var ret = '';\n var tplFound = false;\n var qtiClass = qtiSubclass || element.qtiClass;\n var renderer = _getClassRenderer(qtiClass);\n var decorators = this.getOption('decorators');\n\n if(!renderer || !_.isFunction(renderer.template)){\n throw new Error('no renderer template loaded under the class name : ' + qtiClass);\n }\n\n //pre rendering decoration\n if(_.isObject(decorators) && _.isFunction(decorators.before)){\n\n /**\n * @callback preRenderDecoractor\n * @param {Object} element - the QTI model element\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the decorator result\n */\n res = decorators.before(element, qtiSubclass);\n if(_.isString(res)){\n ret += res;\n }\n }\n\n //render the template\n ret += renderer.template(data);\n\n\n //post rendering decoration\n if(_.isObject(decorators) && _.isFunction(decorators.after)){\n\n /**\n * @callback postRenderDecoractor\n * @param {Object} element - the QTI model element\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the decorator result\n */\n res = decorators.after(element, qtiSubclass);\n if(_.isString(res)){\n ret += res;\n }\n }\n return ret;\n };\n\n this.getData = function(element, data, qtiSubclass){\n\n var ret = data,\n qtiClass = qtiSubclass || element.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(typeof (renderer.getData) === 'function'){\n ret = renderer.getData.call(this, element, data);\n }\n }\n\n return ret;\n };\n\n this.renderDirect = function(tpl, data){\n return Handlebars.compile(tpl)(data);\n };\n\n this.getContainer = function(qtiElement, $scope, qtiSubclass){\n\n var ret = null,\n qtiClass = qtiSubclass || qtiElement.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n ret = renderer.getContainer(qtiElement, $scope);\n }else{\n throw 'no renderer found for the class : ' + qtiElement.qtiClass;\n }\n return ret;\n };\n\n this.postRender = function(qtiElement, data, qtiSubclass){\n\n var qtiClass = qtiSubclass || qtiElement.qtiClass;\n var renderer = _getClassRenderer(qtiClass);\n\n if(renderer && typeof (renderer.render) === 'function') {\n return renderer.render.call(this, qtiElement, data);\n }\n };\n\n this.setResponse = function(qtiInteraction, response, qtiSubclass){\n\n var ret = false,\n qtiClass = qtiSubclass || qtiInteraction.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(typeof (renderer.setResponse) === 'function'){\n ret = renderer.setResponse.call(this, qtiInteraction, response);\n var $container = renderer.getContainer.call(this, qtiInteraction);\n if($container instanceof $ && $container.length){\n $container.trigger('responseSet', [qtiInteraction, response]);\n }\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n return ret;\n };\n\n this.getResponse = function(qtiInteraction, qtiSubclass){\n\n var ret = false,\n qtiClass = qtiSubclass || qtiInteraction.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(typeof (renderer.getResponse) === 'function'){\n ret = renderer.getResponse.call(this, qtiInteraction);\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n return ret;\n };\n\n this.resetResponse = function(qtiInteraction, qtiSubclass){\n\n var ret = false,\n qtiClass = qtiSubclass || qtiInteraction.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(typeof (renderer.resetResponse) === 'function'){\n ret = renderer.resetResponse.call(this, qtiInteraction);\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n return ret;\n };\n\n /**\n * Retrieve the state of the interaction.\n * If the renderer has no state management, it falls back to the response management.\n *\n * @param {Object} qtiInteraction - the interaction\n * @param {String} [qtiSubClass] - (not sure of the type and how it is used - Sam ? )\n * @returns {Object} the interaction's state\n *\n * @throws {Error} if no renderer is registered\n */\n this.getState = function(qtiInteraction, qtiSubclass){\n\n var ret = false;\n var qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n var renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(_.isFunction(renderer.getState)){\n ret = renderer.getState.call(this, qtiInteraction);\n } else {\n ret = renderer.getResponse.call(this, qtiInteraction);\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n return ret;\n };\n\n /**\n * Retrieve the state of the interaction.\n * If the renderer has no state management, it falls back to the response management.\n *\n * @param {Object} qtiInteraction - the interaction\n * @param {Object} state - the interaction's state\n * @param {String} [qtiSubClass] - (not sure of the type and how it is used - Sam ? )\n *\n * @throws {Error} if no renderer is found\n */\n this.setState = function(qtiInteraction, state, qtiSubclass){\n\n var qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n var renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(_.isFunction(renderer.setState)){\n renderer.setState.call(this, qtiInteraction, state);\n } else {\n renderer.resetResponse.call(this, qtiInteraction);\n renderer.setResponse.call(this, qtiInteraction, state);\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n };\n\n /**\n * Calls the renderer destroy.\n * Ask the renderer to run destroy if exists.\n *\n * @throws {Error} if no renderer is found\n */\n this.destroy = function(qtiInteraction, qtiSubclass){\n\n var ret = false,\n qtiClass = qtiSubclass || qtiInteraction.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(_.isFunction(renderer.destroy)){\n ret = renderer.destroy.call(this, qtiInteraction);\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n return ret;\n };\n\n this.getLoadedRenderers = function(){\n return _renderers;\n };\n\n this.register = function(renderersLocations){\n _.extend(_locations, renderersLocations);\n };\n\n this.load = function(callback, requiredClasses){\n var self = this;\n var required = [];\n\n if(options.themes){\n\n //resolve themes paths\n options.themes.base = this.resolveUrl(options.themes.base);\n _.forEach(options.themes.available, function(theme, index){\n options.themes.available[index].path = self.resolveUrl(theme.path);\n });\n this.themeLoader = themeLoader(options.themes).load();\n }\n\n if(requiredClasses){\n if(_.isArray(requiredClasses)){\n\n //exclude abstract classes\n requiredClasses = _.intersection(requiredClasses, _renderableClasses);\n\n //add dependencies\n _.each(requiredClasses, function(reqClass){\n var deps = _dependencies[reqClass];\n if(deps){\n requiredClasses = _.union(requiredClasses, deps);\n }\n });\n\n _.forEach(requiredClasses, function(qtiClass){\n\n if(_renderableSubclasses[qtiClass]){\n var requiredSubClasses = _.intersection(requiredClasses, _renderableSubclasses[qtiClass]);\n _.each(requiredSubClasses, function(subclass){\n if(_locations[qtiClass + '.' + subclass]){\n required.push(_locations[qtiClass + '.' + subclass]);\n }else if(_locations[qtiClass]){\n required.push(_locations[qtiClass]);\n }else{\n throw new Error(self.name + ' : missing qti class location declaration: ' + qtiClass + ', subclass: ' + subclass);\n }\n });\n } else {\n if(_locations[qtiClass] === false){\n _renderers[qtiClass] = false;//mark this class as not renderable\n }else if(_locations[qtiClass]){\n required.push(_locations[qtiClass]);\n }else{\n throw new Error(self.name + ' : missing qti class location declaration: ' + qtiClass);\n }\n }\n });\n } else {\n throw new Error('invalid argument type: expected array for arg \"requireClasses\"');\n }\n\n }else{\n required = _.values(_locations);\n }\n\n var _this = this;\n require(required, function(){\n\n _.each(arguments, function(clazz){\n if(_isValidRenderer(clazz)){\n _renderers[clazz.qtiClass] = clazz;\n }\n });\n\n if(typeof (callback) === 'function'){\n callback.call(_this, _renderers);\n }\n });\n\n return this;\n };\n\n /**\n * Unload the renderer\n */\n this.unload = function unload(){\n if(this.themeLoader){\n themeLoader(options.themes).unload();\n }\n return this;\n };\n\n /**\n * Define the shuffling manually\n *\n * @param {Object} interaction - the interaction\n * @param {Array} choices - the shuffled choices\n * @param {String} identificationType -\n */\n this.setShuffledChoices = function(interaction, choices, identificationType){\n if(Element.isA(interaction, 'interaction')){\n this.shuffledChoices[interaction.getSerial()] = _.pluck(interactionHelper.findChoices(interaction, choices, identificationType), 'serial');\n }\n };\n\n /**\n * Get the choices shuffled for this interaction.\n *\n * @param {Object} interaction - the interaction\n * @param {Boolean} reshuffle - by default choices are shuffled only once and store, but if true you can force shuffling again\n * @param {String} returnedType - the choice type\n * @returns {Array} the choices\n */\n this.getShuffledChoices = function(interaction, reshuffle, returnedType){\n var choices = [];\n var shuffled = [];\n var serial, i;\n\n if(Element.isA(interaction, 'interaction')){\n serial = interaction.getSerial();\n\n //1st time, we shuffle (or asked to force shuffling)\n if(!this.shuffledChoices[serial] || reshuffle){\n if(Element.isA(interaction, 'matchInteraction')){\n this.shuffledChoices[serial] = [];\n for(i = 0; i < 2; i++){\n choices[i] = interactionHelper.shuffleChoices(interaction.getChoices(i));\n this.shuffledChoices[serial][i] = _.pluck(choices[i], 'serial');\n }\n } else {\n choices = interactionHelper.shuffleChoices(interaction.getChoices());\n this.shuffledChoices[serial] = _.pluck(choices, 'serial');\n }\n\n //otherwise get the choices from the serials\n } else {\n if(Element.isA(interaction, 'matchInteraction')){\n _.forEach(choices, function(choice, index){\n if(index < 2){\n _.forEach(this.shuffledChoices[serial][i], function(choiceSerial){\n choice.push(interaction.getChoice(choiceSerial));\n });\n }\n });\n } else {\n _.forEach(this.shuffledChoices[serial], function(choiceSerial){\n choices.push(interaction.getChoice(choiceSerial));\n });\n }\n }\n\n //do some type convertion\n if(returnedType === 'serial' || returnedType === 'identifier'){\n return interactionHelper.convertChoices(choices, returnedType);\n }\n\n //pass value only, not ref\n return _.clone(choices);\n }\n\n return [];\n };\n\n this.getRenderers = function(){\n return _renderers;\n };\n\n this.getLocations = function(){\n return _locations;\n };\n\n /**\n * Resolve URLs using the defined assetManager's strategies\n * @param {String} url - the URL to resolve\n * @returns {String} the resolved URL\n */\n this.resolveUrl = function resolveUrl(url){\n if(!options.assetManager){\n return url;\n }\n if(typeof url === 'string' && url.length > 0){\n return options.assetManager.resolve(url);\n }\n };\n\n /**\n * @deprecated in favor of resolveUrl\n */\n this.getAbsoluteUrl = function(relUrl){\n\n //let until method is removed\n console.warn('DEPRECATED used getAbsoluteUrl with ', arguments);\n\n //allow relative url output only if explicitely said so\n if(this.getOption('userRelativeUrl')){\n return relUrl.replace(/^\\.?\\//, '');\n }\n\n if(/^http(s)?:\\/\\//i.test(relUrl) || /^data:[^\\/]+\\/[^;]+(;charset=[\\w]+)?;base64,/.test(relUrl)){\n //already absolute or base64 encoded\n return relUrl;\n }else{\n\n var absUrl = '';\n var runtimeLocations = this.getOption('runtimeLocations');\n\n if(runtimeLocations && _.size(runtimeLocations)){\n _.forIn(runtimeLocations, function(runtimeLocation, typeIdentifier){\n if(relUrl.indexOf(typeIdentifier) === 0){\n absUrl = relUrl.replace(typeIdentifier, runtimeLocation);\n return false;//break\n }\n });\n }\n\n if(absUrl){\n return absUrl;\n }else{\n var baseUrl = this.getOption('baseUrl') || getDocumentBaseUrl();\n return baseUrl + relUrl;\n }\n\n }\n };\n };\n\n /**\n * Expose the renderer's factory\n * @exports taoQtiItem/qtiRunner/core/Renderer\n */\n return {\n\n /**\n * Creates a new Renderer by extending the Renderer's prototype\n * @param {Object} renderersLocations -\n * @param {String} [name] - the new renderer name\n * @param {Object} [defaultOptions] - the renderer options\n */\n build : function(renderersLocations, name, defaultOptions){\n var NewRenderer = function(){\n var options = _.isPlainObject(arguments[0]) ? arguments[0] : {};\n\n Renderer.apply(this);\n\n this.register(renderersLocations);\n this.name = name || '';\n this.setOptions(_.defaults(options, defaultOptions || {}));\n };\n NewRenderer.prototype = Renderer.prototype;\n return NewRenderer;\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) 2015 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n * The asset manager proposes you to resolve your asset URLs for you!\n * You need to add the resolution strategies, it will then evaluate each strategy until the right one is found\n *\n * @author Bertrand Chevrier \n */\ndefine('taoItems/assets/manager',[\n 'lodash',\n 'util/url'\n], function(_, urlUtil){\n 'use strict';\n\n /**\n * @typedef AssetStrategy Defines a way to resolve an asset path\n * @property {String} name - the strategy name\n * @property {assetStrategyHandle} handle - how to resolve the strategy.\n */\n\n /**\n * @callback assetStrategyHandle\n * @param {String|Object} url - the URL to resolved. If parseUrl, it's an object that contains host, port, search, queryString, etc.\n * @param {Object} data - the context data\n * @returns {String?} falsy if not resolved otherwise the resolved URL\n */\n\n\n /**\n * The assetManagerFactory create a new assetManager with the given resolution stratgies and a data context.\n *\n * @example\n * //define AssetStrategies with a name and a handle method\n * var strategies = [{\n * name : 'external',\n * handle : function(url, data){\n * if(/^http/.test(url)){\n * return path;\n * }\n * }\n * }, {\n * name : 'relative',\n * handle : function(url, data){\n * if(/^((\\.\\/)|(\\w\\/))/){\n * return data.baseUrl + '/' + url ;\n * }\n * }\n * }]);\n *\n * var assetManager = assetManagerFactory(strategies, { baseUrl : 'http://t.oa/public/assets/' });\n * assetManager.resolve('http://foo/bar.png'); //will resolved using external\n * assetManager.resolve('bar.png'); //will resolved using relative strategy\n *\n * @param {AssetStrategy[]} strategies - the strategies\n * @param {Object} data - the context data\n * @param {Object} [options] - the manager options\n * @param {Boolean} [options.parseUrl = true] - If the URL to give to the stragies should be parsed or given as it is.\n * @param {Boolean} [options.cache] - resolve the same URL only once and store the result in memory.\n *\n * @exports taoItems/assets/manager\n * @namespace assetManagerFactory\n */\n var assetManagerFactory = function assetManagerFactory(strategies, data, options) {\n\n var cache = {};\n\n strategies = _.isArray(strategies) ? strategies : [strategies];\n data = data || {};\n options = _.defaults(options || {}, {\n parseUrl : true\n });\n\n /**\n * A brand new asset manager is created by the factory\n */\n var assetManager = {\n\n /**\n * The stack of strategies that would be used to resolve the asset path\n * @type {AssetStrategy[]}\n */\n _strategies : [],\n\n /**\n * Add an asset resolution strategy.\n * The strategies will be evaluated in the order they've been added.\n * @param {AssetStrategy} strategy - the strategy to add\n * @throws {TypeError} if the strategy isn't defined correctly\n */\n addStrategy : function addStrategy (strategy){\n\n if(!_.isPlainObject(strategy) || !_.isFunction(strategy.handle) || !_.isString(strategy.name)){\n throw new TypeError('An asset resolution strategy is an object with a handle method and a name');\n }\n\n this._strategies.push(strategy);\n },\n\n /**\n * Change the strategies\n * @param {AssetStrategy[]} strategies - the strategies\n * @throws {TypeError} if the strategy isn't defined correctly\n */\n setStrategies : function setStrategies(newStrategies){\n var self = this;\n\n this._strategies = [];\n\n //assign the strategies to the assetManager\n _.forEach(newStrategies, function(strategy){\n\n //if it's an object we add it directly\n if(_.isPlainObject(strategy)){\n assetManager.addStrategy(strategy);\n\n //if it's a function, we create the strategy with a generated name\n } else if(_.isFunction(strategy)){\n self.addStrategy({\n name : 'strategy_' + (self._strategies.length + 1),\n handle : strategy\n });\n }\n });\n },\n\n /**\n * Set context data\n * @param {String|Object} [key] - the key of the data to set or the data values if it's an object\n * @param {*} [value] - the value to set if a key is given\n */\n setData : function setData(key, value){\n if(_.isString(key) && typeof value !== 'undefined'){\n data[key] = value;\n } else if(_.isPlainObject(key)){\n data = key;\n }\n },\n\n /**\n * Get context data\n * @param {String} [key] - if we want the value of a particuar key\n * @returns {Object|*} all the data or the proprety value if key is given\n */\n getData : function getData(key){\n if(_.isString(key)){\n return data[key];\n }\n return data;\n },\n\n /**\n * Resolve the given URL against the strategies\n * @param {String} url - the URL to resolve\n * @returns {String?} the resolved URL or nothing\n */\n resolve : function resolve(url){\n var resolved;\n var inputUrl;\n\n //if caching try to load the value from the cache\n if(options.cache && cache.hasOwnProperty(url)){\n return cache[url];\n }\n\n //parse the url ?\n inputUrl = options.parseUrl ? urlUtil.parse(url) : url;\n\n //call strategies handlers, in their order until once returns somethin\n _.forEach(this._strategies, function(strategy){\n var result = strategy.handle(inputUrl, data);\n if(result){\n resolved = result;\n return false;\n }\n });\n\n resolved = resolved || '';\n\n if(options.cache){\n cache[url] = resolved;\n }\n\n return resolved;\n },\n\n /**\n * Resolve the given URL against the strategy identified by the given name\n * @param {String} name - the strategy name\n * @param {String} url - the URL to resolve\n * @returns {String?} the resolved URL or nothing\n */\n resolveBy : function resolveBy(name, url){\n var inputUrl;\n var resolved = '';\n var strategy = _.find(this._strategies, {name : name});\n if(strategy){\n //parse the url ?\n inputUrl = options.parseUrl ? urlUtil.parse(url) : url;\n resolved = strategy.handle(inputUrl, data);\n }\n return resolved;\n },\n\n /**\n * When the cache is used, it could be useful to clear the cache\n */\n clearCache : function clearCache(){\n if(options.cache){\n cache = {};\n }\n }\n };\n\n assetManager.setStrategies(strategies);\n\n return assetManager;\n };\n\n return assetManagerFactory;\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) 2015 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n * Provides common strategies to resolved assets\n * that may be used by any type of items.\n *\n * @author Bertrand Chevrier \n */\ndefine('taoItems/assets/strategies',[\n 'util/url'\n], function(urlUtil){\n 'use strict';\n\n /**\n * Prepend a base to an URL\n * @param {Object} url - a parsed URL\n * @param {String} base - the base to prepend\n * @param {Boolean} [slashcat = false] - remove dots, double slashes, etc.\n * @returns {String} the URL\n */\n var prependToUrl = function prependToUrl(url, base, slashcat){\n\n //is slashcat we manage slash concact\n if(slashcat === true){\n return base.replace(/\\/$/, '') + '/' + url.directory.replace(/^\\.\\//, '').replace(/^\\//, '')\n + encodeURIComponent(url.file.replace(/^\\.\\//, '').replace(/^\\//, ''));\n }\n\n return base + url.directory.replace(/^\\.?\\//, '') + encodeURIComponent(url.file.replace(/^\\.?\\//, ''));\n };\n\n /**\n * Unrelated strategies accessible by there name.\n * Remember to not use the whole object, but each one in an array since the order matters.\n *\n * @exports taoItems/assets/strategies\n */\n var strategies = {\n\n //the baseUrl concats the baseUrl in data if the url is relative\n baseUrl : {\n name : 'baseUrl',\n handle : function handleBaseUrl(url, data){\n if(typeof data.baseUrl === 'string' && (urlUtil.isRelative(url)) ){\n return prependToUrl(url, data.baseUrl, data.slashcat);\n }\n }\n },\n\n //bust the cache for item CSS\n itemCssNoCache : {\n name : 'itemCssNoCache',\n handle : function handleItemCss(url, data){\n if(typeof data.baseUrl === 'string' && (urlUtil.isRelative(url)) && /\\.css$/.test(url.file)) {\n return urlUtil.build(prependToUrl(url, data.baseUrl, data.slashcat), { bust : Date.now() });\n }\n }\n },\n\n //absolute URL are just left intact\n external : {\n name : 'external',\n handle : function handleExternal(url){\n if(urlUtil.isAbsolute(url)){\n return url.toString();\n }\n }\n },\n\n //the base64 encoded resources are also left intact\n base64 : {\n name : 'base64',\n handle : function handleB64(url){\n if(urlUtil.isBase64(url)){\n return url.toString();\n }\n }\n },\n\n //special tao media protocol\n taomedia : {\n name : 'taomedia',\n handle : function handleTaoMedia(url, data){\n //either a baseUrl is given or if empty, taomedia resources are managed as relative resources\n var baseUrl = data.baseUrl || './';\n if( (typeof url === 'object' && url.protocol === 'taomedia') ||\n (/^taomedia:\\/\\//.test(url.toString())) ){\n return baseUrl + url.toString();\n }\n }\n }\n };\n return strategies;\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/factory',['lodash', 'core/promise', 'core/eventifier'], function (_, Promise, eventifier){\n 'use strict';\n\n var _requirejs = window.require;\n\n return function portableElementRegistry(methods){\n\n var _loaded = false;\n var __providers = {};\n\n return eventifier(_.defaults(methods || {}, {\n _registry : {},\n get : function get(typeIdentifier, version){\n\n if(this._registry[typeIdentifier]){\n //check version\n if(version){\n return _.find(this._registry[typeIdentifier], version);\n }else{\n //latest\n return _.last(this._registry[typeIdentifier]);\n }\n }\n },\n registerProvider : function registerProvider(moduleName){\n __providers[moduleName] = null;\n return this;\n },\n resetProviders : function resetProviders(){\n __providers = {};\n return this;\n },\n loadProviders : function loadProviders(){\n var self = this;\n return new Promise(function(resolve, reject) {\n var providerLoadingStack = [];\n _.forIn(__providers, function(provider, id){\n if(provider === null){\n providerLoadingStack.push(id);\n }\n });\n _requirejs(providerLoadingStack, function(){\n _.each([].slice.call(arguments), function(provider){\n if(provider && _.isFunction(provider.load)){\n __providers[providerLoadingStack.shift()] = provider;\n }\n });\n resolve();\n self.trigger('providersloaded');\n }, reject);\n });\n },\n getAllVersions : function getAllVersions(){\n var all = {};\n _.forIn(this._registry, function (versions, id){\n all[id] = _.map(versions, 'version');\n });\n return all;\n },\n getRuntime : function getRuntime(typeIdentifier, version){\n var pci = this.get(typeIdentifier, version);\n if(pci){\n return _.assign(pci.runtime, {\n id : pci.typeIdentifier,\n label : pci.label,\n baseUrl : pci.baseUrl\n });\n }else{\n this.trigger('error', {\n message : 'no portable element runtime found',\n typeIdentifier : typeIdentifier,\n version : version\n });\n }\n },\n getCreator : function getCreator(typeIdentifier, version){\n var pci = this.get(typeIdentifier, version);\n if(pci && pci.creator){\n return _.assign(pci.creator, {\n id : pci.typeIdentifier,\n label : pci.label,\n baseUrl : pci.baseUrl,\n response : pci.response\n });\n }else{\n this.trigger('error', {\n message : 'no portable element runtime found',\n typeIdentifier : typeIdentifier,\n version : version\n });\n }\n },\n getBaseUrl : function getBaseUrl(typeIdentifier, version){\n var runtime = this.get(typeIdentifier, version);\n if(runtime){\n return runtime.baseUrl;\n }\n return '';\n },\n loadRuntimes : function loadRuntimes(reload){\n var self = this;\n var loadPromise;\n if(_loaded && !reload){\n loadPromise = Promise.resolve();\n } else {\n loadPromise = self.loadProviders().then(function(){\n\n var loadStack = [];\n\n _.each(__providers, function (provider){\n if(provider){//check that the provider is loaded\n loadStack.push(provider.load());\n }\n });\n\n //performs the loadings in parallel\n return Promise.all(loadStack).then(function (results){\n\n var requireConfigAliases = {};\n\n //update registry\n self._registry = _.reduce(results, function (acc, _pcis){\n return _.merge(acc, _pcis);\n }, {});\n\n //pre-configuring the baseUrl of the portable element's source\n _.forIn(self._registry, function (versions, typeIdentifier){\n //currently use latest runtime path\n requireConfigAliases[typeIdentifier] = self.getBaseUrl(typeIdentifier);\n });\n _requirejs.config({paths : requireConfigAliases});\n\n _loaded = true;\n });\n });\n }\n\n loadPromise\n .then(function() {\n self.trigger('runtimesloaded');\n })\n .catch(function(err) {\n self.trigger('error', err);\n });\n\n return loadPromise;\n },\n loadCreators : function loadCreators(reload){\n\n var self = this;\n\n var loadPromise = self.loadRuntimes(reload).then(function(){\n var requiredCreators = [];\n\n _.forIn(self._registry, function (versions, typeIdentifier){\n var pciModel = self.get(typeIdentifier);//currently use the latest version only\n if(pciModel.creator && pciModel.creator.hook){\n requiredCreators.push(pciModel.creator.hook.replace(/\\.js$/, ''));\n }\n });\n\n if(requiredCreators.length){\n return new Promise(function(resolve, reject){\n //@todo support caching?\n _requirejs(requiredCreators, function (){\n var creators = {};\n _.each(arguments, function (creatorHook){\n var id = creatorHook.getTypeIdentifier();\n var pciModel = self.get(id);\n var i = _.findIndex(self._registry[id], {version : pciModel.version});\n if(i < 0){\n self.trigger('error', 'no creator found for id/version ' + id + '/' + pciModel.version);\n }else{\n self._registry[id][i].creator.module = creatorHook;\n creators[id] = creatorHook;\n }\n });\n resolve(creators);\n }, reject);\n });\n }else{\n return Promise.resolve({});\n }\n\n });\n\n loadPromise\n .then(function(creators) {\n self.trigger('creatorsloaded', creators);\n return creators;\n })\n .catch(function(err) {\n self.trigger('error', err);\n });\n\n return loadPromise;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Sam \n * @requires jquery\n * @requires lodash\n */\ndefine('taoQtiItem/qtiCreator/helper/qtiElements',['jquery', 'lodash', 'i18n'], function($, _, __){\n \"use strict\";\n\n var QtiElements = {};\n\n QtiElements.classes = {\n //abstract classes:\n 'itemBody' : {'parents' : ['bodyElement'], 'contains' : ['block'], 'abstract' : true},\n 'atomicBlock' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['inline'], 'abstract' : true},\n 'atomicInline' : {'parents' : ['bodyElement', 'flowStatic', 'inlineStatic'], 'contains' : ['inline'], 'abstract' : true},\n 'simpleBlock' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['block'], 'abstract' : true},\n 'simpleInline' : {'parents' : ['bodyElement', 'flowStatic', 'inlineStatic'], 'contains' : ['inline'], 'abstract' : true},\n 'flowStatic' : {'parents' : ['flow'], 'abstract' : true},\n 'blockStatic' : {'parents' : ['block'], 'abstract' : true},\n 'inlineStatic' : {'parents' : ['inline'], 'abstract' : true},\n 'flow' : {'parents' : ['objectFlow'], 'abstract' : true},\n 'tableCell' : {'parents' : ['bodyElement'], 'contains' : ['flow'], 'abstract' : true},\n //html-derived qti elements:\n 'caption' : {'parents' : ['bodyElement'], 'contains' : ['inline'], 'xhtml' : true},\n 'col' : {'parents' : ['bodyElement'], 'xhtml' : true},\n 'colgroup' : {'parents' : ['bodyElement'], 'contains' : ['col'], 'xhtml' : true},\n 'div' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['flow'], 'xhtml' : true},\n 'dl' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['dlElement'], 'xhtml' : true},\n 'dt' : {'parents' : ['dlElement'], 'contains' : ['inline'], 'xhtml' : true},\n 'dd' : {'parents' : ['dlElement'], 'contains' : ['flow'], 'xhtml' : true},\n 'hr' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'xhtml' : true},\n 'math' : {'parents' : ['blockStatic', 'flowStatic', 'inlineStatic'], 'xhtml' : true},\n 'li' : {'parents' : ['bodyElement'], 'contains' : ['flow'], 'xhtml' : true},\n 'ol' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['li'], 'xhtml' : true},\n 'ul' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['li'], 'xhtml' : true},\n 'object' : {'parents' : ['bodyElement', 'flowStatic', 'inlineStatic'], 'contains' : ['objectFlow'], 'xhtml' : true},\n 'param' : {'parents' : ['objectFlow'], 'xhtml' : true},\n 'table' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody'], 'xhtml' : true},\n 'tbody' : {'parents' : ['bodyElement'], 'contains' : ['tr'], 'xhtml' : true},\n 'tfoot' : {'parents' : ['bodyElement'], 'contains' : ['tr'], 'xhtml' : true},\n 'thead' : {'parents' : ['bodyElement'], 'contains' : ['tr'], 'xhtml' : true},\n 'td' : {'parents' : ['tableCell'], 'xhtml' : true},\n 'th' : {'parents' : ['tableCell'], 'xhtml' : true},\n 'tr' : {'parents' : ['bodyElement'], 'contains' : ['tableCell'], 'xhtml' : true},\n 'a' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'abbr' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'acronym' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'b' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'big' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'cite' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'code' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'dfn' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'em' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'i' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'kbd' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'q' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'samp' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'small' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'span' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'strong' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'sub' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'sup' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'tt' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'var' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'blockquote' : {'parents' : ['simpleBlock'], 'xhtml' : true},\n 'address' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h1' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h2' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h3' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h4' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h5' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h6' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'p' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'pre' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'img' : {'parents' : ['atomicInline'], 'xhtml' : true, attributes : ['src', 'alt', 'longdesc', 'height', 'width']},\n 'br' : {'parents' : ['atomicInline'], 'xhtml' : true},\n //qti elements:\n 'infoControl' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'qti' : true},\n 'textRun' : {'parents' : ['inlineStatic', 'flowstatic'], 'qti' : true},\n 'feedbackInline' : {'parents' : ['simpleInline', 'feedbackElement'], 'qti' : true},\n 'feedbackBlock' : {'parents' : ['simpleBlock'], 'qti' : true},\n 'rubricBlock' : {'parents' : ['simpleBlock'], 'qti' : true}, //strange qti 2.1 exception, marked as simpleBlock instead of\n 'blockInteraction' : {'parents' : ['block', 'flow', 'interaction'], 'qti' : true},\n 'inlineInteraction' : {'parents' : ['inline', 'flow', 'interaction'], 'qti' : true},\n 'gap' : {'parents' : ['inlineStatic'], 'qti' : true},\n 'hottext' : {'parents' : ['flowstatic', 'inlineStatic'], 'contains' : ['inlineStatic'], 'qti' : true},\n 'printedVariable' : {'parents' : ['bodyElement', 'flowStatic', 'inlineStatic', 'textOrVariable'], 'qti' : true},\n 'prompt' : {'parents' : ['bodyElement'], 'contains' : ['inlineStatic'], 'qti' : true},\n 'templateElement' : {'parents' : ['bodyElement'], 'qti' : true},\n 'templateBlock' : {'parents' : ['blockStatic', 'flowStatic', 'templateElement'], 'contains' : ['blockStatic'], 'qti' : true},\n 'templateInline' : {'parents' : ['inlineStatic', 'flowStatic', 'templateElement'], 'contains' : ['inlineStatic'], 'qti' : true},\n 'choiceInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'associateInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'orderInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'matchInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'hottextInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'gapMatchInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'mediaInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'sliderInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'uploadInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'drawingInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'graphicInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'hotspotInteraction' : {'parents' : ['graphicInteraction'], 'qti' : true},\n 'graphicAssociateInteraction' : {'parents' : ['graphicInteraction'], 'qti' : true},\n 'graphicOrderInteraction' : {'parents' : ['graphicInteraction'], 'qti' : true},\n 'graphicGapMatchInteraction' : {'parents' : ['graphicInteraction'], 'qti' : true},\n 'selectPointInteraction' : {'parents' : ['graphicInteraction'], 'qti' : true},\n 'textEntryInteraction' : {'parents' : ['stringInteraction', 'inlineInteraction'], 'qti' : true},\n 'extendedTextInteraction' : {'parents' : ['stringInteraction', 'blockInteraction'], 'qti' : true},\n 'inlineChoiceInteraction' : {'parents' : ['inlineInteraction'], 'qti' : true},\n 'endAttemptInteraction' : {'parents' : ['inlineInteraction'], 'qti' : true},\n 'customInteraction' : {'parents' : ['block', 'flow', 'interaction'], 'qti' : true},\n '_container' : {'parents' : ['block'], 'qti' : true}//a pseudo class introduced in TAO\n };\n\n QtiElements.cache = {containable : {}, children : {}, parents : {}};\n\n QtiElements.getAllowedContainersElements = function(qtiClass, $container){\n var classes = QtiElements.getAllowedContainers(qtiClass);\n var jqSelector = '';\n for(var i in classes){\n if(!classes[i].qti){\n //html element:\n jqSelector += classes[i] + ', ';\n }\n }\n\n if(jqSelector){\n jqSelector = jqSelector.substring(0, jqSelector.length - 2);\n }\n\n return $(jqSelector, $container ? $container : $(document)).filter(':not([data-qti-type])');\n };\n\n QtiElements.getAllowedContainers = function(qtiClass){\n var ret;\n if(QtiElements.cache.containable[qtiClass]){\n ret = QtiElements.cache.containable[qtiClass];\n }else{\n ret = [];\n var parents = QtiElements.getParentClasses(qtiClass, true);\n for(var aClass in QtiElements.classes){\n var model = QtiElements.classes[aClass];\n if(model.contains){\n var intersect = _.intersection(model.contains, parents);\n if(intersect.length){\n if(!model.abstract){\n ret.push(aClass);\n }\n ret = _.union(ret, QtiElements.getChildClasses(aClass, true));\n }\n }\n }\n QtiElements.cache.containable[qtiClass] = ret;\n }\n\n return ret;\n };\n\n QtiElements.getAllowedContents = function(qtiClass, recursive, checked){\n\n var ret = [];\n checked = checked || {};\n\n var model = QtiElements.classes[qtiClass];\n if(model && model.contains){\n for(var i in model.contains){\n var contain = model.contains[i];\n if(!checked[contain]){\n checked[contain] = true;\n\n //qtiClass can contain everything defined as its contents\n ret.push(contain);\n\n //qtiClass can also contain subclass of its contents\n var children = QtiElements.getChildClasses(contain, true);\n for(var i in children){\n var child = children[i];\n if(!checked[child]){\n checked[child] = true;\n\n ret.push(child);\n\n //adding children allowed contents depends on the option \"recursive\"\n if(recursive){\n ret = _.union(ret, QtiElements.getAllowedContents(child, true, checked));\n }\n }\n }\n\n //adding allowed contents of qtiClass' allowed contents depends on the option \"recursive\"\n if(recursive){\n ret = _.union(ret, QtiElements.getAllowedContents(contain, true, checked));\n }\n\n }\n }\n }\n\n //qtiClass can contain all allowed contents of its parents:\n var parents = QtiElements.getParentClasses(qtiClass, true);\n for(var i in parents){\n ret = _.union(ret, QtiElements.getAllowedContents(parents[i], recursive, checked));\n }\n\n return _.uniq(ret, false);\n };\n\n QtiElements.isAllowedClass = function(qtiContainerClass, qtiContentClass){\n var allowedClasses = QtiElements.getAllowedContents(qtiContainerClass);\n return (_.indexOf(allowedClasses, qtiContentClass) >= 0);\n };\n\n QtiElements.getParentClasses = function(qtiClass, recursive){\n var ret;\n if(recursive && QtiElements.cache.parents[qtiClass]){\n ret = QtiElements.cache.parents[qtiClass];\n }else{\n ret = [];\n if(QtiElements.classes[qtiClass]){\n ret = QtiElements.classes[qtiClass].parents;\n if(recursive){\n for(var i in ret){\n ret = _.union(ret, QtiElements.getParentClasses(ret[i], recursive));\n }\n ret = _.uniq(ret, false);\n }\n }\n QtiElements.cache.parents[qtiClass] = ret;\n }\n\n return ret;\n };\n\n QtiElements.getChildClasses = function(qtiClass, recursive, type){\n var ret;\n var cacheType = type ? type : 'all';\n if(recursive && QtiElements.cache.children[qtiClass] && QtiElements.cache.children[qtiClass][cacheType]){\n ret = QtiElements.cache.children[qtiClass][cacheType];\n }else{\n ret = [];\n for(var aClass in QtiElements.classes){\n var model = QtiElements.classes[aClass];\n if(_.indexOf(model.parents, qtiClass) >= 0){\n if(type){\n if(model[type]){\n ret.push(aClass);\n }\n }else{\n ret.push(aClass);\n }\n if(recursive){\n ret = _.union(ret, QtiElements.getChildClasses(aClass, recursive, type));\n }\n }\n }\n if(!QtiElements.cache.children[qtiClass]){\n QtiElements.cache.children[qtiClass] = {};\n }\n QtiElements.cache.children[qtiClass][cacheType] = ret;\n }\n\n return ret;\n };\n\n QtiElements.isBlock = function(qtiClass){\n return QtiElements.is(qtiClass, 'block');\n };\n\n QtiElements.isInline = function(qtiClass){\n return QtiElements.is(qtiClass, 'inline');\n };\n\n QtiElements.is = function(qtiClass, topClass){\n if(qtiClass === topClass){\n return true;\n }else{\n var parents = QtiElements.getParentClasses(qtiClass, true);\n return (_.indexOf(parents, topClass) >= 0);\n }\n };\n\n QtiElements.getAvailableAuthoringElements = function(){\n\n return {\n choiceInteraction : {\n label : __('Choice Interaction'),\n description : __('Select a single (radio buttons) or multiple (check boxes) responses among a set of choices.'),\n icon : 'icon-choice',\n short : __('Choice'),\n qtiClass : 'choiceInteraction',\n tags:['Common Interactions', 'mcq']\n },\n orderInteraction : {\n label : __('Order Interaction'),\n icon : 'icon-order',\n description : __('Arrange a list of choices in the correct order.'),\n short : __('Order'),\n qtiClass : 'orderInteraction',\n tags:['Common Interactions', 'ordering']\n },\n associateInteraction : {\n label : __('Associate Interaction'),\n icon : 'icon-associate',\n description : __('Create pair(s) from a series of choices.'),\n short : __('Associate'),\n qtiClass : 'associateInteraction',\n tags:['Common Interactions', 'association']\n },\n matchInteraction : {\n label : __('Match Interaction'),\n icon : 'icon-match',\n description : __('Create association(s) between two sets of choices displayed in a table (row and column).'),\n short : __('Match'),\n qtiClass : 'matchInteraction',\n tags:['Common Interactions', 'association']\n },\n hottextInteraction : {\n label : __('Hottext Interaction'),\n icon : 'icon-hottext',\n description : __('Select one or more text parts (hottext) within a text.'),\n short : __('Hottext'),\n qtiClass : 'hottextInteraction',\n tags:['Common Interactions', 'text']\n },\n gapMatchInteraction : {\n label : __('Gap Match Interaction'),\n icon : 'icon-gap-match',\n description : __(' Fill in the gaps in a text from a set of choices.'),\n short : __('Gap Match'),\n qtiClass : 'gapMatchInteraction',\n tags:['Common Interactions', 'text', 'association']\n },\n sliderInteraction : {\n label : __('Slider Interaction'),\n icon : 'icon-slider',\n description :__('Select a value within a numerical range.'),\n short : __('Slider'),\n qtiClass : 'sliderInteraction',\n tags:['Common Interactions', 'special']\n },\n extendedTextInteraction : {\n label : __('Extended Text Interaction'),\n icon : 'icon-extended-text',\n description : __('Collect open-ended information in one or more text area(s) (strings or numeric values).'),\n short : __('Extended Text'),\n qtiClass : 'extendedTextInteraction',\n tags:['Common Interactions', 'text']\n },\n uploadInteraction : {\n label : __('File Upload Interaction'),\n icon : 'icon-upload',\n description : __('Upload a file (e.g. document, picture...) as a response.'),\n short : __('File Upload'),\n qtiClass : 'uploadInteraction',\n tags:['Common Interactions', 'special']\n },\n mediaInteraction : {\n label : __('Media Interaction'),\n icon : 'icon-media',\n description : __('Control the playing parameters (auto-start, loop) of a video or audio file and report the number of time it has been played.'),\n short : __('Media'),\n qtiClass : 'mediaInteraction',\n tags:['Common Interactions', 'media']\n },\n _container : {\n label : __('Text Block'),\n icon : 'icon-font',\n description : __('Block contains the content (stimulus) of the item such as text or image. It is also required for Inline Interactions.'),\n short : __('Block'),\n qtiClass : '_container',\n tags:['Inline Interactions', 'text']\n },\n inlineChoiceInteraction : {\n label : __('Inline Choice Interaction'),\n icon : 'icon-inline-choice',\n description : __('Select a choice from a drop-down list.'),\n short : __('Inline Choice'),\n qtiClass : 'inlineChoiceInteraction',\n tags:['Inline Interactions', 'inline-interactions', 'mcq']\n },\n textEntryInteraction : {\n label : __('Text Entry Interaction'),\n icon : 'icon-text-entry',\n description : __('Collect open-ended information in a short text input (strings or numeric values).'),\n short : __('Text Entry'),\n qtiClass : 'textEntryInteraction',\n tags:['Inline Interactions', 'inline-interactions', 'text']\n },\n endAttemptInteraction : {\n label : __('End Attempt Interaction'),\n icon : 'icon-end-attempt',\n description : __('Trigger the end of the item attempt.'),\n short : __('End Attempt'),\n qtiClass : 'endAttemptInteraction',\n tags:['Inline Interactions', 'inline-interactions', 'button', 'submit']\n },\n hotspotInteraction : {\n label : __('Hotspot Interaction'),\n icon : 'icon-hotspot',\n description : __('Select one or more areas (hotspots) displayed on an picture.'),\n short : __('Hotspot'),\n qtiClass : 'hotspotInteraction',\n tags:['Graphic Interactions', 'mcq']\n },\n graphicOrderInteraction : {\n label : __('Graphic Order Interaction'),\n icon : 'icon-graphic-order',\n description : __('Order the areas (hotspots) displayed on a picture.'),\n short : __('Order'),\n qtiClass : 'graphicOrderInteraction',\n tags:['Graphic Interactions', 'ordering']\n },\n graphicAssociateInteraction : {\n label : __('Graphic Associate Interaction'),\n icon : 'icon-graphic-associate',\n description : __('Create association(s) between areas (hotspots) displayed on a picture.'),\n short : __('Associate'),\n qtiClass : 'graphicAssociateInteraction',\n tags:['Graphic Interactions', 'association']\n },\n graphicGapMatchInteraction : {\n label : __('Graphic Gap Match Interaction'),\n icon : 'icon-graphic-gap',\n description : __('Fill in the gaps on a picture with a set of image choices.'),\n short : __('Gap Match'),\n qtiClass : 'graphicGapMatchInteraction',\n tags:['Graphic Interactions', 'association']\n },\n selectPointInteraction : {\n label : __('Select Point Interaction'),\n icon : 'icon-select-point',\n description : __('Position one or more points on a picture (response areas are not displayed).'),\n short : __('Select Point'),\n qtiClass : 'selectPointInteraction',\n tags:['Graphic Interactions']\n }\n };\n };\n\n return QtiElements;\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/ciRegistry',[\n 'lodash',\n 'taoQtiItem/portableElementRegistry/factory/factory',\n 'taoQtiItem/qtiCreator/helper/qtiElements'\n], function (_, portableElementRegistry, qtiElements){\n 'use strict';\n\n /**\n * Create a ney interaction registry instance\n * interaction registry need to register newly loaded creator hooks in the list of available qti authoring elements\n *\n * @returns {Object} registry instance\n */\n return function customInteractionRegistry(){\n\n return portableElementRegistry({\n getAuthoringData : function getAuthoringData(typeIdentifier, version){\n var pciModel = this.get(typeIdentifier, version);\n if(pciModel && pciModel.creator && pciModel.creator.hook && pciModel.creator.icon){\n return {\n label : pciModel.label, //currently no translation available\n icon : pciModel.creator.icon.replace(new RegExp('^' + typeIdentifier + '\\/'), pciModel.baseUrl),\n short : pciModel.short,\n description : pciModel.description,\n qtiClass : 'customInteraction.' + pciModel.typeIdentifier, //custom interaction is block type\n tags : _.union(['Custom Interactions'], pciModel.tags)\n };\n }\n }\n }).on('creatorsloaded', function(creators){\n _.each(creators, function(creator){\n qtiElements.classes['customInteraction.' + creator.getTypeIdentifier()] = {parents : ['customInteraction'], qti : true};\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/ciRegistry',['lodash', 'taoQtiItem/portableElementRegistry/factory/ciRegistry', 'module'], function (_, ciRegistry, module){\n 'use strict';\n\n //create a preregistered singleton of ciRegistry\n var registry = ciRegistry();\n var providers = [];\n var config = module.config();\n\n if(config && config.providers){\n providers = config.providers;\n }\n\n _.each(providers, function(provider){\n if(provider.name && provider.module){\n registry.registerProvider(provider.module);\n }\n });\n\n return registry;\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/icRegistry',[\n 'lodash',\n 'taoQtiItem/portableElementRegistry/factory/factory'\n], function (_, portableElementRegistry){\n 'use strict';\n\n /**\n * Info control registry has currently no additonal fonctionalities than the basic portable element registry\n *\n * @returns {Object} registry instance\n */\n return function infoControlRegistry(){\n return portableElementRegistry();\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/icRegistry',['lodash', 'taoQtiItem/portableElementRegistry/factory/icRegistry', 'module'], function (_, icRegistry, module){\n 'use strict';\n\n //create a preregistered singleton of icRegistry\n var registry = icRegistry();\n var providers = [];\n var config = module.config();\n\n if(config && config.providers){\n providers = config.providers;\n }\n\n _.each(providers, function(provider){\n if(provider.name && provider.module){\n registry.registerProvider(provider.module);\n }\n });\n\n return registry;\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) 2016 (original work) Open Assessment Technologies SA;\n */\n\ndefine('taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy',[\n 'taoQtiItem/portableElementRegistry/ciRegistry',\n 'taoQtiItem/portableElementRegistry/icRegistry'\n], function (ciRegistry, icRegistry) {\n 'use strict';\n\n function getBaseUrlByIdentifier(typeIdentifier) {\n if (ciRegistry.get(typeIdentifier)) {\n return ciRegistry.getBaseUrl(typeIdentifier);\n }\n if (icRegistry.get(typeIdentifier)) {\n return icRegistry.getBaseUrl(typeIdentifier);\n }\n return typeIdentifier;\n }\n\n //strategy to resolve portable info control and portable interactions paths.\n //It should never be reached in the stack the usual way and should be called only using resolveBy.\n return {\n name: 'portableElementLocation',\n handle: function handlePortableElementLocation(url) {\n\n if (url.file === url.path) {\n return getBaseUrlByIdentifier(url.file);\n } else if (url.source === url.relative) {\n return url.relative.replace(/^(\\.\\/)?([a-z_0-9]+)\\/(.*)/i, function (fullmatch, $1, typeIdentifier, relPath) {\n var runtimeLocation = getBaseUrlByIdentifier(typeIdentifier);\n if (runtimeLocation) {\n return runtimeLocation + '/' + relPath;\n }\n return fullmatch;\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 (original work) Open Assessment Technologies SA;\n */\n\ndefine('taoQtiItem/qtiCommonRenderer/renderers/config',[\n 'lodash',\n 'context',\n 'ui/themes',\n 'taoItems/assets/manager',\n 'taoItems/assets/strategies',\n 'module',\n 'taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy'\n], function(_, context, themes, assetManagerFactory, assetStrategies, module, portableAssetStrategy){\n 'use strict';\n\n var itemThemes = themes.get('items');\n var moduleConfig = module.config();\n\n //Create asset manager stack\n var assetManager = assetManagerFactory([\n {\n name : 'theme',\n handle : function handleTheme(url){\n if(itemThemes && url.path && (url.path === itemThemes.base || _.contains(_.pluck(itemThemes.available, 'path'), url.path))){\n return context.root_url + url.toString();\n }\n }\n },\n assetStrategies.taomedia,\n assetStrategies.external,\n assetStrategies.base64,\n assetStrategies.itemCssNoCache,\n assetStrategies.baseUrl,\n portableAssetStrategy\n ], {baseUrl : ''});//baseUrl is not predefined in the config, but should be set upon renderer instantiating\n\n //renderers locations\n var locations = {\n 'assessmentItem' : 'taoQtiItem/qtiCommonRenderer/renderers/Item',\n '_container' : 'taoQtiItem/qtiCommonRenderer/renderers/Container',\n '_simpleFeedbackRule' : false,\n 'stylesheet' : 'taoQtiItem/qtiCommonRenderer/renderers/Stylesheet',\n 'outcomeDeclaration' : false,\n 'responseDeclaration' : false,\n 'responseProcessing' : false,\n 'img' : 'taoQtiItem/qtiCommonRenderer/renderers/Img',\n 'math' : 'taoQtiItem/qtiCommonRenderer/renderers/Math',\n 'object' : 'taoQtiItem/qtiCommonRenderer/renderers/Object',\n 'rubricBlock' : 'taoQtiItem/qtiCommonRenderer/renderers/RubricBlock',\n 'modalFeedback' : 'taoQtiItem/qtiCommonRenderer/renderers/ModalFeedback',\n 'prompt' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/Prompt',\n 'choiceInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/ChoiceInteraction',\n 'extendedTextInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/ExtendedTextInteraction',\n 'orderInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/OrderInteraction',\n 'associateInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/AssociateInteraction',\n 'matchInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/MatchInteraction',\n 'textEntryInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/TextEntryInteraction',\n 'sliderInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/SliderInteraction',\n 'inlineChoiceInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/InlineChoiceInteraction',\n 'simpleChoice.choiceInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleChoice.ChoiceInteraction',\n 'simpleChoice.orderInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleChoice.OrderInteraction',\n 'hottext' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/Hottext',\n 'gap' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/Gap',\n 'gapText' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/GapText',\n 'simpleAssociableChoice.matchInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.MatchInteraction',\n 'simpleAssociableChoice.associateInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.AssociateInteraction',\n 'inlineChoice' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/InlineChoice',\n 'hottextInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/HottextInteraction',\n 'hotspotInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/HotspotInteraction',\n 'hotspotChoice' : false,\n 'gapMatchInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GapMatchInteraction',\n 'selectPointInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/SelectPointInteraction',\n 'graphicOrderInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicOrderInteraction',\n 'mediaInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/MediaInteraction',\n 'uploadInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/UploadInteraction',\n 'graphicGapMatchInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicGapMatchInteraction',\n 'gapImg' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/GapImg',\n 'graphicAssociateInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicAssociateInteraction',\n 'associableHotspot' : false,\n 'customInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/PortableCustomInteraction',\n 'infoControl' : 'taoQtiItem/qtiCommonRenderer/renderers/PortableInfoControl',\n 'include' : 'taoQtiItem/qtiCommonRenderer/renderers/Include',\n 'endAttemptInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/EndAttemptInteraction'\n };\n\n return {\n name:'commonRenderer',\n locations: locations,\n options: {\n assetManager: assetManager,\n themes : itemThemes,\n enableDragAndDrop: {\n associate: !!moduleConfig.associateDragAndDrop,\n gapMatch: !!moduleConfig.gapMatchDragAndDrop,\n graphicGapMatch: !!moduleConfig.graphicGapMatchDragAndDrop,\n order: !!moduleConfig.orderDragAndDrop\n },\n messages : moduleConfig.messages\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 (original work) Open Assessment Technologies SA;\n */\n\n/**\n * Define the Qti Item Common Renderer\n */\ndefine('taoQtiItem/qtiCommonRenderer/renderers/Renderer',[\n 'taoQtiItem/qtiRunner/core/Renderer',\n 'taoQtiItem/qtiCommonRenderer/renderers/config'\n], function(Renderer, config){\n 'use strict';\n\n return Renderer.build(config.locations, config.name, config.options);\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) 2015 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/performances/tester',[\n 'jquery',\n 'lodash',\n 'async',\n 'context',\n 'helpers',\n 'taoClientDiagnostic/tools/stats',\n 'taoQtiItem/qtiItem/core/Loader',\n 'taoQtiItem/qtiCommonRenderer/renderers/Renderer',\n 'lib/polyfill/performance-now'\n], function($, _, async, context, helpers, stats, Loader, Renderer) {\n 'use strict';\n\n /**\n * Duration of one second (in milliseconds)\n * @type {Number}\n * @private\n */\n var _second = 1000;\n\n /**\n * Default timeout duration\n * @type {Number}\n * @private\n */\n var _defaultTimeout = 30 * _second;\n\n /**\n * Default number of renderings by samples\n * @type {Number}\n * @private\n */\n var _defaultOccurrencesCount = 10;\n\n /**\n * List of default samples\n * @type {Array}\n */\n var _defaultSamples = [\n 'taoClientDiagnostic/tools/performances/data/sample1/',\n 'taoClientDiagnostic/tools/performances/data/sample2/',\n 'taoClientDiagnostic/tools/performances/data/sample3/'\n ];\n\n /**\n * Base text used to build sample identifiers\n * @type {String}\n * @private\n */\n var _sampleBaseId = 'sample';\n\n /**\n * Loads a page inside a div and compute the time to load\n * @param {Object} data The descriptor of the page to load\n * @param {Function} done A callback function called to provide the result\n */\n function loadItem(data, done){\n\n //item location config\n var qtiJsonFile = data.url + 'qti.json';\n var urlTokens = data.url.split('/');\n var extension = urlTokens[0];\n var fullpath = require.s.contexts._.config.paths[extension];\n var baseUrl = data.url.replace(extension, fullpath);\n var loader = new Loader();\n var renderer = new Renderer({\n baseUrl : baseUrl // compatibility mode for legacy installations\n });\n\n // check needed by compatibility mode for legacy installations\n if (renderer.getAssetManager) {\n renderer.getAssetManager().setData('baseUrl', baseUrl);\n }\n\n require(['json!'+qtiJsonFile], function(itemData){\n\n loader.loadItemData(itemData, function(item){\n renderer.load(function(){\n\n var $container,\n duration,\n start,\n end,\n result;\n\n //start right before rendering\n start = window.performance.now();\n\n //set renderer\n item.setRenderer(this);\n\n //render markup\n $container = $('
').appendTo('body');\n $container.append(item.render());\n\n //execute javascript\n item.postRender();\n\n //remove item\n $container.remove();\n\n //done\n end = window.performance.now();\n\n duration = (end - start) / _second;\n\n result = {\n id : data.id,\n url : data.url,\n duration: duration\n };\n\n done(null, result);\n\n }, this.getLoadedClasses());\n });\n\n });\n\n }\n\n /**\n * Performs a browser performances test by running a heavy page\n *\n * @param {Array} [samples]\n * @param {Number} [occurrences]\n * @param {Number} [timeout]\n * @returns {Object}\n */\n var performancesTester = function performancesTester(samples, occurrences, timeout) {\n var idx = 0;\n var _samples = _.map(!_.isEmpty(samples) && samples || _defaultSamples, function(sample) {\n idx ++;\n return {\n id : _sampleBaseId + idx,\n url : sample,\n timeout : timeout || _defaultTimeout,\n nb : occurrences || _defaultOccurrencesCount\n };\n });\n\n // add one occurrence on the first sample to obfuscate the time needed to load the runner\n _samples[0].nb ++;\n\n return {\n /**\n * Performs a performances test, then call a function to provide the result\n * @param {Function} done\n */\n start: function start(done) {\n var tests = [];\n _.forEach(_samples, function(data) {\n var cb = _.partial(loadItem, data);\n var iterations = data.nb || 1;\n while (iterations --) {\n tests.push(cb);\n }\n });\n\n async.series(tests, function(err, measures) {\n var decimals = 2;\n var results;\n\n if(err && !measures.length){\n //something went wrong\n throw err;\n }\n\n // remove the first result to obfuscate the time needed to load the runner\n measures.shift();\n\n results = stats(measures, 'duration', decimals);\n\n done(results.average, results);\n });\n }\n };\n };\n\n return performancesTester;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\ndefine('taoClientDiagnostic/tools/bandwidth/tester',[\n 'lodash',\n 'async',\n 'context',\n 'taoClientDiagnostic/tools/stats',\n 'taoClientDiagnostic/tools/fixedDecimals',\n 'lib/polyfill/performance-now'\n], function(_, async, context, stats, fixedDecimals) {\n 'use strict';\n\n /**\n * A binary kilo bytes (KiB)\n * @type {Number}\n * @private\n */\n var _kilo = 1024;\n\n /**\n * A binary mega bytes (MiB)\n * @type {Number}\n * @private\n */\n var _mega = _kilo * _kilo;\n\n /**\n * Duration of one second (in milliseconds)\n * @type {Number}\n * @private\n */\n var _second = 1000;\n\n /**\n * List of descriptors defining the data sets to download.\n * - file : path of the file containing the test data\n * - size : the given size of the file\n * - timeout : the timeout for the download\n * - threshold : a bandwidth threshold above which the data set can be downloaded to evaluate a more accurate value\n * - nb : number of download iterations\n * @type {Object}\n */\n var _downloadData = {\n \"10KB\" : {\n id : '10KB',\n file : 'data/bin10KB.data',\n size : 10 * _kilo,\n timeout : _second,\n threshold : 0,\n nb : 10\n },\n \"100KB\" : {\n id : '100KB',\n file : 'data/bin100KB.data',\n size : 100 * _kilo,\n timeout : 2 * _second,\n threshold : 0,\n nb : 5\n },\n \"1MB\" : {\n id : '1MB',\n file : 'data/bin1MB.data',\n size : _mega,\n timeout : 20 * _second,\n threshold : 0,\n nb : 3\n },\n \"10MB\" : {\n id : '10MB',\n file : 'data/bin10MB.data',\n size : 10 * _mega,\n timeout : 20 * _second,\n threshold : 8,\n nb : 3\n }\n };\n\n /**\n * Download a data set as described by the provided descriptor and compute the duration.\n * @param {Object} data The data set descriptor to use for download\n * @param {Function} cb A callback function called at the end of the download.\n * This callback is also called if a timeout breaks the download;\n */\n var download = function download(data, cb) {\n var self = this;\n var start, end;\n var timeoutId;\n var url;\n var request;\n\n if (data.threshold && this.bandwidth < data.threshold) {\n return cb('threshold');\n }\n\n url = context.root_url + '/taoClientDiagnostic/views/js/tools/bandwidth/' + data.file + '?' + Date.now();\n request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.setRequestHeader('Accept', 'application/octet-stream');\n\n request.onload = function onRequestLoad () {\n var duration;\n var bytes;\n var seconds;\n var speed;\n\n end = window.performance.now();\n clearTimeout(timeoutId);\n\n duration = end - start;\n bytes = data.size;\n seconds = duration / _second;\n\n // speed in Mbps\n speed = ((bytes * 8) / seconds) / _mega;\n\n self.bandwidth = Math.max(self.bandwidth, speed);\n\n return cb(null, {\n id : data.id,\n file : data.file,\n size : data.size,\n duration : duration,\n speed : speed\n });\n };\n request.onerror = function onRequestError (err) {\n clearTimeout(timeoutId);\n cb(err);\n };\n\n timeoutId = _.delay(cb, data.timeout, 'timeout');\n start = window.performance.now();\n request.send();\n };\n\n /**\n * Performs a bandwidth test by downloading a bunch of data sets with different sizes\n *\n * @returns {Object}\n */\n var bandwidthTester = function bandwidthTester (){\n return {\n /**\n * Performs a bandwidth test, then call a function to provide the result\n * @param {Function} done\n */\n start : function start(done){\n var self = this;\n var tests = [];\n _.forEach(_downloadData, function(data) {\n var cb = _.bind(download, self, data);\n var iterations = data.nb || 1;\n while (iterations --) {\n tests.push(cb);\n }\n });\n\n this.bandwidth = 0;\n\n async.series(tests, function(err, measures) {\n var duration = 0;\n var size = 0;\n var decimals = 2;\n var getValue;\n var results;\n\n if (err && !measures.length) {\n //something went wrong\n throw err;\n }\n\n getValue = function(value) {\n var speed = 0;\n\n if (value) {\n duration += value.duration;\n size += value.size;\n\n speed = value.speed;\n value.speed = fixedDecimals(speed, decimals);\n }\n\n return speed;\n };\n\n results = stats(measures, getValue, decimals);\n\n results.duration = fixedDecimals(duration / _second, decimals);\n results.size = size;\n\n done(results.average, results);\n });\n }\n };\n };\n\n return bandwidthTester;\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) 2016 (original work) Open Assessment Technologies SA ;\n */\ndefine('taoClientDiagnostic/tools/upload/tester',[\n 'jquery',\n 'lodash',\n 'async',\n 'util/url'\n], function($, _, async, urlHelper) {\n 'use strict';\n\n /**\n * A binary kilo bytes (KiB)\n * @type {Number}\n * @private\n */\n var _kilo = 1024;\n\n /**\n * A binary mega bytes (MiB)\n * @type {Number}\n * @private\n */\n var _mega = _kilo * _kilo;\n\n /**\n * Result of diagnostic\n */\n var data = [];\n\n /**\n * Generate random string of given length\n * @param length\n */\n var generateStr = function generateStr(length) {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for( var i=0; i < length; i++ ) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n\n return text;\n };\n\n /**\n * Upload generated string to check upload speed.\n * @param {number} size of string to upload in bytes\n * @return {object} jqXHR\n */\n var upload = function upload(size) {\n\n var url = urlHelper.route('upload', 'CompatibilityChecker', 'taoClientDiagnostic', {cache : Date.now()});\n var str = generateStr(size);\n data = [];\n\n return $.ajax({\n url : url,\n type : 'POST',\n data : {\n upload : str\n },\n xhr: function() {\n var xhr = new window.XMLHttpRequest();\n var startTime = Date.now();\n // Upload progress\n xhr.upload.addEventListener(\"progress\", function(evt){\n if (evt.lengthComputable) {\n var passedTime = Date.now() - startTime;\n data.push({\n time: passedTime,\n loaded: evt.loaded,\n speed: ((evt.loaded * 8) / _mega) / (passedTime / 1000)\n });\n }\n }, false);\n\n return xhr;\n },\n });\n };\n\n /**\n * Performs a upload speed test\n * @returns {Object}\n */\n var uploadTester = function uploadTester (config){\n return {\n /**\n * Performs upload speed test, then call a function to provide the result\n * @param {Function} done\n */\n start : function start(done) {\n var jqXHR = upload(parseInt(config.size, 10));\n jqXHR.then(function() {\n done(data);\n });\n }\n };\n };\n\n return uploadTester;\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) 2016 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/getconfig',['lodash'], function (_) {\n 'use strict';\n\n /**\n * Gets a config set\n * @param {Object} [config]\n * @param {Object} [defaults]\n * @returns {Object}\n */\n return function getConfig(config, defaults) {\n return _(config || {})\n .omit(function (value) {\n return value === null || value === undefined;\n })\n .defaults(defaults || {})\n .value();\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) 2016 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/browser/tester',[\n 'jquery',\n 'i18n',\n 'helpers',\n 'taoClientDiagnostic/tools/getconfig'\n], function ($, __, helpers, getConfig) {\n 'use strict';\n\n /**\n * Some default values\n * @type {Object}\n * @private\n */\n var _defaults = {\n action: 'whichBrowser',\n controller: 'CompatibilityChecker',\n extension: 'taoClientDiagnostic'\n };\n\n /**\n * Gets the URL of the browser tester\n * @param {Window} window - Need an access to the window object\n * @param {String} action - The name of the action to call to get the browser checker\n * @param {String} controller - The name of the controller to call to get the browser checker\n * @param {String} extension - The name of the extension containing the controller to call to get the browser checker\n * @returns {String}\n */\n function getTesterUrl(window, action, controller, extension) {\n var document = window.document;\n var navigator = window.navigator;\n var screen = window.screen;\n var params = {};\n var e = 0;\n var f = 0;\n\n // append the browser user agent\n params.ua = navigator.userAgent;\n\n // detect browser family\n e |= window.ActiveXObject ? 1 : 0;\n e |= window.opera ? 2 : 0;\n e |= window.chrome ? 4 : 0;\n e |= 'getBoxObjectFor' in document || 'mozInnerScreenX' in window ? 8 : 0;\n e |= ('WebKitCSSMatrix' in window || 'WebKitPoint' in window || 'webkitStorageInfo' in window || 'webkitURL' in window) ? 16 : 0;\n e |= (e & 16 && ({}.toString).toString().indexOf(\"\\n\") === -1) ? 32 : 0;\n params.e = e;\n\n // gather info about browser functionality\n f |= 'sandbox' in document.createElement('iframe') ? 1 : 0;\n f |= 'WebSocket' in window ? 2 : 0;\n f |= window.Worker ? 4 : 0;\n f |= window.applicationCache ? 8 : 0;\n f |= window.history && window.history.pushState ? 16 : 0;\n f |= document.documentElement.webkitRequestFullScreen ? 32 : 0;\n f |= 'FileReader' in window ? 64 : 0;\n params.f = f;\n\n // append a unique ID\n params.r = Math.random().toString(36).substring(7);\n\n // get the screen size\n params.w = screen.width;\n params.h = screen.height;\n\n return helpers._url(action, controller, extension, params);\n }\n\n /**\n * Performs a browser support test\n *\n * @param {Window} window - Need an access to the window object\n * @param {Object} [config] - Some optional configs\n * @param {String} [config.action] - The name of the action to call to get the browser checker\n * @param {String} [config.controller] - The name of the controller to call to get the browser checker\n * @param {String} [config.extension] - The name of the extension containing the controller to call to get the browser checker\n * @returns {Object}\n */\n function browserTester(window, config) {\n var initConfig = getConfig(config || {}, _defaults);\n\n return {\n /**\n * Performs a browser support test, then call a function to provide the result\n * @param {Function} done\n */\n start: function start(done) {\n var url = getTesterUrl(window, initConfig.action, initConfig.controller, initConfig.extension);\n $.ajax({\n url : url,\n success : function(data) {\n done(data);\n }\n });\n }\n };\n }\n\n return browserTester;\n});\n\n","\ndefine('tpl!taoClientDiagnostic/tools/diagnostic/tpl/main', ['handlebars'], function(hb){ \nreturn hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression, self=this;\n\nfunction program1(depth0,data) {\n \n var buffer = \"\", stack1, helper;\n buffer += \"
\\n\";\n return buffer;\n });\n});\n\n","\ndefine('css!taoClientDiagnosticCss/diagnostics',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n * @author dieter \n */\ndefine('taoClientDiagnostic/tools/diagnostic/diagnostic',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'async',\n 'helpers',\n 'ui/feedback',\n 'ui/component',\n 'taoClientDiagnostic/tools/diagnostic/status',\n 'taoClientDiagnostic/tools/performances/tester',\n 'taoClientDiagnostic/tools/bandwidth/tester',\n 'taoClientDiagnostic/tools/upload/tester',\n 'taoClientDiagnostic/tools/browser/tester',\n 'taoClientDiagnostic/tools/getconfig',\n 'tpl!taoClientDiagnostic/tools/diagnostic/tpl/main',\n 'tpl!taoClientDiagnostic/tools/diagnostic/tpl/result',\n 'css!taoClientDiagnosticCss/diagnostics'\n], function ($, _, __, async, helpers, feedback, component, statusFactory, performancesTester, bandwidthTester, uploadTester, browserTester,getConfig, mainTpl, resultTpl) {\n 'use strict';\n\n /**\n * Some default values\n * @type {Object}\n * @private\n */\n var _defaults = {\n title: __('Diagnostic Tool'),\n header: __('This tool will run a number of tests in order to establish how well your current environment is suitable to run the TAO platform.'),\n info: __('Be aware that these tests will take up to several minutes.'),\n button: __('Begin diagnostics'),\n actionStore: 'storeData',\n actionCheck: 'check',\n controller: 'DiagnosticChecker',\n extension: 'taoClientDiagnostic'\n };\n\n /**\n * Default values for the browser tester\n * @type {Object}\n * @private\n */\n var _defaultsBrowser = {\n action: 'whichBrowser',\n controller: 'CompatibilityChecker',\n extension: 'taoClientDiagnostic'\n };\n\n /**\n * Default values for the bandwidth tester\n * @type {Object}\n * @private\n */\n var _defaultsBandwidth = {\n // The typical bandwidth needed for a test taker (Mbps)\n unit: 0.16,\n\n // The thresholds for optimal bandwidth\n ideal: 45,\n\n // Maximum number of test takers to display\n max: 100\n };\n\n /**\n * Default values for the performances tester\n * @type {Object}\n * @private\n */\n var _defaultsPerformances = {\n // The threshold for optimal performances\n optimal: 0.025,\n\n // The threshold for minimal performances\n threshold: 0.25\n };\n\n /**\n * Defines a diagnostic tool\n * @type {Object}\n */\n var diagnostic = {\n /**\n * Updates the displayed status\n * @param {String} status\n * @returns {diagnostic}\n * @private\n */\n changeStatus: function changeStatus(status) {\n if (this.is('rendered')) {\n this.controls.$status.html(status);\n }\n return this;\n },\n\n /**\n * Sends the detailed stats to the server\n * @param {String} type The type of stats\n * @param {Object} details The stats details\n * @param {Function} done A callback method called once server has responded\n */\n store: function store(type, details, done) {\n var config = this.config;\n\n details = _.omit(details, 'values');\n details.type = type;\n\n $.post(\n helpers._url(config.actionStore, config.controller, config.extension, config.storeParams),\n details,\n done,\n \"json\"\n );\n },\n\n /**\n * Performs a browser checks\n * @param {Function} done\n */\n checkBrowser: function checkBrowser(done) {\n var self = this;\n var config = this.config;\n\n this.changeStatus(__('Checking the browser...'));\n\n browserTester(window, getConfig(this.config.browser, _defaultsBrowser)).start(function (information) {\n // which browser\n $.post(\n helpers._url(config.actionCheck, config.controller, config.extension, config.storeParams),\n information,\n function (data) {\n var percentage = ('success' === data.type) ? 100 : (('warning' === data.type) ? 33 : 0);\n var status = self.status.getStatus(percentage, data);\n var summary = {\n browser: {\n message: __('Web browser'),\n value: information.browser + ' ' + information.browserVersion\n },\n os: {\n message: __('Operating system'),\n value: information.os + ' ' + information.osVersion\n }\n };\n\n status.id = 'browser';\n status.title = __('Operating system and web browser');\n\n self.addResult(status);\n\n done(status, summary);\n },\n 'json'\n );\n });\n },\n\n /**\n * Performs a browser performances check\n * @param {Function} done\n */\n checkPerformances: function checkPerformances(done) {\n var self = this;\n var config = getConfig(this.config.performances, _defaultsPerformances);\n var optimal = config.optimal;\n var range = Math.abs(optimal - (config.threshold));\n\n this.changeStatus(__('Checking the performances...'));\n performancesTester(config.samples, config.occurrences, config.timeout * 1000).start(function (average, details) {\n var cursor = range - average + optimal;\n var status = self.status.getStatus(cursor / range * 100, 'performances');\n var summary = {\n performancesMin: {message: __('Minimum rendering time'), value: details.min + ' s'},\n performancesMax: {message: __('Maximum rendering time'), value: details.max + ' s'},\n performancesAverage: {message: __('Average rendering time'), value: details.average + ' s'}\n };\n\n self.store('performance', details, function () {\n status.id = 'performance';\n status.title = __('Workstation performances');\n\n self.addResult(status);\n done(status, summary);\n });\n });\n },\n\n /**\n * Performs a browser bandwidth check\n * @param {Function} done\n */\n checkBandwidth: function checkBandwidth(done) {\n var self = this;\n var config = getConfig(this.config.bandwidth, _defaultsBandwidth);\n\n this.changeStatus(__('Checking the bandwidth...'));\n bandwidthTester().start(function (average, details) {\n var summary = {\n bandwidthMin: {message: __('Minimum bandwidth'), value: details.min + ' Mbps'},\n bandwidthMax: {message: __('Maximum bandwidth'), value: details.max + ' Mbps'},\n bandwidthAverage: {message: __('Average bandwidth'), value: details.average + ' Mbps'}\n };\n\n self.store('bandwidth', details, function () {\n var status = [];\n\n var bandwidthUnit = config.unit;\n var testTakers = config.ideal;\n var maxTestTakers = config.max;\n\n if (!_.isArray(testTakers)) {\n testTakers = [testTakers];\n }\n\n _.forEach(testTakers, function (threshold, i) {\n var max = threshold * bandwidthUnit;\n var st = self.status.getStatus(details.max / max * 100, 'bandwidth');\n var nb = Math.floor(details.max / bandwidthUnit);\n\n if (nb > maxTestTakers) {\n nb = '>' + maxTestTakers;\n }\n\n st.id = 'bandwidth-' + i;\n st.title = __('Bandwidth');\n st.feedback.legend = __('Number of simultaneous test takers the connection can handle');\n\n st.quality.label = nb;\n\n if (nb.toString().length > 2) {\n st.quality.wide = true;\n }\n\n status.push(st);\n\n self.addResult(st);\n });\n\n done(status, summary);\n });\n });\n },\n\n /**\n * Check upload speed\n * @param {Function} done\n */\n checkUpload: function checkUpload(done) {\n var self = this;\n var config = this.config.upload;\n\n this.changeStatus(__('Checking upload speed...'));\n uploadTester(config).start(function (data) {\n var totalSpeed = 0;\n var avgSpeed;\n var maxSpeed = 0;\n var optimal = config.optimal / 1024 / 1024;\n\n _.forEach(data, function (val) {\n totalSpeed += val.speed;\n if (maxSpeed < val.speed) {\n maxSpeed = Math.round(val.speed * 100) / 100;\n }\n });\n avgSpeed = Math.round(totalSpeed / data.length * 100) / 100;\n\n var status = self.status.getStatus((100 / optimal) * avgSpeed, 'upload');\n var summary = {\n uploadAvg: {message: __('Average upload speed'), value: avgSpeed + ' Mbps'},\n uploadMax: {message: __('Max upload speed'), value: maxSpeed + ' Mbps'},\n };\n\n self.store('upload', {\n max: maxSpeed,\n avg: avgSpeed,\n type: 'upload'\n }, function () {\n status.id = 'upload';\n status.title = __('Upload speed');\n\n self.addResult(status);\n\n done(status, summary);\n });\n });\n },\n\n /**\n * Add a result row\n * @param {Object} result\n * @returns {diagnostic}\n */\n addResult: function addResult(result) {\n var $result, $indicator;\n\n if (this.is('rendered')) {\n // adjust the width of the displayed label, if any, to the text length\n if (result.quality && result.quality.label && result.quality.label.toString().length > 2) {\n result.quality.wide = true;\n }\n\n // create and append the result to the displayed list\n $result = $(resultTpl(result));\n $indicator = $result.find('.quality-indicator');\n this.controls.$results.append($result);\n\n // the result is hidden by default, show it with a little animation\n $result.fadeIn(function () {\n if ($indicator.length) {\n $indicator.animate({\n left: (result.percentage * $result.outerWidth() / 100) - ($indicator.outerWidth() / 2)\n });\n }\n });\n }\n\n return this;\n },\n\n /**\n * Does some preparations before starting the diagnostics\n * @returns {diagnostic}\n * @private\n */\n prepare: function prepare() {\n /**\n * Notifies the diagnostic start\n * @event diagnostic#start\n */\n this.trigger('start');\n this.changeStatus(__('Starting...'));\n this.setState('running', true);\n this.setState('done', false);\n\n // first we need a clean space to display the results, so remove the last results if any\n this.controls.$results.empty();\n\n // remove the start button during the diagnostic\n this.controls.$start.addClass('hidden');\n\n return this;\n },\n\n /**\n * Does some post process after ending the diagnostics\n * @returns {diagnostic}\n * @private\n */\n finish: function finish() {\n // restore the start button to allow a new diagnostic run\n this.controls.$start.removeClass('hidden');\n\n /**\n * Notifies the diagnostic end\n * @event diagnostic#end\n */\n this.trigger('end');\n this.changeStatus(__('Done!'));\n this.setState('running', false);\n this.setState('done', true);\n\n return this;\n },\n\n /**\n * Runs the diagnostics\n * @returns {diagnostic}\n */\n run: function run() {\n var self = this;\n var information = {};\n var scores = {};\n\n // common handling for testers\n function doCheck(method, cb) {\n /**\n * Notifies the start of a tester operation\n * @event diagnostic#starttester\n * @param {String} name - The name of the tester\n */\n self.trigger('starttester', method);\n self.setState(method, true);\n\n self[method](function (status, details) {\n // the returned details must be ingested into the main details list\n _.assign(information, details);\n\n // sometimes it is an array, sometimes not...\n // simplify all by only supporting arrays\n if (!_.isArray(status)) {\n status = [status];\n }\n _.forEach(status, function (st) {\n scores[st.id] = st;\n });\n\n /**\n * Notifies the end of a tester operation\n * @event diagnostic#endtester\n * @param {String} name - The name of the tester\n * @param {Array} results - The results of the test\n */\n self.trigger('endtester', method, status);\n self.setState(method, false);\n\n // do not forget to notify the end of the operation to the manager\n cb();\n });\n }\n\n if (this.is('rendered')) {\n // set up the component to a new run\n this.prepare();\n\n // launch each testers in series, then display the results\n async.series([function (cb) {\n doCheck('checkBrowser', cb);\n }, function (cb) {\n doCheck('checkPerformances', cb);\n }, function (cb) {\n doCheck('checkBandwidth', cb);\n }, function (cb) {\n doCheck('checkUpload', cb);\n }], function () {\n // pick the lowest percentage as the main score\n var total = _.min(scores, 'percentage');\n\n // get a status according to the main score\n var status = self.status.getStatus(total.percentage, 'summary');\n\n // display the result\n status.title = __('Total');\n status.id = 'total';\n status.details = information;\n self.addResult(status);\n\n // done !\n self.finish();\n });\n }\n\n return this;\n }\n };\n\n /**\n * Builds an instance of the diagnostic tool\n * @param {Object} config\n * @param {String} [config.title] - The displayed title\n * @param {String} [config.header] - A header text displayed to describe the component\n * @param {String} [config.info] - An information text displayed to warn about run duration\n * @param {String} [config.button] - The caption of the start button\n * @param {String} [config.actionStore] - The name of the action to call to store the results\n * @param {String} [config.actionCheck] - The name of the action to call to check the browser results\n * @param {String} [config.controller] - The name of the controller to call\n * @param {String} [config.extension] - The name of the extension containing the controller\n * @param {Object} [config.storeParams] - A list of additional parameters to send with diagnostic results\n *\n * @param {String} [config.browser.action] - The name of the action to call to get the browser checker\n * @param {String} [config.browser.controller] - The name of the controller to call to get the browser checker\n * @param {String} [config.browser.extension] - The name of the extension containing the controller to call to get the browser checker\n *\n * @param {Number} [config.bandwidth.unit] - The typical bandwidth needed for a test taker (Mbps)\n * @param {Array} [config.bandwidth.ideal] - The thresholds for optimal bandwidth, one by bar\n * @param {Number} [config.bandwidth.max] - Maximum number of test takers to display\n *\n * @param {Array} [config.performances.samples] - A list of samples to render in order to compute the rendering performances\n * @param {Number} [config.performances.occurrences] - The number of renderings by samples\n * @param {Number} [config.performances.timeout] - Max allowed duration for a sample rendering\n * @param {Number} [config.performances.optimal] - The threshold for optimal performances\n * @param {Number} [config.performances.threshold] - The threshold for minimal performances\n * @returns {diagnostic}\n */\n function diagnosticFactory(config) {\n // fix the translations for content loaded from config files\n if (config) {\n _.forEach(['title', 'header', 'footer', 'info', 'button'], function(name) {\n if (config[name]) {\n config[name] = __(config[name]);\n }\n });\n }\n\n return component(diagnostic, _defaults)\n .setTemplate(mainTpl)\n\n // uninstalls the component\n .on('destroy', function () {\n this.controls = null;\n this.status = null;\n })\n\n // renders the component\n .on('render', function () {\n var self = this;\n\n // use an external component to handle the thresholds and status\n this.status = statusFactory();\n\n // get access to all needed placeholders\n this.controls = {\n $start: this.$component.find('[data-action=\"test-launcher\"]'),\n $status: this.$component.find('.status h2'),\n $results: this.$component.find('.results')\n };\n\n // start the diagnostic\n this.controls.$start.on('click', function () {\n self.run();\n });\n\n // show result details\n this.controls.$results.on('click', 'button[data-action=\"show-details\"]', function () {\n var $btn = $(this).closest('button');\n var $result = $btn.closest('[data-result]');\n var $details = $result.find('.details');\n $details.removeClass('hidden');\n $btn.addClass('hidden');\n $result.find('[data-action=\"hide-details\"]').removeClass('hidden');\n });\n\n // hide result details\n this.controls.$results.on('click', 'button[data-action=\"hide-details\"]', function () {\n var $btn = $(this).closest('button');\n var $result = $btn.closest('[data-result]');\n var $details = $result.find('.details');\n $details.addClass('hidden');\n $btn.addClass('hidden');\n $result.find('[data-action=\"show-details\"]').removeClass('hidden');\n });\n })\n .init(config);\n }\n\n return diagnosticFactory;\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) 2015 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n *\n * @author dieter \n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/controller/CompatibilityChecker/diagnostics',[\n 'jquery',\n 'layout/loading-bar',\n 'ui/feedback',\n 'taoClientDiagnostic/tools/message',\n 'taoClientDiagnostic/tools/diagnostic/diagnostic'\n], function ($, loadingBar, feedback, showMessage, diagnosticFactory) {\n 'use strict';\n\n /**\n * @exports\n */\n return {\n start: function(config) {\n var $contentArea = $('.content');\n\n showMessage('#feedback-box');\n\n diagnosticFactory(config)\n .on('start', function() {\n loadingBar.start();\n })\n .on('end', function() {\n loadingBar.stop();\n })\n .render($contentArea);\n }\n };\n});\n\n","\ndefine('tpl!taoClientDiagnostic/templates/diagnostic/main', ['handlebars'], function(hb){ \nreturn hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, options, functionType=\"function\", escapeExpression=this.escapeExpression, self=this, helperMissing=helpers.helperMissing;\n\nfunction program1(depth0,data) {\n \n var buffer = \"\", stack1, helper;\n buffer += \"
\\n\";\n return buffer;\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\n/**\n *\n * @author dieter \n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/controller/Diagnostic/diagnostic',[\n 'jquery',\n 'i18n',\n 'helpers',\n 'layout/loading-bar',\n 'ui/actionbar',\n 'ui/feedback',\n 'taoClientDiagnostic/tools/diagnostic/diagnostic',\n 'tpl!taoClientDiagnostic/templates/diagnostic/main'\n], function ($, __, helpers, loadingBar, actionbar, feedback, diagnosticFactory, diagnosticTpl) {\n 'use strict';\n\n /**\n * The CSS scope\n * @type {String}\n */\n var cssScope = '.diagnostic-runner';\n\n // the page is always loading data when starting\n loadingBar.start();\n\n /**\n * Controls the readiness check page\n *\n * @type {Object}\n */\n var taoDiagnosticRunnerCtlr = {\n /**\n * Entry point of the page\n */\n start : function start() {\n var $container = $(cssScope);\n var $list = $container.find('.list');\n var $panel = $('.panel');\n var config = $container.data('config');\n var indexUrl = helpers._url('index', 'Diagnostic', 'taoClientDiagnostic');\n var workstationUrl = helpers._url('workstation', 'DiagnosticChecker', 'taoClientDiagnostic');\n\n /**\n * Installs the diagnostic tool GUI\n * @param {String} workstation\n */\n function installTester(workstation) {\n diagnosticFactory(config)\n .setTemplate(diagnosticTpl)\n .on('render', function() {\n var self = this;\n\n // get access to the input\n this.controls.$workstation = this.getElement().find('[data-control=\"workstation\"]')\n .on('keypress', function (e) {\n if (e.which === 13) {\n e.preventDefault();\n self.run();\n }\n })\n .val(workstation);\n })\n .on('start', function() {\n // append the workstation name to the queries\n this.config.storeParams = this.config.storeParams || {};\n this.config.storeParams.workstation = this.controls.$workstation.val();\n\n // disable the input when running the test\n this.controls.$workstation.prop('disabled', true);\n loadingBar.start();\n })\n .on('end', function() {\n // enable the input when the test is complete\n this.controls.$workstation.removeProp('disabled');\n loadingBar.stop();\n })\n .on('render', function() {\n loadingBar.stop();\n })\n .render($list);\n }\n\n actionbar({\n renderTo: $panel,\n buttons: [{\n id: 'back',\n icon: 'step-backward',\n title: __('Return to the list'),\n label: __('List of readiness checks'),\n action: function() {\n window.location.href = indexUrl;\n }\n }]\n });\n\n // need to known the workstation name to display it\n $.get(workstationUrl, 'json')\n .done(function(data) {\n installTester(data && data.workstation);\n })\n .fail(function() {\n feedback().error(__('Unable to get the workstation name!'));\n installTester();\n });\n }\n };\n\n return taoDiagnosticRunnerCtlr;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/controller/Diagnostic/index',[\n 'jquery',\n 'i18n',\n 'helpers',\n 'layout/loading-bar',\n 'util/encode',\n 'ui/feedback',\n 'ui/dialog',\n 'taoClientDiagnostic/tools/diagnostic/status',\n 'ui/datatable'\n], function ($, __, helpers, loadingBar, encode, feedback, dialog, statusFactory) {\n 'use strict';\n\n /**\n * The CSS scope\n * @type {String}\n */\n var cssScope = '.diagnostic-index';\n\n // the page is always loading data when starting\n loadingBar.start();\n\n /**\n * Format a number with decimals\n * @param {Number} number - The number to format\n * @param {Number} [digits] - The number of decimals\n * @returns {Number}\n */\n function formatNumber(number, digits) {\n var nb = undefined === digits ? 2 : Math.max(0, parseInt(digits, 10));\n var factor = Math.pow(10, nb) || 1;\n return Math.round(number * factor) / factor;\n }\n\n /**\n * Controls the readiness check page\n *\n * @type {Object}\n */\n var taoDiagnosticCtlr = {\n /**\n * Entry point of the page\n */\n start : function start() {\n var $container = $(cssScope);\n var $list = $container.find('.list');\n var dataset = $container.data('set');\n var config = $container.data('config') || {};\n var installedExtension = $container.data('installedextension') || false;\n var diagnosticUrl = helpers._url('diagnostic', 'Diagnostic', 'taoClientDiagnostic');\n var removeUrl = helpers._url('remove', 'Diagnostic', 'taoClientDiagnostic');\n var serviceUrl = helpers._url('diagnosticData', 'Diagnostic', 'taoClientDiagnostic');\n\n var performancesConfig = config.performances || {};\n var performancesOptimal = performancesConfig.optimal;\n var performancesRange = Math.abs(performancesOptimal - (performancesConfig.threshold));\n\n var diagnosticStatus = statusFactory();\n\n var tools = [];\n var actions = [];\n var model = [];\n\n // request the server with a selection of readiness check results\n function request(url, selection, message) {\n if (selection && selection.length) {\n loadingBar.start();\n\n $.ajax({\n url: url,\n data: {\n id: selection\n },\n dataType : 'json',\n type: 'POST',\n error: function() {\n loadingBar.stop();\n }\n }).done(function(response) {\n loadingBar.stop();\n\n if (response && response.success) {\n if (message) {\n feedback().success(message);\n }\n $list.datatable('refresh');\n } else {\n feedback().error(__('Something went wrong ...') + ' ' + encode.html(response.error), {encodeHtml: false});\n }\n });\n }\n }\n\n // request the server to remove the selected diagnostic-index\n function remove(selection) {\n request(removeUrl, selection, __('The readiness check result have been removed'));\n }\n\n // tool: page refresh\n tools.push({\n id: 'refresh',\n icon: 'reset',\n title: __('Refresh the page'),\n label: __('Refresh'),\n action: function() {\n $list.datatable('refresh');\n }\n });\n\n // tool: readiness check\n tools.push({\n id: 'launch',\n icon: 'play',\n title: __('Launch another readiness check'),\n label: __('Launch readiness check'),\n action: function() {\n window.location.href = diagnosticUrl;\n }\n });\n\n if(installedExtension){\n // tool: compatibilty via lti\n tools.push({\n id: 'lti',\n icon: 'play',\n title: __('Try a test delivery'),\n label: __('Try a test delivery'),\n action: function() {\n window.location.href = deliveryUrl;\n }\n });\n }\n\n // tool: remove selected results\n tools.push({\n id: 'remove',\n icon: 'remove',\n title: __('Remove the selected readiness check results'),\n label: __('Remove'),\n massAction: true,\n action: function(selection) {\n dialog({\n message: __('The selected readiness check results will be removed. Continue ?'),\n autoRender: true,\n autoDestroy: true,\n onOkBtn: function() {\n remove(selection);\n }\n });\n }\n });\n\n // action: remove the result\n actions.push({\n id: 'remove',\n icon: 'remove',\n title: __('Remove the readiness check result?'),\n action: function(id) {\n dialog({\n autoRender: true,\n autoDestroy: true,\n message: __('The readiness check result will be removed. Continue ?'),\n onOkBtn: function() {\n remove([id]);\n }\n });\n }\n });\n\n // column: Workstation identifier\n model.push({\n id: 'workstation',\n label: __('Workstation')\n });\n\n // column: Operating system information\n model.push({\n id: 'os',\n label: __('OS')\n });\n\n // column: Browser information\n model.push({\n id: 'browser',\n label: __('Browser')\n });\n\n // column: Performances of the workstation\n model.push({\n id: 'performance',\n label: __('Performances'),\n transform: function(value) {\n var cursor = performancesRange - value + performancesOptimal;\n var status = diagnosticStatus.getStatus(cursor / performancesRange * 100, 'performances');\n return status.feedback.message;\n }\n });\n\n // column: Available bandwidth\n model.push({\n id: 'bandwidth',\n label: __('Bandwidth'),\n transform: function(value) {\n var bandwidth = formatNumber(value);\n\n if (value > 100) {\n bandwidth = '> 100';\n }\n\n return bandwidth;// + ' Mbs';\n }\n });\n\n // column: Date of diagnostic\n model.push({\n id: 'date',\n label: __('Date')\n });\n\n $list\n .on('query.datatable', function() {\n loadingBar.start();\n })\n .on('load.datatable', function() {\n loadingBar.stop();\n })\n .datatable({\n url: serviceUrl,\n status: {\n empty: __('No readiness checks have been done!'),\n available: __('Readiness checks already done'),\n loading: __('Loading')\n },\n tools: tools,\n actions: actions,\n selectable: true,\n model: model\n }, dataset);\n }\n };\n\n return taoDiagnosticCtlr;\n});\n\n","\n(function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})\n('.diagnostics-main-area{max-width:768px;margin:40px auto 0 auto;background:#f3f1ef;border:1px solid #ddd;border-radius:2px;-webkit-border-radius:2px;padding:20px}.diagnostics-main-area h1,.diagnostics-main-area h2,.diagnostics-main-area h3{font-style:normal;font-family:\\\"Century Gothic\\\",CenturyGothic,AppleGothic,sans-serif}.diagnostics-main-area h1{margin-bottom:20px;font-size:20px;font-size:2rem}.diagnostics-main-area h2{margin:0;font-size:14px;font-size:1.4rem}.diagnostics-main-area h3{margin-top:10px;margin-bottom:5px;font-size:12px;font-size:1.2rem}.diagnostics-main-area .status h2,.diagnostics-main-area .details h2{margin:1rem 0}.diagnostics-main-area .legend{font-style:italic;font-weight:normal;font-family:\\\"Century Gothic\\\",CenturyGothic,AppleGothic,sans-serif;font-size:11px;font-size:1.1rem}.diagnostics-main-area .quality-bar{height:15px;background:linear-gradient(to right, #CE1431 0%, #D57915 25%, #D5A215 50%, #D5CB15 75%, #36B111 100%);opacity:.8;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;margin:5px 0 10px;position:relative}.diagnostics-main-area .quality-indicator{position:absolute;border-width:10px 8px;border-style:solid;border-color:#333 transparent transparent;top:-1px;height:25px;width:0}.diagnostics-main-area .quality-indicator[title]:before{font-size:11px;font-size:1.1rem;content:attr(title);position:absolute;top:-36px;left:-12px;text-align:center;width:24px;height:24px;line-height:24px;display:inline-block;background-color:#0e5d91;color:rgba(255,255,255,0.9);-moz-border-radius:12px;-webkit-border-radius:12px;border-radius:12px}.diagnostics-main-area .quality-indicator.wide[title]:before{left:-16px;width:32px}.diagnostics-main-area [data-result],.diagnostics-main-area .bandwidth-box{display:none}.diagnostics-main-area [data-action=bandwidth-launcher]{margin:5px 0 10px}.diagnostics-main-area li{padding-bottom:10px}.diagnostics-main-area .intro{margin-bottom:20px}.diagnostics-main-area table.matrix{border:1px solid #ddd;border-radius:2px;-webkit-border-radius:2px;margin-top:5px}table.datatable [class^=\\\"icon-\\\"]{padding:0}table.datatable td{font-size:90%;font-weight:normal}table.datatable .progress .state:not(:first-child):before{content:\\' - \\'}table.datatable .progress .item-time:before{content:\\' (\\'}table.datatable .progress .item-time .total:before{content:\\' / \\'}table.datatable .progress .item-time:after{content:\\')\\'}.diagnostic-scope h1{font-family:\\\"Century Gothic\\\",CenturyGothic,AppleGothic,sans-serif;font-size:22px;font-size:2.2rem;font-weight:normal}.diagnostic-scope h2{font-family:\\\"Century Gothic\\\",CenturyGothic,AppleGothic,sans-serif;font-size:18px;font-size:1.8rem;margin:30px 0 10px}.diagnostic-scope form.daterange label{padding:0}.diagnostic-scope form.daterange input{margin:0 10px}.diagnostic-scope table.datatable [class^=\\\"icon-\\\"]{padding:0}.diagnostic-scope table.datatable td{font-size:90%;font-weight:normal}.diagnostic-scope .content{margin:auto}.diagnostic-scope .diagnostic-index .content,.diagnostic-scope .diagnostic-runner .content{width:100%;padding:0 20px}.diagnostic-scope .diagnostic-index .message,.diagnostic-scope .diagnostic-runner .message{padding:8px;text-align:center}.diagnostic-scope .panel .action-bar{background:#266d9c;padding:3px;overflow:hidden;color:#e7eff4;margin:40px 0 10px 0}.diagnostic-scope .panel .action-bar .btn-info{overflow:hidden;background:transparent;border:1px rgba(255,255,255,0.3) solid}.diagnostic-scope .diagnostics-main-area{margin-top:0px;max-width:800px}\\n/*# sourceMappingURL=diagnostics.css.map */\\n');\n"]}
\ No newline at end of file
+{"version":3,"sources":["routes.js","../tools/message.js","Authenticator/login.js","../tools/diagnostic/status.js","../tools/fixedDecimals.js","../tools/stats.js","../../taoQtiItem/qtiItem/core/qtiClasses.js","../../taoQtiItem/qtiItem/helper/util.js","../../taoQtiItem/qtiItem/helper/rendererConfig.js","../../taoQtiItem/qtiItem/core/Element.js","../../taoQtiItem/qtiItem/core/Loader.js","../../taoQtiItem/qtiItem/helper/interactionHelper.js","../../taoQtiItem/qtiRunner/core/Renderer.js","../../taoItems/assets/manager.js","../../taoItems/assets/strategies.js","../../taoQtiItem/portableElementRegistry/factory/factory.js","../../taoQtiItem/qtiCreator/helper/qtiElements.js","../../taoQtiItem/portableElementRegistry/factory/ciRegistry.js","../../taoQtiItem/portableElementRegistry/ciRegistry.js","../../taoQtiItem/portableElementRegistry/factory/icRegistry.js","../../taoQtiItem/portableElementRegistry/icRegistry.js","../../taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy.js","../../taoQtiItem/qtiCommonRenderer/renderers/config.js","../../taoQtiItem/qtiCommonRenderer/renderers/Renderer.js","../tools/performances/tester.js","../tools/bandwidth/tester.js","../tools/upload/tester.js","../tools/getconfig.js","../tools/browser/tester.js","../tools/diagnostic/tpl/main!tpl","../tools/diagnostic/tpl/result!tpl","../../taoClientDiagnosticCss/diagnostics!css","../tools/diagnostic/diagnostic.js","CompatibilityChecker/diagnostics.js","../templates/diagnostic/main!tpl","Diagnostic/diagnostic.js","Diagnostic/index.js","../../../../../../../../../../../../onLayerEnd0.js"],"names":["define","Authenticator","actions","login","CompatibilityChecker","index","Diagnostic","diagnostic","$","feedback","showMessages","container","$feedbackBox","data","error","showMessage","start","_","__","diagnosticStatusFactory","thresholds","performances","performancesThresholds","bandwidth","bandwidthThresholds","upload","uploadThresholds","summary","summaryThresholds","getThresholds","name","this","getStatus","percentage","len","i","step","status","Math","max","min","round","parseInt","isString","isArray","length","threshold","quality","clone","message","type","fixedDecimals","value","decimals","shift","pow","abs","Number","stats","list","fieldName","variance","avg","med","middle","getValue","results","sum","sum2","MAX_VALUE","count","values","isFunction","item","forEach","undefined","push","diff","sqrt","sort","floor","ceil","average","median","key","_container","assessmentItem","responseProcessing","_simpleFeedbackRule","stylesheet","math","img","object","outcomeDeclaration","responseDeclaration","rubricBlock","associableHotspot","gap","gapImg","gapText","hotspotChoice","hottext","inlineChoice","simpleAssociableChoice","simpleChoice","associateInteraction","choiceInteraction","endAttemptInteraction","extendedTextInteraction","gapMatchInteraction","graphicAssociateInteraction","graphicGapMatchInteraction","graphicOrderInteraction","hotspotInteraction","hottextInteraction","inlineChoiceInteraction","matchInteraction","mediaInteraction","orderInteraction","prompt","selectPointInteraction","sliderInteraction","textEntryInteraction","uploadInteraction","feedbackBlock","feedbackInline","modalFeedback","customInteraction","infoControl","include","util","buildSerial","prefix","id","chars","charAt","random","buildId","usedIds","suffix","exists","TypeError","getUsedIds","contains","buildIdentifier","useSuffix","getUsedIdentifiers","isUndefined","replace","findInCollection","element","collectionNames","searchedSerial","found","Error","each","collectionName","collection","split","nameToken","elt","parent","find","addMarkupNamespace","markup","ns","$0","$1","$2","$3","$4","indexOf","removeMarkupNamespaces","getMarkupUsedNamespaces","namespaces","original","slash","node","uniq","rendererConfigHelper","getOptionsFromArguments","args","options","placeholder","subclass","renderer","arg","isRenderer","isPlainObject","console","log","Class","rendererConfig","_instances","Element","extend","qtiClass","serial","relatedItem","init","attributes","metaData","match","setAttributes","initContainer","arguments","initObject","is","getSerial","elts","getComposingElements","attr","prop","document","trigger","removeData","removeAttr","removeAttributes","getAttributes","attrNames","append","getBody","getObject","v","isA","getUsedClasses","ret","composingElts","location","getRelatedItem","setRelatedItem","recursive","setRenderer","getRenderer","render","_renderer","tplData","defaultData","tag","body","resolveUrl","merge","getData","rendering","renderTpl","replaceWith","postRender","altClassName","postRenderers","compact","getContainer","$scope","toArray","arr","isEmpty","addClass","className","clazz","_containClass","hasClass","removeClass","regex","RegExp","trim","toggleClass","state","isset","issetElement","unset","unsetElement","allClassStr","test","qtiElement","getElementBySerial","composingElements","qtiClasses","loadPortableCustomElementData","portableElement","typeIdentifier","entryPoint","properties","libraries","Loader","classesLocation","qti","setClassesLocation","getRequiredClasses","union","loadRequiredClasses","callback","reload","requiredClasses","required","requiredClass","_this","require","QtiClass","prototype","call","getLoadedClasses","keys","loadItemData","Qti","loadContainer","outcomes","outcome","buildOutcome","addOutcomeDeclaration","feedbacks","buildElement","addModalFeedback","stylesheets","addStylesheet","responses","response","buildResponse","addResponseDeclaration","feedbackRules","forIn","fbData","buildSimpleFeedbackRule","setResponseProcessing","buildResponseProcessing","setNamespaces","setSchemaLocations","schemaLocations","setApipAccessibility","apipAccessibility","loadAndBuildElement","loadElement","loadElementData","loadElements","allElements","elementData","template","howMatch","defaultValue","correctResponse","correctResponses","size","mapping","mapEntries","areaMapping","mappingAttributes","feedbackRule","setCondition","condition","comparedValue","feedbackOutcome","feedbackThen","modalFeedbacks","feedbackElse","comparedOutcome","rp","processingType","xml","bodyObject","bodyData","elements","eltData","setElement","defaults","bdy","loadObjectData","loadInteractionData","loadChoiceData","loadMathData","loadPicData","interaction","buildInteractionChoices","loadPciData","choices","set","matchSet","choice","addChoice","gapImgs","addGapImg","val","text","_alt","setMathML","mathML","annotations","encoding","setAnnotation","pci","pic","convertChoices","outputType","c","findChoices","inputType","getChoice","getChoiceByIdentifier","shuffleChoices","r","f","j","n","k","tmp","serialToIdentifier","choiceSerial","Handlebars","Promise","interactionHelper","themeLoader","getDocumentBaseUrl","window","protocol","host","pathname","_isValidRenderer","valid","classCorrect","_renderableClasses","pos","slice","subClass","_renderableSubclasses","_dependencies","_defaults","Renderer","_locations","_renderers","shuffledChoices","_getClassRenderer","setOption","setOptions","opts","getOption","getCustomMessage","elementName","messageKey","messages","compile","getAssetManager","assetManager","getThemeLoader","qtiSubclass","res","decorators","isObject","before","after","renderDirect","tpl","setResponse","qtiInteraction","$container","getResponse","resetResponse","getState","setState","destroy","getLoadedRenderers","register","renderersLocations","load","self","themes","base","available","theme","path","intersection","reqClass","deps","requiredSubClasses","unload","setShuffledChoices","identificationType","pluck","getShuffledChoices","reshuffle","returnedType","getChoices","getRenderers","getLocations","url","resolve","getAbsoluteUrl","relUrl","warn","absUrl","runtimeLocations","runtimeLocation","baseUrl","build","defaultOptions","NewRenderer","apply","urlUtil","assetManagerFactory","strategies","cache","parseUrl","_strategies","addStrategy","strategy","handle","setStrategies","newStrategies","setData","resolved","inputUrl","hasOwnProperty","parse","result","resolveBy","clearCache","prependToUrl","slashcat","directory","encodeURIComponent","file","isRelative","itemCssNoCache","bust","Date","now","external","isAbsolute","toString","base64","isBase64","taomedia","eventifier","_requirejs","methods","_loaded","__providers","_registry","get","version","last","registerProvider","moduleName","resetProviders","loadProviders","reject","providerLoadingStack","provider","getAllVersions","all","versions","map","getRuntime","assign","runtime","label","getCreator","creator","getBaseUrl","loadRuntimes","loadPromise","then","loadStack","requireConfigAliases","reduce","acc","_pcis","config","paths","catch","err","loadCreators","requiredCreators","pciModel","hook","creators","creatorHook","getTypeIdentifier","findIndex","module","QtiElements","classes","itemBody","parents","abstract","atomicBlock","atomicInline","simpleBlock","simpleInline","flowStatic","blockStatic","inlineStatic","flow","tableCell","caption","xhtml","col","colgroup","div","dl","dt","dd","hr","li","ol","ul","param","table","tbody","tfoot","thead","td","th","tr","a","abbr","acronym","b","big","cite","code","dfn","em","kbd","q","samp","small","span","strong","sub","sup","tt","var","blockquote","address","h1","h2","h3","h4","h5","h6","p","pre","br","textRun","blockInteraction","inlineInteraction","printedVariable","templateElement","templateBlock","templateInline","drawingInteraction","graphicInteraction","containable","children","getAllowedContainersElements","getAllowedContainers","jqSelector","substring","filter","getParentClasses","aClass","model","intersect","getChildClasses","getAllowedContents","checked","contain","child","isAllowedClass","qtiContainerClass","qtiContentClass","allowedClasses","cacheType","isBlock","isInline","topClass","getAvailableAuthoringElements","description","icon","short","tags","portableElementRegistry","qtiElements","getAuthoringData","on","ciRegistry","registry","providers","icRegistry","getBaseUrlByIdentifier","source","relative","fullmatch","relPath","context","assetStrategies","portableAssetStrategy","itemThemes","moduleConfig","root_url","locations","simpleChoice.choiceInteraction","simpleChoice.orderInteraction","simpleAssociableChoice.matchInteraction","simpleAssociableChoice.associateInteraction","enableDragAndDrop","associate","associateDragAndDrop","gapMatch","gapMatchDragAndDrop","graphicGapMatch","graphicGapMatchDragAndDrop","order","orderDragAndDrop","async","helpers","loadItem","done","qtiJsonFile","urlTokens","extension","fullpath","s","contexts","loader","itemData","duration","end","performance","appendTo","remove","_second","_defaultTimeout","_defaultOccurrencesCount","_defaultSamples","_sampleBaseId","performancesTester","samples","occurrences","timeout","idx","_samples","sample","nb","tests","cb","partial","iterations","series","measures","_kilo","_mega","_downloadData","10KB","100KB","1MB","10MB","download","timeoutId","request","XMLHttpRequest","open","setRequestHeader","onload","bytes","seconds","speed","clearTimeout","onerror","delay","send","bandwidthTester","bind","urlHelper","generateStr","possible","route","str","ajax","xhr","startTime","addEventListener","evt","lengthComputable","passedTime","time","loaded","uploadTester","jqXHR","omit","getConfig","getTesterUrl","action","controller","navigator","screen","params","e","ua","userAgent","ActiveXObject","opera","chrome","createElement","Worker","applicationCache","history","pushState","documentElement","webkitRequestFullScreen","w","width","h","height","_url","browserTester","initConfig","success","hb","depth0","partials","program1","stack1","helper","buffer","header","hash","functionType","escapeExpression","program3","info","compilerInfo","title","inverse","noop","fn","program","button","legend","program2","program4","wide","program5","program7","program9","helperMissing","program10","details","component","statusFactory","mainTpl","resultTpl","diagnosticFactory","setTemplate","controls","$start","$component","$status","$results","run","$btn","closest","$result","$details","actionStore","actionCheck","_defaultsBrowser","_defaultsBandwidth","unit","ideal","_defaultsPerformances","optimal","changeStatus","html","store","post","storeParams","checkBrowser","browser","information","browserVersion","os","osVersion","addResult","checkPerformances","range","cursor","performancesMin","performancesMax","performancesAverage","checkBandwidth","bandwidthMin","bandwidthMax","bandwidthAverage","bandwidthUnit","testTakers","maxTestTakers","st","checkUpload","avgSpeed","totalSpeed","maxSpeed","uploadAvg","uploadMax","$indicator","fadeIn","animate","left","outerWidth","prepare","empty","finish","doCheck","method","scores","total","loadingBar","$contentArea","stop","actionbar","diagnosticTpl","cssScope","taoDiagnosticRunnerCtlr","installTester","workstation","$workstation","getElement","which","preventDefault","removeProp","$list","$panel","indexUrl","workstationUrl","renderTo","buttons","href","fail","encode","dialog","formatNumber","number","digits","factor","taoDiagnosticCtlr","selection","dataType","datatable","encodeHtml","removeUrl","dataset","installedExtension","diagnosticUrl","serviceUrl","performancesConfig","performancesOptimal","performancesRange","diagnosticStatus","tools","deliveryUrl","massAction","autoRender","autoDestroy","onOkBtn","transform","loading","selectable","d","getElementsByTagName","cssText","createTextNode"],"mappings":"AAAAA,OAAA,yCACAC,eACAC,SACAC,MAAA,mCAGAC,sBACAF,SACAG,MAAA,gDAGAC,YACAJ,SACAG,MAAA,8BACAE,WAAA,uCCUAP,OAAA,qCACA,SACA,eACA,SAAAQ,EAAAC,UACA,YAMA,SAAAC,cAAAC,WACA,GAAAC,cAAAJ,EAAAG,UAEAC,cAAAC,KAAA,UACAJ,WAAAK,MAAAF,aAAAC,KAAA,UAEAD,aAAAC,KAAA,YACAJ,WAAAK,MAAAF,aAAAC,KAAA,YAOA,MAAAH,gBCzBAV,OAAA,sDACA,SACA,qCACA,SAAAQ,EAAAO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AAA,GAAAnW,GAAA6G,GAAAA,EAAA5qB,GAAA4qB,EAAA5qB,GAAAm6B,QAAAhkB,EAAAyU,EAAA7G,GAAAkW,EAAAG,eAAAjkB,KACA","file":"routes.js.map","sourcesContent":["define('taoClientDiagnostic/controller/routes',{\n 'Authenticator' : {\n 'actions' : {\n 'login' : 'controller/Authenticator/login'\n }\n },\n 'CompatibilityChecker' : {\n 'actions' : {\n 'index' : 'controller/CompatibilityChecker/diagnostics'\n }\n },\n 'Diagnostic' : {\n 'actions' : {\n 'index' : 'controller/Diagnostic/index',\n 'diagnostic' : 'controller/Diagnostic/diagnostic'\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n *\n * @author Camille Moyon \n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/message',[\n 'jquery',\n 'ui/feedback'\n], function ($, feedback) {\n 'use strict';\n\n /**\n * Displays the messages set into a markup\n * @param {String|jQuery|HTMLElement} container\n */\n function showMessages(container) {\n var $feedbackBox = $(container);\n\n if ($feedbackBox.data('error')) {\n feedback().error($feedbackBox.data('error'));\n }\n if ($feedbackBox.data('message')) {\n feedback().error($feedbackBox.data('message'));\n }\n }\n\n /**\n * @exports\n */\n return showMessages;\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n *\n * @author Camille Moyon \n */\ndefine('taoClientDiagnostic/controller/Authenticator/login',[\n 'jquery',\n 'taoClientDiagnostic/tools/message'\n], function ($, showMessage) {\n 'use strict';\n\n /**\n * @exports\n */\n return {\n start: function() {\n showMessage('#feedback-box');\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) 2016 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n * @author dieter \n */\ndefine('taoClientDiagnostic/tools/diagnostic/status',[\n 'jquery',\n 'lodash',\n 'i18n'\n], function ($, _, __) {\n 'use strict';\n\n /**\n * A list of thresholds for performances check\n * @type {Array}\n */\n var performancesThresholds = [{\n threshold: 0,\n message: __('Very slow performances'),\n type: 'error'\n }, {\n threshold: 33,\n message: __('Average performances'),\n type: 'warning'\n }, {\n threshold: 66,\n message: __('Good performances'),\n type: 'success'\n }];\n\n /**\n * A list of thresholds for bandwidth check\n * @type {Array}\n */\n var bandwidthThresholds = [{\n threshold: 0,\n message: __('Low bandwidth'),\n type: 'error'\n }, {\n threshold: 33,\n message: __('Average bandwidth'),\n type: 'warning'\n }, {\n threshold: 66,\n message: __('Good bandwidth'),\n type: 'success'\n }];\n\n /**\n * A list of thresholds for bandwidth check\n * @type {Array}\n */\n var uploadThresholds = [{\n threshold: 0,\n message: __('Low upload speed'),\n type: 'error'\n }, {\n threshold: 33,\n message: __('Average upload speed'),\n type: 'warning'\n }, {\n threshold: 66,\n message: __('Good upload speed'),\n type: 'success'\n }];\n\n /**\n * A list of thresholds for summary\n * @type {Array}\n */\n var summaryThresholds = [{\n threshold: 0,\n message: __('Your system requires a compatibility update, please contact your system administrator.'),\n type: 'error'\n }, {\n threshold: 33,\n message: __('Your system is not optimal, please contact your system administrator.'),\n type: 'warning'\n }, {\n threshold: 66,\n message: __('Your system is fully compliant.'),\n type: 'success'\n }];\n\n /**\n * Gets a diagnostic factory manager\n * @returns {Object}\n */\n function diagnosticStatusFactory() {\n return {\n /**\n * The list of known thresholds by context\n */\n thresholds: {\n performances: performancesThresholds,\n bandwidth: bandwidthThresholds,\n upload: uploadThresholds,\n summary: summaryThresholds\n },\n\n /**\n * Gets the thresholds for a particular context\n * @param {String} name\n * @returns {Array}\n */\n getThresholds: function getThresholds(name) {\n return this.thresholds[name];\n },\n\n /**\n * Gets the correct status message for a given percentage\n * @param {Number} percentage\n * @param {Array|String} thresholds\n * @returns {Object}\n */\n getStatus: function getStatus(percentage, thresholds) {\n var len, feedback, i, step, status;\n\n // the percentage is between 0 and 100 and obviously must be a number\n percentage = Math.max(0, Math.min(100, Math.round(parseInt(percentage, 10))));\n\n if (_.isString(thresholds)) {\n thresholds = this.getThresholds(thresholds);\n }\n\n // grab a feedback related to the percentage in the thresholds list\n if (thresholds) {\n if (!_.isArray(thresholds)) {\n thresholds = [thresholds];\n }\n\n len = thresholds.length;\n feedback = thresholds[0];\n for (i = 1; i < len; i++) {\n step = thresholds[i];\n if (step && percentage >= step.threshold) {\n feedback = step;\n } else {\n break;\n }\n }\n }\n\n // need a structure compatible with the handlebars template\n status = {\n percentage: percentage,\n quality: {}\n };\n\n if (feedback) {\n status.feedback = _.clone(feedback);\n }\n\n return status;\n }\n };\n }\n\n return diagnosticStatusFactory;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/fixedDecimals',[],function () {\n 'use strict';\n\n /**\n * Rounds a value to a fixed number of decimals\n * @param {Number} value The value to round\n * @param {Number} decimals The number of decimal\n * @returns {Number}\n */\n var fixedDecimals = function fixedDecimals(value, decimals) {\n var shift = Math.pow(10, Math.abs(decimals || 1));\n return Math.round(Number(value) * shift) / shift || 0;\n };\n\n return fixedDecimals;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/stats',[\n 'lodash',\n 'taoClientDiagnostic/tools/fixedDecimals'\n], function (_, fixedDecimals) {\n 'use strict';\n\n /**\n * Computes some stats on a list from a particular field\n * @param {Array|Object} list The list to compute stats on\n * @param {String|Function} fieldName The name of the field to process, or a callback method returning the value\n * @param {Number} [decimals] Optional number of fixed decimals for values\n * @returns {Object}\n */\n var stats = function stats(list, fieldName, decimals) {\n var sum = 0;\n var sum2 = 0;\n var min = Number.MAX_VALUE;\n var max = 0;\n var variance;\n var count = 0;\n var values = [];\n var avg;\n var med;\n var middle;\n var getValue;\n var results;\n\n if (_.isFunction(fieldName)) {\n getValue = fieldName;\n } else {\n getValue = function(item) {\n return item && item[fieldName] || 0;\n };\n }\n\n // process 1st pass stats: compute sum, min and max values\n _.forEach(list, function(item) {\n var value;\n if (undefined !== item) {\n value = getValue(item);\n values.push(value);\n min = Math.min(min, value);\n max = Math.max(max, value);\n sum += value;\n count++;\n }\n });\n\n // compute the average value\n avg = sum / (count || 1);\n\n // process 2nd pass stats: compute variance\n _.forEach(values, function(value) {\n var diff = value - avg;\n sum2 += diff * diff;\n });\n\n // compute de standard variance\n variance = count > 1 ? Math.sqrt(sum2 / (count - 1)) : 0;\n\n // compute the median value\n values.sort();\n middle = count / 2;\n med = (values[Math.floor(middle)] + values[Math.ceil(middle)]) / 2;\n\n results = {\n min : min,\n max : max,\n sum : sum,\n count : count,\n average : avg,\n median : med,\n variance : variance\n };\n\n if (decimals) {\n _.forEach(results, function(value, key) {\n results[key] = fixedDecimals(value, decimals);\n });\n }\n\n results.values = list;\n return results;\n };\n\n return stats;\n});\n\n","define('taoQtiItem/qtiItem/core/qtiClasses',[], function(){\n return {\n '_container' : 'taoQtiItem/qtiItem/core/Container',\n 'assessmentItem' : 'taoQtiItem/qtiItem/core/Item',\n 'responseProcessing' : 'taoQtiItem/qtiItem/core/ResponseProcessing',\n '_simpleFeedbackRule' : 'taoQtiItem/qtiItem/core/response/SimpleFeedbackRule',\n 'stylesheet' : 'taoQtiItem/qtiItem/core/Stylesheet',\n 'math' : 'taoQtiItem/qtiItem/core/Math',\n 'img' : 'taoQtiItem/qtiItem/core/Img',\n 'object' : 'taoQtiItem/qtiItem/core/Object',\n 'outcomeDeclaration' : 'taoQtiItem/qtiItem/core/variables/OutcomeDeclaration',\n 'responseDeclaration' : 'taoQtiItem/qtiItem/core/variables/ResponseDeclaration',\n 'rubricBlock' : 'taoQtiItem/qtiItem/core/RubricBlock',\n 'associableHotspot' : 'taoQtiItem/qtiItem/core/choices/AssociableHotspot',\n 'gap' : 'taoQtiItem/qtiItem/core/choices/Gap',\n 'gapImg' : 'taoQtiItem/qtiItem/core/choices/GapImg',\n 'gapText' : 'taoQtiItem/qtiItem/core/choices/GapText',\n 'hotspotChoice' : 'taoQtiItem/qtiItem/core/choices/HotspotChoice',\n 'hottext' : 'taoQtiItem/qtiItem/core/choices/Hottext',\n 'inlineChoice' : 'taoQtiItem/qtiItem/core/choices/InlineChoice',\n 'simpleAssociableChoice' : 'taoQtiItem/qtiItem/core/choices/SimpleAssociableChoice',\n 'simpleChoice' : 'taoQtiItem/qtiItem/core/choices/SimpleChoice',\n 'associateInteraction' : 'taoQtiItem/qtiItem/core/interactions/AssociateInteraction',\n 'choiceInteraction' : 'taoQtiItem/qtiItem/core/interactions/ChoiceInteraction',\n 'endAttemptInteraction' : 'taoQtiItem/qtiItem/core/interactions/EndAttemptInteraction',\n 'extendedTextInteraction' : 'taoQtiItem/qtiItem/core/interactions/ExtendedTextInteraction',\n 'gapMatchInteraction' : 'taoQtiItem/qtiItem/core/interactions/GapMatchInteraction',\n 'graphicAssociateInteraction' : 'taoQtiItem/qtiItem/core/interactions/GraphicAssociateInteraction',\n 'graphicGapMatchInteraction' : 'taoQtiItem/qtiItem/core/interactions/GraphicGapMatchInteraction',\n 'graphicOrderInteraction' : 'taoQtiItem/qtiItem/core/interactions/GraphicOrderInteraction',\n 'hotspotInteraction' : 'taoQtiItem/qtiItem/core/interactions/HotspotInteraction',\n 'hottextInteraction' : 'taoQtiItem/qtiItem/core/interactions/HottextInteraction',\n 'inlineChoiceInteraction' : 'taoQtiItem/qtiItem/core/interactions/InlineChoiceInteraction',\n 'matchInteraction' : 'taoQtiItem/qtiItem/core/interactions/MatchInteraction',\n 'mediaInteraction' : 'taoQtiItem/qtiItem/core/interactions/MediaInteraction',\n 'orderInteraction' : 'taoQtiItem/qtiItem/core/interactions/OrderInteraction',\n 'prompt' : 'taoQtiItem/qtiItem/core/interactions/Prompt',\n 'selectPointInteraction' : 'taoQtiItem/qtiItem/core/interactions/SelectPointInteraction',\n 'sliderInteraction' : 'taoQtiItem/qtiItem/core/interactions/SliderInteraction',\n 'textEntryInteraction' : 'taoQtiItem/qtiItem/core/interactions/TextEntryInteraction',\n 'uploadInteraction' : 'taoQtiItem/qtiItem/core/interactions/UploadInteraction',\n 'feedbackBlock' : 'taoQtiItem/qtiItem/core/feedbacks/FeedbackBlock',\n 'feedbackInline' : 'taoQtiItem/qtiItem/core/feedbacks/FeedbackInline',\n 'modalFeedback' : 'taoQtiItem/qtiItem/core/feedbacks/ModalFeedback',\n 'customInteraction' : 'taoQtiItem/qtiItem/core/interactions/CustomInteraction',\n 'infoControl' : 'taoQtiItem/qtiItem/core/PortableInfoControl',\n 'include' : 'taoQtiItem/qtiItem/core/Include'\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) 2015 (original work) Open Assessment Technologies SA\n *\n */\n\n/**\n * Common basic util functions\n */\ndefine('taoQtiItem/qtiItem/helper/util',['lodash'], function(_){\n 'use strict';\n\n var util = {\n\n buildSerial : function buildSerial(prefix){\n var id = prefix || '';\n var chars = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n for(var i = 0; i < 22; i++){\n id += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return id;\n },\n\n /**\n * Generates an id for a Qti element (the generation is different from identifier)\n * @param {Object} item - the element related item\n * @param {String} prefix - identifier prefix\n * @returns {String} the identifier\n * @throws {TypeError} if there is no item\n */\n buildId : function buildId(item, prefix){\n var id;\n var usedIds;\n var i = 1;\n var suffix = '';\n var exists = false;\n\n if(!item){\n throw new TypeError('A item is required to generate a unique identifier');\n }\n\n usedIds = item.getUsedIds();\n\n do{\n exists = false;\n id = prefix + suffix;\n if(_.contains(usedIds, id)){\n exists = true;\n suffix = '_' + i;\n i++;\n }\n } while(exists);\n\n return id;\n },\n\n /**\n * Generates an identifier for a Qti element\n * @param {Object} item - the element related item\n * @param {String} prefix - identifier prefix\n * @param {Boolean} [useSuffix = true] - add a \"_ + index\" to the identifier\n * @returns {String} the identifier\n * @throws {TypeError} if there is no item\n */\n buildIdentifier : function buildIdentifier(item, prefix, useSuffix){\n\n var id;\n var usedIds;\n var suffix = '';\n var i = 1;\n var exists = false;\n\n if(!item){\n throw new TypeError('A item is required to generate a unique identifier');\n }\n\n if(!prefix){\n throw new TypeError('Prefix is required to build an identifier');\n }\n\n usedIds = item.getUsedIdentifiers();\n useSuffix = _.isUndefined(useSuffix) ? true : useSuffix;\n\n if(prefix){\n prefix = prefix.replace(/_[0-9]+$/ig, '_') //detect incremental id of type choice_12, response_3, etc.\n .replace(/[^a-zA-Z0-9_]/ig, '_')\n .replace(/(_)+/ig, '_');\n if(useSuffix){\n suffix = '_' + i;\n }\n }\n\n do{\n exists = false;\n id = prefix + suffix;\n if(usedIds[id]){\n exists = true;\n suffix = '_' + i;\n i++;\n }\n } while(exists);\n\n return id;\n },\n\n findInCollection : function findInCollection(element, collectionNames, searchedSerial){\n\n var found = null;\n\n if(_.isString(collectionNames)){\n collectionNames = [collectionNames];\n }\n\n if(_.isArray(collectionNames)){\n\n _.each(collectionNames, function(collectionName){\n\n //get collection to search in (resolving case like interaction.choices.0\n var collection = element;\n _.each(collectionName.split('.'), function(nameToken){\n collection = collection[nameToken];\n });\n var elt = collection[searchedSerial];\n\n if(elt){\n found = {'parent' : element, 'element' : elt};\n return false;//break the each loop\n }\n\n //search inside each elements:\n _.each(collection, function(elt){\n\n if(_.isFunction(elt.find)){\n found = elt.find(searchedSerial);\n if(found){\n return false;//break the each loop\n }\n }\n\n });\n\n if(found){\n return false;//break the each loop\n }\n\n });\n\n }else{\n\n throw new Error('invalid argument : collectionNames must be an array or a string');\n }\n\n return found;\n },\n addMarkupNamespace : function addMarkupNamespace(markup, ns){\n if(ns) {\n markup = markup.replace(/<(\\/)?([a-z:]+)(\\s?)([^><]*)>/g, function($0, $1, $2, $3, $4){\n if($2.indexOf(':')>0){\n return $0;\n }\n $1 = $1 || '';\n $3 = $3 || '';\n return '<'+ $1 + ns + ':'+$2+$3+$4+'>';\n });\n return markup;\n }\n return markup;\n\n },\n removeMarkupNamespaces : function removeMarkupNamespace(markup){\n return markup.replace(/<(\\/)?(\\w*):([^>]*)>/g, '<$1$3>');\n },\n getMarkupUsedNamespaces : function getMarkupUsedNamespaces(markup){\n var namespaces = [];\n markup.replace(/<(\\/)?(\\w*):([^>]*)>/g, function(original, slash, ns, node){\n namespaces.push(ns);\n return '<'+slash+node+'>';\n });\n return _.uniq(namespaces);\n }\n };\n\n return util;\n});\n\n","define('taoQtiItem/qtiItem/helper/rendererConfig',['lodash', 'jquery'], function(_, $){\n\n var rendererConfigHelper = {};\n\n rendererConfigHelper.getOptionsFromArguments = function(args){\n\n var options = {\n data : {},\n placeholder : null,\n subclass : '',\n renderer : null\n };\n \n _.each(args, function(arg){\n if(arg){\n if(arg.isRenderer){\n options.renderer = arg;\n }else if(arg instanceof $ && arg.length){\n options.placeholder = arg;\n }else if(_.isString(arg)){\n options.subclass = arg;\n }else if(_.isPlainObject(arg)){\n options.data = arg;\n }else{\n console.log('invalid arg', arg, args);\n }\n }\n });\n \n return options;\n };\n \n return rendererConfigHelper;\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) 2015 (original work) Open Assessment Technologies SA\n *\n */\ndefine('taoQtiItem/qtiItem/core/Element',[\n 'jquery',\n 'lodash',\n 'class',\n 'taoQtiItem/qtiItem/helper/util',\n 'taoQtiItem/qtiItem/helper/rendererConfig'\n], function($, _, Class, util, rendererConfig){\n 'use strict';\n\n var _instances = {};\n\n var Element = Class.extend({\n qtiClass : '',\n serial : '',\n relatedItem : null,\n init : function(serial, attributes){\n\n //init own attributes\n this.attributes = {};\n\n //system properties, for item creator internal use only\n this.metaData = {};\n\n //init call in the format init(attributes)\n if(typeof (serial) === 'object'){\n attributes = serial;\n serial = '';\n }\n\n if(!serial){\n serial = util.buildSerial(this.qtiClass + '_');\n }\n\n if(serial && (typeof serial !== 'string' || !serial.match(/^[a-z_0-9]*$/i))){\n throw 'invalid QTI serial : (' + (typeof serial) + ') ' + serial;\n }\n\n if(!_instances[serial]){\n _instances[serial] = this;\n this.serial = serial;\n this.setAttributes(attributes || {});\n }else{\n throw 'a QTI Element with the same serial already exists ' + serial;\n }\n\n if(typeof this.initContainer === 'function'){\n this.initContainer(arguments[2] || '');\n }\n if(typeof this.initObject === 'function'){\n this.initObject();\n }\n },\n is : function(qtiClass){\n return (qtiClass === this.qtiClass);\n },\n placeholder : function(){\n return '{{' + this.serial + '}}';\n },\n getSerial : function(){\n return this.serial;\n },\n getUsedIdentifiers : function(){\n var usedIds = {};\n var elts = this.getComposingElements();\n for(var i in elts){\n var elt = elts[i];\n var id = elt.attr('identifier');\n if(id){\n //warning: simplistic implementation, allow only one unique identifier in the item no matter the element class/type\n usedIds[id] = elt;\n }\n }\n return usedIds;\n },\n\n /**\n * Get the ids in use. (id is different from identifier)\n * @returns {Array} of the ids in use\n */\n getUsedIds : function getUsedIds(){\n var usedIds = [];\n _.forEach(this.getComposingElements(), function(elt){\n var id = elt.attr('id');\n if(id && !_.contains(usedIds, id)){\n usedIds.push(id);\n }\n });\n return usedIds;\n },\n\n attr : function(name, value){\n if(name){\n if(value !== undefined){\n this.attributes[name] = value;\n }else{\n if(typeof (name) === 'object'){\n for(var prop in name){\n this.attr(prop, name[prop]);\n }\n }else if(typeof (name) === 'string'){\n if(this.attributes[name] === undefined){\n return undefined;\n }else{\n return this.attributes[name];\n }\n }\n }\n }\n return this;\n },\n data : function(name, value){\n if(name){\n if(value !== undefined){\n this.metaData[name] = value;\n $(document).trigger('metaChange.qti-widget', {element : this, key : name, value : value});\n }else{\n if(typeof (name) === 'object'){\n for(var prop in name){\n this.data(prop, name[prop]);\n }\n }else if(typeof (name) === 'string'){\n if(this.metaData[name] === undefined){\n return undefined;\n }else{\n return this.metaData[name];\n }\n }\n }\n }\n return this;\n },\n removeData : function(name){\n delete this.metaData[name];\n return this;\n },\n removeAttr : function(name){\n return this.removeAttributes(name);\n },\n setAttributes : function(attributes){\n this.attributes = attributes;\n return this;\n },\n getAttributes : function(){\n return _.clone(this.attributes);\n },\n removeAttributes : function(attrNames){\n if(typeof (attrNames) === 'string'){\n attrNames = [attrNames];\n }\n for(var i in attrNames){\n delete this.attributes[attrNames[i]];\n }\n return this;\n },\n getComposingElements : function(){\n var elts = {};\n function append(element){\n elts[element.getSerial()] = element;//pass individual object by ref, instead of the whole list(object)\n elts = _.extend(elts, element.getComposingElements());\n }\n if(typeof this.initContainer === 'function'){\n append(this.getBody());\n }\n if(typeof this.initObject === 'function'){\n append(this.getObject());\n }\n _.each(this.metaData, function(v){\n if(Element.isA(v, '_container')){\n append(v);\n }else if(_.isArray(v)){\n _.each(v, function(v){\n if(Element.isA(v, '_container')){\n append(v);\n }\n });\n }\n });\n return elts;\n },\n getUsedClasses : function(){\n\n var ret = [this.qtiClass],\n composingElts = this.getComposingElements();\n\n _.each(composingElts, function(elt){\n ret.push(elt.qtiClass);\n });\n\n return _.uniq(ret);\n },\n find : function(serial){\n\n var found = null;\n\n if(typeof this.initObject === 'function'){\n var object = this.getObject();\n if(object.serial === serial){\n found = {'parent' : this, 'element' : object, 'location' : 'object'};\n }\n }\n\n if(!found && typeof this.initContainer === 'function'){\n found = this.getBody().find(serial, this);\n }\n\n return found;\n },\n parent : function(){\n var item = this.getRelatedItem();\n if(item){\n var found = item.find(this.getSerial());\n if(found){\n return found.parent;\n }\n }\n return null;\n },\n setRelatedItem : function(item, recursive){\n\n recursive = (typeof recursive === 'undefined') ? true : recursive;\n\n if(Element.isA(item, 'assessmentItem')){\n this.relatedItem = item;\n var composingElts = this.getComposingElements();\n for(var i in composingElts){\n composingElts[i].setRelatedItem(item, false);\n }\n }\n\n },\n getRelatedItem : function(){\n var ret = null;\n if(Element.isA(this.relatedItem, 'assessmentItem')){\n ret = this.relatedItem;\n }\n return ret;\n },\n setRenderer : function(renderer){\n if(renderer && renderer.isRenderer){\n this.renderer = renderer;\n var elts = this.getComposingElements();\n for(var serial in elts){\n elts[serial].setRenderer(renderer);\n }\n }else{\n throw 'invalid qti rendering engine';\n }\n },\n getRenderer : function(){\n return this.renderer;\n },\n render : function(){\n\n var args = rendererConfig.getOptionsFromArguments(arguments);\n var _renderer = args.renderer || this.getRenderer();\n\n var tplData = {},\n defaultData = {\n 'tag' : this.qtiClass,\n 'serial' : this.serial,\n 'attributes' : this.getAttributes()\n };\n\n if(!_renderer){\n throw 'render: no renderer found for the element ' + this.qtiClass + ':' + this.serial;\n }\n\n if(typeof this.initContainer === 'function'){\n //allow body to have a different renderer if it has its own renderer set\n defaultData.body = this.getBody().render(args.renderer);\n }\n if(typeof this.initObject === 'function'){\n defaultData.object = {\n attributes : this.object.getAttributes()\n };\n defaultData.object.attributes.data = _renderer.resolveUrl(this.object.attr('data'));\n }\n\n tplData = _.merge(defaultData, args.data || {});\n tplData = _renderer.getData(this, tplData, args.subclass);\n var rendering = _renderer.renderTpl(this, tplData, args.subclass);\n if(args.placeholder){\n args.placeholder.replaceWith(rendering);\n }\n\n return rendering;\n },\n postRender : function(data, altClassName, renderer){\n\n var postRenderers = [];\n var _renderer = renderer || this.getRenderer();\n\n if(typeof this.initContainer === 'function'){\n //allow body to have a different renderer if it has its own renderer set\n postRenderers = this.getBody().postRender({}, '', renderer);\n }\n\n if(_renderer){\n postRenderers.push(_renderer.postRender(this, data, altClassName));\n }else{\n throw 'postRender: no renderer found for the element ' + this.qtiClass + ':' + this.serial;\n }\n\n return _.compact(postRenderers);\n },\n getContainer : function($scope, subclass){\n var renderer = this.getRenderer();\n if(renderer){\n return renderer.getContainer(this, $scope, subclass);\n }else{\n throw 'getContainer: no renderer found for the element ' + this.qtiClass + ':' + this.serial;\n }\n },\n toArray : function(){\n var arr = {\n serial : this.serial,\n type : this.qtiClass,\n attributes : this.getAttributes()\n };\n\n if(typeof this.initContainer === 'function'){\n arr.body = this.getBody().toArray();\n }\n if(typeof this.initObject === 'function'){\n arr.object = this.object.toArray();\n }\n\n return arr;\n },\n isEmpty : function(){\n //tells whether the element should be considered empty or not, from the rendering point of view\n return false;\n },\n addClass : function(className){\n var clazz = this.attr('class') || '';\n if(!_containClass(clazz, className)){\n this.attr('class', clazz + (clazz.length ? ' ' : '') + className);\n }\n },\n hasClass : function(className){\n return _containClass(this.attr('class'), className);\n },\n removeClass : function(className){\n\n var clazz = this.attr('class') || '';\n if(clazz){\n\n var regex = new RegExp('(?:^|\\\\s)' + className + '(?:\\\\s|$)');\n clazz = clazz.replace(regex, ' ').trim();\n\n if(clazz){\n this.attr('class', clazz);\n }else{\n this.removeAttr('class');\n }\n }\n },\n /**\n * Add or remove class. Setting the optional state will force addition/removal.\n * State is here to keep the jQuery syntax\n *\n * @param {String} className\n * @param {Boolean} [state]\n */\n toggleClass : function(className, state) {\n\n if(typeof state === 'boolean') {\n return state ? this.addClass(className) : this.removeClass(className);\n }\n\n if(this.hasClass(className)) {\n return this.removeClass(className);\n }\n return this.addClass(className);\n },\n isset : function(){\n return Element.issetElement(this.serial);\n },\n unset : function(){\n return Element.unsetElement(this.serial);\n }\n });\n\n var _containClass = function(allClassStr, className){\n var regex = new RegExp('(?:^|\\\\s)' + className + '(?:\\\\s|$)', '');\n return allClassStr && regex.test(allClassStr);\n };\n\n //helpers\n Element.isA = function(qtiElement, qtiClass){\n return (qtiElement instanceof Element && qtiElement.is(qtiClass));\n };\n\n Element.getElementBySerial = function(serial){\n return _instances[serial];\n };\n\n Element.issetElement = function(serial){\n return !!_instances[serial];\n };\n\n /**\n * Unset a registered element from it's serial\n * @param {String} serial - the element serial\n * @returns {Boolean} true if unset\n */\n Element.unsetElement = function(serial){\n\n var element = Element.getElementBySerial(serial);\n\n if(element){\n\n var composingElements = element.getComposingElements();\n _.each(composingElements, function(elt){\n delete _instances[elt.serial];\n });\n delete _instances[element.serial];\n\n return true;\n }\n return false;\n };\n\n return Element;\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) 2015 (original work) Open Assessment Technologies SA ;\n *\n */\n//@todo : move this to the ../helper directory\ndefine('taoQtiItem/qtiItem/core/Loader',['lodash', 'class', 'taoQtiItem/qtiItem/core/qtiClasses', 'taoQtiItem/qtiItem/core/Element'], function(_, Class, qtiClasses, Element){\n\n var Loader = Class.extend({\n init : function(item, classesLocation){\n\n this.qti = {}; //loaded qti classes are store here\n this.classesLocation = {};\n\n this.item = item || null;//starts either from scratch or with an existing item object\n this.setClassesLocation(classesLocation || qtiClasses);//load default location for qti classes model\n },\n setClassesLocation : function(qtiClasses){\n _.extend(this.classesLocation, qtiClasses);\n return this;\n },\n getRequiredClasses : function(data){\n var ret = [];\n for(var i in data){\n if(i === 'qtiClass' && data[i] !== '_container' && i !== 'relatedItem'){//although a _container is a concrete class in TAO, it is not defined in QTI standard\n ret.push(data[i]);\n }else if(typeof(data[i]) === 'object' && i !== 'responseRules'){ //responseRules should'nt be part of the parsing\n ret = _.union(ret, this.getRequiredClasses(data[i]));\n }\n }\n return ret;\n },\n loadRequiredClasses : function(data, callback, reload){\n\n var requiredClasses = this.getRequiredClasses(data, reload), required = [];\n\n for(var i in requiredClasses){\n var requiredClass = requiredClasses[i];\n if(this.classesLocation[requiredClass]){\n required.push(this.classesLocation[requiredClass]);\n }else{\n throw new Error('missing qti class location declaration : ' + requiredClass);\n }\n }\n\n var _this = this;\n require(required, function(){\n _.each(arguments, function(QtiClass){\n _this.qti[QtiClass.prototype.qtiClass] = QtiClass;\n });\n callback.call(_this, _this.qti);\n });\n },\n getLoadedClasses : function(){\n return _.keys(this.qti);\n },\n loadItemData : function(data, callback){\n\n var _this = this;\n _this.loadRequiredClasses(data, function(Qti){\n var i;\n if(typeof(data) === 'object' && data.qtiClass === 'assessmentItem'){\n\n //unload an item from it's serial (in case of a reload)\n if(data.serial){\n Element.unsetElement(data.serial);\n }\n\n _this.item = new Qti.assessmentItem(data.serial, data.attributes || {});\n _this.loadContainer(_this.item.getBody(), data.body);\n\n for(i in data.outcomes){\n var outcome = _this.buildOutcome(data.outcomes[i]);\n if(outcome){\n _this.item.addOutcomeDeclaration(outcome);\n }\n }\n for(i in data.feedbacks){\n var feedback = _this.buildElement(data.feedbacks[i]);\n if(feedback){\n _this.item.addModalFeedback(feedback);\n }\n }\n for(i in data.stylesheets){\n var stylesheet = _this.buildElement(data.stylesheets[i]);\n if(stylesheet){\n _this.item.addStylesheet(stylesheet);\n }\n }\n \n //important : build responses after all modal feedbacks and outcomes has been loaded, because the simple feedback rules need to reference them\n for(i in data.responses){\n var response = _this.buildResponse(data.responses[i]);\n if(response){\n _this.item.addResponseDeclaration(response);\n\n var feedbackRules = data.responses[i].feedbackRules;\n if(feedbackRules){\n _.forIn(feedbackRules, function(fbData, serial){\n response.feedbackRules[serial] = _this.buildSimpleFeedbackRule(fbData, response);\n });\n }\n }\n }\n \n if(data.responseProcessing){\n _this.item.setResponseProcessing(_this.buildResponseProcessing(data.responseProcessing));\n }\n _this.item.setNamespaces(data.namespaces);\n _this.item.setSchemaLocations(data.schemaLocations);\n _this.item.setApipAccessibility(data.apipAccessibility);\n }\n\n if(typeof(callback) === 'function'){\n callback.call(_this, _this.item);\n }\n });\n },\n loadAndBuildElement : function(data, callback){\n\n var _this = this;\n\n _this.loadRequiredClasses(data, function(Qti){\n\n var element = _this.buildElement(data);\n\n if(typeof(callback) === 'function'){\n callback.call(_this, element);\n }\n });\n },\n loadElement : function(element, data, callback){\n\n var _this = this;\n this.loadRequiredClasses(data, function(){\n _this.loadElementData(element, data);\n if(typeof(callback) === 'function'){\n callback.call(_this, element);\n }\n });\n },\n /**\n * Load ALL given elements into existing loaded item\n *\n * @todo to be renamed to loadItemElements\n * @param {object} data\n * @param {function} callback\n * @returns {undefined}\n */\n loadElements : function(data, callback){\n\n var _this = this;\n\n if(_this.item){\n\n this.loadRequiredClasses(data, function(){\n\n var allElements = _this.item.getComposingElements();\n\n for(var i in data){\n var elementData = data[i];\n if(elementData && elementData.qtiClass && elementData.serial){\n //find and update element\n if(allElements[elementData.serial]){\n _this.loadElementData(allElements[elementData.serial], elementData);\n }\n }\n }\n\n if(typeof(callback) === 'function'){\n callback.call(_this, _this.item);\n }\n });\n }else{\n throw 'QtiLoader : cannot load elements in empty item';\n }\n\n },\n buildResponse : function(data){\n\n var response = this.buildElement(data);\n\n response.template = data.howMatch || null;\n response.defaultValue = data.defaultValue || null;\n response.correctResponse = data.correctResponses || null;\n\n if(_.size(data.mapping)){\n response.mapEntries = data.mapping;\n }else if(_.size(data.areaMapping)){\n response.mapEntries = data.areaMapping;\n }else{\n response.mapEntries = {};\n }\n\n response.mappingAttributes = data.mappingAttributes || {};\n\n return response;\n },\n buildSimpleFeedbackRule : function(data, response){\n\n var feedbackRule = this.buildElement(data);\n \n feedbackRule.setCondition(response, data.condition, data.comparedValue || null);\n \n// feedbackRule.comparedOutcome = this.item.responses[data.comparedOutcome] || null;\n feedbackRule.feedbackOutcome = this.item.outcomes[data.feedbackOutcome] || null;\n feedbackRule.feedbackThen = this.item.modalFeedbacks[data.feedbackThen] || null;\n feedbackRule.feedbackElse = this.item.modalFeedbacks[data.feedbackElse] || null;\n \n //associate the compared outcome to the feedbacks if applicable\n var response = feedbackRule.comparedOutcome;\n if(feedbackRule.feedbackThen){\n feedbackRule.feedbackThen.data('relatedResponse', response);\n }\n if(feedbackRule.feedbackElse){\n feedbackRule.feedbackElse.data('relatedResponse', response);\n }\n \n return feedbackRule;\n },\n buildOutcome : function(data){\n var outcome = this.buildElement(data);\n outcome.defaultValue = data.defaultValue || null;\n return outcome;\n },\n buildResponseProcessing : function(data){\n var rp = this.buildElement(data);\n if(data && data.processingType){\n if(data.processingType === 'custom'){\n rp.xml = data.data;\n rp.processingType = 'custom';\n }else{\n rp.processingType = 'templateDriven';\n }\n }\n return rp;\n },\n loadContainer : function(bodyObject, bodyData){\n if(!Element.isA(bodyObject, '_container')){\n throw 'bodyObject must be a QTI Container';\n }\n\n if(bodyData && typeof bodyData.body === 'string' && (typeof bodyData.elements === 'array' || typeof bodyData.elements === 'object')){\n for(var serial in bodyData.elements){\n var eltData = bodyData.elements[serial];\n //check if class is loaded:\n var element = this.buildElement(eltData);\n if(element){\n bodyObject.setElement(element, bodyData.body);\n }\n }\n bodyObject.body(bodyData.body);\n }else{\n throw 'wrong bodydata format';\n }\n },\n buildElement : function(elementData){\n var elt = null;\n if(elementData && elementData.qtiClass && elementData.serial){\n var className = elementData.qtiClass;\n if(this.qti[className]){\n elt = new this.qti[className](elementData.serial);\n this.loadElementData(elt, elementData);\n }else{\n throw 'the qti element class does not exist: ' + className;\n }\n }else{\n throw 'wrong elementData format';\n }\n return elt;\n },\n loadElementData : function(element, data){\n\n //merge attributes when loading element data\n var attributes = _.defaults(data.attributes || {}, element.attributes || {});\n element.setAttributes(attributes);\n\n if(element.body && data.body){\n if(element.bdy){\n this.loadContainer(element.getBody(), data.body);\n }\n }\n\n if(element.object && data.object){\n if(element.object){\n this.loadObjectData(element.object, data.object);\n }\n }\n\n if(Element.isA(element, 'interaction')){\n this.loadInteractionData(element, data);\n }else if(Element.isA(element, 'choice')){\n this.loadChoiceData(element, data);\n }else if(Element.isA(element, 'math')){\n this.loadMathData(element, data);\n }else if(Element.isA(element, 'infoControl')){\n this.loadPicData(element, data);\n }\n\n return element;\n },\n loadInteractionData : function(interaction, data){\n if(Element.isA(interaction, 'blockInteraction')){\n if(data.prompt){\n this.loadContainer(interaction.prompt.getBody(), data.prompt);\n }\n }\n\n this.buildInteractionChoices(interaction, data);\n\n if(Element.isA(interaction, 'customInteraction')){\n this.loadPciData(interaction, data);\n }\n },\n buildInteractionChoices : function(interaction, data){\n\n //note: Qti.ContainerInteraction (Qti.GapMatchInteraction and Qti.HottextInteraction) has already been parsed by builtElement(interacionData);\n if(data.choices){\n if(Element.isA(interaction, 'matchInteraction')){\n for(var set = 0; set < 2; set++){\n if(!data.choices[set]){\n throw 'missing match set #' + set;\n }\n var matchSet = data.choices[set];\n for(var serial in matchSet){\n var choice = this.buildElement(matchSet[serial]);\n if(choice){\n interaction.addChoice(choice, set);\n }\n }\n }\n }else{\n for(var serial in data.choices){\n var choice = this.buildElement(data.choices[serial]);\n if(choice){\n interaction.addChoice(choice);\n }\n }\n }\n\n if(Element.isA(interaction, 'graphicGapMatchInteraction')){\n if(data.gapImgs){\n for(var serial in data.gapImgs){\n var gapImg = this.buildElement(data.gapImgs[serial]);\n if(gapImg){\n interaction.addGapImg(gapImg);\n }\n }\n }\n }\n\n }\n\n },\n loadChoiceData : function(choice, data){\n if(Element.isA(choice, 'textVariableChoice')){\n choice.val(data.text);\n }else if(Element.isA(choice, 'gapImg')){\n //has already been taken care of in buildElement()\n }else if(Element.isA(choice, 'containerChoice')){\n //has already been taken care of in buildElement()\n }\n },\n loadObjectData : function(object, data){\n object.setAttributes(data.attributes);\n //@todo: manage object like a container\n if(data._alt){\n if(data._alt.qtiClass === 'object'){\n object._alt = Loader.buildElement(data._alt);\n }else{\n object._alt = data._alt;\n }\n }\n },\n loadMathData : function(math, data){\n math.ns = data.ns || {};\n math.setMathML(data.mathML || '');\n _.forIn(data.annotations || {}, function(value, encoding){\n math.setAnnotation(encoding, value);\n });\n },\n loadPciData : function(pci, data){\n loadPortableCustomElementData(pci, data);\n },\n loadPicData : function(pic, data){\n loadPortableCustomElementData(pic, data);\n }\n });\n\n function loadPortableCustomElementData(portableElement, data){\n portableElement.typeIdentifier = data.typeIdentifier;\n portableElement.markup = data.markup;\n portableElement.entryPoint = data.entryPoint;\n portableElement.properties = data.properties;\n portableElement.libraries = data.libraries;\n }\n\n return Loader;\n});\n\n","/**\n * Common helper functions\n */\ndefine('taoQtiItem/qtiItem/helper/interactionHelper',['lodash', 'taoQtiItem/qtiItem/core/Element'], function(_, Element){\n return {\n convertChoices : function(choices, outputType){\n\n var ret = [], _this = this;\n\n _.each(choices, function(c){\n if(Element.isA(c, 'choice')){\n switch(outputType){\n case 'serial':\n ret.push(c.getSerial());\n break;\n case 'identifier':\n ret.push(c.id());\n break;\n default:\n ret.push(c);\n }\n\n }else if(_.isArray(c)){\n ret.push(_this.convertChoices(c, outputType));\n }\n });\n\n return ret;\n },\n findChoices : function(interaction, choices, inputType){\n\n var ret = [], _this = this;\n\n _.each(choices, function(c){\n var choice;\n if(_.isString(c)){\n if(inputType === 'serial'){\n choice = interaction.getChoice(c);\n if(choice){\n ret.push(choice);\n }\n }else if(inputType === 'identifier'){\n choice = interaction.getChoiceByIdentifier(c);\n if(choice){\n ret.push(choice);\n }\n }else{\n ret.push(c);\n }\n }else if(_.isArray(c)){\n ret.push(_this.findChoices(interaction, c, inputType));\n }else{\n ret.push(c);\n }\n });\n\n return ret;\n },\n shuffleChoices : function(choices){\n var r = [], //returned array\n f = {}, //fixed choices array\n j = 0;\n\n for(var i in choices){\n if(Element.isA(choices[i], 'choice')){\n var choice = choices[i];\n if(choice.attr('fixed')){\n f[j] = choice;\n }\n r.push(choice);\n j++;\n }else{\n throw 'invalid element in array: is not a qti choice';\n }\n }\n\n for(var n = 0; n < r.length - 1; n++){\n if(f[n]){\n continue;\n }\n var k = -1;\n do{\n k = n + Math.floor(Math.random() * (r.length - n));\n }while(f[k]);\n var tmp = r[k];\n r[k] = r[n];\n r[n] = tmp;\n }\n\n return r;\n },\n serialToIdentifier : function(interaction, choiceSerial){\n var choice = interaction.getChoice(choiceSerial);\n if(choice){\n return choice.id();\n }else{\n return '';\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 (original work) Open Assessment Technlogies SA (under the project TAO-PRODUCT);\n *\n */\n\n/**\n * A factory to create a QTI renderer.\n *\n * @author Sam Sipasseuth \n * @author Bertrand Chevrier \n */\ndefine('taoQtiItem/qtiRunner/core/Renderer',[\n 'lodash',\n 'jquery',\n 'handlebars',\n 'core/promise',\n 'taoQtiItem/qtiItem/core/Element',\n 'taoQtiItem/qtiItem/helper/interactionHelper',\n 'ui/themeLoader'\n], function(_, $, Handlebars, Promise, Element, interactionHelper, themeLoader){\n 'use strict';\n\n var _isValidRenderer = function(renderer){\n\n var valid = true;\n\n if(typeof (renderer) !== 'object'){\n return false;\n }\n\n var classCorrect = false;\n if(renderer.qtiClass){\n if(_.indexOf(_renderableClasses, renderer.qtiClass) >= 0){\n classCorrect = true;\n }else{\n var pos = renderer.qtiClass.indexOf('.');\n if(pos > 0){\n var qtiClass = renderer.qtiClass.slice(0, pos);\n var subClass = renderer.qtiClass.slice(pos + 1);\n if(_renderableSubclasses[qtiClass] && _.indexOf(_renderableSubclasses[qtiClass], subClass) >= 0){\n classCorrect = true;\n }\n }\n }\n }\n if(!classCorrect){\n valid = false;\n throw new Error('invalid qti class name in renderer declaration : ' + renderer.qtiClass);\n }\n\n if(!renderer.template){\n valid = false;\n throw new Error('missing template in renderer declaration : ' + renderer.qtiClass);\n }\n\n return valid;\n };\n\n var _renderableClasses = [\n '_container',\n 'assessmentItem',\n 'stylesheet',\n 'responseDeclaration',\n 'outcomeDeclaration',\n 'responseProcessing',\n '_simpleFeedbackRule',\n 'img',\n 'math',\n 'object',\n 'modalFeedback',\n 'rubricBlock',\n 'associateInteraction',\n 'choiceInteraction',\n 'extendedTextInteraction',\n 'gapMatchInteraction',\n 'graphicAssociateInteraction',\n 'graphicGapMatchInteraction',\n 'graphicOrderInteraction',\n 'hotspotInteraction',\n 'hottextInteraction',\n 'inlineChoiceInteraction',\n 'matchInteraction',\n 'mediaInteraction',\n 'orderInteraction',\n 'selectPointInteraction',\n 'sliderInteraction',\n 'textEntryInteraction',\n 'uploadInteraction',\n 'endAttemptInteraction',\n 'customInteraction',\n 'prompt',\n 'associableHotspot',\n 'gap',\n 'gapImg',\n 'gapText',\n 'hotspotChoice',\n 'hottext',\n 'inlineChoice',\n 'simpleAssociableChoice',\n 'simpleChoice',\n 'infoControl',\n 'include'\n ];\n\n /**\n * The list of qti element dependencies. It is used internally to load dependent qti classes\n */\n var _dependencies = {\n assessmentItem : ['stylesheet', '_container', 'prompt', 'modalFeedback'],\n rubricBlock : ['_container'],\n associateInteraction : ['simpleAssociableChoice'],\n choiceInteraction : ['simpleChoice'],\n gapMatchInteraction : ['gap', 'gapText'],\n graphicAssociateInteraction : ['associableHotspot'],\n graphicGapMatchInteraction : ['associableHotspot', 'gapImg'],\n graphicOrderInteraction : ['hotspotChoice'],\n hotspotInteraction : ['hotspotChoice'],\n hottextInteraction : ['hottext'],\n inlineChoiceInteraction : ['inlineChoice'],\n matchInteraction : ['simpleAssociableChoice'],\n orderInteraction : ['simpleChoice']\n };\n\n /**\n * The list of supported qti subclasses.\n */\n var _renderableSubclasses = {\n 'simpleAssociableChoice' : ['associateInteraction', 'matchInteraction'],\n 'simpleChoice' : ['choiceInteraction', 'orderInteraction']\n };\n\n /**\n * List of the default properties for the item\n */\n var _defaults = {\n shuffleChoices : true\n };\n\n /**\n * Get the location of the document, useful to define a baseUrl for the required context\n * @returns {String}\n */\n function getDocumentBaseUrl(){\n return window.location.protocol + '//' + window.location.host + window.location.pathname.replace(/([^\\/]*)$/, '');\n }\n\n /**\n * The built Renderer class\n * @constructor\n * @param {Object} [options] - the renderer options\n * @param {AssetManager} [options.assetManager] - The renderer needs an AssetManager to resolve URLs (see {@link taoItems/assets/manager})\n * @param {Boolean} [options.shuffleChoices = true] - Does the renderer take care of the shuffling\n * @param {Object} [options.decorators] - to set up rendering decorator\n * @param {preRenderDecorator} [options.decorators.before] - to set up a pre decorator\n * @param {postRenderDecorator} [options.decorators.after] - to set up a post decorator\n */\n var Renderer = function(options){\n\n /**\n * Store the registered renderer location\n */\n var _locations = {};\n\n /**\n * Store loaded renderers\n */\n var _renderers = {};\n\n options = _.defaults(options || {}, _defaults);\n\n this.isRenderer = true;\n\n this.name = '';\n\n //store shuffled choice here\n this.shuffledChoices = [];\n\n /**\n * Get the actual renderer of the give qti class or subclass:\n * e.g. simplceChoice, simpleChoice.choiceInteraction, simpleChoice.orderInteraction\n */\n var _getClassRenderer = function(qtiClass){\n var ret = null;\n if(_renderers[qtiClass]){\n ret = _renderers[qtiClass];\n }else{\n var pos = qtiClass.indexOf('.');\n if(pos > 0){\n qtiClass = qtiClass.slice(0, pos);\n if(_renderers[qtiClass]){\n ret = _renderers[qtiClass];\n }\n }\n }\n return ret;\n };\n\n /**\n * Set the renderer options\n * @param {String} key - the name of the option\n * @param {*} value - the option vallue\n * @returns {Renderer} for chaining\n */\n this.setOption = function(key, value){\n if(typeof (key) === 'string'){\n options[key] = value;\n }\n return this;\n };\n\n /**\n * Set the renderer options\n * @param {Object} opts - the options\n * @returns {Renderer} for chaining\n */\n this.setOptions = function(opts){\n options = _.extend(options, opts);\n return this;\n };\n\n /**\n * Get the renderer option\n * @param {String} key - the name of the option\n * @returns {*|null} the option vallue\n */\n this.getOption = function(key){\n if(typeof (key) === 'string' && options[key]){\n return options[key];\n }\n return null;\n };\n\n this.getCustomMessage = function getCustomMessage(elementName, messageKey){\n var messages = this.getOption('messages');\n if(messages &&\n elementName &&\n messages[elementName] &&\n _.isString(messages[elementName][messageKey])){\n //currently not translatable but potentially could be if the need raises\n return Handlebars.compile(messages[elementName][messageKey]);\n }else{\n return null;\n }\n };\n\n /**\n * Get the bound assetManager\n * @returns {AssetManager} the assetManager\n */\n this.getAssetManager = function getAssetManager(){\n return options.assetManager;\n };\n\n /**\n * Get the bound theme loader\n * @returns {Object} the themeLoader\n */\n this.getThemeLoader = function getThemeLoader(){\n return this.themeLoader;\n };\n\n\n /**\n * Renders the template\n * @param {Object} element - the QTI model element\n * @param {Object} data - the data to give to the template\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the template results\n * @throws {Error} if the renderer is not set or has no template bound\n */\n this.renderTpl = function(element, data, qtiSubclass){\n\n var res;\n var ret = '';\n var tplFound = false;\n var qtiClass = qtiSubclass || element.qtiClass;\n var renderer = _getClassRenderer(qtiClass);\n var decorators = this.getOption('decorators');\n\n if(!renderer || !_.isFunction(renderer.template)){\n throw new Error('no renderer template loaded under the class name : ' + qtiClass);\n }\n\n //pre rendering decoration\n if(_.isObject(decorators) && _.isFunction(decorators.before)){\n\n /**\n * @callback preRenderDecoractor\n * @param {Object} element - the QTI model element\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the decorator result\n */\n res = decorators.before(element, qtiSubclass);\n if(_.isString(res)){\n ret += res;\n }\n }\n\n //render the template\n ret += renderer.template(data);\n\n\n //post rendering decoration\n if(_.isObject(decorators) && _.isFunction(decorators.after)){\n\n /**\n * @callback postRenderDecoractor\n * @param {Object} element - the QTI model element\n * @param {String} [qtiSubclass] - to get the render of the element subclass (when element's qtiClass is abstract)\n * @returns {String} the decorator result\n */\n res = decorators.after(element, qtiSubclass);\n if(_.isString(res)){\n ret += res;\n }\n }\n return ret;\n };\n\n this.getData = function(element, data, qtiSubclass){\n\n var ret = data,\n qtiClass = qtiSubclass || element.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(typeof (renderer.getData) === 'function'){\n ret = renderer.getData.call(this, element, data);\n }\n }\n\n return ret;\n };\n\n this.renderDirect = function(tpl, data){\n return Handlebars.compile(tpl)(data);\n };\n\n this.getContainer = function(qtiElement, $scope, qtiSubclass){\n\n var ret = null,\n qtiClass = qtiSubclass || qtiElement.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n ret = renderer.getContainer(qtiElement, $scope);\n }else{\n throw 'no renderer found for the class : ' + qtiElement.qtiClass;\n }\n return ret;\n };\n\n this.postRender = function(qtiElement, data, qtiSubclass){\n\n var qtiClass = qtiSubclass || qtiElement.qtiClass;\n var renderer = _getClassRenderer(qtiClass);\n\n if(renderer && typeof (renderer.render) === 'function') {\n return renderer.render.call(this, qtiElement, data);\n }\n };\n\n this.setResponse = function(qtiInteraction, response, qtiSubclass){\n\n var ret = false,\n qtiClass = qtiSubclass || qtiInteraction.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(typeof (renderer.setResponse) === 'function'){\n ret = renderer.setResponse.call(this, qtiInteraction, response);\n var $container = renderer.getContainer.call(this, qtiInteraction);\n if($container instanceof $ && $container.length){\n $container.trigger('responseSet', [qtiInteraction, response]);\n }\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n return ret;\n };\n\n this.getResponse = function(qtiInteraction, qtiSubclass){\n\n var ret = false,\n qtiClass = qtiSubclass || qtiInteraction.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(typeof (renderer.getResponse) === 'function'){\n ret = renderer.getResponse.call(this, qtiInteraction);\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n return ret;\n };\n\n this.resetResponse = function(qtiInteraction, qtiSubclass){\n\n var ret = false,\n qtiClass = qtiSubclass || qtiInteraction.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(typeof (renderer.resetResponse) === 'function'){\n ret = renderer.resetResponse.call(this, qtiInteraction);\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n return ret;\n };\n\n /**\n * Retrieve the state of the interaction.\n * If the renderer has no state management, it falls back to the response management.\n *\n * @param {Object} qtiInteraction - the interaction\n * @param {String} [qtiSubClass] - (not sure of the type and how it is used - Sam ? )\n * @returns {Object} the interaction's state\n *\n * @throws {Error} if no renderer is registered\n */\n this.getState = function(qtiInteraction, qtiSubclass){\n\n var ret = false;\n var qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n var renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(_.isFunction(renderer.getState)){\n ret = renderer.getState.call(this, qtiInteraction);\n } else {\n ret = renderer.getResponse.call(this, qtiInteraction);\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n return ret;\n };\n\n /**\n * Retrieve the state of the interaction.\n * If the renderer has no state management, it falls back to the response management.\n *\n * @param {Object} qtiInteraction - the interaction\n * @param {Object} state - the interaction's state\n * @param {String} [qtiSubClass] - (not sure of the type and how it is used - Sam ? )\n *\n * @throws {Error} if no renderer is found\n */\n this.setState = function(qtiInteraction, state, qtiSubclass){\n\n var qtiClass = qtiSubclass || qtiInteraction.qtiClass;\n var renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(_.isFunction(renderer.setState)){\n renderer.setState.call(this, qtiInteraction, state);\n } else {\n renderer.resetResponse.call(this, qtiInteraction);\n renderer.setResponse.call(this, qtiInteraction, state);\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n };\n\n /**\n * Calls the renderer destroy.\n * Ask the renderer to run destroy if exists.\n *\n * @throws {Error} if no renderer is found\n */\n this.destroy = function(qtiInteraction, qtiSubclass){\n\n var ret = false,\n qtiClass = qtiSubclass || qtiInteraction.qtiClass,\n renderer = _getClassRenderer(qtiClass);\n\n if(renderer){\n if(_.isFunction(renderer.destroy)){\n ret = renderer.destroy.call(this, qtiInteraction);\n }\n }else{\n throw 'no renderer registered under the name : ' + qtiClass;\n }\n return ret;\n };\n\n this.getLoadedRenderers = function(){\n return _renderers;\n };\n\n this.register = function(renderersLocations){\n _.extend(_locations, renderersLocations);\n };\n\n this.load = function(callback, requiredClasses){\n var self = this;\n var required = [];\n\n if(options.themes){\n\n //resolve themes paths\n options.themes.base = this.resolveUrl(options.themes.base);\n _.forEach(options.themes.available, function(theme, index){\n options.themes.available[index].path = self.resolveUrl(theme.path);\n });\n this.themeLoader = themeLoader(options.themes).load();\n }\n\n if(requiredClasses){\n if(_.isArray(requiredClasses)){\n\n //exclude abstract classes\n requiredClasses = _.intersection(requiredClasses, _renderableClasses);\n\n //add dependencies\n _.each(requiredClasses, function(reqClass){\n var deps = _dependencies[reqClass];\n if(deps){\n requiredClasses = _.union(requiredClasses, deps);\n }\n });\n\n _.forEach(requiredClasses, function(qtiClass){\n\n if(_renderableSubclasses[qtiClass]){\n var requiredSubClasses = _.intersection(requiredClasses, _renderableSubclasses[qtiClass]);\n _.each(requiredSubClasses, function(subclass){\n if(_locations[qtiClass + '.' + subclass]){\n required.push(_locations[qtiClass + '.' + subclass]);\n }else if(_locations[qtiClass]){\n required.push(_locations[qtiClass]);\n }else{\n throw new Error(self.name + ' : missing qti class location declaration: ' + qtiClass + ', subclass: ' + subclass);\n }\n });\n } else {\n if(_locations[qtiClass] === false){\n _renderers[qtiClass] = false;//mark this class as not renderable\n }else if(_locations[qtiClass]){\n required.push(_locations[qtiClass]);\n }else{\n throw new Error(self.name + ' : missing qti class location declaration: ' + qtiClass);\n }\n }\n });\n } else {\n throw new Error('invalid argument type: expected array for arg \"requireClasses\"');\n }\n\n }else{\n required = _.values(_locations);\n }\n\n var _this = this;\n require(required, function(){\n\n _.each(arguments, function(clazz){\n if(_isValidRenderer(clazz)){\n _renderers[clazz.qtiClass] = clazz;\n }\n });\n\n if(typeof (callback) === 'function'){\n callback.call(_this, _renderers);\n }\n });\n\n return this;\n };\n\n /**\n * Unload the renderer\n */\n this.unload = function unload(){\n if(this.themeLoader){\n themeLoader(options.themes).unload();\n }\n return this;\n };\n\n /**\n * Define the shuffling manually\n *\n * @param {Object} interaction - the interaction\n * @param {Array} choices - the shuffled choices\n * @param {String} identificationType -\n */\n this.setShuffledChoices = function(interaction, choices, identificationType){\n if(Element.isA(interaction, 'interaction')){\n this.shuffledChoices[interaction.getSerial()] = _.pluck(interactionHelper.findChoices(interaction, choices, identificationType), 'serial');\n }\n };\n\n /**\n * Get the choices shuffled for this interaction.\n *\n * @param {Object} interaction - the interaction\n * @param {Boolean} reshuffle - by default choices are shuffled only once and store, but if true you can force shuffling again\n * @param {String} returnedType - the choice type\n * @returns {Array} the choices\n */\n this.getShuffledChoices = function(interaction, reshuffle, returnedType){\n var choices = [];\n var shuffled = [];\n var serial, i;\n\n if(Element.isA(interaction, 'interaction')){\n serial = interaction.getSerial();\n\n //1st time, we shuffle (or asked to force shuffling)\n if(!this.shuffledChoices[serial] || reshuffle){\n if(Element.isA(interaction, 'matchInteraction')){\n this.shuffledChoices[serial] = [];\n for(i = 0; i < 2; i++){\n choices[i] = interactionHelper.shuffleChoices(interaction.getChoices(i));\n this.shuffledChoices[serial][i] = _.pluck(choices[i], 'serial');\n }\n } else {\n choices = interactionHelper.shuffleChoices(interaction.getChoices());\n this.shuffledChoices[serial] = _.pluck(choices, 'serial');\n }\n\n //otherwise get the choices from the serials\n } else {\n if(Element.isA(interaction, 'matchInteraction')){\n _.forEach(choices, function(choice, index){\n if(index < 2){\n _.forEach(this.shuffledChoices[serial][i], function(choiceSerial){\n choice.push(interaction.getChoice(choiceSerial));\n });\n }\n });\n } else {\n _.forEach(this.shuffledChoices[serial], function(choiceSerial){\n choices.push(interaction.getChoice(choiceSerial));\n });\n }\n }\n\n //do some type convertion\n if(returnedType === 'serial' || returnedType === 'identifier'){\n return interactionHelper.convertChoices(choices, returnedType);\n }\n\n //pass value only, not ref\n return _.clone(choices);\n }\n\n return [];\n };\n\n this.getRenderers = function(){\n return _renderers;\n };\n\n this.getLocations = function(){\n return _locations;\n };\n\n /**\n * Resolve URLs using the defined assetManager's strategies\n * @param {String} url - the URL to resolve\n * @returns {String} the resolved URL\n */\n this.resolveUrl = function resolveUrl(url){\n if(!options.assetManager){\n return url;\n }\n if(typeof url === 'string' && url.length > 0){\n return options.assetManager.resolve(url);\n }\n };\n\n /**\n * @deprecated in favor of resolveUrl\n */\n this.getAbsoluteUrl = function(relUrl){\n\n //let until method is removed\n console.warn('DEPRECATED used getAbsoluteUrl with ', arguments);\n\n //allow relative url output only if explicitely said so\n if(this.getOption('userRelativeUrl')){\n return relUrl.replace(/^\\.?\\//, '');\n }\n\n if(/^http(s)?:\\/\\//i.test(relUrl) || /^data:[^\\/]+\\/[^;]+(;charset=[\\w]+)?;base64,/.test(relUrl)){\n //already absolute or base64 encoded\n return relUrl;\n }else{\n\n var absUrl = '';\n var runtimeLocations = this.getOption('runtimeLocations');\n\n if(runtimeLocations && _.size(runtimeLocations)){\n _.forIn(runtimeLocations, function(runtimeLocation, typeIdentifier){\n if(relUrl.indexOf(typeIdentifier) === 0){\n absUrl = relUrl.replace(typeIdentifier, runtimeLocation);\n return false;//break\n }\n });\n }\n\n if(absUrl){\n return absUrl;\n }else{\n var baseUrl = this.getOption('baseUrl') || getDocumentBaseUrl();\n return baseUrl + relUrl;\n }\n\n }\n };\n };\n\n /**\n * Expose the renderer's factory\n * @exports taoQtiItem/qtiRunner/core/Renderer\n */\n return {\n\n /**\n * Creates a new Renderer by extending the Renderer's prototype\n * @param {Object} renderersLocations -\n * @param {String} [name] - the new renderer name\n * @param {Object} [defaultOptions] - the renderer options\n */\n build : function(renderersLocations, name, defaultOptions){\n var NewRenderer = function(){\n var options = _.isPlainObject(arguments[0]) ? arguments[0] : {};\n\n Renderer.apply(this);\n\n this.register(renderersLocations);\n this.name = name || '';\n this.setOptions(_.defaults(options, defaultOptions || {}));\n };\n NewRenderer.prototype = Renderer.prototype;\n return NewRenderer;\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) 2015 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n * The asset manager proposes you to resolve your asset URLs for you!\n * You need to add the resolution strategies, it will then evaluate each strategy until the right one is found\n *\n * @author Bertrand Chevrier \n */\ndefine('taoItems/assets/manager',[\n 'lodash',\n 'util/url'\n], function(_, urlUtil){\n 'use strict';\n\n /**\n * @typedef AssetStrategy Defines a way to resolve an asset path\n * @property {String} name - the strategy name\n * @property {assetStrategyHandle} handle - how to resolve the strategy.\n */\n\n /**\n * @callback assetStrategyHandle\n * @param {String|Object} url - the URL to resolved. If parseUrl, it's an object that contains host, port, search, queryString, etc.\n * @param {Object} data - the context data\n * @returns {String?} falsy if not resolved otherwise the resolved URL\n */\n\n\n /**\n * The assetManagerFactory create a new assetManager with the given resolution stratgies and a data context.\n *\n * @example\n * //define AssetStrategies with a name and a handle method\n * var strategies = [{\n * name : 'external',\n * handle : function(url, data){\n * if(/^http/.test(url)){\n * return path;\n * }\n * }\n * }, {\n * name : 'relative',\n * handle : function(url, data){\n * if(/^((\\.\\/)|(\\w\\/))/){\n * return data.baseUrl + '/' + url ;\n * }\n * }\n * }]);\n *\n * var assetManager = assetManagerFactory(strategies, { baseUrl : 'http://t.oa/public/assets/' });\n * assetManager.resolve('http://foo/bar.png'); //will resolved using external\n * assetManager.resolve('bar.png'); //will resolved using relative strategy\n *\n * @param {AssetStrategy[]} strategies - the strategies\n * @param {Object} data - the context data\n * @param {Object} [options] - the manager options\n * @param {Boolean} [options.parseUrl = true] - If the URL to give to the stragies should be parsed or given as it is.\n * @param {Boolean} [options.cache] - resolve the same URL only once and store the result in memory.\n *\n * @exports taoItems/assets/manager\n * @namespace assetManagerFactory\n */\n var assetManagerFactory = function assetManagerFactory(strategies, data, options) {\n\n var cache = {};\n\n strategies = _.isArray(strategies) ? strategies : [strategies];\n data = data || {};\n options = _.defaults(options || {}, {\n parseUrl : true\n });\n\n /**\n * A brand new asset manager is created by the factory\n */\n var assetManager = {\n\n /**\n * The stack of strategies that would be used to resolve the asset path\n * @type {AssetStrategy[]}\n */\n _strategies : [],\n\n /**\n * Add an asset resolution strategy.\n * The strategies will be evaluated in the order they've been added.\n * @param {AssetStrategy} strategy - the strategy to add\n * @throws {TypeError} if the strategy isn't defined correctly\n */\n addStrategy : function addStrategy (strategy){\n\n if(!_.isPlainObject(strategy) || !_.isFunction(strategy.handle) || !_.isString(strategy.name)){\n throw new TypeError('An asset resolution strategy is an object with a handle method and a name');\n }\n\n this._strategies.push(strategy);\n },\n\n /**\n * Change the strategies\n * @param {AssetStrategy[]} strategies - the strategies\n * @throws {TypeError} if the strategy isn't defined correctly\n */\n setStrategies : function setStrategies(newStrategies){\n var self = this;\n\n this._strategies = [];\n\n //assign the strategies to the assetManager\n _.forEach(newStrategies, function(strategy){\n\n //if it's an object we add it directly\n if(_.isPlainObject(strategy)){\n assetManager.addStrategy(strategy);\n\n //if it's a function, we create the strategy with a generated name\n } else if(_.isFunction(strategy)){\n self.addStrategy({\n name : 'strategy_' + (self._strategies.length + 1),\n handle : strategy\n });\n }\n });\n },\n\n /**\n * Set context data\n * @param {String|Object} [key] - the key of the data to set or the data values if it's an object\n * @param {*} [value] - the value to set if a key is given\n */\n setData : function setData(key, value){\n if(_.isString(key) && typeof value !== 'undefined'){\n data[key] = value;\n } else if(_.isPlainObject(key)){\n data = key;\n }\n },\n\n /**\n * Get context data\n * @param {String} [key] - if we want the value of a particuar key\n * @returns {Object|*} all the data or the proprety value if key is given\n */\n getData : function getData(key){\n if(_.isString(key)){\n return data[key];\n }\n return data;\n },\n\n /**\n * Resolve the given URL against the strategies\n * @param {String} url - the URL to resolve\n * @returns {String?} the resolved URL or nothing\n */\n resolve : function resolve(url){\n var resolved;\n var inputUrl;\n\n //if caching try to load the value from the cache\n if(options.cache && cache.hasOwnProperty(url)){\n return cache[url];\n }\n\n //parse the url ?\n inputUrl = options.parseUrl ? urlUtil.parse(url) : url;\n\n //call strategies handlers, in their order until once returns somethin\n _.forEach(this._strategies, function(strategy){\n var result = strategy.handle(inputUrl, data);\n if(result){\n resolved = result;\n return false;\n }\n });\n\n resolved = resolved || '';\n\n if(options.cache){\n cache[url] = resolved;\n }\n\n return resolved;\n },\n\n /**\n * Resolve the given URL against the strategy identified by the given name\n * @param {String} name - the strategy name\n * @param {String} url - the URL to resolve\n * @returns {String?} the resolved URL or nothing\n */\n resolveBy : function resolveBy(name, url){\n var inputUrl;\n var resolved = '';\n var strategy = _.find(this._strategies, {name : name});\n if(strategy){\n //parse the url ?\n inputUrl = options.parseUrl ? urlUtil.parse(url) : url;\n resolved = strategy.handle(inputUrl, data);\n }\n return resolved;\n },\n\n /**\n * When the cache is used, it could be useful to clear the cache\n */\n clearCache : function clearCache(){\n if(options.cache){\n cache = {};\n }\n }\n };\n\n assetManager.setStrategies(strategies);\n\n return assetManager;\n };\n\n return assetManagerFactory;\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) 2015 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n * Provides common strategies to resolved assets\n * that may be used by any type of items.\n *\n * @author Bertrand Chevrier \n */\ndefine('taoItems/assets/strategies',[\n 'util/url'\n], function(urlUtil){\n 'use strict';\n\n /**\n * Prepend a base to an URL\n * @param {Object} url - a parsed URL\n * @param {String} base - the base to prepend\n * @param {Boolean} [slashcat = false] - remove dots, double slashes, etc.\n * @returns {String} the URL\n */\n var prependToUrl = function prependToUrl(url, base, slashcat){\n\n //is slashcat we manage slash concact\n if(slashcat === true){\n return base.replace(/\\/$/, '') + '/' + url.directory.replace(/^\\.\\//, '').replace(/^\\//, '')\n + encodeURIComponent(url.file.replace(/^\\.\\//, '').replace(/^\\//, ''));\n }\n\n return base + url.directory.replace(/^\\.?\\//, '') + encodeURIComponent(url.file.replace(/^\\.?\\//, ''));\n };\n\n /**\n * Unrelated strategies accessible by there name.\n * Remember to not use the whole object, but each one in an array since the order matters.\n *\n * @exports taoItems/assets/strategies\n */\n var strategies = {\n\n //the baseUrl concats the baseUrl in data if the url is relative\n baseUrl : {\n name : 'baseUrl',\n handle : function handleBaseUrl(url, data){\n if(typeof data.baseUrl === 'string' && (urlUtil.isRelative(url)) ){\n return prependToUrl(url, data.baseUrl, data.slashcat);\n }\n }\n },\n\n //bust the cache for item CSS\n itemCssNoCache : {\n name : 'itemCssNoCache',\n handle : function handleItemCss(url, data){\n if(typeof data.baseUrl === 'string' && (urlUtil.isRelative(url)) && /\\.css$/.test(url.file)) {\n return urlUtil.build(prependToUrl(url, data.baseUrl, data.slashcat), { bust : Date.now() });\n }\n }\n },\n\n //absolute URL are just left intact\n external : {\n name : 'external',\n handle : function handleExternal(url){\n if(urlUtil.isAbsolute(url)){\n return url.toString();\n }\n }\n },\n\n //the base64 encoded resources are also left intact\n base64 : {\n name : 'base64',\n handle : function handleB64(url){\n if(urlUtil.isBase64(url)){\n return url.toString();\n }\n }\n },\n\n //special tao media protocol\n taomedia : {\n name : 'taomedia',\n handle : function handleTaoMedia(url, data){\n //either a baseUrl is given or if empty, taomedia resources are managed as relative resources\n var baseUrl = data.baseUrl || './';\n if( (typeof url === 'object' && url.protocol === 'taomedia') ||\n (/^taomedia:\\/\\//.test(url.toString())) ){\n return baseUrl + url.toString();\n }\n }\n }\n };\n return strategies;\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/factory',['lodash', 'core/promise', 'core/eventifier'], function (_, Promise, eventifier){\n 'use strict';\n\n var _requirejs = window.require;\n\n return function portableElementRegistry(methods){\n\n var _loaded = false;\n var __providers = {};\n\n return eventifier(_.defaults(methods || {}, {\n _registry : {},\n get : function get(typeIdentifier, version){\n\n if(this._registry[typeIdentifier]){\n //check version\n if(version){\n return _.find(this._registry[typeIdentifier], version);\n }else{\n //latest\n return _.last(this._registry[typeIdentifier]);\n }\n }\n },\n registerProvider : function registerProvider(moduleName){\n __providers[moduleName] = null;\n return this;\n },\n resetProviders : function resetProviders(){\n __providers = {};\n return this;\n },\n loadProviders : function loadProviders(){\n var self = this;\n return new Promise(function(resolve, reject) {\n var providerLoadingStack = [];\n _.forIn(__providers, function(provider, id){\n if(provider === null){\n providerLoadingStack.push(id);\n }\n });\n _requirejs(providerLoadingStack, function(){\n _.each([].slice.call(arguments), function(provider){\n if(provider && _.isFunction(provider.load)){\n __providers[providerLoadingStack.shift()] = provider;\n }\n });\n resolve();\n self.trigger('providersloaded');\n }, reject);\n });\n },\n getAllVersions : function getAllVersions(){\n var all = {};\n _.forIn(this._registry, function (versions, id){\n all[id] = _.map(versions, 'version');\n });\n return all;\n },\n getRuntime : function getRuntime(typeIdentifier, version){\n var pci = this.get(typeIdentifier, version);\n if(pci){\n return _.assign(pci.runtime, {\n id : pci.typeIdentifier,\n label : pci.label,\n baseUrl : pci.baseUrl\n });\n }else{\n this.trigger('error', {\n message : 'no portable element runtime found',\n typeIdentifier : typeIdentifier,\n version : version\n });\n }\n },\n getCreator : function getCreator(typeIdentifier, version){\n var pci = this.get(typeIdentifier, version);\n if(pci && pci.creator){\n return _.assign(pci.creator, {\n id : pci.typeIdentifier,\n label : pci.label,\n baseUrl : pci.baseUrl,\n response : pci.response\n });\n }else{\n this.trigger('error', {\n message : 'no portable element runtime found',\n typeIdentifier : typeIdentifier,\n version : version\n });\n }\n },\n getBaseUrl : function getBaseUrl(typeIdentifier, version){\n var runtime = this.get(typeIdentifier, version);\n if(runtime){\n return runtime.baseUrl;\n }\n return '';\n },\n loadRuntimes : function loadRuntimes(reload){\n var self = this;\n var loadPromise;\n if(_loaded && !reload){\n loadPromise = Promise.resolve();\n } else {\n loadPromise = self.loadProviders().then(function(){\n\n var loadStack = [];\n\n _.each(__providers, function (provider){\n if(provider){//check that the provider is loaded\n loadStack.push(provider.load());\n }\n });\n\n //performs the loadings in parallel\n return Promise.all(loadStack).then(function (results){\n\n var requireConfigAliases = {};\n\n //update registry\n self._registry = _.reduce(results, function (acc, _pcis){\n return _.merge(acc, _pcis);\n }, {});\n\n //pre-configuring the baseUrl of the portable element's source\n _.forIn(self._registry, function (versions, typeIdentifier){\n //currently use latest runtime path\n requireConfigAliases[typeIdentifier] = self.getBaseUrl(typeIdentifier);\n });\n _requirejs.config({paths : requireConfigAliases});\n\n _loaded = true;\n });\n });\n }\n\n loadPromise\n .then(function() {\n self.trigger('runtimesloaded');\n })\n .catch(function(err) {\n self.trigger('error', err);\n });\n\n return loadPromise;\n },\n loadCreators : function loadCreators(reload){\n\n var self = this;\n\n var loadPromise = self.loadRuntimes(reload).then(function(){\n var requiredCreators = [];\n\n _.forIn(self._registry, function (versions, typeIdentifier){\n var pciModel = self.get(typeIdentifier);//currently use the latest version only\n if(pciModel.creator && pciModel.creator.hook){\n requiredCreators.push(pciModel.creator.hook.replace(/\\.js$/, ''));\n }\n });\n\n if(requiredCreators.length){\n return new Promise(function(resolve, reject){\n //@todo support caching?\n _requirejs(requiredCreators, function (){\n var creators = {};\n _.each(arguments, function (creatorHook){\n var id = creatorHook.getTypeIdentifier();\n var pciModel = self.get(id);\n var i = _.findIndex(self._registry[id], {version : pciModel.version});\n if(i < 0){\n self.trigger('error', 'no creator found for id/version ' + id + '/' + pciModel.version);\n }else{\n self._registry[id][i].creator.module = creatorHook;\n creators[id] = creatorHook;\n }\n });\n resolve(creators);\n }, reject);\n });\n }else{\n return Promise.resolve({});\n }\n\n });\n\n loadPromise\n .then(function(creators) {\n self.trigger('creatorsloaded', creators);\n return creators;\n })\n .catch(function(err) {\n self.trigger('error', err);\n });\n\n return loadPromise;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Sam \n * @requires jquery\n * @requires lodash\n */\ndefine('taoQtiItem/qtiCreator/helper/qtiElements',['jquery', 'lodash', 'i18n'], function($, _, __){\n \"use strict\";\n\n var QtiElements = {};\n\n QtiElements.classes = {\n //abstract classes:\n 'itemBody' : {'parents' : ['bodyElement'], 'contains' : ['block'], 'abstract' : true},\n 'atomicBlock' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['inline'], 'abstract' : true},\n 'atomicInline' : {'parents' : ['bodyElement', 'flowStatic', 'inlineStatic'], 'contains' : ['inline'], 'abstract' : true},\n 'simpleBlock' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['block'], 'abstract' : true},\n 'simpleInline' : {'parents' : ['bodyElement', 'flowStatic', 'inlineStatic'], 'contains' : ['inline'], 'abstract' : true},\n 'flowStatic' : {'parents' : ['flow'], 'abstract' : true},\n 'blockStatic' : {'parents' : ['block'], 'abstract' : true},\n 'inlineStatic' : {'parents' : ['inline'], 'abstract' : true},\n 'flow' : {'parents' : ['objectFlow'], 'abstract' : true},\n 'tableCell' : {'parents' : ['bodyElement'], 'contains' : ['flow'], 'abstract' : true},\n //html-derived qti elements:\n 'caption' : {'parents' : ['bodyElement'], 'contains' : ['inline'], 'xhtml' : true},\n 'col' : {'parents' : ['bodyElement'], 'xhtml' : true},\n 'colgroup' : {'parents' : ['bodyElement'], 'contains' : ['col'], 'xhtml' : true},\n 'div' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['flow'], 'xhtml' : true},\n 'dl' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['dlElement'], 'xhtml' : true},\n 'dt' : {'parents' : ['dlElement'], 'contains' : ['inline'], 'xhtml' : true},\n 'dd' : {'parents' : ['dlElement'], 'contains' : ['flow'], 'xhtml' : true},\n 'hr' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'xhtml' : true},\n 'math' : {'parents' : ['blockStatic', 'flowStatic', 'inlineStatic'], 'xhtml' : true},\n 'li' : {'parents' : ['bodyElement'], 'contains' : ['flow'], 'xhtml' : true},\n 'ol' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['li'], 'xhtml' : true},\n 'ul' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['li'], 'xhtml' : true},\n 'object' : {'parents' : ['bodyElement', 'flowStatic', 'inlineStatic'], 'contains' : ['objectFlow'], 'xhtml' : true},\n 'param' : {'parents' : ['objectFlow'], 'xhtml' : true},\n 'table' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'contains' : ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody'], 'xhtml' : true},\n 'tbody' : {'parents' : ['bodyElement'], 'contains' : ['tr'], 'xhtml' : true},\n 'tfoot' : {'parents' : ['bodyElement'], 'contains' : ['tr'], 'xhtml' : true},\n 'thead' : {'parents' : ['bodyElement'], 'contains' : ['tr'], 'xhtml' : true},\n 'td' : {'parents' : ['tableCell'], 'xhtml' : true},\n 'th' : {'parents' : ['tableCell'], 'xhtml' : true},\n 'tr' : {'parents' : ['bodyElement'], 'contains' : ['tableCell'], 'xhtml' : true},\n 'a' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'abbr' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'acronym' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'b' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'big' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'cite' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'code' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'dfn' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'em' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'i' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'kbd' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'q' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'samp' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'small' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'span' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'strong' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'sub' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'sup' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'tt' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'var' : {'parents' : ['simpleInline'], 'xhtml' : true},\n 'blockquote' : {'parents' : ['simpleBlock'], 'xhtml' : true},\n 'address' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h1' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h2' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h3' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h4' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h5' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'h6' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'p' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'pre' : {'parents' : ['atomicBlock'], 'xhtml' : true},\n 'img' : {'parents' : ['atomicInline'], 'xhtml' : true, attributes : ['src', 'alt', 'longdesc', 'height', 'width']},\n 'br' : {'parents' : ['atomicInline'], 'xhtml' : true},\n //qti elements:\n 'infoControl' : {'parents' : ['blockStatic', 'bodyElement', 'flowStatic'], 'qti' : true},\n 'textRun' : {'parents' : ['inlineStatic', 'flowstatic'], 'qti' : true},\n 'feedbackInline' : {'parents' : ['simpleInline', 'feedbackElement'], 'qti' : true},\n 'feedbackBlock' : {'parents' : ['simpleBlock'], 'qti' : true},\n 'rubricBlock' : {'parents' : ['simpleBlock'], 'qti' : true}, //strange qti 2.1 exception, marked as simpleBlock instead of\n 'blockInteraction' : {'parents' : ['block', 'flow', 'interaction'], 'qti' : true},\n 'inlineInteraction' : {'parents' : ['inline', 'flow', 'interaction'], 'qti' : true},\n 'gap' : {'parents' : ['inlineStatic'], 'qti' : true},\n 'hottext' : {'parents' : ['flowstatic', 'inlineStatic'], 'contains' : ['inlineStatic'], 'qti' : true},\n 'printedVariable' : {'parents' : ['bodyElement', 'flowStatic', 'inlineStatic', 'textOrVariable'], 'qti' : true},\n 'prompt' : {'parents' : ['bodyElement'], 'contains' : ['inlineStatic'], 'qti' : true},\n 'templateElement' : {'parents' : ['bodyElement'], 'qti' : true},\n 'templateBlock' : {'parents' : ['blockStatic', 'flowStatic', 'templateElement'], 'contains' : ['blockStatic'], 'qti' : true},\n 'templateInline' : {'parents' : ['inlineStatic', 'flowStatic', 'templateElement'], 'contains' : ['inlineStatic'], 'qti' : true},\n 'choiceInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'associateInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'orderInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'matchInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'hottextInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'gapMatchInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'mediaInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'sliderInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'uploadInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'drawingInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'graphicInteraction' : {'parents' : ['blockInteraction'], 'qti' : true},\n 'hotspotInteraction' : {'parents' : ['graphicInteraction'], 'qti' : true},\n 'graphicAssociateInteraction' : {'parents' : ['graphicInteraction'], 'qti' : true},\n 'graphicOrderInteraction' : {'parents' : ['graphicInteraction'], 'qti' : true},\n 'graphicGapMatchInteraction' : {'parents' : ['graphicInteraction'], 'qti' : true},\n 'selectPointInteraction' : {'parents' : ['graphicInteraction'], 'qti' : true},\n 'textEntryInteraction' : {'parents' : ['stringInteraction', 'inlineInteraction'], 'qti' : true},\n 'extendedTextInteraction' : {'parents' : ['stringInteraction', 'blockInteraction'], 'qti' : true},\n 'inlineChoiceInteraction' : {'parents' : ['inlineInteraction'], 'qti' : true},\n 'endAttemptInteraction' : {'parents' : ['inlineInteraction'], 'qti' : true},\n 'customInteraction' : {'parents' : ['block', 'flow', 'interaction'], 'qti' : true},\n '_container' : {'parents' : ['block'], 'qti' : true}//a pseudo class introduced in TAO\n };\n\n QtiElements.cache = {containable : {}, children : {}, parents : {}};\n\n QtiElements.getAllowedContainersElements = function(qtiClass, $container){\n var classes = QtiElements.getAllowedContainers(qtiClass);\n var jqSelector = '';\n for(var i in classes){\n if(!classes[i].qti){\n //html element:\n jqSelector += classes[i] + ', ';\n }\n }\n\n if(jqSelector){\n jqSelector = jqSelector.substring(0, jqSelector.length - 2);\n }\n\n return $(jqSelector, $container ? $container : $(document)).filter(':not([data-qti-type])');\n };\n\n QtiElements.getAllowedContainers = function(qtiClass){\n var ret;\n if(QtiElements.cache.containable[qtiClass]){\n ret = QtiElements.cache.containable[qtiClass];\n }else{\n ret = [];\n var parents = QtiElements.getParentClasses(qtiClass, true);\n for(var aClass in QtiElements.classes){\n var model = QtiElements.classes[aClass];\n if(model.contains){\n var intersect = _.intersection(model.contains, parents);\n if(intersect.length){\n if(!model.abstract){\n ret.push(aClass);\n }\n ret = _.union(ret, QtiElements.getChildClasses(aClass, true));\n }\n }\n }\n QtiElements.cache.containable[qtiClass] = ret;\n }\n\n return ret;\n };\n\n QtiElements.getAllowedContents = function(qtiClass, recursive, checked){\n\n var ret = [];\n checked = checked || {};\n\n var model = QtiElements.classes[qtiClass];\n if(model && model.contains){\n for(var i in model.contains){\n var contain = model.contains[i];\n if(!checked[contain]){\n checked[contain] = true;\n\n //qtiClass can contain everything defined as its contents\n ret.push(contain);\n\n //qtiClass can also contain subclass of its contents\n var children = QtiElements.getChildClasses(contain, true);\n for(var i in children){\n var child = children[i];\n if(!checked[child]){\n checked[child] = true;\n\n ret.push(child);\n\n //adding children allowed contents depends on the option \"recursive\"\n if(recursive){\n ret = _.union(ret, QtiElements.getAllowedContents(child, true, checked));\n }\n }\n }\n\n //adding allowed contents of qtiClass' allowed contents depends on the option \"recursive\"\n if(recursive){\n ret = _.union(ret, QtiElements.getAllowedContents(contain, true, checked));\n }\n\n }\n }\n }\n\n //qtiClass can contain all allowed contents of its parents:\n var parents = QtiElements.getParentClasses(qtiClass, true);\n for(var i in parents){\n ret = _.union(ret, QtiElements.getAllowedContents(parents[i], recursive, checked));\n }\n\n return _.uniq(ret, false);\n };\n\n QtiElements.isAllowedClass = function(qtiContainerClass, qtiContentClass){\n var allowedClasses = QtiElements.getAllowedContents(qtiContainerClass);\n return (_.indexOf(allowedClasses, qtiContentClass) >= 0);\n };\n\n QtiElements.getParentClasses = function(qtiClass, recursive){\n var ret;\n if(recursive && QtiElements.cache.parents[qtiClass]){\n ret = QtiElements.cache.parents[qtiClass];\n }else{\n ret = [];\n if(QtiElements.classes[qtiClass]){\n ret = QtiElements.classes[qtiClass].parents;\n if(recursive){\n for(var i in ret){\n ret = _.union(ret, QtiElements.getParentClasses(ret[i], recursive));\n }\n ret = _.uniq(ret, false);\n }\n }\n QtiElements.cache.parents[qtiClass] = ret;\n }\n\n return ret;\n };\n\n QtiElements.getChildClasses = function(qtiClass, recursive, type){\n var ret;\n var cacheType = type ? type : 'all';\n if(recursive && QtiElements.cache.children[qtiClass] && QtiElements.cache.children[qtiClass][cacheType]){\n ret = QtiElements.cache.children[qtiClass][cacheType];\n }else{\n ret = [];\n for(var aClass in QtiElements.classes){\n var model = QtiElements.classes[aClass];\n if(_.indexOf(model.parents, qtiClass) >= 0){\n if(type){\n if(model[type]){\n ret.push(aClass);\n }\n }else{\n ret.push(aClass);\n }\n if(recursive){\n ret = _.union(ret, QtiElements.getChildClasses(aClass, recursive, type));\n }\n }\n }\n if(!QtiElements.cache.children[qtiClass]){\n QtiElements.cache.children[qtiClass] = {};\n }\n QtiElements.cache.children[qtiClass][cacheType] = ret;\n }\n\n return ret;\n };\n\n QtiElements.isBlock = function(qtiClass){\n return QtiElements.is(qtiClass, 'block');\n };\n\n QtiElements.isInline = function(qtiClass){\n return QtiElements.is(qtiClass, 'inline');\n };\n\n QtiElements.is = function(qtiClass, topClass){\n if(qtiClass === topClass){\n return true;\n }else{\n var parents = QtiElements.getParentClasses(qtiClass, true);\n return (_.indexOf(parents, topClass) >= 0);\n }\n };\n\n QtiElements.getAvailableAuthoringElements = function(){\n\n return {\n choiceInteraction : {\n label : __('Choice Interaction'),\n description : __('Select a single (radio buttons) or multiple (check boxes) responses among a set of choices.'),\n icon : 'icon-choice',\n short : __('Choice'),\n qtiClass : 'choiceInteraction',\n tags:['Common Interactions', 'mcq']\n },\n orderInteraction : {\n label : __('Order Interaction'),\n icon : 'icon-order',\n description : __('Arrange a list of choices in the correct order.'),\n short : __('Order'),\n qtiClass : 'orderInteraction',\n tags:['Common Interactions', 'ordering']\n },\n associateInteraction : {\n label : __('Associate Interaction'),\n icon : 'icon-associate',\n description : __('Create pair(s) from a series of choices.'),\n short : __('Associate'),\n qtiClass : 'associateInteraction',\n tags:['Common Interactions', 'association']\n },\n matchInteraction : {\n label : __('Match Interaction'),\n icon : 'icon-match',\n description : __('Create association(s) between two sets of choices displayed in a table (row and column).'),\n short : __('Match'),\n qtiClass : 'matchInteraction',\n tags:['Common Interactions', 'association']\n },\n hottextInteraction : {\n label : __('Hottext Interaction'),\n icon : 'icon-hottext',\n description : __('Select one or more text parts (hottext) within a text.'),\n short : __('Hottext'),\n qtiClass : 'hottextInteraction',\n tags:['Common Interactions', 'text']\n },\n gapMatchInteraction : {\n label : __('Gap Match Interaction'),\n icon : 'icon-gap-match',\n description : __(' Fill in the gaps in a text from a set of choices.'),\n short : __('Gap Match'),\n qtiClass : 'gapMatchInteraction',\n tags:['Common Interactions', 'text', 'association']\n },\n sliderInteraction : {\n label : __('Slider Interaction'),\n icon : 'icon-slider',\n description :__('Select a value within a numerical range.'),\n short : __('Slider'),\n qtiClass : 'sliderInteraction',\n tags:['Common Interactions', 'special']\n },\n extendedTextInteraction : {\n label : __('Extended Text Interaction'),\n icon : 'icon-extended-text',\n description : __('Collect open-ended information in one or more text area(s) (strings or numeric values).'),\n short : __('Extended Text'),\n qtiClass : 'extendedTextInteraction',\n tags:['Common Interactions', 'text']\n },\n uploadInteraction : {\n label : __('File Upload Interaction'),\n icon : 'icon-upload',\n description : __('Upload a file (e.g. document, picture...) as a response.'),\n short : __('File Upload'),\n qtiClass : 'uploadInteraction',\n tags:['Common Interactions', 'special']\n },\n mediaInteraction : {\n label : __('Media Interaction'),\n icon : 'icon-media',\n description : __('Control the playing parameters (auto-start, loop) of a video or audio file and report the number of time it has been played.'),\n short : __('Media'),\n qtiClass : 'mediaInteraction',\n tags:['Common Interactions', 'media']\n },\n _container : {\n label : __('Text Block'),\n icon : 'icon-font',\n description : __('Block contains the content (stimulus) of the item such as text or image. It is also required for Inline Interactions.'),\n short : __('Block'),\n qtiClass : '_container',\n tags:['Inline Interactions', 'text']\n },\n inlineChoiceInteraction : {\n label : __('Inline Choice Interaction'),\n icon : 'icon-inline-choice',\n description : __('Select a choice from a drop-down list.'),\n short : __('Inline Choice'),\n qtiClass : 'inlineChoiceInteraction',\n tags:['Inline Interactions', 'inline-interactions', 'mcq']\n },\n textEntryInteraction : {\n label : __('Text Entry Interaction'),\n icon : 'icon-text-entry',\n description : __('Collect open-ended information in a short text input (strings or numeric values).'),\n short : __('Text Entry'),\n qtiClass : 'textEntryInteraction',\n tags:['Inline Interactions', 'inline-interactions', 'text']\n },\n endAttemptInteraction : {\n label : __('End Attempt Interaction'),\n icon : 'icon-end-attempt',\n description : __('Trigger the end of the item attempt.'),\n short : __('End Attempt'),\n qtiClass : 'endAttemptInteraction',\n tags:['Inline Interactions', 'inline-interactions', 'button', 'submit']\n },\n hotspotInteraction : {\n label : __('Hotspot Interaction'),\n icon : 'icon-hotspot',\n description : __('Select one or more areas (hotspots) displayed on an picture.'),\n short : __('Hotspot'),\n qtiClass : 'hotspotInteraction',\n tags:['Graphic Interactions', 'mcq']\n },\n graphicOrderInteraction : {\n label : __('Graphic Order Interaction'),\n icon : 'icon-graphic-order',\n description : __('Order the areas (hotspots) displayed on a picture.'),\n short : __('Order'),\n qtiClass : 'graphicOrderInteraction',\n tags:['Graphic Interactions', 'ordering']\n },\n graphicAssociateInteraction : {\n label : __('Graphic Associate Interaction'),\n icon : 'icon-graphic-associate',\n description : __('Create association(s) between areas (hotspots) displayed on a picture.'),\n short : __('Associate'),\n qtiClass : 'graphicAssociateInteraction',\n tags:['Graphic Interactions', 'association']\n },\n graphicGapMatchInteraction : {\n label : __('Graphic Gap Match Interaction'),\n icon : 'icon-graphic-gap',\n description : __('Fill in the gaps on a picture with a set of image choices.'),\n short : __('Gap Match'),\n qtiClass : 'graphicGapMatchInteraction',\n tags:['Graphic Interactions', 'association']\n },\n selectPointInteraction : {\n label : __('Select Point Interaction'),\n icon : 'icon-select-point',\n description : __('Position one or more points on a picture (response areas are not displayed).'),\n short : __('Select Point'),\n qtiClass : 'selectPointInteraction',\n tags:['Graphic Interactions']\n }\n };\n };\n\n return QtiElements;\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/ciRegistry',[\n 'lodash',\n 'taoQtiItem/portableElementRegistry/factory/factory',\n 'taoQtiItem/qtiCreator/helper/qtiElements'\n], function (_, portableElementRegistry, qtiElements){\n 'use strict';\n\n /**\n * Create a ney interaction registry instance\n * interaction registry need to register newly loaded creator hooks in the list of available qti authoring elements\n *\n * @returns {Object} registry instance\n */\n return function customInteractionRegistry(){\n\n return portableElementRegistry({\n getAuthoringData : function getAuthoringData(typeIdentifier, version){\n var pciModel = this.get(typeIdentifier, version);\n if(pciModel && pciModel.creator && pciModel.creator.hook && pciModel.creator.icon){\n return {\n label : pciModel.label, //currently no translation available\n icon : pciModel.creator.icon.replace(new RegExp('^' + typeIdentifier + '\\/'), pciModel.baseUrl),\n short : pciModel.short,\n description : pciModel.description,\n qtiClass : 'customInteraction.' + pciModel.typeIdentifier, //custom interaction is block type\n tags : _.union(['Custom Interactions'], pciModel.tags)\n };\n }\n }\n }).on('creatorsloaded', function(creators){\n _.each(creators, function(creator){\n qtiElements.classes['customInteraction.' + creator.getTypeIdentifier()] = {parents : ['customInteraction'], qti : true};\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/ciRegistry',['lodash', 'taoQtiItem/portableElementRegistry/factory/ciRegistry', 'module'], function (_, ciRegistry, module){\n 'use strict';\n\n //create a preregistered singleton of ciRegistry\n var registry = ciRegistry();\n var providers = [];\n var config = module.config();\n\n if(config && config.providers){\n providers = config.providers;\n }\n\n _.each(providers, function(provider){\n if(provider.name && provider.module){\n registry.registerProvider(provider.module);\n }\n });\n\n return registry;\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/factory/icRegistry',[\n 'lodash',\n 'taoQtiItem/portableElementRegistry/factory/factory'\n], function (_, portableElementRegistry){\n 'use strict';\n\n /**\n * Info control registry has currently no additonal fonctionalities than the basic portable element registry\n *\n * @returns {Object} registry instance\n */\n return function infoControlRegistry(){\n return portableElementRegistry();\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) 2016 (original work) Open Assessment Technologies SA;\n *\n */\ndefine('taoQtiItem/portableElementRegistry/icRegistry',['lodash', 'taoQtiItem/portableElementRegistry/factory/icRegistry', 'module'], function (_, icRegistry, module){\n 'use strict';\n\n //create a preregistered singleton of icRegistry\n var registry = icRegistry();\n var providers = [];\n var config = module.config();\n\n if(config && config.providers){\n providers = config.providers;\n }\n\n _.each(providers, function(provider){\n if(provider.name && provider.module){\n registry.registerProvider(provider.module);\n }\n });\n\n return registry;\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) 2016 (original work) Open Assessment Technologies SA;\n */\n\ndefine('taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy',[\n 'taoQtiItem/portableElementRegistry/ciRegistry',\n 'taoQtiItem/portableElementRegistry/icRegistry'\n], function (ciRegistry, icRegistry) {\n 'use strict';\n\n function getBaseUrlByIdentifier(typeIdentifier) {\n if (ciRegistry.get(typeIdentifier)) {\n return ciRegistry.getBaseUrl(typeIdentifier);\n }\n if (icRegistry.get(typeIdentifier)) {\n return icRegistry.getBaseUrl(typeIdentifier);\n }\n return typeIdentifier;\n }\n\n //strategy to resolve portable info control and portable interactions paths.\n //It should never be reached in the stack the usual way and should be called only using resolveBy.\n return {\n name: 'portableElementLocation',\n handle: function handlePortableElementLocation(url) {\n\n if (url.file === url.path) {\n return getBaseUrlByIdentifier(url.file);\n } else if (url.source === url.relative) {\n return url.relative.replace(/^(\\.\\/)?([a-z_0-9]+)\\/(.*)/i, function (fullmatch, $1, typeIdentifier, relPath) {\n var runtimeLocation = getBaseUrlByIdentifier(typeIdentifier);\n if (runtimeLocation) {\n return runtimeLocation + '/' + relPath;\n }\n return fullmatch;\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 (original work) Open Assessment Technologies SA;\n */\n\ndefine('taoQtiItem/qtiCommonRenderer/renderers/config',[\n 'lodash',\n 'context',\n 'ui/themes',\n 'taoItems/assets/manager',\n 'taoItems/assets/strategies',\n 'module',\n 'taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy'\n], function(_, context, themes, assetManagerFactory, assetStrategies, module, portableAssetStrategy){\n 'use strict';\n\n var itemThemes = themes.get('items');\n var moduleConfig = module.config();\n\n //Create asset manager stack\n var assetManager = assetManagerFactory([\n {\n name : 'theme',\n handle : function handleTheme(url){\n if(itemThemes && url.path && (url.path === itemThemes.base || _.contains(_.pluck(itemThemes.available, 'path'), url.path))){\n return context.root_url + url.toString();\n }\n }\n },\n assetStrategies.taomedia,\n assetStrategies.external,\n assetStrategies.base64,\n assetStrategies.itemCssNoCache,\n assetStrategies.baseUrl,\n portableAssetStrategy\n ], {baseUrl : ''});//baseUrl is not predefined in the config, but should be set upon renderer instantiating\n\n //renderers locations\n var locations = {\n 'assessmentItem' : 'taoQtiItem/qtiCommonRenderer/renderers/Item',\n '_container' : 'taoQtiItem/qtiCommonRenderer/renderers/Container',\n '_simpleFeedbackRule' : false,\n 'stylesheet' : 'taoQtiItem/qtiCommonRenderer/renderers/Stylesheet',\n 'outcomeDeclaration' : false,\n 'responseDeclaration' : false,\n 'responseProcessing' : false,\n 'img' : 'taoQtiItem/qtiCommonRenderer/renderers/Img',\n 'math' : 'taoQtiItem/qtiCommonRenderer/renderers/Math',\n 'object' : 'taoQtiItem/qtiCommonRenderer/renderers/Object',\n 'rubricBlock' : 'taoQtiItem/qtiCommonRenderer/renderers/RubricBlock',\n 'modalFeedback' : 'taoQtiItem/qtiCommonRenderer/renderers/ModalFeedback',\n 'prompt' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/Prompt',\n 'choiceInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/ChoiceInteraction',\n 'extendedTextInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/ExtendedTextInteraction',\n 'orderInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/OrderInteraction',\n 'associateInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/AssociateInteraction',\n 'matchInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/MatchInteraction',\n 'textEntryInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/TextEntryInteraction',\n 'sliderInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/SliderInteraction',\n 'inlineChoiceInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/InlineChoiceInteraction',\n 'simpleChoice.choiceInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleChoice.ChoiceInteraction',\n 'simpleChoice.orderInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleChoice.OrderInteraction',\n 'hottext' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/Hottext',\n 'gap' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/Gap',\n 'gapText' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/GapText',\n 'simpleAssociableChoice.matchInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.MatchInteraction',\n 'simpleAssociableChoice.associateInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/SimpleAssociableChoice.AssociateInteraction',\n 'inlineChoice' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/InlineChoice',\n 'hottextInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/HottextInteraction',\n 'hotspotInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/HotspotInteraction',\n 'hotspotChoice' : false,\n 'gapMatchInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GapMatchInteraction',\n 'selectPointInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/SelectPointInteraction',\n 'graphicOrderInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicOrderInteraction',\n 'mediaInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/MediaInteraction',\n 'uploadInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/UploadInteraction',\n 'graphicGapMatchInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicGapMatchInteraction',\n 'gapImg' : 'taoQtiItem/qtiCommonRenderer/renderers/choices/GapImg',\n 'graphicAssociateInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/GraphicAssociateInteraction',\n 'associableHotspot' : false,\n 'customInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/PortableCustomInteraction',\n 'infoControl' : 'taoQtiItem/qtiCommonRenderer/renderers/PortableInfoControl',\n 'include' : 'taoQtiItem/qtiCommonRenderer/renderers/Include',\n 'endAttemptInteraction' : 'taoQtiItem/qtiCommonRenderer/renderers/interactions/EndAttemptInteraction'\n };\n\n return {\n name:'commonRenderer',\n locations: locations,\n options: {\n assetManager: assetManager,\n themes : itemThemes,\n enableDragAndDrop: {\n associate: !!moduleConfig.associateDragAndDrop,\n gapMatch: !!moduleConfig.gapMatchDragAndDrop,\n graphicGapMatch: !!moduleConfig.graphicGapMatchDragAndDrop,\n order: !!moduleConfig.orderDragAndDrop\n },\n messages : moduleConfig.messages\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 (original work) Open Assessment Technologies SA;\n */\n\n/**\n * Define the Qti Item Common Renderer\n */\ndefine('taoQtiItem/qtiCommonRenderer/renderers/Renderer',[\n 'taoQtiItem/qtiRunner/core/Renderer',\n 'taoQtiItem/qtiCommonRenderer/renderers/config'\n], function(Renderer, config){\n 'use strict';\n\n return Renderer.build(config.locations, config.name, config.options);\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) 2015 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/performances/tester',[\n 'jquery',\n 'lodash',\n 'async',\n 'context',\n 'helpers',\n 'taoClientDiagnostic/tools/stats',\n 'taoQtiItem/qtiItem/core/Loader',\n 'taoQtiItem/qtiCommonRenderer/renderers/Renderer',\n 'lib/polyfill/performance-now'\n], function($, _, async, context, helpers, stats, Loader, Renderer) {\n 'use strict';\n\n /**\n * Duration of one second (in milliseconds)\n * @type {Number}\n * @private\n */\n var _second = 1000;\n\n /**\n * Default timeout duration\n * @type {Number}\n * @private\n */\n var _defaultTimeout = 30 * _second;\n\n /**\n * Default number of renderings by samples\n * @type {Number}\n * @private\n */\n var _defaultOccurrencesCount = 10;\n\n /**\n * List of default samples\n * @type {Array}\n */\n var _defaultSamples = [\n 'taoClientDiagnostic/tools/performances/data/sample1/',\n 'taoClientDiagnostic/tools/performances/data/sample2/',\n 'taoClientDiagnostic/tools/performances/data/sample3/'\n ];\n\n /**\n * Base text used to build sample identifiers\n * @type {String}\n * @private\n */\n var _sampleBaseId = 'sample';\n\n /**\n * Loads a page inside a div and compute the time to load\n * @param {Object} data The descriptor of the page to load\n * @param {Function} done A callback function called to provide the result\n */\n function loadItem(data, done){\n\n //item location config\n var qtiJsonFile = data.url + 'qti.json';\n var urlTokens = data.url.split('/');\n var extension = urlTokens[0];\n var fullpath = require.s.contexts._.config.paths[extension];\n var baseUrl = data.url.replace(extension, fullpath);\n var loader = new Loader();\n var renderer = new Renderer({\n baseUrl : baseUrl // compatibility mode for legacy installations\n });\n\n // check needed by compatibility mode for legacy installations\n if (renderer.getAssetManager) {\n renderer.getAssetManager().setData('baseUrl', baseUrl);\n }\n\n require(['json!'+qtiJsonFile], function(itemData){\n\n loader.loadItemData(itemData, function(item){\n renderer.load(function(){\n\n var $container,\n duration,\n start,\n end,\n result;\n\n //start right before rendering\n start = window.performance.now();\n\n //set renderer\n item.setRenderer(this);\n\n //render markup\n $container = $('
').appendTo('body');\n $container.append(item.render());\n\n //execute javascript\n item.postRender();\n\n //remove item\n $container.remove();\n\n //done\n end = window.performance.now();\n\n duration = (end - start) / _second;\n\n result = {\n id : data.id,\n url : data.url,\n duration: duration\n };\n\n done(null, result);\n\n }, this.getLoadedClasses());\n });\n\n });\n\n }\n\n /**\n * Performs a browser performances test by running a heavy page\n *\n * @param {Array} [samples]\n * @param {Number} [occurrences]\n * @param {Number} [timeout]\n * @returns {Object}\n */\n var performancesTester = function performancesTester(samples, occurrences, timeout) {\n var idx = 0;\n var _samples = _.map(!_.isEmpty(samples) && samples || _defaultSamples, function(sample) {\n idx ++;\n return {\n id : _sampleBaseId + idx,\n url : sample,\n timeout : timeout || _defaultTimeout,\n nb : occurrences || _defaultOccurrencesCount\n };\n });\n\n // add one occurrence on the first sample to obfuscate the time needed to load the runner\n _samples[0].nb ++;\n\n return {\n /**\n * Performs a performances test, then call a function to provide the result\n * @param {Function} done\n */\n start: function start(done) {\n var tests = [];\n _.forEach(_samples, function(data) {\n var cb = _.partial(loadItem, data);\n var iterations = data.nb || 1;\n while (iterations --) {\n tests.push(cb);\n }\n });\n\n async.series(tests, function(err, measures) {\n var decimals = 2;\n var results;\n\n if(err && !measures.length){\n //something went wrong\n throw err;\n }\n\n // remove the first result to obfuscate the time needed to load the runner\n measures.shift();\n\n results = stats(measures, 'duration', decimals);\n\n done(results.average, results);\n });\n }\n };\n };\n\n return performancesTester;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\ndefine('taoClientDiagnostic/tools/bandwidth/tester',[\n 'lodash',\n 'async',\n 'context',\n 'taoClientDiagnostic/tools/stats',\n 'taoClientDiagnostic/tools/fixedDecimals',\n 'lib/polyfill/performance-now'\n], function(_, async, context, stats, fixedDecimals) {\n 'use strict';\n\n /**\n * A binary kilo bytes (KiB)\n * @type {Number}\n * @private\n */\n var _kilo = 1024;\n\n /**\n * A binary mega bytes (MiB)\n * @type {Number}\n * @private\n */\n var _mega = _kilo * _kilo;\n\n /**\n * Duration of one second (in milliseconds)\n * @type {Number}\n * @private\n */\n var _second = 1000;\n\n /**\n * List of descriptors defining the data sets to download.\n * - file : path of the file containing the test data\n * - size : the given size of the file\n * - timeout : the timeout for the download\n * - threshold : a bandwidth threshold above which the data set can be downloaded to evaluate a more accurate value\n * - nb : number of download iterations\n * @type {Object}\n */\n var _downloadData = {\n \"10KB\" : {\n id : '10KB',\n file : 'data/bin10KB.data',\n size : 10 * _kilo,\n timeout : _second,\n threshold : 0,\n nb : 10\n },\n \"100KB\" : {\n id : '100KB',\n file : 'data/bin100KB.data',\n size : 100 * _kilo,\n timeout : 2 * _second,\n threshold : 0,\n nb : 5\n },\n \"1MB\" : {\n id : '1MB',\n file : 'data/bin1MB.data',\n size : _mega,\n timeout : 20 * _second,\n threshold : 0,\n nb : 3\n },\n \"10MB\" : {\n id : '10MB',\n file : 'data/bin10MB.data',\n size : 10 * _mega,\n timeout : 20 * _second,\n threshold : 8,\n nb : 3\n }\n };\n\n /**\n * Download a data set as described by the provided descriptor and compute the duration.\n * @param {Object} data The data set descriptor to use for download\n * @param {Function} cb A callback function called at the end of the download.\n * This callback is also called if a timeout breaks the download;\n */\n var download = function download(data, cb) {\n var self = this;\n var start, end;\n var timeoutId;\n var url;\n var request;\n\n if (data.threshold && this.bandwidth < data.threshold) {\n return cb('threshold');\n }\n\n url = context.root_url + '/taoClientDiagnostic/views/js/tools/bandwidth/' + data.file + '?' + Date.now();\n request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.setRequestHeader('Accept', 'application/octet-stream');\n\n request.onload = function onRequestLoad () {\n var duration;\n var bytes;\n var seconds;\n var speed;\n\n end = window.performance.now();\n clearTimeout(timeoutId);\n\n duration = end - start;\n bytes = data.size;\n seconds = duration / _second;\n\n // speed in Mbps\n speed = ((bytes * 8) / seconds) / _mega;\n\n self.bandwidth = Math.max(self.bandwidth, speed);\n\n return cb(null, {\n id : data.id,\n file : data.file,\n size : data.size,\n duration : duration,\n speed : speed\n });\n };\n request.onerror = function onRequestError (err) {\n clearTimeout(timeoutId);\n cb(err);\n };\n\n timeoutId = _.delay(cb, data.timeout, 'timeout');\n start = window.performance.now();\n request.send();\n };\n\n /**\n * Performs a bandwidth test by downloading a bunch of data sets with different sizes\n *\n * @returns {Object}\n */\n var bandwidthTester = function bandwidthTester (){\n return {\n /**\n * Performs a bandwidth test, then call a function to provide the result\n * @param {Function} done\n */\n start : function start(done){\n var self = this;\n var tests = [];\n _.forEach(_downloadData, function(data) {\n var cb = _.bind(download, self, data);\n var iterations = data.nb || 1;\n while (iterations --) {\n tests.push(cb);\n }\n });\n\n this.bandwidth = 0;\n\n async.series(tests, function(err, measures) {\n var duration = 0;\n var size = 0;\n var decimals = 2;\n var getValue;\n var results;\n\n if (err && !measures.length) {\n //something went wrong\n throw err;\n }\n\n getValue = function(value) {\n var speed = 0;\n\n if (value) {\n duration += value.duration;\n size += value.size;\n\n speed = value.speed;\n value.speed = fixedDecimals(speed, decimals);\n }\n\n return speed;\n };\n\n results = stats(measures, getValue, decimals);\n\n results.duration = fixedDecimals(duration / _second, decimals);\n results.size = size;\n\n done(results.average, results);\n });\n }\n };\n };\n\n return bandwidthTester;\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) 2016 (original work) Open Assessment Technologies SA ;\n */\ndefine('taoClientDiagnostic/tools/upload/tester',[\n 'jquery',\n 'lodash',\n 'async',\n 'util/url'\n], function($, _, async, urlHelper) {\n 'use strict';\n\n /**\n * A binary kilo bytes (KiB)\n * @type {Number}\n * @private\n */\n var _kilo = 1024;\n\n /**\n * A binary mega bytes (MiB)\n * @type {Number}\n * @private\n */\n var _mega = _kilo * _kilo;\n\n /**\n * Result of diagnostic\n */\n var data = [];\n\n /**\n * Generate random string of given length\n * @param length\n */\n var generateStr = function generateStr(length) {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for( var i=0; i < length; i++ ) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n\n return text;\n };\n\n /**\n * Upload generated string to check upload speed.\n * @param {number} size of string to upload in bytes\n * @return {object} jqXHR\n */\n var upload = function upload(size) {\n\n var url = urlHelper.route('upload', 'CompatibilityChecker', 'taoClientDiagnostic', {cache : Date.now()});\n var str = generateStr(size);\n data = [];\n\n return $.ajax({\n url : url,\n type : 'POST',\n data : {\n upload : str\n },\n xhr: function() {\n var xhr = new window.XMLHttpRequest();\n var startTime = Date.now();\n // Upload progress\n xhr.upload.addEventListener(\"progress\", function(evt){\n if (evt.lengthComputable) {\n var passedTime = Date.now() - startTime;\n data.push({\n time: passedTime,\n loaded: evt.loaded,\n speed: ((evt.loaded * 8) / _mega) / (passedTime / 1000)\n });\n }\n }, false);\n\n return xhr;\n },\n });\n };\n\n /**\n * Performs a upload speed test\n * @returns {Object}\n */\n var uploadTester = function uploadTester (config){\n return {\n /**\n * Performs upload speed test, then call a function to provide the result\n * @param {Function} done\n */\n start : function start(done) {\n var jqXHR = upload(parseInt(config.size, 10));\n jqXHR.then(function() {\n done(data);\n });\n }\n };\n };\n\n return uploadTester;\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) 2016 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/getconfig',['lodash'], function (_) {\n 'use strict';\n\n /**\n * Gets a config set\n * @param {Object} [config]\n * @param {Object} [defaults]\n * @returns {Object}\n */\n return function getConfig(config, defaults) {\n return _(config || {})\n .omit(function (value) {\n return value === null || value === undefined;\n })\n .defaults(defaults || {})\n .value();\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) 2016 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/tools/browser/tester',[\n 'jquery',\n 'i18n',\n 'helpers',\n 'taoClientDiagnostic/tools/getconfig'\n], function ($, __, helpers, getConfig) {\n 'use strict';\n\n /**\n * Some default values\n * @type {Object}\n * @private\n */\n var _defaults = {\n action: 'whichBrowser',\n controller: 'CompatibilityChecker',\n extension: 'taoClientDiagnostic'\n };\n\n /**\n * Gets the URL of the browser tester\n * @param {Window} window - Need an access to the window object\n * @param {String} action - The name of the action to call to get the browser checker\n * @param {String} controller - The name of the controller to call to get the browser checker\n * @param {String} extension - The name of the extension containing the controller to call to get the browser checker\n * @returns {String}\n */\n function getTesterUrl(window, action, controller, extension) {\n var document = window.document;\n var navigator = window.navigator;\n var screen = window.screen;\n var params = {};\n var e = 0;\n var f = 0;\n\n // append the browser user agent\n params.ua = navigator.userAgent;\n\n // detect browser family\n e |= window.ActiveXObject ? 1 : 0;\n e |= window.opera ? 2 : 0;\n e |= window.chrome ? 4 : 0;\n e |= 'getBoxObjectFor' in document || 'mozInnerScreenX' in window ? 8 : 0;\n e |= ('WebKitCSSMatrix' in window || 'WebKitPoint' in window || 'webkitStorageInfo' in window || 'webkitURL' in window) ? 16 : 0;\n e |= (e & 16 && ({}.toString).toString().indexOf(\"\\n\") === -1) ? 32 : 0;\n params.e = e;\n\n // gather info about browser functionality\n f |= 'sandbox' in document.createElement('iframe') ? 1 : 0;\n f |= 'WebSocket' in window ? 2 : 0;\n f |= window.Worker ? 4 : 0;\n f |= window.applicationCache ? 8 : 0;\n f |= window.history && window.history.pushState ? 16 : 0;\n f |= document.documentElement.webkitRequestFullScreen ? 32 : 0;\n f |= 'FileReader' in window ? 64 : 0;\n params.f = f;\n\n // append a unique ID\n params.r = Math.random().toString(36).substring(7);\n\n // get the screen size\n params.w = screen.width;\n params.h = screen.height;\n\n return helpers._url(action, controller, extension, params);\n }\n\n /**\n * Performs a browser support test\n *\n * @param {Window} window - Need an access to the window object\n * @param {Object} [config] - Some optional configs\n * @param {String} [config.action] - The name of the action to call to get the browser checker\n * @param {String} [config.controller] - The name of the controller to call to get the browser checker\n * @param {String} [config.extension] - The name of the extension containing the controller to call to get the browser checker\n * @returns {Object}\n */\n function browserTester(window, config) {\n var initConfig = getConfig(config || {}, _defaults);\n\n return {\n /**\n * Performs a browser support test, then call a function to provide the result\n * @param {Function} done\n */\n start: function start(done) {\n var url = getTesterUrl(window, initConfig.action, initConfig.controller, initConfig.extension);\n $.ajax({\n url : url,\n success : function(data) {\n done(data);\n }\n });\n }\n };\n }\n\n return browserTester;\n});\n\n","\ndefine('tpl!taoClientDiagnostic/tools/diagnostic/tpl/main', ['handlebars'], function(hb){ \nreturn hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression, self=this;\n\nfunction program1(depth0,data) {\n \n var buffer = \"\", stack1, helper;\n buffer += \"
\\n\";\n return buffer;\n });\n});\n\n","\ndefine('css!taoClientDiagnosticCss/diagnostics',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2016 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n * @author dieter \n */\ndefine('taoClientDiagnostic/tools/diagnostic/diagnostic',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'async',\n 'helpers',\n 'ui/feedback',\n 'ui/component',\n 'taoClientDiagnostic/tools/diagnostic/status',\n 'taoClientDiagnostic/tools/performances/tester',\n 'taoClientDiagnostic/tools/bandwidth/tester',\n 'taoClientDiagnostic/tools/upload/tester',\n 'taoClientDiagnostic/tools/browser/tester',\n 'taoClientDiagnostic/tools/getconfig',\n 'tpl!taoClientDiagnostic/tools/diagnostic/tpl/main',\n 'tpl!taoClientDiagnostic/tools/diagnostic/tpl/result',\n 'css!taoClientDiagnosticCss/diagnostics'\n], function ($, _, __, async, helpers, feedback, component, statusFactory, performancesTester, bandwidthTester, uploadTester, browserTester,getConfig, mainTpl, resultTpl) {\n 'use strict';\n\n /**\n * Some default values\n * @type {Object}\n * @private\n */\n var _defaults = {\n title: __('Diagnostic Tool'),\n header: __('This tool will run a number of tests in order to establish how well your current environment is suitable to run the TAO platform.'),\n info: __('Be aware that these tests will take up to several minutes.'),\n button: __('Begin diagnostics'),\n actionStore: 'storeData',\n actionCheck: 'check',\n controller: 'DiagnosticChecker',\n extension: 'taoClientDiagnostic'\n };\n\n /**\n * Default values for the browser tester\n * @type {Object}\n * @private\n */\n var _defaultsBrowser = {\n action: 'whichBrowser',\n controller: 'CompatibilityChecker',\n extension: 'taoClientDiagnostic'\n };\n\n /**\n * Default values for the bandwidth tester\n * @type {Object}\n * @private\n */\n var _defaultsBandwidth = {\n // The typical bandwidth needed for a test taker (Mbps)\n unit: 0.16,\n\n // The thresholds for optimal bandwidth\n ideal: 45,\n\n // Maximum number of test takers to display\n max: 100\n };\n\n /**\n * Default values for the performances tester\n * @type {Object}\n * @private\n */\n var _defaultsPerformances = {\n // The threshold for optimal performances\n optimal: 0.025,\n\n // The threshold for minimal performances\n threshold: 0.25\n };\n\n /**\n * Defines a diagnostic tool\n * @type {Object}\n */\n var diagnostic = {\n /**\n * Updates the displayed status\n * @param {String} status\n * @returns {diagnostic}\n * @private\n */\n changeStatus: function changeStatus(status) {\n if (this.is('rendered')) {\n this.controls.$status.html(status);\n }\n return this;\n },\n\n /**\n * Sends the detailed stats to the server\n * @param {String} type The type of stats\n * @param {Object} details The stats details\n * @param {Function} done A callback method called once server has responded\n */\n store: function store(type, details, done) {\n var config = this.config;\n\n details = _.omit(details, 'values');\n details.type = type;\n\n $.post(\n helpers._url(config.actionStore, config.controller, config.extension, config.storeParams),\n details,\n done,\n \"json\"\n );\n },\n\n /**\n * Performs a browser checks\n * @param {Function} done\n */\n checkBrowser: function checkBrowser(done) {\n var self = this;\n var config = this.config;\n\n this.changeStatus(__('Checking the browser...'));\n\n browserTester(window, getConfig(this.config.browser, _defaultsBrowser)).start(function (information) {\n // which browser\n $.post(\n helpers._url(config.actionCheck, config.controller, config.extension, config.storeParams),\n information,\n function (data) {\n var percentage = ('success' === data.type) ? 100 : (('warning' === data.type) ? 33 : 0);\n var status = self.status.getStatus(percentage, data);\n var summary = {\n browser: {\n message: __('Web browser'),\n value: information.browser + ' ' + information.browserVersion\n },\n os: {\n message: __('Operating system'),\n value: information.os + ' ' + information.osVersion\n }\n };\n\n status.id = 'browser';\n status.title = __('Operating system and web browser');\n\n self.addResult(status);\n\n done(status, summary);\n },\n 'json'\n );\n });\n },\n\n /**\n * Performs a browser performances check\n * @param {Function} done\n */\n checkPerformances: function checkPerformances(done) {\n var self = this;\n var config = getConfig(this.config.performances, _defaultsPerformances);\n var optimal = config.optimal;\n var range = Math.abs(optimal - (config.threshold));\n\n this.changeStatus(__('Checking the performances...'));\n performancesTester(config.samples, config.occurrences, config.timeout * 1000).start(function (average, details) {\n var cursor = range - average + optimal;\n var status = self.status.getStatus(cursor / range * 100, 'performances');\n var summary = {\n performancesMin: {message: __('Minimum rendering time'), value: details.min + ' s'},\n performancesMax: {message: __('Maximum rendering time'), value: details.max + ' s'},\n performancesAverage: {message: __('Average rendering time'), value: details.average + ' s'}\n };\n\n self.store('performance', details, function () {\n status.id = 'performance';\n status.title = __('Workstation performances');\n\n self.addResult(status);\n done(status, summary);\n });\n });\n },\n\n /**\n * Performs a browser bandwidth check\n * @param {Function} done\n */\n checkBandwidth: function checkBandwidth(done) {\n var self = this;\n var config = getConfig(this.config.bandwidth, _defaultsBandwidth);\n\n this.changeStatus(__('Checking the bandwidth...'));\n bandwidthTester().start(function (average, details) {\n var summary = {\n bandwidthMin: {message: __('Minimum bandwidth'), value: details.min + ' Mbps'},\n bandwidthMax: {message: __('Maximum bandwidth'), value: details.max + ' Mbps'},\n bandwidthAverage: {message: __('Average bandwidth'), value: details.average + ' Mbps'}\n };\n\n self.store('bandwidth', details, function () {\n var status = [];\n\n var bandwidthUnit = config.unit;\n var testTakers = config.ideal;\n var maxTestTakers = config.max;\n\n if (!_.isArray(testTakers)) {\n testTakers = [testTakers];\n }\n\n _.forEach(testTakers, function (threshold, i) {\n var max = threshold * bandwidthUnit;\n var st = self.status.getStatus(details.max / max * 100, 'bandwidth');\n var nb = Math.floor(details.max / bandwidthUnit);\n\n if (nb > maxTestTakers) {\n nb = '>' + maxTestTakers;\n }\n\n st.id = 'bandwidth-' + i;\n st.title = __('Bandwidth');\n st.feedback.legend = __('Number of simultaneous test takers the connection can handle');\n\n st.quality.label = nb;\n\n if (nb.toString().length > 2) {\n st.quality.wide = true;\n }\n\n status.push(st);\n\n self.addResult(st);\n });\n\n done(status, summary);\n });\n });\n },\n\n /**\n * Check upload speed\n * @param {Function} done\n */\n checkUpload: function checkUpload(done) {\n var self = this;\n var config = this.config.upload;\n\n this.changeStatus(__('Checking upload speed...'));\n uploadTester(config).start(function (data) {\n var totalSpeed = 0;\n var avgSpeed;\n var maxSpeed = 0;\n var optimal = config.optimal / 1024 / 1024;\n\n _.forEach(data, function (val) {\n totalSpeed += val.speed;\n if (maxSpeed < val.speed) {\n maxSpeed = Math.round(val.speed * 100) / 100;\n }\n });\n avgSpeed = Math.round(totalSpeed / data.length * 100) / 100;\n\n var status = self.status.getStatus((100 / optimal) * avgSpeed, 'upload');\n var summary = {\n uploadAvg: {message: __('Average upload speed'), value: avgSpeed + ' Mbps'},\n uploadMax: {message: __('Max upload speed'), value: maxSpeed + ' Mbps'},\n };\n\n self.store('upload', {\n max: maxSpeed,\n avg: avgSpeed,\n type: 'upload'\n }, function () {\n status.id = 'upload';\n status.title = __('Upload speed');\n\n self.addResult(status);\n\n done(status, summary);\n });\n });\n },\n\n /**\n * Add a result row\n * @param {Object} result\n * @returns {diagnostic}\n */\n addResult: function addResult(result) {\n var $result, $indicator;\n\n if (this.is('rendered')) {\n // adjust the width of the displayed label, if any, to the text length\n if (result.quality && result.quality.label && result.quality.label.toString().length > 2) {\n result.quality.wide = true;\n }\n\n // create and append the result to the displayed list\n $result = $(resultTpl(result));\n $indicator = $result.find('.quality-indicator');\n this.controls.$results.append($result);\n\n // the result is hidden by default, show it with a little animation\n $result.fadeIn(function () {\n if ($indicator.length) {\n $indicator.animate({\n left: (result.percentage * $result.outerWidth() / 100) - ($indicator.outerWidth() / 2)\n });\n }\n });\n }\n\n return this;\n },\n\n /**\n * Does some preparations before starting the diagnostics\n * @returns {diagnostic}\n * @private\n */\n prepare: function prepare() {\n /**\n * Notifies the diagnostic start\n * @event diagnostic#start\n */\n this.trigger('start');\n this.changeStatus(__('Starting...'));\n this.setState('running', true);\n this.setState('done', false);\n\n // first we need a clean space to display the results, so remove the last results if any\n this.controls.$results.empty();\n\n // remove the start button during the diagnostic\n this.controls.$start.addClass('hidden');\n\n return this;\n },\n\n /**\n * Does some post process after ending the diagnostics\n * @returns {diagnostic}\n * @private\n */\n finish: function finish() {\n // restore the start button to allow a new diagnostic run\n this.controls.$start.removeClass('hidden');\n\n /**\n * Notifies the diagnostic end\n * @event diagnostic#end\n */\n this.trigger('end');\n this.changeStatus(__('Done!'));\n this.setState('running', false);\n this.setState('done', true);\n\n return this;\n },\n\n /**\n * Runs the diagnostics\n * @returns {diagnostic}\n */\n run: function run() {\n var self = this;\n var information = {};\n var scores = {};\n\n // common handling for testers\n function doCheck(method, cb) {\n /**\n * Notifies the start of a tester operation\n * @event diagnostic#starttester\n * @param {String} name - The name of the tester\n */\n self.trigger('starttester', method);\n self.setState(method, true);\n\n self[method](function (status, details) {\n // the returned details must be ingested into the main details list\n _.assign(information, details);\n\n // sometimes it is an array, sometimes not...\n // simplify all by only supporting arrays\n if (!_.isArray(status)) {\n status = [status];\n }\n _.forEach(status, function (st) {\n scores[st.id] = st;\n });\n\n /**\n * Notifies the end of a tester operation\n * @event diagnostic#endtester\n * @param {String} name - The name of the tester\n * @param {Array} results - The results of the test\n */\n self.trigger('endtester', method, status);\n self.setState(method, false);\n\n // do not forget to notify the end of the operation to the manager\n cb();\n });\n }\n\n if (this.is('rendered')) {\n // set up the component to a new run\n this.prepare();\n\n // launch each testers in series, then display the results\n async.series([function (cb) {\n doCheck('checkBrowser', cb);\n }, function (cb) {\n doCheck('checkPerformances', cb);\n }, function (cb) {\n doCheck('checkBandwidth', cb);\n }, function (cb) {\n doCheck('checkUpload', cb);\n }], function () {\n // pick the lowest percentage as the main score\n var total = _.min(scores, 'percentage');\n\n // get a status according to the main score\n var status = self.status.getStatus(total.percentage, 'summary');\n\n // display the result\n status.title = __('Total');\n status.id = 'total';\n status.details = information;\n self.addResult(status);\n\n // done !\n self.finish();\n });\n }\n\n return this;\n }\n };\n\n /**\n * Builds an instance of the diagnostic tool\n * @param {Object} config\n * @param {String} [config.title] - The displayed title\n * @param {String} [config.header] - A header text displayed to describe the component\n * @param {String} [config.info] - An information text displayed to warn about run duration\n * @param {String} [config.button] - The caption of the start button\n * @param {String} [config.actionStore] - The name of the action to call to store the results\n * @param {String} [config.actionCheck] - The name of the action to call to check the browser results\n * @param {String} [config.controller] - The name of the controller to call\n * @param {String} [config.extension] - The name of the extension containing the controller\n * @param {Object} [config.storeParams] - A list of additional parameters to send with diagnostic results\n *\n * @param {String} [config.browser.action] - The name of the action to call to get the browser checker\n * @param {String} [config.browser.controller] - The name of the controller to call to get the browser checker\n * @param {String} [config.browser.extension] - The name of the extension containing the controller to call to get the browser checker\n *\n * @param {Number} [config.bandwidth.unit] - The typical bandwidth needed for a test taker (Mbps)\n * @param {Array} [config.bandwidth.ideal] - The thresholds for optimal bandwidth, one by bar\n * @param {Number} [config.bandwidth.max] - Maximum number of test takers to display\n *\n * @param {Array} [config.performances.samples] - A list of samples to render in order to compute the rendering performances\n * @param {Number} [config.performances.occurrences] - The number of renderings by samples\n * @param {Number} [config.performances.timeout] - Max allowed duration for a sample rendering\n * @param {Number} [config.performances.optimal] - The threshold for optimal performances\n * @param {Number} [config.performances.threshold] - The threshold for minimal performances\n * @returns {diagnostic}\n */\n function diagnosticFactory(config) {\n // fix the translations for content loaded from config files\n if (config) {\n _.forEach(['title', 'header', 'footer', 'info', 'button'], function(name) {\n if (config[name]) {\n config[name] = __(config[name]);\n }\n });\n }\n \n return component(diagnostic, _defaults)\n .setTemplate(mainTpl)\n\n // uninstalls the component\n .on('destroy', function () {\n this.controls = null;\n this.status = null;\n })\n\n // renders the component\n .on('render', function () {\n var self = this;\n\n // use an external component to handle the thresholds and status\n this.status = statusFactory();\n\n // get access to all needed placeholders\n this.controls = {\n $start: this.$component.find('[data-action=\"test-launcher\"]'),\n $status: this.$component.find('.status h2'),\n $results: this.$component.find('.results')\n };\n\n // start the diagnostic\n this.controls.$start.on('click', function () {\n self.run();\n });\n\n // show result details\n this.controls.$results.on('click', 'button[data-action=\"show-details\"]', function () {\n var $btn = $(this).closest('button');\n var $result = $btn.closest('[data-result]');\n var $details = $result.find('.details');\n $details.removeClass('hidden');\n $btn.addClass('hidden');\n $result.find('[data-action=\"hide-details\"]').removeClass('hidden');\n });\n\n // hide result details\n this.controls.$results.on('click', 'button[data-action=\"hide-details\"]', function () {\n var $btn = $(this).closest('button');\n var $result = $btn.closest('[data-result]');\n var $details = $result.find('.details');\n $details.addClass('hidden');\n $btn.addClass('hidden');\n $result.find('[data-action=\"show-details\"]').removeClass('hidden');\n });\n })\n .init(config);\n }\n\n return diagnosticFactory;\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) 2015 (original work) Open Assessment Technologies SA;\n *\n */\n\n/**\n *\n * @author dieter \n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/controller/CompatibilityChecker/diagnostics',[\n 'jquery',\n 'layout/loading-bar',\n 'ui/feedback',\n 'taoClientDiagnostic/tools/message',\n 'taoClientDiagnostic/tools/diagnostic/diagnostic'\n], function ($, loadingBar, feedback, showMessage, diagnosticFactory) {\n 'use strict';\n\n /**\n * @exports\n */\n return {\n start: function(config) {\n var $contentArea = $('.content');\n\n showMessage('#feedback-box');\n\n diagnosticFactory(config)\n .on('start', function() {\n loadingBar.start();\n })\n .on('end', function() {\n loadingBar.stop();\n })\n .render($contentArea);\n }\n };\n});\n\n","\ndefine('tpl!taoClientDiagnostic/templates/diagnostic/main', ['handlebars'], function(hb){ \nreturn hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, options, functionType=\"function\", escapeExpression=this.escapeExpression, self=this, helperMissing=helpers.helperMissing;\n\nfunction program1(depth0,data) {\n \n var buffer = \"\", stack1, helper;\n buffer += \"
\\n\";\n return buffer;\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\n/**\n *\n * @author dieter \n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/controller/Diagnostic/diagnostic',[\n 'jquery',\n 'i18n',\n 'helpers',\n 'layout/loading-bar',\n 'ui/actionbar',\n 'ui/feedback',\n 'taoClientDiagnostic/tools/diagnostic/diagnostic',\n 'tpl!taoClientDiagnostic/templates/diagnostic/main'\n], function ($, __, helpers, loadingBar, actionbar, feedback, diagnosticFactory, diagnosticTpl) {\n 'use strict';\n\n /**\n * The CSS scope\n * @type {String}\n */\n var cssScope = '.diagnostic-runner';\n\n // the page is always loading data when starting\n loadingBar.start();\n\n /**\n * Controls the readiness check page\n *\n * @type {Object}\n */\n var taoDiagnosticRunnerCtlr = {\n /**\n * Entry point of the page\n */\n start : function start() {\n var $container = $(cssScope);\n var extension = $container.data('extension') || 'taoClientDiagnostic';\n var $list = $container.find('.list');\n var $panel = $('.panel');\n var config = $container.data('config');\n var indexUrl = helpers._url('index', 'Diagnostic', extension);\n var workstationUrl = helpers._url('workstation', 'DiagnosticChecker', extension);\n /**\n * Installs the diagnostic tool GUI\n * @param {String} workstation\n */\n function installTester(workstation) {\n diagnosticFactory(config)\n .setTemplate(diagnosticTpl)\n .on('render', function() {\n var self = this;\n\n // get access to the input\n this.controls.$workstation = this.getElement().find('[data-control=\"workstation\"]')\n .on('keypress', function (e) {\n if (e.which === 13) {\n e.preventDefault();\n self.run();\n }\n })\n .val(workstation);\n })\n .on('start', function() {\n // append the workstation name to the queries\n this.config.storeParams = this.config.storeParams || {};\n this.config.storeParams.workstation = this.controls.$workstation.val();\n\n // disable the input when running the test\n this.controls.$workstation.prop('disabled', true);\n loadingBar.start();\n })\n .on('end', function() {\n // enable the input when the test is complete\n this.controls.$workstation.removeProp('disabled');\n loadingBar.stop();\n })\n .on('render', function() {\n loadingBar.stop();\n })\n .render($list);\n }\n\n actionbar({\n renderTo: $panel,\n buttons: [{\n id: 'back',\n icon: 'step-backward',\n title: __('Return to the list'),\n label: __('List of readiness checks'),\n action: function() {\n window.location.href = indexUrl;\n }\n }]\n });\n\n // need to known the workstation name to display it\n $.get(workstationUrl, 'json')\n .done(function(data) {\n installTester(data && data.workstation);\n })\n .fail(function() {\n feedback().error(__('Unable to get the workstation name!'));\n installTester();\n });\n }\n };\n\n return taoDiagnosticRunnerCtlr;\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) 2015 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoClientDiagnostic/controller/Diagnostic/index',[\n 'jquery',\n 'i18n',\n 'helpers',\n 'layout/loading-bar',\n 'util/encode',\n 'ui/feedback',\n 'ui/dialog',\n 'taoClientDiagnostic/tools/diagnostic/status',\n 'ui/datatable'\n], function ($, __, helpers, loadingBar, encode, feedback, dialog, statusFactory) {\n 'use strict';\n\n /**\n * The CSS scope\n * @type {String}\n */\n var cssScope = '.diagnostic-index';\n\n // the page is always loading data when starting\n loadingBar.start();\n\n /**\n * Format a number with decimals\n * @param {Number} number - The number to format\n * @param {Number} [digits] - The number of decimals\n * @returns {Number}\n */\n function formatNumber(number, digits) {\n var nb = undefined === digits ? 2 : Math.max(0, parseInt(digits, 10));\n var factor = Math.pow(10, nb) || 1;\n return Math.round(number * factor) / factor;\n }\n\n /**\n * Controls the readiness check page\n *\n * @type {Object}\n */\n var taoDiagnosticCtlr = {\n /**\n * Entry point of the page\n */\n start : function start() {\n var $container = $(cssScope);\n var extension = $container.data('extension') || 'taoClientDiagnostic';\n var $list = $container.find('.list');\n var dataset = $container.data('set');\n var config = $container.data('config') || {};\n var installedExtension = $container.data('installedextension') || false;\n var diagnosticUrl = helpers._url('diagnostic', 'Diagnostic', extension);\n var removeUrl = helpers._url('remove', 'Diagnostic', extension);\n var serviceUrl = helpers._url('diagnosticData', 'Diagnostic', extension);\n\n var performancesConfig = config.performances || {};\n var performancesOptimal = performancesConfig.optimal;\n var performancesRange = Math.abs(performancesOptimal - (performancesConfig.threshold));\n\n var diagnosticStatus = statusFactory();\n\n var tools = [];\n var actions = [];\n var model = [];\n\n // request the server with a selection of readiness check results\n function request(url, selection, message) {\n if (selection && selection.length) {\n loadingBar.start();\n\n $.ajax({\n url: url,\n data: {\n id: selection\n },\n dataType : 'json',\n type: 'POST',\n error: function() {\n loadingBar.stop();\n }\n }).done(function(response) {\n loadingBar.stop();\n\n if (response && response.success) {\n if (message) {\n feedback().success(message);\n }\n $list.datatable('refresh');\n } else {\n feedback().error(__('Something went wrong ...') + ' ' + encode.html(response.error), {encodeHtml: false});\n }\n });\n }\n }\n\n // request the server to remove the selected diagnostic-index\n function remove(selection) {\n request(removeUrl, selection, __('The readiness check result have been removed'));\n }\n\n // tool: page refresh\n tools.push({\n id: 'refresh',\n icon: 'reset',\n title: __('Refresh the page'),\n label: __('Refresh'),\n action: function() {\n $list.datatable('refresh');\n }\n });\n\n // tool: readiness check\n tools.push({\n id: 'launch',\n icon: 'play',\n title: __('Launch another readiness check'),\n label: __('Launch readiness check'),\n action: function() {\n window.location.href = diagnosticUrl;\n }\n });\n\n if(installedExtension){\n // tool: compatibilty via lti\n tools.push({\n id: 'lti',\n icon: 'play',\n title: __('Try a test delivery'),\n label: __('Try a test delivery'),\n action: function() {\n window.location.href = deliveryUrl;\n }\n });\n }\n\n // tool: remove selected results\n tools.push({\n id: 'remove',\n icon: 'remove',\n title: __('Remove the selected readiness check results'),\n label: __('Remove'),\n massAction: true,\n action: function(selection) {\n dialog({\n message: __('The selected readiness check results will be removed. Continue ?'),\n autoRender: true,\n autoDestroy: true,\n onOkBtn: function() {\n remove(selection);\n }\n });\n }\n });\n\n // action: remove the result\n actions.push({\n id: 'remove',\n icon: 'remove',\n title: __('Remove the readiness check result?'),\n action: function(id) {\n dialog({\n autoRender: true,\n autoDestroy: true,\n message: __('The readiness check result will be removed. Continue ?'),\n onOkBtn: function() {\n remove([id]);\n }\n });\n }\n });\n\n // column: Workstation identifier\n model.push({\n id: 'workstation',\n label: __('Workstation')\n });\n\n // column: Operating system information\n model.push({\n id: 'os',\n label: __('OS')\n });\n\n // column: Browser information\n model.push({\n id: 'browser',\n label: __('Browser')\n });\n\n // column: Performances of the workstation\n model.push({\n id: 'performance',\n label: __('Performances'),\n transform: function(value) {\n var cursor = performancesRange - value + performancesOptimal;\n var status = diagnosticStatus.getStatus(cursor / performancesRange * 100, 'performances');\n return status.feedback.message;\n }\n });\n\n // column: Available bandwidth\n model.push({\n id: 'bandwidth',\n label: __('Bandwidth'),\n transform: function(value) {\n var bandwidth = formatNumber(value);\n\n if (value > 100) {\n bandwidth = '> 100';\n }\n\n return bandwidth;// + ' Mbs';\n }\n });\n\n // column: Date of diagnostic\n model.push({\n id: 'date',\n label: __('Date')\n });\n\n $list\n .on('query.datatable', function() {\n loadingBar.start();\n })\n .on('load.datatable', function() {\n loadingBar.stop();\n })\n .datatable({\n url: serviceUrl,\n status: {\n empty: __('No readiness checks have been done!'),\n available: __('Readiness checks already done'),\n loading: __('Loading')\n },\n tools: tools,\n actions: actions,\n selectable: true,\n model: model\n }, dataset);\n }\n };\n\n return taoDiagnosticCtlr;\n});\n\n","\n(function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})\n('.diagnostics-main-area{max-width:768px;margin:40px auto 0 auto;background:#f3f1ef;border:1px solid #ddd;border-radius:2px;-webkit-border-radius:2px;padding:20px}.diagnostics-main-area h1,.diagnostics-main-area h2,.diagnostics-main-area h3{font-style:normal;font-family:\\\"Century Gothic\\\",CenturyGothic,AppleGothic,sans-serif}.diagnostics-main-area h1{margin-bottom:20px;font-size:20px;font-size:2rem}.diagnostics-main-area h2{margin:0;font-size:14px;font-size:1.4rem}.diagnostics-main-area h3{margin-top:10px;margin-bottom:5px;font-size:12px;font-size:1.2rem}.diagnostics-main-area .status h2,.diagnostics-main-area .details h2{margin:1rem 0}.diagnostics-main-area .legend{font-style:italic;font-weight:normal;font-family:\\\"Century Gothic\\\",CenturyGothic,AppleGothic,sans-serif;font-size:11px;font-size:1.1rem}.diagnostics-main-area .quality-bar{height:15px;background:linear-gradient(to right, #CE1431 0%, #D57915 25%, #D5A215 50%, #D5CB15 75%, #36B111 100%);opacity:.8;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;margin:5px 0 10px;position:relative}.diagnostics-main-area .quality-indicator{position:absolute;border-width:10px 8px;border-style:solid;border-color:#333 transparent transparent;top:-1px;height:25px;width:0}.diagnostics-main-area .quality-indicator[title]:before{font-size:11px;font-size:1.1rem;content:attr(title);position:absolute;top:-36px;left:-12px;text-align:center;width:24px;height:24px;line-height:24px;display:inline-block;background-color:#0e5d91;color:rgba(255,255,255,0.9);-moz-border-radius:12px;-webkit-border-radius:12px;border-radius:12px}.diagnostics-main-area .quality-indicator.wide[title]:before{left:-16px;width:32px}.diagnostics-main-area [data-result],.diagnostics-main-area .bandwidth-box{display:none}.diagnostics-main-area [data-action=bandwidth-launcher]{margin:5px 0 10px}.diagnostics-main-area li{padding-bottom:10px}.diagnostics-main-area .intro{margin-bottom:20px}.diagnostics-main-area table.matrix{border:1px solid #ddd;border-radius:2px;-webkit-border-radius:2px;margin-top:5px}table.datatable [class^=\\\"icon-\\\"]{padding:0}table.datatable td{font-size:90%;font-weight:normal}table.datatable .progress .state:not(:first-child):before{content:\\' - \\'}table.datatable .progress .item-time:before{content:\\' (\\'}table.datatable .progress .item-time .total:before{content:\\' / \\'}table.datatable .progress .item-time:after{content:\\')\\'}.diagnostic-scope h1{font-family:\\\"Century Gothic\\\",CenturyGothic,AppleGothic,sans-serif;font-size:22px;font-size:2.2rem;font-weight:normal}.diagnostic-scope h2{font-family:\\\"Century Gothic\\\",CenturyGothic,AppleGothic,sans-serif;font-size:18px;font-size:1.8rem;margin:30px 0 10px}.diagnostic-scope form.daterange label{padding:0}.diagnostic-scope form.daterange input{margin:0 10px}.diagnostic-scope table.datatable [class^=\\\"icon-\\\"]{padding:0}.diagnostic-scope table.datatable td{font-size:90%;font-weight:normal}.diagnostic-scope .content{margin:auto}.diagnostic-scope .diagnostic-index .content,.diagnostic-scope .diagnostic-runner .content{width:100%;padding:0 20px}.diagnostic-scope .diagnostic-index .message,.diagnostic-scope .diagnostic-runner .message{padding:8px;text-align:center}.diagnostic-scope .panel .action-bar{background:#266d9c;padding:3px;overflow:hidden;color:#e7eff4;margin:40px 0 10px 0}.diagnostic-scope .panel .action-bar .btn-info{overflow:hidden;background:transparent;border:1px rgba(255,255,255,0.3) solid}.diagnostic-scope .diagnostics-main-area{margin-top:0px;max-width:800px}\\n/*# sourceMappingURL=diagnostics.css.map */\\n');\n"]}
\ No newline at end of file