Hide download handout button if assessement has no handout #1951
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Summary generated by Reviewpad on 02 Aug 23 05:00 UTC
This pull request includes two patches.
The first patch hides the "handout" button if no handout is defined. It makes changes to the handout controller, assessment model, and the show.html.erb view file.
The second patch provides a temporary fix for a chromedriver issue. It adds a fix to the rails_helper.rb file to address a specific version issue with chromedriver.
Please review these changes and test them accordingly.
Description
Hide "download handout" button if assessment does not overwrite
handout
method, andhandout
is neither a url nor a file.Motivation and Context
Removes non-applicable menu items to avoid clutter and confusion. (similar logic for the writeup button was applied in #1615)
Closes #1941
How Has This Been Tested?
handout
to be a random string, observe that "download handout" button is still absenthandout
to be a url, observe that "download handout" button appears and workshandout
to be a file (e.g.<asmt>.yml
), observe that "download handout" button appears and workshandout
, definehandout
method in.rb
file as follows:Reload config file. Observe that "download handout" button appears and works.
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for linting