Skip to content

[Bugfix:Submission] release_hidden_gradeables fix#12422

Merged
bmcutler merged 16 commits into
mainfrom
Hidden_Show_Details_12411
Jun 4, 2026
Merged

[Bugfix:Submission] release_hidden_gradeables fix#12422
bmcutler merged 16 commits into
mainfrom
Hidden_Show_Details_12411

Conversation

@John-Roy123

@John-Roy123 John-Roy123 commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

Fixes #12411

What is the New Behavior?

Student users are now able to view the details of a hidden test in a gradeable if instructors add the "release_hidden_gradeables" flag

Before:
image
After:
image

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

  1. Log in as a bitdiddle
  2. Open a gradeable with viewable hidden tests cases (Autograder Hidden and Extra Credit (C++ Hidden Tests) in sample)
  3. Click "Show Details" on a hidden gradeable that has the button and the details should appear

Testing Security Error Fix:

  1. Log in as bitdiddle
  2. Open gradeable: Autograder Hidden and Extra Credit (C++ Hidden Tests) in sample
  3. open browser dev tools and go to network monitor
  4. click "Show Details" on the released hidden test case and retrieve the link made in the generated fetch request
  5. go to that link and verify you get a page giving you data on the released hidden test case
  6. modify the "index" value within the link from "index=4" to "index=5" (this is the index of the specified grading component)
  7. verify that "index=5" results in the link not giving you test case info because the hidden case is not released

Automated Testing & Documentation

Added e2e test to show hidden results do not show before submission is due, and then are able to show after due date.

Other information

This change affects the permissions a student has when viewing a hidden gradeable. Someone more familiar with the permissions structure should double-check to make sure the permission scope is as narrow as necessary.

Student users are now able to be served hidden tests details if professor allows
@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Feb 10, 2026
@John-Roy123 John-Roy123 changed the title Fixed user permissions [Bugfix:Submissions] Hidden Gradeables not expanding for students Feb 10, 2026
@codecov

codecov Bot commented Feb 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.64%. Comparing base (cf41dbd) to head (a0527ae).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #12422      +/-   ##
============================================
- Coverage     21.64%   21.64%   -0.01%     
- Complexity     9818     9823       +5     
============================================
  Files           268      268              
  Lines         36777    36781       +4     
  Branches        490      490              
============================================
  Hits           7960     7960              
- Misses        28331    28335       +4     
  Partials        486      486              
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.02% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.69% <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.

@John-Roy123 John-Roy123 changed the title [Bugfix:Submissions] Hidden Gradeables not expanding for students [Bugfix:Submissions] release_hidden_gradeables fix Feb 11, 2026
@John-Roy123 John-Roy123 changed the title [Bugfix:Submissions] release_hidden_gradeables fix [Bugfix:Submission] release_hidden_gradeables fix Feb 11, 2026
@Rkoester47

Copy link
Copy Markdown
Contributor

I was not able to reproduce your changes on this branch. Could you update your testing steps and maybe include screenshots to show your changes?

@John-Roy123

Copy link
Copy Markdown
Contributor Author

I was not able to reproduce your changes on this branch. Could you update your testing steps and maybe include screenshots to show your changes?

I updated my PR to include screenshots and clearer testing steps - keep in mind not all hidden gradeables will have the option to show details. If you go into sample/Autograder Hidden and Extra Credit (C++ Hidden Tests), there is a hidden test with the "show details" option. The changes should work on that.

@Rkoester47 Rkoester47 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 was able to test the functionality of the PR and can confirm that the hidden details does show the hidden test case for me on the gradeable described. I was able to open the drop down and see the diff checker for that particular hidden test. The code implementation seems to have succeeded in accomplishing what is described in the PR with minimal changes.

I have questions about the changes made to the gradeable_results.spec.js cypress test. Did you change the gradeable that this test usually accesses so that it will check your specific PR's test case? With your changes to this cypress test, some of the other portions of the test now fail where they would have succeeded in the past. Would it be better to create your own test that navigates to this gradeable and checks to see if test case 4 is expandable?

