generated from LearningInfiniTensor/exam-grading
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 756983f
Showing
151 changed files
with
11,112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// TODO 判断文件是否存在 | ||
|
||
function judge(outputFile) { | ||
try { | ||
let jsonResult = JSON.parse(outputFile); | ||
let points = {}; | ||
jsonResult.exercises.forEach(({ name, result }) => { | ||
if (result) { | ||
points[name] = [1,1] | ||
} else { | ||
points[name] = [0,1] | ||
} | ||
}) | ||
return points; | ||
} catch(e) { | ||
return {}; | ||
} | ||
} | ||
|
||
module.exports.judge = judge; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
{ | ||
"exercises": [ | ||
{ | ||
"name": "exercise00", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise01", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise02", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise03", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise04", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise05", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise06", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise07", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise08", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise09", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise10", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise11", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise12", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise13", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise14", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise15", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise16", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise17", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise18", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise19", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise20", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise21", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise22", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise23", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise24", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise25", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise26", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise27", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise28", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise29", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise30", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise31", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise32", | ||
"result": false | ||
}, | ||
{ | ||
"name": "exercise33", | ||
"result": false | ||
} | ||
], | ||
"user_name": null, | ||
"statistics": { | ||
"total_exercations": 34, | ||
"total_succeeds": 0, | ||
"total_failures": 34, | ||
"total_time": 3 | ||
} | ||
} |
Oops, something went wrong.