Igor 2 anni fa
parent
commit
73aa464732
1 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 7 2
      js/visualUI/functions.js

+ 7 - 2
js/visualUI/functions.js

@@ -1615,7 +1615,7 @@ function stopExecution () {
 
 function downloadFile() {
   
-  var contentToSend = '';
+  var contentToSend = '{}\n::algorithm::';
 
   if (settingsProgrammingTypes == "textual") {
     contentToSend +=  ivprogCore.CodeEditor.getCode();
@@ -1642,7 +1642,12 @@ function uploadFile (evt) {
     oFReader.onload = function (oFREvent) {
       var txt = oFREvent.target.result;
       try {
-        window.program_obj = JSON.parse(txt);
+
+        previousContent = txt;
+        prepareActivityToStudent(txt);
+
+        // window.algorithm_in_ilm = txt;
+        // window.program_obj = JSON.parse(txt);
         window.renderAlgorithm();
       }
       catch (e) {