MDL-61444 question: add question tagmine and tagall capabilities

This commit is contained in:
Simey Lameze 2018-02-19 10:26:38 +08:00
parent d1b4ca921e
commit 34cd75240e
3 changed files with 25 additions and 1 deletions

View file

@ -343,6 +343,8 @@ $string['question:useall'] = 'Use all questions';
$string['question:usemine'] = 'Use your own questions'; $string['question:usemine'] = 'Use your own questions';
$string['question:viewall'] = 'View all questions'; $string['question:viewall'] = 'View all questions';
$string['question:viewmine'] = 'View your own 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:rate'] = 'Add ratings to items';
$string['rating:view'] = 'View the total rating you received'; $string['rating:view'] = 'View the total rating you received';
$string['rating:viewany'] = 'View total ratings that anyone received'; $string['rating:viewany'] = 'View total ratings that anyone received';

View file

@ -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( 'moodle/site:doclinks' => array(
'captype' => 'read', 'captype' => 'read',
'contextlevel' => CONTEXT_SYSTEM, 'contextlevel' => CONTEXT_SYSTEM,

View file

@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die(); 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. // RR = release increments - 00 in DEV branches.
// .XX = incremental changes. // .XX = incremental changes.