Merged
Conversation
fanpu
approved these changes
Jul 12, 2022
Contributor
fanpu
left a comment
There was a problem hiding this comment.
Great work catching this and the changes looks good! Could you also update the comments to include the subsequent columns that were elided so people will be able to know the entire roster format in the future?
- Avoid mapping semester (since it's unused anyway) - For ROSTER_COLUMNS_F16 format, fixed mapping for grade option
damianhxy
commented
Jul 12, 2022
| # Semester(0 - skip), Email(1), Last Name(2), First Name(3), School(4), | ||
| # Major(5), Year(6), Grade Policy(7), Course(8 - skip), Lecture(9), | ||
| # Section(10) | ||
| return parsedRoster |
Member
Author
There was a problem hiding this comment.
To be fully consistent with what we're doing with SIO rosters (i.e. dropping the Semester and Course columns here, even though they will be ignored later on anyway), we should technically use a "map" here [-1, 1, 2, 3, 4, 5, 6, 7, -1, 9, 10]. However, this doesn't make a difference unless for some reason we make use of those columns in the future.
Contributor
|
Updated changes looks good, don't worry about the stuff from S15 too, no one should be using those now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.namefor the missingcourseNumbercolumnROSTER_COLUMNS_F16andROSTER_COLUMNS_F20useLecture(rather thanCourse) forcourseLecturefield.ROSTER_COLUMNS_F16andROSTER_COLUMNS_F20formats in commentsmap[0](Semester) to-1since it is not usedgrading_policyinROSTER_COLUMNS_F16formatMotivation 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 forSemesterandcourseNumber, since the data is stored in@course). However, when exporting a roster, thecourseNumbercolumn is not outputted, which causes the columns to shift if we reimport the data (courseLecturewill now take on the value ofsection, andsectionwill be blank). This PR fixes this by using@course.namefor thecourseNumbercolumn.Furthermore, when processing Roster formats
ROSTER_COLUMNS_F16andROSTER_COLUMNS_F20, theCoursefield, instead of theLecturefield, 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, thecourseLecturewas correctly mapped to theLecturefield.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,ATest 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 --signto use pre-commit hook for linting