Skip to content

[Feature:InstructorUI] GUI for instructors to archive course#12453

Merged
bmcutler merged 27 commits into
Submitty:mainfrom
davidyim03:main
Jun 19, 2026
Merged

[Feature:InstructorUI] GUI for instructors to archive course#12453
bmcutler merged 27 commits into
Submitty:mainfrom
davidyim03:main

Conversation

@davidyim03

@davidyim03 davidyim03 commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

Closes #10880

What is the New Behavior?

Before, there were no ways for the instructors to archive/unarchive courses in the GUI, it had to be done through manually modifying the DB.
A new checkbox was added in the danger zone in the course configurations so that instructors can archive and unarchive courses in the configurations tab.
Screenshot 2026-02-20 at 6 01 28 PM

An unarchivable field was added to the courses table since the original issue suggests that unarchiving may cause problems due to space limitations. This field can be modified through directly modifying the DB, and once the field is set to False, the course cannot be unarchived.

Screenshot 2026-02-20 at 6 06 48 PM

What steps should a reviewer take to reproduce or test the bug or new feature?

Log in as instructor and go to course configuration to click to archive/unarchive courses

Automated Testing & Documentation

Completed manual testing of archiving and unarchiving and checked if field gets modified correspondingly.
Since UI was edited, modified PHP testing to include the new field unarchivable and all tests pass.

Other information

New migration file added to add unarchivable field to courses table

@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Feb 20, 2026
@davidyim03 davidyim03 closed this Feb 20, 2026
@davidyim03 davidyim03 reopened this Feb 20, 2026
@davidyim03 davidyim03 closed this Feb 20, 2026
@davidyim03 davidyim03 changed the title [Feature: InstructorUI] GUI for instructors to archive/unarchive course [Feature: InstructorUI] GUI for instructors to archive course Feb 20, 2026
@davidyim03 davidyim03 reopened this Feb 21, 2026
@bmcutler

Copy link
Copy Markdown
Member

@davidyim03

The text you have next to archive course is incorrect.
The course is not 'hidden from the course list' -- the course is only visible to 'instructor' users in that course.
The system does not block new submissions to archived courses -- we would like that to be true -- we would prefer users with access to archived courses do not make any changes to the course, but this is not currently enforced and will be complicated to implement.

@davidyim03

davidyim03 commented Feb 21, 2026

Copy link
Copy Markdown
Contributor Author

@bmcutler do you think things like converting files to read only and backing up data should also be mentioned in the instructions so that instructor can take appropriate actions?

currently modified description to
Screenshot 2026-02-21 at 11 23 29 AM

@codecov

codecov Bot commented Mar 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.00000% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.48%. Comparing base (8fa4355) to head (c4485a8).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #12453      +/-   ##
============================================
- Coverage     21.48%   21.48%   -0.01%     
- Complexity     9842     9851       +9     
============================================
  Files           268      268              
  Lines         36851    36888      +37     
  Branches        495      495              
============================================
+ Hits           7919     7924       +5     
- Misses        28441    28473      +32     
  Partials        491      491              
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.01% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.51% <20.00%> (-0.01%) ⬇️
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

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.

Comment thread site/app/controllers/admin/ConfigurationController.php Outdated
Comment on lines +234 to +238
return MultiResponse::JsonOnlyResponse(
JsonResponse::getSuccessResponse([
'message' => 'Course archived successfully'
])
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You should just return JsonResponse::getSuccessResponse() directly

Comment thread site/app/libraries/database/DatabaseQueries.php
@davidyim03

Copy link
Copy Markdown
Contributor Author

Added new changes to incorporate feedback
Few things however: I've noticed some inconsistencies throughout the codebase regarding semester and term so I couldn't fully change all the wordings in my code to term since that might lead to having to change files unrelated to this PR

IDzyre
IDzyre previously requested changes Mar 17, 2026
Comment thread migration/migrator/migrations/master/20260220140000_add_course_unarchivable.py Outdated
Comment thread site/app/controllers/admin/ConfigurationController.php
@davidyim03

Copy link
Copy Markdown
Contributor Author

Fix: all linters now pass, cypress test fails on (Feature, Gradeable), but those are unrelated to the files I've modified so it might be a flaky test?

@IDzyre

IDzyre commented Mar 29, 2026

Copy link
Copy Markdown
Member

The CSS lint is failing due to an issue that was fixed on the main branch, so if you merge main into your PR that should pass. Also, the title module isn't passing the documentation tests. Also, yes one of the gradeable tests is currently failing on main, and will be fixed soon.

@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Apr 13, 2026

@Eli-J-Schwartz Eli-J-Schwartz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I tested this locally, and it seemed to work correctly; when I toggled the button, it switched from being available to being archived. I had to manually hard reload the page to see the actual button toggle change; do you know why this happens? Also, I noticed that there seem to be some changes from unrelated PRs in this one, such as changes to course_tables.sql. Finally, please fix the failing tests.

@dagemcn dagemcn changed the title [Feature: InstructorUI] GUI for instructors to archive course [Feature:InstructorUI] GUI for instructors to archive course Jun 5, 2026

@mattLif mattLif left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Feature works as intended, and code looks good.

Comment thread site/.performance_warning_ignore.json Outdated
Comment on lines +5 to +6
"/courses/<term>/<course>/config",
"/api/courses/<term>/<course>/config",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a way to not add these to the performance warnings?

@dagemcn dagemcn Jun 17, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Added a db query and updated ConfigurationController accordingly to reduce db queries to less than 20, let me know what you think of this approach.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think that is a valid approach, to combine the queries into one.

@github-actions github-actions Bot removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Jun 9, 2026

@mattLif mattLif left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Functionality still works, and changes look good. I'm approving.

@IDzyre
IDzyre dismissed their stale review June 18, 2026 21:57

Stale, comments addressed, but didn't test enough to explicitly approve.

@bmcutler
bmcutler merged commit abd1ba5 into Submitty:main Jun 19, 2026
17 of 26 checks passed
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 GUI for instructor to archive (& un-archive) courses

6 participants