Skip to content

Refactor Classlist / Graderlist Upload #12599

Description

@Eli-J-Schwartz

What problem are you trying to solve with Submitty
Right now, the classlist upload feature in the instructor UI, under the manage students tab, is confusing to use and develop. Documentation on how to use the feature is inconsistent between submitty.org and submitty.cs.rpi.edu, and the existence of multiple unlabeled optional fields make the logic confusing. Additionally, several parts of the code use confusing equations or hardcoded array indices to access the CSV formatted data. Finally, the "Download Users" button produces data that is incompatible with the "Upload Users" button.

Image Image

Code Example:

$pref_givenname_idx = $use_database ? 6 : 5;
$pref_familyname_idx = $pref_givenname_idx + 1;
$registration_type_idx = $pref_givenname_idx + 2;
$registration_section_idx = $list_type === 'classlist' ? 4 : $pref_givenname_idx + 2;
$grading_assignments_idx = $use_database ? 9 : 8;

Describe the way you'd like to solve this problem
The classlist upload system should parse the CSV headers to determine which columns correspond to what data, so that optional columns can be used or ignored easily. The names of the headers should be the same as what is downloaded, to make editing easier.

Describe any potential alternatives you'd tried to solve the problem
None.

Additional context
Issue discovered while trying to solve #12424, so a fix for this could easily fix that issue as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions