Skip to content

Hide unreleased assessment attachments#1548

Merged
damianhxy merged 1 commit into
masterfrom
hide-unreleased-asmt-attachments
Jun 7, 2022
Merged

Hide unreleased assessment attachments#1548
damianhxy merged 1 commit into
masterfrom
hide-unreleased-asmt-attachments

Conversation

@damianhxy

Copy link
Copy Markdown
Member

Description

  • Change logic to only display attachments whose corresponding assessments are released (note that we use a left_outer_join in order to include attachments that belong to the course, since they will have an assessment_id of nil)

Motivation and Context

Currently, released attachments of unreleased assessments are viewable to students (but not downloadable). While not a major issue, this is not desirable if e.g. the instructor wants to mark certain attachments as released ahead of time but does not want students to see their names.

Fixes #1527

How Has This Been Tested?

Created released and unreleased attachments for course, unreleased assessment (Homework 0), and released assessment (Homework 1). Student should only be able to see released attachments for course and Homework 1.

As instructor:
Screen Shot 2022-06-04 at 02 02 25

As student:
Screen Shot 2022-06-04 at 02 02 41

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run rubocop for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting
  • My change requires a change to the documentation, which is located at Autolab Docs
  • I have updated the documentation accordingly, included in this PR

Other issues / help required

Unsure if syntax follows best practices.

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

lgtm!

@damianhxy damianhxy merged commit c37bd2d into master Jun 7, 2022
@damianhxy damianhxy deleted the hide-unreleased-asmt-attachments branch June 7, 2022 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handouts on unreleased assignments can be viewed under course attachments

2 participants