From 3b764d976e2a4d0c8e9365c41f33d2e1a9aab619 Mon Sep 17 00:00:00 2001 From: Pranav Rao <56097527+pranavrao145@users.noreply.github.com> Date: Fri, 3 Jan 2025 01:52:10 -0500 Subject: [PATCH] docs(rubric-criterion-denominator): changelog --- Changelog.md | 1 + spec/models/rubric_criterion_spec.rb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Changelog.md b/Changelog.md index 541dc7290c..e5cae5b64f 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,7 @@ ### 🐛 Bug fixes - Ensures row selection for peer reviewer unassigning has the same validation checks as individual selections (#7274) +- Ensures mark levels on a rubric criterion are properly scaled when its max mark is updated (#7311) ### 🔧 Internal changes diff --git a/spec/models/rubric_criterion_spec.rb b/spec/models/rubric_criterion_spec.rb index a6ebd537c4..d1316c39d7 100644 --- a/spec/models/rubric_criterion_spec.rb +++ b/spec/models/rubric_criterion_spec.rb @@ -140,6 +140,7 @@ level_names = ['Level 1', 'Level 2', 'Level 3'] old_marks = level_names.map { |name| rubric.levels.find { |level| level.name == name }.mark } + rubric.update!(max_mark: 8.0) rubric.update_levels(levels_attributes, 2.0) rubric.reload @@ -150,6 +151,7 @@ end it 'does not scale level marks if they have been changed in levels_attributes' do + rubric.update!(max_mark: 8.0) rubric.update_levels(levels_attributes, 2.0) rubric.reload @@ -162,6 +164,7 @@ end it 'does not scale marks for any new levels in level_attributes' do + rubric.update!(max_mark: 8.0) rubric.update_levels(levels_attributes, 2.0) rubric.reload