Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-38557 quiz manual grading should check mod/quiz:grade

  • Loading branch information...
commit 30461b006613bc02e46e6b085d76e1040c7c11d2 1 parent 0559a72
Tim Hunt timhunt authored
1  mod/quiz/db/install.php
@@ -46,5 +46,6 @@ function xmldb_quiz_install() {
46 46 $record = new stdClass();
47 47 $record->name = 'grading';
48 48 $record->displayorder = '6000';
  49 + $record->capability = 'mod/quiz:grade';
49 50 $DB->insert_record('quiz_reports', $record);
50 51 }
7 mod/quiz/db/upgrade.php
@@ -395,6 +395,13 @@ function xmldb_quiz_upgrade($oldversion) {
395 395 // Moodle v2.4.0 release upgrade line
396 396 // Put any upgrade step following this
397 397
  398 + if ($oldversion < 2013031900) {
  399 + // Quiz manual grading UI should be controlled by mod/quiz:grade, not :viewreports.
  400 + $DB->set_field('quiz_reports', 'capability', 'mod/quiz:grade', array('name' => 'grading'));
  401 +
  402 + // Mod quiz savepoint reached.
  403 + upgrade_mod_savepoint(true, 2013031900, 'quiz');
  404 + }
398 405
399 406 return true;
400 407 }
6 mod/quiz/version.php
@@ -25,7 +25,7 @@
25 25
26 26 defined('MOODLE_INTERNAL') || die();
27 27
28   -$module->version = 2013021500; // The current module version (Date: YYYYMMDDXX).
29   -$module->requires = 2012112900; // Requires this Moodle version.
30   -$module->component = 'mod_quiz'; // Full name of the plugin (used for diagnostics).
  28 +$module->version = 2013031900; // The current module version (Date: YYYYMMDDXX).
  29 +$module->requires = 2012112900; // Requires this Moodle version.
  30 +$module->component = 'mod_quiz'; // Full name of the plugin (used for diagnostics).
31 31 $module->cron = 60;

0 comments on commit 30461b0

Please sign in to comment.
Something went wrong with that request. Please try again.