Skip to content

Commit

Permalink
Merge pull request #7115 from donny-wong/v2.4.11
Browse files Browse the repository at this point in the history
V2.4.11
  • Loading branch information
pretendWhale committed Jun 10, 2024
2 parents 9989898 + 6e489a0 commit c93c813
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [v2.4.11]

### 🚨 Breaking changes

- Disallow peer reviewers from printing results (#7114)

## [v2.4.10]

### ✨ New features and improvements
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ GEM
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
mini_portile2 (2.8.6)
minitest (5.20.0)
mono_logger (1.1.2)
msgpack (1.7.2)
Expand All @@ -261,7 +261,7 @@ GEM
net-smtp (0.4.0)
net-protocol
nio4r (2.7.0)
nokogiri (1.16.2)
nokogiri (1.16.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
parser (3.2.2.4)
Expand Down
2 changes: 1 addition & 1 deletion app/MARKUS_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=v2.4.10,PATCH_LEVEL=DEV
VERSION=v2.4.11,PATCH_LEVEL=DEV
24 changes: 13 additions & 11 deletions app/assets/javascripts/Components/Result/submission_selector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,19 @@ export class SubmissionSelector extends React.Component {
}

renderPrintButton() {
return (
<a
className={"button"}
href={Routes.print_course_result_path(this.props.course_id, this.props.result_id)}
style={{alignSelf: "flex-end"}}
title={I18n.t("results.print")}
>
<FontAwesomeIcon icon={"fa-solid fa-print"} />
<span className="button-text">{I18n.t("results.print")}</span>
</a>
);
if (!this.props.is_reviewer) {
return (
<a
className={"button"}
href={Routes.print_course_result_path(this.props.course_id, this.props.result_id)}
style={{alignSelf: "flex-end"}}
title={I18n.t("results.print")}
>
<FontAwesomeIcon icon={"fa-solid fa-print"} />
<span className="button-text">{I18n.t("results.print")}</span>
</a>
);
}
}

onOpenFilterModal = () => {
Expand Down
4 changes: 2 additions & 2 deletions app/policies/result_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
class ResultPolicy < ApplicationPolicy
default_rule :manage?
alias_rule :get_test_runs_instructors_released?, to: :view_marks?
alias_rule :create?, :add_extra_mark?, :remove_extra_mark?, :get_test_runs_instructors?,
alias_rule :create?, :add_extra_mark?, :remove_extra_mark?, :get_test_runs_instructors?, :print?,
:add_tag?, :remove_tag?, :revert_to_automatic_deductions?, :random_incomplete_submission?, to: :grade?
alias_rule :show?, :get_annotations?, :print?, to: :view?
alias_rule :show?, :get_annotations?, to: :view?
alias_rule :edit?, :toggle_marking_state?, :update_overall_comment?, :next_grouping?, to: :review?
alias_rule :refresh_view_tokens?, :update_view_token_expiry?, to: :set_released_to_students?

Expand Down

0 comments on commit c93c813

Please sign in to comment.