- Create a field for the user's name, preferably as the first field
- Prefix every question with
questionIndex.
E.g.
1. Why doesn't JotForm have an auto-grader
?
- Prefix each answer with a letter, (A, B, C, D...)
E.g.
A. I don't know B. Option name C. I have no idea
- This tool has only been tested with multiple-choice and single-choice questions.
Your Answers JSON will be converted to a Marking
.
struct Marking: Codable {
var outputPath: String
var outputName: String
var questions: [Question]
}
struct Question: Codable {
var questionIndex: String
var answers: [Answer]
}
struct Answer: Codable {
var answerPrefix: String // A, B, C...
var score: Double
}
Prepare your Answers JSON like this to ensure that it works properly.
{
"outputPath": "/Where/Do/You/What/To/Put/Your/File/",
"outputName" : "Output.csv",
"questions" : [
{
"questionIndex" : "1",
"answers" : [
{
"answerPrefix" : "A",
"score" : 100
},
{
"answerPrefix" : "B",
"score" : 200
},
{
"answerPrefix" : "C",
"score" : 300
},
{
"answerPrefix" : "D",
"score" : 400
}
]
},
{
"questionIndex" : "2",
"answers" : [
{
"answerPrefix" : "A",
"score" : -100.86
},
{
"answerPrefix" : "B",
"score" : -200.56
},
{
"answerPrefix" : "C",
"score" : -300.24
},
{
"answerPrefix" : "D",
"score" : -400.05
}
]
}
]
}