Преглед изворни кода

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

lairaalmas пре 1 година
родитељ
комит
9c72a719f2
2 измењених фајлова са 12 додато и 0 уклоњено
  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())"
+    );
   }
 }