|
@@ -4,12 +4,13 @@ import { DOMConsole } from "./../io/domConsole";
|
|
|
import { OutputMatching } from "./output_matching/output_matching";
|
|
|
import { Config } from "../util/config";
|
|
|
import { Assessment } from "./assessment";
|
|
|
+import { Assistant } from "../assistant/assistant";
|
|
|
|
|
|
const StringTypes = line_i18n.StringTypes;
|
|
|
|
|
|
export class IVProgAssessment extends Assessment {
|
|
|
- constructor (ast_code, testCases, domConsole) {
|
|
|
- super(ast_code, testCases, domConsole);
|
|
|
+ constructor (ast_code, exerciseType, testCases, domConsole) {
|
|
|
+ super(ast_code, exerciseType, testCases, domConsole);
|
|
|
}
|
|
|
|
|
|
runTest () {
|
|
@@ -65,6 +66,16 @@ export class IVProgAssessment extends Assessment {
|
|
|
"test_suite_grade",
|
|
|
(grade * 100).toFixed(2)
|
|
|
);
|
|
|
+ const ivprog_assistant = new Assistant();
|
|
|
+ let textArray = ivprog_assistant.analise("http://127.0.0.1:81/moodle/mod/iassign/endpoint.php",this.exerciseType,results);
|
|
|
+ Promise.resolve(textArray).then((Text) => {
|
|
|
+ this.writeToConsole(
|
|
|
+ DOMConsole.INFO,
|
|
|
+ StringTypes.MESSAGE,
|
|
|
+ "assistant_content",
|
|
|
+ results[0].generateAssistantOutput(Text[0],Text[1])
|
|
|
+ );
|
|
|
+ });
|
|
|
return grade;
|
|
|
});
|
|
|
// return testResult.then(function (total) {
|