Create Question Category [Post api/question-category/create]
Header
Content-type: application/json
Get All Question Categories [Get api/question-category/]
{
_id: ObjectId
description: String
}
Update Question Category [Put api/question-category/update/:categoryId]
Header
Content-type: application/json
Delete Question Category [Delete api/question-category/delete/:categoryId]
{
message: "Deleted",
success: true
}
Create Questions [Post api/question/create]
Header
Content-type: application/json
[{
category: ObjectId,
type: ["SINGLE CHOICE", "MULTI CHOICE", "FILL IN THE GAPS"],
instruction: String,
text: String,
options: [String],
answer: [String]
}]
Get All Questions [Get api/question/]
{
_id: ObjectId,
category: {
_id: ObjectId
description: String
},
type: String,
instruction: String,
text: String,
options: [String],
answer: [String]
}
Update Question [Put api/question/update/:questionId]
Header
Content-type: application/json
{
category: ObjectId,
type: ["SINGLE CHOICE", "MULTI CHOICE", "FILL IN THE GAPS"],
instruction: String,
text: String,
options: [String],
answer: [String]
}
Delete Question [Delete api/question/delete/:questionId]
{
message: "Deleted",
success: true
}
Create User [Post api/users/]
Header
Content-type: application/json
{
name: String,
email: String,
password: String,
role: ["user","admin"],
}
Get All Users [Get api/users/]
{
_id: ObjectId,
name: String,
email: String,
password: String,
role: String,
isActive: Boolean,
isVerified: Boolean
}
Create Assessment [Post api/assessment/create]
Header
Content-type: application/json
{
title: String,
description: String,
duration: Number,
numberOfQuestion: Number,
totalMark: Number,
dateTime: Date,
questionBank: [ObjectId]
}
Get All Assessments [Get api/assessment/]
{
_id: ObjectId,
title: String,
description: String,
duration: Number,
numberOfQuestion: Number,
totalMark: Number,
markPerQuestion: Number,
dateTime: Date,
questionBank: [{
_id: ObjectId,
description: String
}]
}
Update Assessment [Put api/assessment/update/:assessmentId]
Header
Content-type: application/json
{
title: String,
description: String,
duration: Number,
numberOfQuestion: Number,
totalMark: Number,
dateTime: Date,
questionBank: [ObjectId]
}
Delete Assessment [Delete api/assessment/delete/:assessmentId]
{
message: "Deleted",
success: true
}
Prepare Assessments For User [Get api/assessment/prepare/:userId/:assessmentId]
{
_id: ObjectId,
user: {
_id: ObjectId,
name: String,
email: String,
password: String,
role: String,
isActive: Boolean,
isVerified: Boolean
},
assessment: {
_id: ObjectId,
title: String,
description: String,
duration: Number,
numberOfQuestion: Number,
totalMark: Number,
markPerQuestion: Number,
dateTime: Date,
questionBank: [{
_id: ObjectId,
description: String
}]
},
mark: Number,
assessmentScript: [{
question: {
_id: ObjectId,
category: {
_id: ObjectId,
description: String
},
type: String,
instruction: String,
text: String,
options: [String],
answer: [String]
},
choice: [String],
isCorrect: Boolean,
markGotten: Number
}]
}
Submit Assessments For User [Post api/assessment/submit/:userId/:assessmentId]
Header
Content-type: application/json
[{
question: {
_id: ObjectId,
category: {
_id: ObjectId,
description: String
},
type: String,
instruction: String,
text: String,
options: [String],
answer: [String]
},
choice: [String],
}]
{
_id: ObjectId,
user: {
_id: ObjectId,
name: String,
email: String,
password: String,
role: String,
isActive: Boolean,
isVerified: Boolean
},
assessment: {
_id: ObjectId,
title: String,
description: String,
duration: Number,
numberOfQuestion: Number,
totalMark: Number,
markPerQuestion: Number,
dateTime: Date,
questionBank: [{
_id: ObjectId,
description: String
}]
},
mark: Number,
assessmentScript: [{
question: {
_id: ObjectId,
category: {
_id: ObjectId,
description: String
},
type: String,
instruction: String,
text: String,
options: [String],
answer: [String]
},
choice: [String],
isCorrect: Boolean,
markGotten: Number
}]
}