Pārlūkot izejas kodu

Added the necessary fields for the Assistant

victor_passos 2 gadi atpakaļ
vecāks
revīzija
259aed3f0c
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  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
       );