Repository navigation
Adding fields to roster.csv? #1136
|
If I were to manually add a couple of columns to roster.csv, would that cause issues anywhere or would they potentially be overwritten? What I'm trying to do is add a student id and Canvas ID field to the list so I could script a way to import grades from Classroom50 into Canvas. My concerns would be whether that would break something or if there's some process in place that would blank those fields out as the actions work with the csv file. Other option I'm leaning towards is a totally separate CSV file in the same folder with just their GH id and the two that I'd need to push to Canvas. I figure that would be the safest option to not mess with anything that CR50 uses directly. |
Replies: 1 comment
|
Yes, the current code supports adding extra columns directly to the existing I tested this with made-up One catch: the CLI's CSV import is a different path. It ignores new custom columns in the file being imported. So don't rely on an import to populate those IDs; add them to the stored roster itself. Importing a matching student didn't erase extras already stored on that row in the test. Keep These checks were against current |
Yes, the current code supports adding extra columns directly to the existing
roster.csv. It keeps columns it doesn't recognize when reading and writing the roster.I tested this with made-up
student_idandcanvas_idvalues, including leading zeros. They survived saving and reloading, changing a student's section, upserting the same student, and removing a different student. The web reader/writer and metadata-update checks passed too. The CLI writer includes the extra columns, and updating an existing row keeps its stored extras.One catch: the CLI's CSV import is a different path. It ignores new custom columns in the file being imported. So don't rely on an import to populate those IDs; a…