Search code examples
desire2learnvalence

Create a Section in Desire 2 Learn


I'm trying to create a section in a course offering that does not already have sections.

I understand that I must first do a PUT request using Section.SectionPropertyData in order to initialise sections in the course offering.

The JSON request has the format:

{
    "EnrollmentStyle": 1,
    "EnrollmentQuantity": 0,
    "AutoEnroll": false,
    "RandomizeEnrollments": false
}

I am getting a BAD_REQUEST response. I suspect the values of enrollmentstyle and quantity are the issue. What should they be set to when I want to specify the members of each section and not have a maximum number of students in a section?


Solution

  • Turns out I needed:

    { "EnrollmentStyle": 1, "EnrollmentQuantity": 200, "AutoEnroll": false, "RandomizeEnrollments": false }

    So that EnrollmentQuantity was > 0. Not sure if this limits the number of users that can be enrolled in a section, but most of our sections have a maximum of 25 students anyway so won't be an issue.