2 Commity 6c7838ce80 ... af1e0193ea

Autor SHA1 Wiadomość Data
  Igor af1e0193ea changes 2 lat temu
  Igor ae9922c06e finished changes 2 lat temu

BIN
ivprog_2022_01_13_14_00.zip


+ 4 - 1
js/util/iassignHelpers.js

@@ -13,7 +13,10 @@ function parseActivityData (data, ignore_logs=false) {
     algorithm_in_ilm = data.split("\n::algorithm::")[1].split("\n::logs::")[0];
     const logs = data.split("\n::algorithm::")[1].split("\n::logs::")[1];
     if (logs != null && ignore_logs == false) {
-      parseLogs(logs);
+      try {
+        parseLogs(logs);
+      }
+      catch (e) {}
     }
   }
   let content;

+ 7 - 0
js/util/utils.js

@@ -194,7 +194,14 @@ export function isKeyword (text) {
 
 export function isValidIdentifier (identifier_str) {
   const validRegex = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);
+<<<<<<< HEAD
+  if (!validRegex) {
+    return false;
+  }
+  return !isKeyword(identifier_str);
+=======
   return validRegex && !isKeyword(identifier_str)
+>>>>>>> 6c7838ce80a547899aaa9e4248f41136f41da1e2
 }
 
 export function getCodeEditorModeConfig () {

+ 6 - 0
templates/index.html

@@ -161,6 +161,12 @@
       if (iLMparameters.iLM_PARAM_TeacherAutoEval == null) {
         ivprogCore.initVisualUI();
       }
+
+      setTimeout(function() {
+        $('.ivprog_visual_panel').removeClass("loading");
+        renderAlgorithm();
+      },
+      8000)
     });
   </script>
 </html>