Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
@course.name
for the missingcourseNumber
columnROSTER_COLUMNS_F16
andROSTER_COLUMNS_F20
useLecture
(rather thanCourse
) forcourseLecture
field.ROSTER_COLUMNS_F16
andROSTER_COLUMNS_F20
formats in commentsmap[0]
(Semester
) to-1
since it is not usedgrading_policy
inROSTER_COLUMNS_F16
formatMotivation and Context
The "General Autolab Format" is described by
Semester,email,last_name,first_name,school,major,year,grading_policy,courseNumber,courseLecture,section
.Inside
parse_roster_csv
, the corresponding fields are extracted (except forSemester
andcourseNumber
, since the data is stored in@course
). However, when exporting a roster, thecourseNumber
column is not outputted, which causes the columns to shift if we reimport the data (courseLecture
will now take on the value ofsection
, andsection
will be blank). This PR fixes this by using@course.name
for thecourseNumber
column.Furthermore, when processing Roster formats
ROSTER_COLUMNS_F16
andROSTER_COLUMNS_F20
, theCourse
field, instead of theLecture
field, is mapped tocourseLecture
, meaning that we are recording the Course name (e.g.15122
) as the Lecture number (which should be1
,2
, etc.). In older formatROSTER_COLUMNS_S15
, thecourseLecture
was correctly mapped to theLecture
field.Fixes #997.
How Has This Been Tested?
Test 1: Ensure General Autolab Format still works correctly
Roster
M22,xho@foo.bar,Ho,Damian,SCS,CS,2025,L,15122,1,A
Test 2: Check that Export + Import works correctly
Roster (Note the 4 undropped students)
Before PR: Export + Import
Observe that the section letter shifted into the lecture column.
After PR: Export + Import
Test 3: Check that CMU Roster Format works correctly
Roster
Before PR
Observe that Course number appears in the lecture field.
After PR
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for linting