Adding group numbers to list of students

It is very convenient to have the list of students augmented by the number of the group that they are in. The following workflow will produce a useful data set:

  1. Using the program list_students_in_course.pyView in a new window course_id (as described in Getting last_name and first_name from KTHIDs (used as SIS user IDs) to create a spreadsheet of the form: students-in-xxx.xlsx where xxx is the course_id
  2. Augment this spreadsheet with the group membership information for a given group set using the program Download augment_list_of_students_in_course_with_group.py course_id group_set_name. For example:
    ./augment_list_of_students_in_course_with_group.py 190 'Project Groups P1P2'
    

This produces a new spreadsheet students-in-xxx.xlsx with a column labelled 'Project Groups P1P2' and for each student in the course there is a row with the data:

id integration_id login_id name short_name sis_login_id sis_user_id sortable_name Project Groups P1P2

Now one can further augment this data with the Lat_name and First_name as shown earlier:

./augument_list_students_in_course.py 190 kthids-190a-augmented.csv

There result is a spreadsheet students-in-190-augmented.xlsx with the columns:

id integration_id login_id name short_name sis_login_id sis_user_id sortable_name Project Groups P1P2 Last_name First_name

Given this augmented spreadsheet it is now possible to inject these as custom columns into the Canvas gradebook using the program Download insert-custom-columns-from-spreadsheet.py

. This program takes the course_id and a list of column names, for example:

 

 ./insert-custom-columns-from-spreadsheet.py 190 'Last_name' 'First_name' 'Project Groups P1P2'
'Thu Dec 29 01:54:23 2016'
inserted column
column number:  50
inserted column
column number:  51
inserted column
column number:  52
'Thu Dec 29 01:57:32 2016'
'\n--DONE--\n\n'

Where the above column numbers are the custom column numbers assigned by the Canvas API. The resulting gradebook looks like the following:

custom_columns-20161229-cropped.png

If you want to delete the columns you can use the https://xxxx.instructure.com/doc/api/live environment.