Merge branch 'master_MDL-31731' of git://github.com/danmarsden/moodle

This commit is contained in:
Dan Poltawski
2012-05-04 07:28:29 +08:00
3 changed files with 4 additions and 4 deletions
@@ -55,7 +55,7 @@ $string['err_nomaxscore'] = 'Criterion max score can not be empty';
$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';
+2 -2
View File
@@ -331,7 +331,6 @@ class gradingform_guide_controller extends gradingform_controller {
}
}
$comments->close();
if (empty($this->moduleinstance)) { // Only set if empty.
$modulename = $this->get_component();
$context = $this->get_context();
@@ -339,7 +338,8 @@ class gradingform_guide_controller extends gradingform_controller {
$dbman = $DB->get_manager();
$modulename = substr($modulename, 4);
if ($dbman->table_exists($modulename)) {
$this->moduleinstance = $DB->get_record($modulename, array('id' => $context->instanceid));
$cm = get_coursemodule_from_id('assignment', $context->instanceid);
$this->moduleinstance = $DB->get_record($modulename, array("id"=>$cm->instance));
}
}
}
+1 -1
View File
@@ -625,7 +625,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
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');
}