Parcourir la source

Merge branch 'fix/moodle-bugs' of ssh://200.144.254.107:2245/LInE/Ifractions-web into fix/moodle-bugs

lairaalmas il y a 1 an
Parent
commit
9c72a719f2
2 fichiers modifiés avec 12 ajouts et 0 suppressions
  1. 7 0
      js/globals/globals_functions.js
  2. 5 0
      js/moodle/integrationFunctions.js

+ 7 - 0
js/globals/globals_functions.js

@@ -169,6 +169,10 @@ const sendToDatabase = function (extraData) {
       '&iLM_PARAM_ArchiveContent=' +
       encodeURIComponent(report);
 
+    console.log(grade);
+    console.log(report);
+    console.log(moodleVar);
+
     const init = {
       method: 'POST',
       body: data,
@@ -202,6 +206,9 @@ const sendToDatabase = function (extraData) {
       langString +
       extraData;
 
+    console.log('----------------');
+    console.log(data);
+
     const url = 'php/save.php';
 
     const init = {

+ 5 - 0
js/moodle/integrationFunctions.js

@@ -67,6 +67,7 @@ function getAnswer() {
         moodleVar.time[i] +
         '}';
     }
+    console.log(str);
   } else {
     // Professor role: creating new assignment
     if (!gameName) {
@@ -111,6 +112,10 @@ function getEvaluation() {
     for (i = 0; i < moodleVar.hits.length && moodleVar.hits[i] == 1; i++);
     const grade = i / 4;
     return grade;
+  } else {
+    alert(
+      "(getEvaluation) I'm a professor getting an evaluation (getEvaluation())"
+    );
   }
 }