Explorar el Código

Added the necessary fields for the Assistant

victor_passos hace 2 años
padre
commit
259aed3f0c
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      js/util/iassignHelpers.js

+ 4 - 1
js/util/iassignHelpers.js

@@ -1,4 +1,4 @@
-import { setTestCases, getTestCases } from "../visualUI/functions";
+import { setTestCases, setExerciseType, getTestCases } from "../visualUI/functions";
 import { generate } from "../visualUI/code_generator";
 import { IVProgAssessment } from "../assessment/ivprogAssessment";
 import { TestConsole } from "./testConsole";
@@ -31,6 +31,8 @@ export function prepareActivityToStudentHelper (ilm_cont) {
   return maybe_content.map((content) => {
     const testCases = content.testcases;
     setTestCases(testCases);
+    const exerciseType = content.exercisetype;
+    setExerciseType(exerciseType);
 
     let prog_type = null;
     if (content.settings_programming_type) {
@@ -97,6 +99,7 @@ export function autoEval (originalData, callback) {
       const con = new TestConsole([]);
       const autoAssessment = new IVProgAssessment(
         ast_code,
+        original.exerciseType,
         original.testcases,
         con
       );