[Bugfix:InstructorUI] Fix Manage Students Toggle Columns#12953
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12953 +/- ##
============================================
- Coverage 21.40% 21.40% -0.01%
Complexity 9944 9944
============================================
Files 268 268
Lines 37124 37126 +2
Branches 494 494
============================================
Hits 7948 7948
- Misses 28686 28688 +2
Partials 490 490
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
First confirmed the Toggle Columns feature for Manage Students does not work on main. Any changes to column selection aren't saved or applied. Tested changes on macOS machine using Chrome browser. Toggle columns feature only started working after deleting active_student_columns cookie in DevTool's Application window. The new feature is working as expected and any buttons inside a column still work. When closing the tab, the columns are still configured the same way as it was last left. Also tested changes on Safari browser. Because I likely had no existing cookies for the site, the feature worked immediately without needing to manually delete anything. When I switched back to main after testing the PR in Safari, the columns were still configured from the PR branch. I had to clear the cookie again for the toggle columns to function as expected on main. Overall, the PR successfully fixes the toggle columns bug. One comment is that existing users with the old, broken cookie may need to delete it manually for the fix to take effect (as noted by Emma). |
dagemcn
left a comment
There was a problem hiding this comment.
I was able to verify that the columns to not update when on main. After checking out the branch and clearing my cookies, I was able to toggle columns. They persist through refreshed, changing pages, and logging out and back in. Code also looks good.
) ### Why is this Change Important & Necessary? Closes Submitty#12906 (toggle columns feature is broken) ### What is the New Behavior? Fixed a bug where the cookie (a string of 1's and 0's representing the active_columns) was not being set properly due to how PHP converts boolean values to strings. Now, when using the Toggle Columns feature, the columns should properly be toggled on and off. ### Screenshots Here's an example with everything toggled on: <img width="1649" height="783" alt="image" src="https://github.com/user-attachments/assets/2892f541-eb64-4eb2-bcca-6c3ec0dd9bc2" /> Here's an example with most things toggled off (not sure why you would want to do this particular combination) <img width="1652" height="733" alt="image" src="https://github.com/user-attachments/assets/e0e1a0f2-cde4-4b66-a240-4d7f54e85655" /> ### What steps should a reviewer take to reproduce or test the bug or new feature? 0. On main or before installing the changes, verify that the Toggle Columns feature does not work (columns are not actually toggled when setting them). 1. As instructor, navigate to the 'Manage Students' page of a course 2. Play with the toggle columns feature and test the toggling of all the columns. 3. Additionally, test that the buttons inside the columns still work (though this shouldn't be affected). 4. Test leaving the page / closing the tab and then coming back to verify that the cookie is saving correctly. ### Automated Testing & Documentation This is a simple bugfix and does not need to be covered by automated testing. ### Other information You may need to clear the site cookies before testing this feature.
* main: (78 commits) [Bugfix:TAGrading] Auto-open single file (#12625) [Feature:InstructorUI] Add sortable columns to manage students (#12957) [Dependency] Bump php-ds/php-ds from 1.7.0 to 2.0.1 in /site (#12827) [Refactor:TAGrading] Events Infrastructure & StatusBanner (#12941) [Dependency] Bump sqlalchemy from 2.0.48 to 2.0.51 in /.setup/pip (#12884) [Bugfix:Developer] trust hashicorp for vagrant install (#12968) [Feature:TAGrading] Backend for submission clustering (#12886) [Bugfix:InstructorUI] Missing Subsection in the Edit User form (#12955) [Bugfix:Submission] Warning Banners Accessibility Fix (#12956) [Bugfix:System] Preserve signup fields (#12939) [Bugfix:InstructorUI] Fix Csv Download of Subsections (#12954) [Bugfix:InstructorUI] Fix Manage Students Toggle Columns (#12953) [Feature:TAGrading] Persistent Auto-Open (#12931) [Bugfix:Submission] Dot File Upload (#12924) [Refactor:System] Declutter workers (#12815) [Bugfix:Developer] save/restore autograding_containers.json (#12952) [Bugfix:InstructorUI] Create Course Validation (#12949) [Testing:Notifications] Fix grade_inquiries.spec.js (#12950) [UI/UX:System] Add fullscreen button vue component (#12936) [Bugfix:TAGrading] Student Name Resize (#12946) ... # Conflicts: # .pylintrc
Why is this Change Important & Necessary?
Closes #12906 (toggle columns feature is broken)
What is the New Behavior?
Fixed a bug where the cookie (a string of 1's and 0's representing the active_columns) was not being set properly due to how PHP converts boolean values to strings.
Now, when using the Toggle Columns feature, the columns should properly be toggled on and off.
Screenshots
Here's an example with everything toggled on:

Here's an example with most things toggled off (not sure why you would want to do this particular combination)

What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
This is a simple bugfix and does not need to be covered by automated testing.
Other information
You may need to clear the site cookies before testing this feature.