From 34cd75240ec0b188f3032f66dabb730d95ba43c8 Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Mon, 19 Feb 2018 10:26:38 +0800 Subject: [PATCH] MDL-61444 question: add question tagmine and tagall capabilities --- lang/en/role.php | 2 ++ lib/db/access.php | 22 ++++++++++++++++++++++ version.php | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lang/en/role.php b/lang/en/role.php index cfc56992ce0..957a504f31c 100644 --- a/lang/en/role.php +++ b/lang/en/role.php @@ -343,6 +343,8 @@ $string['question:useall'] = 'Use all questions'; $string['question:usemine'] = 'Use your own questions'; $string['question:viewall'] = 'View all questions'; $string['question:viewmine'] = 'View your own questions'; +$string['question:tagall'] = 'Tag all questions'; +$string['question:tagmine'] = 'Tag your own questions'; $string['rating:rate'] = 'Add ratings to items'; $string['rating:view'] = 'View the total rating you received'; $string['rating:viewany'] = 'View total ratings that anyone received'; diff --git a/lib/db/access.php b/lib/db/access.php index 2efdccff27c..1652534349e 100644 --- a/lib/db/access.php +++ b/lib/db/access.php @@ -1483,6 +1483,28 @@ $capabilities = array( ) ), + // Controls whether the user can tag his own questions. + 'moodle/question:tagmine' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_COURSE, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ), + 'clonepermissionsfrom' => 'moodle/question:editmine' + ), + + // Controls whether the user can tag all questions. + 'moodle/question:tagall' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_COURSE, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ), + 'clonepermissionsfrom' => 'moodle/question:editall' + ), + 'moodle/site:doclinks' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_SYSTEM, diff --git a/version.php b/version.php index 2d56c3414ec..a68eb10c31a 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2018021600.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2018021600.01; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes. -- 2.11.4.GIT