Closed kohlhase closed 8 months ago
I think the information "type" : "sproblem"
is not necessary. Same for id
s for answer classes. You're likely to just reproduce (parts of) the description anyway. Default description, feedback and points is sensible, though.
That would lead to JSON looking something like this:
{
"id" : "foo",
"title" : "FOO",
"subproblems" : [
{
"id" : "foo:first",
"title" : "First subproblem",
"pts" : 2,
"gnote" : {
"text":"that was easy",
"anscls": [
{
"pts" : 0,
"feedback" : "try harder",
"description" : "not found"
},
{
"pts" : 1.5,
"feedback" : "that was already good, but we want a street address",
"description" : "only specifies there are lots downtown"
},
{
"pts" : 2,
"description" : "gives street address"
},
{
"pts":2,
"description" : "gives directions to walk there"
}
]
}
}
]
}
one caveat: "title", "feedback" and "description" are going to be HTML. Largely they should be "trivial" HTML in the sense of: maybe a div
with some class that won't exist and can be ignored with plain text content. But I'm not in charge of what people put in there, so comple-latex-in-complex-HTML-out, I guess :D
Actually, I've noticed I need a bit more information in the JSON. We use the numbers of exercises for correcting, so it would be helpful to have them included in the json. Otherwise, it's difficult to know if the third problem specified is "1.3" or if there's only "1.1" and "1.2" and this one is already "2.1"...
And because I was editing anyway, I also added some answer traits (as opposed to answer classes, see #404 if you can find it).
{
"id" : "foo",
"title" : "FOO",
"number" : "2.1",
"subproblems" : [
{
"id" : "foo:first",
"title" : "First subproblem",
"number" : "2.1.1",
"pts" : 2,
"gnote" : {
"text":"that was easy",
"anscls": [
{
"pts" : 0,
"feedback" : "try harder",
"description" : "not found"
},
{
"pts" : 1.5,
"feedback" : "that was already good, but we want a street address",
"description" : "only specifies there are lots downtown"
},
{
"pts" : 2,
"description" : "gives street address"
},
{
"pts":2,
"description" : "gives directions to walk there"
},
{
"pts" : "+0.5",
"description" : "Student did better",
"feedback" : "well done"
},
{
"pts" : "-0.5",
"description" : "Student did worse"
}
]
}
}
]
}
this is done, right?
Answerclasses currently have the attributes
id
,pts
, andschema
, they also need thefeedback
attribute, so that we can writefor the answer class awarding 2 points by default, and providing the feedback
bar
. Here is a complete example, it is also at https://gl.mathhub.info/MiKoCourses/krmt/-/blob/main/source/SS23/probex.en.tex:This should export the JSON (see https://gl.mathhub.info/MiKoCourses/krmt/-/blob/main/source/SS23/probex.json: