Fixing MDL-39710: setting to limit student access to rubric now checked.
authorRussell Boyatt <russell.boyatt@warwick.ac.uk>
Wed, 29 May 2013 14:32:48 +0000 (15:32 +0100)
committerMarina Glancy <marina@moodle.com>
Fri, 31 May 2013 06:14:26 +0000 (16:14 +1000)
grade/grading/form/rubric/lib.php

index 7f08a4e..fcd25bf 100644 (file)
@@ -520,7 +520,8 @@ class gradingform_rubric_controller extends gradingform_controller {
         if (has_capability('moodle/grade:managegradingforms', $page->context)) {
             $rubric .= $output->display_rubric_mapping_explained($this->get_min_max_score());
             $rubric .= $output->display_rubric($criteria, $options, self::DISPLAY_PREVIEW, 'rubric');
-        } else {
+        // ensure we don't display unless show rubric option enabled
+        } else if ( !empty($options['alwaysshowdefinition']) )  {
             $rubric .= $output->display_rubric($criteria, $options, self::DISPLAY_PREVIEW_GRADED, 'rubric');
         }