Changes user from student (version conflict) to bitdiddle (valid version) for test
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Feb 24, 2026
@John-Roy123

Copy link
Copy Markdown
Contributor Author

The Cypress test for this PR is taking longer than expected, but the intended functionality of this PR is correct. The Cypress test will be made into its own PR so that this change can be moved forward.

@Rkoester47 Rkoester47 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 was able to reproduce the steps described in this PR and see the hidden details. Once the gradeable was closed and released, the hidden details was viewable by the student, as intended.

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Mar 27, 2026
@bmcutler
bmcutler requested a review from cjreed121 March 29, 2026 15:11
@automateprojectmangement automateprojectmangement Bot moved this from Awaiting Maintainer Review to In Review in Submitty Development Mar 29, 2026

@cjreed121 cjreed121 left a comment

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.

This unfortunately allows for students to access the results of a hidden test case (without release_hidden_details being set to true). If you look at the network request being made for expanding the test cases, you will see it contains an index query parameter. Specifically look at frame size 13 which will have an index of 4, if you try an index of 5, you can now see the results of it by manually querying. Before this PR, this would not work. The permissions should not allow for this. Adjustments will need to be made to ensure this is not allowed. Perhaps the permissions should be split up.

@github-project-automation github-project-automation Bot moved this from In Review to Work in Progress in Submitty Development Mar 30, 2026
@John-Roy123 John-Roy123 moved this from Work in Progress to Seeking Reviewer in Submitty Development Apr 2, 2026
@John-Roy123 John-Roy123 moved this from Seeking Reviewer to Work in Progress in Submitty Development Apr 2, 2026
Updated ElectronicGraderControllers so that student users can no longer make ajax requests to prematurely view releasable hidden tests
@John-Roy123 John-Roy123 moved this from Work in Progress to Awaiting Maintainer Review in Submitty Development Apr 3, 2026
@bmcutler
bmcutler requested a review from hyeenaa April 6, 2026 19:26
@automateprojectmangement automateprojectmangement Bot moved this from Awaiting Maintainer Review to In Review in Submitty Development Apr 6, 2026
@John-Roy123
John-Roy123 requested a review from cjreed121 April 7, 2026 20:10

@hyeenaa hyeenaa 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.

Works as intended.

@Eli-J-Schwartz

Copy link
Copy Markdown
Contributor

Hi @John-Roy123, the commits you have made did not address the security issues mentioned by cjreed. For example, I was able to perform the following fetch request in the DevTools console: fetch("http://localhost:1511/courses/f25/sample/gradeable/grades_released_homework_autohiddenEC/grading/student_output?who_id=JErqqcVQeaIaXEi&index=5&version=1"), and the hidden results would be visibile in the network tab. Alternatively, I could have also just visited http://localhost:1511/courses/f25/sample/gradeable/grades_released_homework_autohiddenEC/grading/student_output?who_id=JErqqcVQeaIaXEi&index=5&version=1 directly, which also displays the hidden results.

@hyeenaa
hyeenaa self-requested a review May 1, 2026 17:37
@mattLif mattLif self-assigned this Jun 2, 2026
@mattLif mattLif moved this from In Review to Work in Progress in Submitty Development Jun 2, 2026
@mattLif mattLif moved this from Work in Progress to Seeking Reviewer in Submitty Development Jun 2, 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.

Added component specific checks for whether or not they were released, as well as fixed formatting.

@dagemcn dagemcn left a comment

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.

Functionality here looks good, the error where hidden test cases would be accessible through index manipulation is fixed. Code looks good although I can't really speak to the added cypress test.

@bmcutler
bmcutler merged commit 7f06c18 into main Jun 4, 2026
47 of 51 checks passed
@bmcutler
bmcutler deleted the Hidden_Show_Details_12411 branch June 4, 2026 18:47
@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Done in Submitty Development Jun 4, 2026
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.

"release_hidden_details" flag doesn't work for students (only instructor?)

8 participants