Add structured content blocks to an assignment (instructions, requirements, rubrics). Only admins and lecturers can add content.
POST
/api/v1/assignment/{id}/add-content
curl \
--request POST 'http://localhost:3500/api/v1/assignment/assignment-123/add-content' \
--header "Content-Type: application/json" \
--data '{"text":"1. Implement both merge sort and quicksort\n2. Include time complexity analysis\n3. Submit as .zip file","type":"INSTRUCTIONS","title":"Submission Guidelines"}'
Request examples
Instructions
{
"text": "1. Implement both merge sort and quicksort\n2. Include time complexity analysis\n3. Submit as .zip file",
"type": "INSTRUCTIONS",
"title": "Submission Guidelines"
}
{
"text": "Code correctness: 50 points\nCode efficiency: 30 points\nDocumentation: 20 points",
"type": "RUBRIC",
"title": "Grading Criteria"
}
Response examples (201)
{
"content": {
"id": "content-1",
"text": "1. Implement both merge sort and quicksort...",
"type": "INSTRUCTIONS",
"title": "Submission Guidelines",
"assignmentId": "assignment-123"
},
"message": "Content added successfully"
}