Skip to content

Commit

Permalink
MDL-31731 Advanced Grading: Marking Guide display scale warning for h…
Browse files Browse the repository at this point in the history
…igher max grade as well as lower.
  • Loading branch information
danmarsden committed May 3, 2012
1 parent b4b1d49 commit 6c20925
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grade/grading/form/guide/lang/en/gradingform_guide.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
$string['err_noshortname'] = 'Criterion name can not be empty';
$string['err_scoreinvalid'] = 'The score given to {$a->criterianame} is not valid, the max score is: {$a->maxscore}';
$string['gradingof'] = '{$a} grading';
$string['guidemappingexplained'] = 'WARNING: Your marking guide has a maximum grade of <b>{$a->maxscore} points</b> but the maximum grade set in your activity is {$a->modulegrade} The maximum score set in your marking guide will be scaled up to the maximum grade in the module.<br />
$string['guidemappingexplained'] = 'WARNING: Your marking guide has a maximum grade of <b>{$a->maxscore} points</b> but the maximum grade set in your activity is {$a->modulegrade} The maximum score set in your marking guide will be scaled to the maximum grade in the module.<br />
Intermediate scores will be converted respectively and rounded to the nearest available grade.';
$string['guidenotcompleted'] = 'Please provide a valid grade for each criterion';
$string['guideoptions'] = 'Marking guide options';
Expand Down
2 changes: 1 addition & 1 deletion grade/grading/form/guide/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ public function display_guide_mapping_explained($scores) {
if (!$scores) {
return $html;
}
if (isset($scores['modulegrade']) && $scores['maxscore'] < $scores['modulegrade']) {
if (isset($scores['modulegrade']) && $scores['maxscore'] != $scores['modulegrade']) {
$html .= $this->box(html_writer::tag('div', get_string('guidemappingexplained', 'gradingform_guide', (object)$scores))
, 'generalbox gradingform_guide-error');
}
Expand Down

0 comments on commit 6c20925

Please sign in to comment.