Skip to content

Commit c93c813

Browse files
authored
Merge pull request #7115 from donny-wong/v2.4.11
V2.4.11
2 parents 9989898 + 6e489a0 commit c93c813

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

Changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [v2.4.11]
4+
5+
### 🚨 Breaking changes
6+
7+
- Disallow peer reviewers from printing results (#7114)
8+
39
## [v2.4.10]
410

511
### ✨ New features and improvements

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ GEM
244244
matrix (0.4.2)
245245
method_source (1.0.0)
246246
mini_mime (1.1.5)
247-
mini_portile2 (2.8.5)
247+
mini_portile2 (2.8.6)
248248
minitest (5.20.0)
249249
mono_logger (1.1.2)
250250
msgpack (1.7.2)
@@ -261,7 +261,7 @@ GEM
261261
net-smtp (0.4.0)
262262
net-protocol
263263
nio4r (2.7.0)
264-
nokogiri (1.16.2)
264+
nokogiri (1.16.5)
265265
mini_portile2 (~> 2.8.2)
266266
racc (~> 1.4)
267267
parser (3.2.2.4)

app/MARKUS_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION=v2.4.10,PATCH_LEVEL=DEV
1+
VERSION=v2.4.11,PATCH_LEVEL=DEV

app/assets/javascripts/Components/Result/submission_selector.jsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,19 @@ export class SubmissionSelector extends React.Component {
102102
}
103103

104104
renderPrintButton() {
105-
return (
106-
<a
107-
className={"button"}
108-
href={Routes.print_course_result_path(this.props.course_id, this.props.result_id)}
109-
style={{alignSelf: "flex-end"}}
110-
title={I18n.t("results.print")}
111-
>
112-
<FontAwesomeIcon icon={"fa-solid fa-print"} />
113-
<span className="button-text">{I18n.t("results.print")}</span>
114-
</a>
115-
);
105+
if (!this.props.is_reviewer) {
106+
return (
107+
<a
108+
className={"button"}
109+
href={Routes.print_course_result_path(this.props.course_id, this.props.result_id)}
110+
style={{alignSelf: "flex-end"}}
111+
title={I18n.t("results.print")}
112+
>
113+
<FontAwesomeIcon icon={"fa-solid fa-print"} />
114+
<span className="button-text">{I18n.t("results.print")}</span>
115+
</a>
116+
);
117+
}
116118
}
117119

118120
onOpenFilterModal = () => {

app/policies/result_policy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
class ResultPolicy < ApplicationPolicy
33
default_rule :manage?
44
alias_rule :get_test_runs_instructors_released?, to: :view_marks?
5-
alias_rule :create?, :add_extra_mark?, :remove_extra_mark?, :get_test_runs_instructors?,
5+
alias_rule :create?, :add_extra_mark?, :remove_extra_mark?, :get_test_runs_instructors?, :print?,
66
:add_tag?, :remove_tag?, :revert_to_automatic_deductions?, :random_incomplete_submission?, to: :grade?
7-
alias_rule :show?, :get_annotations?, :print?, to: :view?
7+
alias_rule :show?, :get_annotations?, to: :view?
88
alias_rule :edit?, :toggle_marking_state?, :update_overall_comment?, :next_grouping?, to: :review?
99
alias_rule :refresh_view_tokens?, :update_view_token_expiry?, to: :set_released_to_students?
1010

0 commit comments

Comments
 (0)