Added term-based suffixes to course names created via LTI to ensure uniqueness across academic years#7881
Conversation
Coverage Report for CI Build 24087247980Coverage increased (+0.005%) to 91.714%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
eb994e0 to
1262f73
Compare
| render 'message', status: :forbidden | ||
| return | ||
| end | ||
|
|
| # Define default URL options to not include locale | ||
| def default_url_options(_options = {}) | ||
| {} | ||
| def get_course_suffix(term_string) |
There was a problem hiding this comment.
The logic here looks good, but this is quite specific to how Canvas is being deployed at our institution.
Let's make this a more customizable approach by extracting this logic into a separate function in the same way we currently handle the course whitelisting. Specifically, we currently have a setting called course_filter_file, which defines a module LtiConfig. Let's rename the setting to something more general like adapter_file and then define a new method in there.
Simultaneously, I think it's too restrictive to only allow suffixes to be added. Rather, let's have this method take in an lti_deployment argument and return a string for the name. This will allow further customization of the course name.
Finally, after reviewing the course names on Quercus more carefully, I now believe that the most appropriate short identifier (for UofT) should follow the format "CSC108H1F 20259". In particular, the course code should show the full "H1F" part, and the term should be in the five-digit format 20259. This will make these identifiers consistent with what appears to students on Quercus and other systems.
1262f73 to
797da0c
Compare
Proposed Changes
(Describe your changes here. Also describe the motivation for your changes: what problem do they solve, or how do they improve the application or codebase? If this pull request fixes an open issue, use a keyword to link this pull request to the issue.)
Currently, courses created via Canvas lack a term identifier, leading to potential duplicates in future years. This change integrates the
Canvas.term.nameparameter as a suffix to the MarkUs course name. This ensures each term’s deployment remains unique and correctly categorized within the database.Potential Term patterns from Canvas:
Screenshots of your changes (if applicable)
Associated documentation repository pull request (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
(Include any questions or comments you have regarding your changes.)