[Feature:InstructorUI] Update Course ID from Manage Sections#12354
[Feature:InstructorUI] Update Course ID from Manage Sections#12354
Conversation
Started functionality for the Update Course ID UI added previously, based on delete section and add section.
Switching the UI approach for updating course ID.
Began implementing backend part of changing course ID.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12354 +/- ##
============================================
- Coverage 21.67% 21.65% -0.02%
- Complexity 9623 9630 +7
============================================
Files 268 268
Lines 36171 36198 +27
Branches 486 486
============================================
Hits 7840 7840
- Misses 27849 27876 +27
Partials 482 482
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
I primarily conducted a functionality test. When testing the changed work, immediately I noticed that the "pencil" icons to change the course ID were present. Clicking on it opened up a small window that allows course ID to be changed, at which point I conducted a variety of tests for edge cases. It successfully limited me to inputting only a 5 digit number, with no letters working which is all good. It also prevented me from inputting an empty ID. There was however, one problem I noticed when testing. If, let's say, I make a course ID 00002. Now when I try to add a new course ID to another course it would deny me from adding 00002 as its ID, which is good and intended. The problem arose after I removed 00002 as an ID from the course I assigned it to, where after removing it, I still couldn't add it as a valid ID as seen below:
It is also may be important to note that this prevented me from adding 00002 to any of the listed sections after 00002 was removed. This could pose a significant problem and prevent course ID's from being edited, and I would recommend this be changed to only restrict course ID's being used.
JManion32
left a comment
There was a problem hiding this comment.
I did a code review. I left some comments throughout the code. Great job with this so far!
-Moved user-profile.css and rotating-sections.css to server.css -updated "semester" to "term" -removed csrf check -updated query logic
|
I did a functionality review on this, the previous issue that @aconfo mentioned seems to be resolved, though I can't speak to the changes requested for the code. This is a great quality of life improvement for instructors. I tested quite a few special characters along with alt-code characters. Everything is appears to be working as intended. One thing I noticed is a redundant close button, although I'm not sure if that is the correct style for a pop up menu like this. |
dagemcn
left a comment
There was a problem hiding this comment.
Refer to my above comment, I was confused on the workflow, my apologies.
@dagemcn We use a template for popups so we don't have to build a new one from scratch every time we need one. The |
Thank you for the feedback. I implemented the requested changes, and also please take a look at my reply to you on PR#12412, about merging my two PRs before moving the Javascript to its own .js file. I propose moving the add section input to a better spot in #12429 , and then a refactor PR for the page in the future. |
JManion32
left a comment
There was a problem hiding this comment.
Great work with this pull request, all of your changes look good to me. Just remove the comment I tagged about moving from another file.


Why is this Change Important & Necessary?
Fixes #8770
Currently, there is no way to update the Course ID for a given section on the Manage Sections page.
What is the New Behavior?
Now, there are pencil buttons next to the Course ID for each section. These buttons will open a popup so that an instructor can change the Course ID from this page. This change will update the Course ID in both the Submitty Database and Course Database.
The styling for the pencil buttons was taken directly from the User Profile page pencil buttons.
What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
Other information
This is not a breaking change.