Skip to content

[Refactor:Submission] Submission file hiding in UI#7804

Merged
bmcutler merged 18 commits intomainfrom
gradeable-student-download-ui
Oct 17, 2022
Merged

[Refactor:Submission] Submission file hiding in UI#7804
bmcutler merged 18 commits intomainfrom
gradeable-student-download-ui

Conversation

@DefinitiveAbove
Copy link
Copy Markdown
Member

@DefinitiveAbove DefinitiveAbove commented Apr 4, 2022

What is the current behavior?

hide_submitted_files is a gradeable config option.

A scanned exam/bulk upload gradeable is separated from a electronic_hw gradeable based on the gradeable type set initially.

"Make new submissions and access all prior versions?" under "What are students allowed to do?" for electronic gradeables does not work as expected for student access to prior versions; there is also a gradeable autograding config option which hides the gradeable version as part of it (hide_version_and_test_details.

What is the new behavior?

Student download (can students view/download submitted files?) is added as an option for a gradeable that is configurable in the UI. By default, this is set to the opposite of whether the gradeable was previously a bulk upload/scanned exam option. hide_submitted_files is removed as an option and will no longer affect whether gradeables will display submitted files. This also affects previous gradeables.

Scanned exam/bulk upload is removed as a gradeable parameter; in the frontend, the gradeable type instead dynamically changes from a student gradeable (electronic_hw - "Students will submit one or more files by direct upload to the Submitty website") to a scanned exam/bulk upload (electronic_bulk - "TA/Instructor will (bulk) upload scanned .pdf for online manual grading"); if "View the gradeable on the course home page?" is set to "When grades are released", it will be a bulk upload gradeable; otherwise, it will be a student gradeable.

Fixed already-existing UI version hiding option ("Make new submissions and access all prior versions?") to properly hide other versions from the student, and only show the active version to them if applicable. hide_version_and_test_details is renamed to hide_test_details and no longer affects whether the version is shown or hidden. This also affects previous gradeables.

Other information?

Functionality that hid individual images and bulk upload data of PDFs from student view has been removed; future images/bulk upload data will have a prefix of . to hide them, but current files will become visible - this was discussed and decided on because the current implementation of hiding/restricting access to certain files for bulk upload gradeables is unclear.

hide_version_and_test_details will still hide test details but will no longer hide the version.

eg_scanned_exam under the electronic_gradeable table is being removed - the field wasn't necessarily accurate since instructors would sometimes select one option and then change the uploaded gradeable config to match the other option.

When reverting this PR, eg_scanned_exam in the database is set based on if "View the gradeable on the course home page?" is set to "When grades are released".

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2022

Codecov Report

Merging #7804 (fb35f2f) into main (1b8cf59) will decrease coverage by 1.84%.
The diff coverage is 19.23%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #7804      +/-   ##
============================================
- Coverage     22.21%   20.36%   -1.85%     
- Complexity     7673     8185     +512     
============================================
  Files           205      205              
  Lines         24170    26360    +2190     
  Branches         66       89      +23     
============================================
  Hits           5369     5369              
- Misses        18737    20904    +2167     
- Partials         64       87      +23     
Flag Coverage Δ
autograder 19.22% <ø> (ø)
js 26.19% <ø> (-2.56%) ⬇️
migrator 99.11% <ø> (ø)
php 18.66% <19.23%> (-1.88%) ⬇️
python_submitty_utils 71.65% <ø> (ø)

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

@DefinitiveAbove DefinitiveAbove changed the title [Refactor:Submission] Submission file hiding in UI and related updates [Refactor:Submission] Submission file hiding in UI Apr 4, 2022
@williamjallen williamjallen self-requested a review April 4, 2022 21:28
Copy link
Copy Markdown
Member

@shailpatels shailpatels left a comment

Choose a reason for hiding this comment

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

I left some comments but biggest issue is with the change of removing scanned_exam as a database stored type. I think the new method to base it off of if students can download submissions after grades are released isn't the best method

If an instructor prevents students from downloading submission until after grading is complete it doesn't necessarily imply a gradeable is a bulk uploaded gradeable.

I'm not sure if any of this has been discussed but was there an issue for having bulk upload use better defaults/config to let students only download after grades have been released? A scanned exam / bulk upload is technically only an electronic gradeable that has that flag set to true on creation - it should still have all the other settings and configs of a normal electronic gradeable

I guess the overall question is why does the scanned gradeable flag need to be removed and silently calculated based on configs instead of just explicitly set and have the gradeable use good defaults introduced with the rest of this PR to get the expected behavior of an exam

@shailpatels
Copy link
Copy Markdown
Member

Should be noted this PR required rebuilding gradeables

Copy link
Copy Markdown
Member

@williamjallen williamjallen left a comment

Choose a reason for hiding this comment

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

Code looks good overall, and would be fine to merge as-is. I noted a few stylistic changes below, but they do not necessarily have to be made for this to be merged.

<span class="required_type" >(Required)</span>
{% else %}
<fieldset><legend><b style='font-size:18px'>Gradeable type</b>: <span id="gradeable-type-string">{{ type_string }}</span></legend>
<fieldset><legend><b style='font-size:18px'>Gradeable type</b>: <span id="gradeable-type-string" data-hw="{{ gradeable_type_strings['electronic_hw'] | e('html_attr') }}" data-bulk="{{ gradeable_type_strings['electronic_bulk'] | e ('html_attr') }}">{{ type_string }}</span></legend>
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 supposed to be a space in e ('html_attr')? It's used both with and without the space in this line.

Copy link
Copy Markdown
Member

@williamjallen williamjallen left a comment

Choose a reason for hiding this comment

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

Code looks good.

@bmcutler bmcutler deleted the branch main May 23, 2022 15:10
@bmcutler bmcutler closed this May 23, 2022
@bmcutler bmcutler reopened this May 23, 2022
@MasterOdin MasterOdin changed the base branch from master to main May 23, 2022 16:34
@tkoz0 tkoz0 self-requested a review September 28, 2022 14:31
Copy link
Copy Markdown
Contributor

@tkoz0 tkoz0 left a comment

Choose a reason for hiding this comment

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

Works as expected with a test bulk upload gradeable.

Copy link
Copy Markdown
Contributor

@Eceptonsu Eceptonsu left a comment

Choose a reason for hiding this comment

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

Code looks fine and the changes work as expected.
When "Make new submissions and access all prior versions?" is selected as "No", the "Will this assignment have a due date?" option in the date section disappears. Is this intentional?

@bmcutler bmcutler merged commit 4ac9b11 into main Oct 17, 2022
@bmcutler bmcutler deleted the gradeable-student-download-ui branch October 17, 2022 02:18
bmcutler pushed a commit that referenced this pull request Feb 5, 2026
### Why is this Change Important & Necessary?
Lingering change from #7804

See warning/error in
https://github.com/Submitty/Submitty/actions/runs/21500146068/job/61944467809#step:5:12258

### What is the New Behavior?
hide_submitted_files, an invalid config value, is now removed from the
notebook_expected_string config example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants