Skip to content

Commit e164b93

Browse files
committed
Fixed output of eval func
1 parent 587a00c commit e164b93

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

evaluation_function.wl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ processEvaluate[jsonData_] := Module[{result, requestData, answer, response, par
1616
Print["Evaluating Response Against Answer"];
1717
result = EvaluationFunction[type, answer, response, params];
1818
Print["Output: ", result];
19-
result
19+
<| "command" -> "eval", "result" -> result |>
2020
]
2121

2222
processPreview[jsonData_] := Module[{result, requestData, response},
@@ -27,19 +27,19 @@ processPreview[jsonData_] := Module[{result, requestData, response},
2727

2828
result = PreviewFunction[response];
2929
Print["Result: ", result];
30-
result
30+
<| "command" -> "preview", "result" -> result |>
3131
]
3232

3333
evalQuestionIO = Function[
34-
Module[{jsonData, command, resultAssoc},
34+
Module[{jsonData, command, resultAssoc, response},
3535
jsonData = Import[#1, "JSON"] //. List :> Association;
3636
command = jsonData["method"];
3737

38-
resultAssoc = ExportForm[Which[
38+
resultAssoc = Which[
3939
command == "eval", processEvaluate[jsonData],
4040
command == "preview", processPreview[jsonData],
4141
True, "Incorrect command"
42-
]];
42+
];
4343

4444
Print["Outputted JSON"];
4545
Print[resultAssoc];

0 commit comments

Comments
 (0)