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

NameValue TypeValidationDetails
hwNamestringRequiredHomework name.
hwDescriptionstringRequiredHomework description.
hwDueDatedatetimeRequired (only for teacher)The date until the theme will have to be submitted.
hwSanIDintRequiredSemester ID.
hwAllowAfterDueDateboolRequiredAllow after due date flag for homeworks.
hwRepartizari[]array(int)RequiredArray 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. It is not required for the teacher; empty the student.
hwSolutions[]array(int)OptionalArray 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 FieldError CodeError Message
hwRepartizari[]101One or more repartition are invalid.
hwAttachments[]102One or more attachments are invalid.

Output example

{
"hwID": "117",
"hwsa": [
[
"fsID": "32523",
"hwsaID: "44333"
],
[
"fsID": "432",
"hwsaID: "222"
]
]
}