PUT ./teme
It is used to update a homework.
Only the values present in POST method will be validated and updated.
Attention! The function deletes attachments and repartition that are not in the POST method, so if you want to add a file in hwAttachments or a repatition in hwDistributions, the old ids will also be present. If you want to delete an attachment or a repartition, this endpoint will be called only with the ids to be kept.
PUT parameters
Name | Value Type | Validation | Details |
---|---|---|---|
hwID | int | Required | Homework ID. |
hwName | string | Optional | Homework name. |
hwDescription | string | Optional | Homework description. |
hwDueDate | datetime | Optional | The date until the theme will have to be submitted. |
hwAllowAfterDueDate | bool | Required | Allow after due date flag for homeworks. |
hwRepartizari[] | array(int) | Optional | 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. |
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
{"result": true,}