diff --git a/amd/build/ggbq.min.js b/amd/build/ggbq.min.js index 8a11703..cd39532 100644 --- a/amd/build/ggbq.min.js +++ b/amd/build/ggbq.min.js @@ -1,2 +1,2 @@ -define ("qtype_geogebra/ggbq",["jquery","//www.geogebra.org/apps/deployggb.js"],function(a,b){return{b64input:[],ggbBase64:[],xmlinput:[],ggbxml:[],currentvals:[],answerinput:[],responsevars:[],exerciseresultinput:[],qdiv:[],ggbDataset:[],init:function init(c){window.GGBQ=this;var d=document.getElementById(c).dataset,e=d.slot;window.ggbAppletOnLoad=function(a){if(-1!=a){document.querySelector("article").onkeydown=this.checkEnter;var b=a.substring(9),c=window[a];for(var d in window.GGBQ.currentvals[b]){c.setValue(d,window.GGBQ.currentvals[b][d])}window.GGBQ.b64input[b].val(c.getBase64());window.GGBQ.xmlinput[b].val(c.getXML());var e=c.startExercise();for(var f in e){window.GGBQ.qdiv[b].innerHTML=window.GGBQ.qdiv[b].innerHTML.replace("{"+f+"}",e[f])}window.GGBQ.qdiv[b].style.visibility="visible";if(""==window.GGBQ.answerinput[b].val()){var g="";window.GGBQ.responsevars[b].forEach(function(a){if(c.isDefined(a)){g+=c.getValue(a)}else{g+=0}});window.GGBQ.answerinput[b].val(g)}}};this.b64input[e]=a(document.getElementById(d.b64input));this.ggbBase64[e]=this.b64input[e].val();this.xmlinput[e]=a(document.getElementById(d.xmlinput));this.ggbxml[e]=this.xmlinput[e].val();this.qdiv[e]=a("#q"+e+" .qtext")[0];var f=JSON.parse(d.parameters);if(""!=this.ggbBase64[e]){f.ggbBase64=this.ggbBase64[e]}f.language=d.lang;f.moodle="takingQuiz";delete f.material_id;f.id="ggbApplet"+e;var g=JSON.parse(d.views),h=new b(f,g,d.html5NoWebSimple);h.setHTML5Codebase("https://cdn.geogebra.org/apps/5.0.541.0/web3d");h.inject(d.div,"preferHTML5");a("#responseform").on("submit",this.getBase64andCheck);a(document.getElementById(d.div)).on("mouseleave",this.getBase64andCheck);this.currentvals[e]=d.vars;this.answerinput[e]=a(document.getElementById(d.answerinput));this.exerciseresultinput[e]=a(document.getElementById(d.exerciseresultinput));this.responsevars[e]=JSON.parse(d.responsevars)},checkEnter:function checkEnter(a){a=a||event;var b=/textarea/i.test((a.target||a.srcElement).tagName);return b||13!==(a.keyCode||a.which||a.charCode||0)},getBase64andCheck:function getBase64andCheck(){for(var a=0,b;a\n * @copyright (c) International GeoGebra Institute 2018\n * @license http://www.geogebra.org/license\n */\ndefine(['jquery', '//www.geogebra.org/apps/deployggb.js'], function($, GGBApplet) {\n /**\n * Created by Christoph on 25.08.19.\n */\n\n return {\n b64input: [],\n ggbBase64: [],\n xmlinput: [],\n ggbxml: [],\n currentvals: [],\n answerinput: [],\n responsevars: [],\n exerciseresultinput: [],\n qdiv: [],\n //parameters: {},\n ggbDataset: [],\n //applet1,\n\n init: function(appletParametersID) {\n window.GGBQ = this;\n\n var ggbDataset = document.getElementById(appletParametersID).dataset;\n var slot = ggbDataset.slot;\n\n window.ggbAppletOnLoad = function(ggbAppletId) {\n if (ggbAppletId != -1) {\n document.querySelector('article').onkeydown = this.checkEnter;\n var id = ggbAppletId.substring(9);\n var ggbApplet = window[ggbAppletId];\n for (var label in window.GGBQ.currentvals[id]) {\n ggbApplet.setValue(label, window.GGBQ.currentvals[id][label]);\n }\n window.GGBQ.b64input[id].val(ggbApplet.getBase64());\n window.GGBQ.xmlinput[id].val(ggbApplet.getXML());\n var numvars = ggbApplet.startExercise();\n for (var key in numvars) {\n window.GGBQ.qdiv[id].innerHTML =\n window.GGBQ.qdiv[id].innerHTML.replace(\"{\" + key + \"}\", numvars[key]);\n }\n window.GGBQ.qdiv[id].style.visibility = 'visible';\n\n if (window.GGBQ.answerinput[id].val() == '') {\n var responsestring = '';\n window.GGBQ.responsevars[id].forEach(function(responsevar) {\n if (ggbApplet.isDefined(responsevar)) {\n responsestring += ggbApplet.getValue(responsevar);\n } else {\n responsestring += 0;\n }\n });\n window.GGBQ.answerinput[id].val(responsestring);\n }\n }\n };\n\n // jquery doesn't handle the colon : but later we expect a jquery optject, so ...\n this.b64input[slot] = $(document.getElementById(ggbDataset.b64input));\n this.ggbBase64[slot] = this.b64input[slot].val();\n\n this.xmlinput[slot] = $(document.getElementById(ggbDataset.xmlinput));\n this.ggbxml[slot] = this.xmlinput[slot].val();\n this.qdiv[slot] = $(\"#q\" + (slot) + \" .qtext\")[0];\n\n var parameters = JSON.parse(ggbDataset.parameters);\n if (this.ggbBase64[slot] != '') {\n parameters.ggbBase64 = this.ggbBase64[slot];\n }\n parameters.language = ggbDataset.lang;\n parameters.moodle = \"takingQuiz\";\n delete parameters.material_id;\n\n parameters.id = 'ggbApplet' + slot;\n\n var views = JSON.parse(ggbDataset.views);\n\n var applet1 = new GGBApplet(parameters, views, ggbDataset.html5NoWebSimple);\n applet1.setHTML5Codebase(\"https://cdn.geogebra.org/apps/5.0.541.0/web3d\");\n applet1.inject(ggbDataset.div, \"preferHTML5\");\n\n $('#responseform').on('submit', this.getBase64andCheck);\n\n $(document.getElementById(ggbDataset.div)).on('mouseleave', this.getBase64andCheck);\n\n this.currentvals[slot] = ggbDataset.vars;\n this.answerinput[slot] = $(document.getElementById(ggbDataset.answerinput));\n this.exerciseresultinput[slot] = $(document.getElementById(ggbDataset.exerciseresultinput));\n this.responsevars[slot] = JSON.parse(ggbDataset.responsevars);\n },\n checkEnter: function(e) {\n e = e || event;\n var txtArea = /textarea/i.test((e.target || e.srcElement).tagName);\n return txtArea || (e.keyCode || e.which || e.charCode || 0) !== 13;\n },\n\n\n getBase64andCheck: function() {\n for (var i = 0; i < window.GGBQ.answerinput.length; i++) {\n var ggbApplet = window['ggbApplet' + i];\n if (typeof ggbApplet !== \"undefined\") {\n window.GGBQ.b64input[i].val(ggbApplet.getBase64());\n window.GGBQ.xmlinput[i].val(ggbApplet.getXML());\n\n var responsestring = '';\n for (var j = 0; j < window.GGBQ.responsevars[i].length; j++) {\n if (ggbApplet.isDefined(window.GGBQ.responsevars[i][j])) {\n responsestring += ggbApplet.getValue(window.GGBQ.responsevars[i][j]);\n } else {\n responsestring += 0;\n }\n }\n\n window.GGBQ.answerinput[i].val(responsestring);\n window.GGBQ.exerciseresultinput[i].val(JSON.stringify(ggbApplet.getExerciseResult()));\n }\n }\n },\n\n };\n});\n"],"file":"ggbq.min.js"} \ No newline at end of file +{"version":3,"sources":["../src/ggbq.js"],"names":["define","$","GGBApplet","b64input","ggbBase64","xmlinput","ggbxml","currentvals","answerinput","responsevars","exerciseresultinput","qdiv","ggbDataset","init","appletParametersID","window","GGBQ","document","getElementById","dataset","slot","ggbAppletOnLoad","ggbAppletId","querySelector","onkeydown","checkEnter","id","substring","ggbApplet","label","setValue","val","getBase64","getXML","numvars","startExercise","key","innerHTML","replace","style","visibility","responsestring","forEach","responsevar","isDefined","getValue","parameters","JSON","parse","aspectratio","height","width","parent","language","lang","moodle","material_id","views","applet1","html5NoWebSimple","setHTML5Codebase","inject","div","on","getBase64andCheck","vars","e","event","txtArea","test","target","srcElement","tagName","keyCode","which","charCode","i","length","j","stringify","getExerciseResult"],"mappings":"AAUAA,OAAM,uBAAC,CAAC,QAAD,CAAW,sCAAX,CAAD,CAAqD,SAAUC,CAAV,CAAaC,CAAb,CAAwB,CAK/E,MAAO,CACHC,QAAQ,CAAE,EADP,CAEHC,SAAS,CAAE,EAFR,CAGHC,QAAQ,CAAE,EAHP,CAIHC,MAAM,CAAE,EAJL,CAKHC,WAAW,CAAE,EALV,CAMHC,WAAW,CAAE,EANV,CAOHC,YAAY,CAAE,EAPX,CAQHC,mBAAmB,CAAE,EARlB,CASHC,IAAI,CAAE,EATH,CAWHC,UAAU,CAAE,EAXT,CAcHC,IAAI,CAAE,cAAUC,CAAV,CAA8B,CAChCC,MAAM,CAACC,IAAP,CAAc,IAAd,CADgC,GAG5BJ,CAAAA,CAAU,CAAGK,QAAQ,CAACC,cAAT,CAAwBJ,CAAxB,EAA4CK,OAH7B,CAI5BC,CAAI,CAAGR,CAAU,CAACQ,IAJU,CAMhCL,MAAM,CAACM,eAA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B7B,MAAM,CAACC,IAAP,CAAYP,YAAZ,CAAyBmE,CAAzB,EAA4BE,CAA5B,CAApB,CAAJ,CAAyD,CACrDrC,CAAc,EAAIb,CAAS,CAACiB,QAAV,CAAmB9B,MAAM,CAACC,IAAP,CAAYP,YAAZ,CAAyBmE,CAAzB,EAA4BE,CAA5B,CAAnB,CACrB,CAFD,IAEO,CACHrC,CAAc,EAAI,CACrB,CACJ,CAED1B,MAAM,CAACC,IAAP,CAAYR,WAAZ,CAAwBoE,CAAxB,EAA2B7C,GAA3B,CAA+BU,CAA/B,EACA1B,MAAM,CAACC,IAAP,CAAYN,mBAAZ,CAAgCkE,CAAhC,EAAmC7C,GAAnC,CAAuCgB,IAAI,CAACgC,SAAL,CAAenD,CAAS,CAACoD,iBAAV,EAAf,CAAvC,CACH,CACJ,CACJ,CAvHE,CA0HV,CA/HK,CAAN","sourcesContent":["/**\n * Javascript Controller to embed GGBApplet\n *\n * This class provides all the functionality for the new assign module.\n *\n * @package assignsubmission_geogebra\n * @author Christoph Stadlbauer \n * @copyright (c) International GeoGebra Institute 2018\n * @license http://www.geogebra.org/license\n */\ndefine(['jquery', '//www.geogebra.org/apps/deployggb.js'], function ($, GGBApplet) {\n /**\n * Created by Christoph on 25.08.19.\n */\n\n return {\n b64input: [],\n ggbBase64: [],\n xmlinput: [],\n ggbxml: [],\n currentvals: [],\n answerinput: [],\n responsevars: [],\n exerciseresultinput: [],\n qdiv: [],\n //parameters: {},\n ggbDataset: [],\n //applet1,\n\n init: function (appletParametersID) {\n window.GGBQ = this;\n\n var ggbDataset = document.getElementById(appletParametersID).dataset;\n var slot = ggbDataset.slot;\n\n window.ggbAppletOnLoad = function (ggbAppletId) {\n if (ggbAppletId != -1) {\n document.querySelector('article').onkeydown = this.checkEnter;\n var id = ggbAppletId.substring(9);\n var ggbApplet = window[ggbAppletId];\n for (var label in window.GGBQ.currentvals[id]) {\n ggbApplet.setValue(label, window.GGBQ.currentvals[id][label]);\n }\n window.GGBQ.b64input[id].val(ggbApplet.getBase64());\n window.GGBQ.xmlinput[id].val(ggbApplet.getXML());\n var numvars = ggbApplet.startExercise();\n for (var key in numvars) {\n window.GGBQ.qdiv[id].innerHTML =\n window.GGBQ.qdiv[id].innerHTML.replace(\"{\" + key + \"}\", numvars[key]);\n }\n window.GGBQ.qdiv[id].style.visibility = 'visible';\n\n if (window.GGBQ.answerinput[id].val() == '') {\n var responsestring = '';\n window.GGBQ.responsevars[id].forEach(function (responsevar) {\n if (ggbApplet.isDefined(responsevar)) {\n responsestring += ggbApplet.getValue(responsevar);\n } else {\n responsestring += 0;\n }\n });\n window.GGBQ.answerinput[id].val(responsestring);\n }\n }\n };\n\n // jquery doesn't handle the colon : but later we expect a jquery optject, so ...\n this.b64input[slot] = $(document.getElementById(ggbDataset.b64input));\n this.ggbBase64[slot] = this.b64input[slot].val();\n\n this.xmlinput[slot] = $(document.getElementById(ggbDataset.xmlinput));\n this.ggbxml[slot] = this.xmlinput[slot].val();\n this.qdiv[slot] = $(\"#q\" + (slot) + \" .qtext\")[0];\n\n var parameters = JSON.parse(ggbDataset.parameters);\n if (this.ggbBase64[slot] != '') {\n parameters.ggbBase64 = this.ggbBase64[slot];\n }\n\n // To adjust the width of the ggbApplet to the available area.\n var aspectratio = parameters.height / parameters.width;\n if (aspectratio > 0) {\n parameters.width = $(\".qtext\").parent().width();\n parameters.height = parameters.width * aspectratio;\n }\n\n parameters.language = ggbDataset.lang;\n parameters.moodle = \"takingQuiz\";\n delete parameters.material_id;\n\n parameters.id = 'ggbApplet' + slot;\n\n var views = JSON.parse(ggbDataset.views);\n\n var applet1 = new GGBApplet(parameters, views, ggbDataset.html5NoWebSimple);\n applet1.setHTML5Codebase(\"https://cdn.geogebra.org/apps/5.0.541.0/web3d\");\n applet1.inject(ggbDataset.div, \"preferHTML5\");\n\n $('#responseform').on('submit', this.getBase64andCheck);\n\n $(document.getElementById(ggbDataset.div)).on('mouseleave', this.getBase64andCheck);\n\n this.currentvals[slot] = ggbDataset.vars;\n this.answerinput[slot] = $(document.getElementById(ggbDataset.answerinput));\n this.exerciseresultinput[slot] = $(document.getElementById(ggbDataset.exerciseresultinput));\n this.responsevars[slot] = JSON.parse(ggbDataset.responsevars);\n },\n checkEnter: function(e) {\n e = e || event;\n var txtArea = /textarea/i.test((e.target || e.srcElement).tagName);\n return txtArea || (e.keyCode || e.which || e.charCode || 0) !== 13;\n },\n\n\n getBase64andCheck: function() {\n for (var i = 0; i < window.GGBQ.answerinput.length; i++) {\n var ggbApplet = window['ggbApplet' + i];\n if (typeof ggbApplet !== \"undefined\") {\n window.GGBQ.b64input[i].val(ggbApplet.getBase64());\n window.GGBQ.xmlinput[i].val(ggbApplet.getXML());\n\n var responsestring = '';\n for (var j = 0; j < window.GGBQ.responsevars[i].length; j++) {\n if (ggbApplet.isDefined(window.GGBQ.responsevars[i][j])) {\n responsestring += ggbApplet.getValue(window.GGBQ.responsevars[i][j]);\n } else {\n responsestring += 0;\n }\n }\n\n window.GGBQ.answerinput[i].val(responsestring);\n window.GGBQ.exerciseresultinput[i].val(JSON.stringify(ggbApplet.getExerciseResult()));\n }\n }\n },\n\n };\n});\n"],"file":"ggbq.min.js"} \ No newline at end of file diff --git a/version.php b/version.php index a46a5a4..b5b6424 100644 --- a/version.php +++ b/version.php @@ -13,7 +13,8 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'qtype_geogebra'; -$plugin->version = 2021062300; +$plugin->version = 2021062400; +$plugin->release = '1.11.1'; $plugin->requires = 2018051702; $plugin->dependencies = array( @@ -22,5 +23,3 @@ ); $plugin->maturity = MATURITY_STABLE; - -$plugin->release = '1.9.2';