learning-unlimited / ESP-Website

A website to help manage the logistics of large, short-term educational programs
82 stars 57 forks source link

Class difficulties are saved as strings #3708

Open willgearty opened 5 months ago

willgearty commented 5 months ago

The options for a class's difficulty is set by the global "teacherreg_difficulty_choices" tag. This tag is basically an ordered dictionary consisting of rankings/abbreviations (keys) and their descriptions (values). During class creation/editing, only the descriptions are shown, but the chosen key is saved as a string. This key is then shown on the course catalog and during student registration. However, this presents several problems:

  1. The difficulty description is never shown outside of teacher registration (as far as I can tell). This means that students can only infer what the difficulty is based on the abbreviation. The default for this is some number of stars, but it's unclear to students how many stars is the max, etc.
  2. When the choices tag is changed, this can possibly invalidate all course registration forms because the old chosen strings are no longer valid options. This similarly causes the difficulty filter on the course catalog to break (because the new options that are populated into the filter dropdown don't match the strings in the catalog).

I'm not too sure what the fix for this should be. Here are some possible options:

willgearty commented 5 months ago

@kkbrum brought this up and probably has thoughts.