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

NameValue TypeValidationDetails
hwIDintRequiredHomework ID.
hwNamestringOptionalHomework name.
hwDescriptionstringOptionalHomework description.
hwDueDatedatetimeOptionalThe date until the theme will have to be submitted.
hwAllowAfterDueDateboolRequiredAllow after due date flag for homeworks.
hwRepartizari[]array(int)OptionalArray with student / professor / subject / class assignment ids to which the topic applies.
hwAttachments[]array(int)OptionalArray with the file ids that will be attached to the homework.

Validation

Error FieldError CodeError Message
hwRepartizari[]101One or more repartition are invalid.
hwAttachments[]102One or more attachments are invalid.

Output example

{
"result": true,
}