Sections in courses

Sections are a useful feature in Canvas. This page introduces some tools for working with Sections using a program.

The first task is to figure out what sections exist for a course and which students are in which section(s). A simply program to do this is  Download list_sections_in_course.py

 it takes a course_id as an argument and creates a spreadsheet of the form: sections-in-190.xlsx (for the course 190). This spread sheet has a page "Sections" and a page "Students" which respectively list the information about the sections in the course and the student in the course (including which section(s) thy are in).

In order to create a new section you can use: Download create_sections_in_course.py

. This is used as follows:

./create_sections_in_course.py 190 "A section" "B section" "C section"

After creating a section you might want to delete it. You can delete sections by section_id (a number) with  Download delete_section_by_id.py

This is used as follows:

./delete_section_by_id.py 5049 5050

Of course one might want to take a spreadsheet of students (as produced by the first program), then augment it with a new list of sections as a column - so that each student is associated with one of the new sections.  This program is Download place_students_in_sections_in_course.py

.

For example, I create a new column in the spreadsheet labelled quiz1_sections and populated it with entries of the form: quiz1_section_0, quiz1_section_1, quiz1_section_2, and quiz1_section_4. Then I ran the program to enroll the students in the indicated section: 

./place_students_in_sections_in_course.py 190 new_sections-in-190.xlsx "quiz1_sections"

The result was checked by running the listing program once again.


An obvious extension is to randomly assign students to a set of N sections (with balancing over the set of sections). For example, this could be used to form sections for the purpose of assigning each section a different version of a quiz.

Note: Section names must be strings.