Skip to content

[Feature:InstructorUI] Update Course ID from Manage Sections#12354

Merged
bmcutler merged 31 commits intomainfrom
set-courseid-manage-sections
Feb 20, 2026
Merged

[Feature:InstructorUI] Update Course ID from Manage Sections#12354
bmcutler merged 31 commits intomainfrom
set-courseid-manage-sections

Conversation

@Rkoester47
Copy link
Contributor

@Rkoester47 Rkoester47 commented Jan 27, 2026

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?

  1. Login as Instructor
  2. Go to Sample > Manage Sections
  3. Click the pencil button next to a course section
  4. Update the Course ID with a new number and save - ensure the success banner displays.
  5. Attempt to update a section to have the same Course ID as another section - error banner should display.

Automated Testing & Documentation

Other information

This is not a breaking change.

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.
@github-project-automation github-project-automation bot moved this to Seeking Reviewer in Submitty Development Jan 27, 2026
@automateprojectmangement automateprojectmangement bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Jan 27, 2026
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 0% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.65%. Comparing base (9c7283a) to head (b0b0ed1).
⚠️ Report is 23 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             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              
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.68% <0.00%> (-0.02%) ⬇️
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Rkoester47 Rkoester47 marked this pull request as ready for review February 3, 2026 17:41
@automateprojectmangement automateprojectmangement bot moved this from Work in Progress to Seeking Reviewer in Submitty Development Feb 3, 2026
Copy link

@aconfo aconfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Image Image Image 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.

@github-project-automation github-project-automation bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Feb 3, 2026
@Rkoester47 Rkoester47 requested a review from aconfo February 5, 2026 01:55
@automateprojectmangement automateprojectmangement bot moved this from Work in Progress to In Review in Submitty Development Feb 5, 2026
Copy link
Contributor

@JManion32 JManion32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@dagemcn
Copy link
Contributor

dagemcn commented Feb 6, 2026

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.
image
Someone more knowledgeable may be able to comment on this.

@dagemcn dagemcn self-requested a review February 6, 2026 17:49
@automateprojectmangement automateprojectmangement bot moved this from Work in Progress to In Review in Submitty Development Feb 6, 2026
@dagemcn dagemcn removed their request for review February 6, 2026 17:50
Copy link
Contributor

@dagemcn dagemcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refer to my above comment, I was confused on the workflow, my apologies.

@JManion32
Copy link
Contributor

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. image Someone more knowledgeable may be able to comment on this.

@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 close button in the top right is always there, and I believe the one on the bottom can be customized, but usually just stays as the default.

@Rkoester47
Copy link
Contributor Author

Rkoester47 commented Feb 10, 2026

I did a code review. I left some comments throughout the code. Great job with this so far!

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.

Copy link
Contributor

@JManion32 JManion32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Rkoester47 Rkoester47 moved this from In Review to Ready to Merge in Submitty Development Feb 20, 2026
@bmcutler bmcutler merged commit ec592ba into main Feb 20, 2026
25 checks passed
@bmcutler bmcutler deleted the set-courseid-manage-sections branch February 20, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add "course_id" to the database

5 participants