Base question
Schema
-
A question:
-
must be an object
-
must have an id property
-
must have a type property
-
must have a content property
-
may have a title property
-
may have a description property
-
may have a meta property
-
may have an objects property
-
may have a resources property
-
may have a feedback property
-
may have a score property
-
-
The id property:
- must be a string
-
The type property:
-
must be a string
-
must hold a custom JSON MIME type
-
-
The title property:
- must be a string
-
The content property:
- must be a string
-
The description property:
- must be a string
-
The meta property:
- must satisfy the metadata schema
-
The objects property:
-
must be an array
-
Each object:
-
must satisfy the content schema
-
must be unique
-
-
-
The resources property:
-
must be an array
-
Each resource:
-
must satisfy the content schema
-
must be unique
-
-
-
The hints property:
-
must be an array
-
Each hint:
-
must satisfy the hint schema
-
must be unique
-
-
-
The feedback property:
- must be a string
-
The score property:
-
must be an object
-
must have a type property
-
The type property:
- must be either “sum” or “fixed”
-
Scores of type “fixed”:
-
must have a success property
-
must have a failure property
-
The success property:
- must be a number
-
The feedback property:
- must be a string
-
-
Examples
With hints
{
"id": "1",
"type": "application/x.type+json",
"title": "Question ?",
"content": "this is the content of the question",
"hints": [
{
"id": "1",
"value": "Lorem"
},
{
"id": "2",
"value": "Ipsum"
}
]
}
With metadata
{
"id": "1",
"type": "application/x.type+json",
"content": "this is the content of the question",
"meta": {
"authors": [
{
"name": "John Doe",
"status": "Tutor"
}
],
"license": "CC",
"created": "2014-06-23",
"category": {
"id": "1",
"name": "Category A"
}
},
"title": "Question ?"
}
With object
{
"id": "1",
"type": "application/x.type+json",
"content": "this is the content of the question",
"objects": [
{
"id": "1",
"type": "text/html",
"data": "<p>Lorem ipsum dolor sit amet</p>",
"meta": {
"title": "Lorem sample"
}
}
],
"title": "Is the previous text written in english ?"
}
With resource
{
"id": "1",
"type": "application/x.type+json",
"title": "Question ?",
"content": "this is the content of the question",
"resources": [
{
"id": "1",
"type": "application/pdf",
"url": "http://domain.com/syllabus.txt"
}
]
}
With fixed score
{
"id": "1",
"type": "application/x.type+json",
"title": "Question ?",
"content": "this is the content of the question",
"score": {
"type": "fixed",
"success": 5,
"failure": -1.5
}
}
With sum score
{
"id": "1",
"type": "application/x.type+json",
"title": "Question ?",
"content": "this is the content of the question",
"score": {
"type": "sum"
}
}
Global feedback
{
"id": "1",
"type": "application/x.type+json",
"title": "Question ?",
"content": "this is the content of the question",
"feedback": "Lorem ipsum dolor sit amet"
}
With more info
{
"id": "1",
"type": "application/x.type+json",
"title": "Question ?",
"content": "this is the content of the question",
"description": "Lorem ipsum dolor sit amet"
}
With title
{
"id": "1",
"type": "application/x.type+json",
"title": "Question ?",
"content": "this is the content of the question"
}