POST ./teme
It is used to create a new homework.
Specifications for when the homework is created by a student:
- The parameter hwDueDate will be empty.
- The parameter hwRepartizari it will be a single repartition array.
- The parameter hwAttachments will be empty.
- The parameter hwSolutions will be the ids of the solutions uploaded by the student.
- The hwsa key with the solution ids will also be present in the response.
POST parameters
| Name | Value Type | Validation | Details |
|---|---|---|---|
| hwName | string | Required | Homework name. |
| hwDescription | string | Required | Homework description. |
| hwDueDate | datetime | Required (only for teacher) | The date until the theme will have to be submitted. |
| hwSanID | int | Required | Semester ID. |
| hwAllowAfterDueDate | bool | Required | Allow after due date flag for homeworks. |
| hwRepartizari[] | array(int) | Required | Array with student / professor / subject / class assignment ids to which the topic applies. |
| hwAttachments[] | array(int) | Optional | Array with the file ids that will be attached to the homework. It is not required for the teacher; empty the student. |
| hwSolutions[] | array(int) | Optional | Array with the file ids that will be attached to the homework as solutions. It is required if the homework is submitted by the student. |
Validation
| Error Field | Error Code | Error Message |
|---|---|---|
| hwRepartizari[] | 101 | One or more repartition are invalid. |
| hwAttachments[] | 102 | One or more attachments are invalid. |
Output example
{"hwID": "117","hwsa": [["fsID": "32523","hwsaID: "44333"],["fsID": "432","hwsaID: "222"]]}
