Pārlūkot izejas kodu

on moodle version, implemented automatic submition after every level

laira 3 gadi atpakaļ
vecāks
revīzija
f6d2f0e419
3 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  1. 4 0
      js/globals.js
  2. 0 1
      js/integrationFunctions.js
  3. 3 0
      js/map.js

+ 4 - 0
js/globals.js

@@ -597,6 +597,10 @@ const sendToDB = function (extraData) {
 
     moodleVar.time[mapPosition - 1] += game.timer.elapsed;
 
+    getAnswer();
+    
+    getEvaluation();
+
   } else {
 
     // Create some variables we need to send to our PHP file

+ 0 - 1
js/integrationFunctions.js

@@ -113,7 +113,6 @@ const iLMparameters = {
    * Gets current moodle language.
    */
   lang: getParameterByName("lang"),
-  iLM_PARAM_ServerToGetAnswerURL: getParameterByName("iLM_PARAM_ServerToGetAnswerURL"),
   iLM_PARAM_ServerToGetAnswerURL: getParameterByName("iLM_PARAM_ServerToGetAnswerURL")
 };
 

+ 3 - 0
js/map.js

@@ -350,6 +350,9 @@ const endState = {
         if (!moodle) {
           completedLevels = 0;
           game.state.start('menu');
+        } else {
+          // FOR MOODLE
+          parent.location.reload(true);
         }
 
       }