Skip to content

Commit

Permalink
MDL-61444 question: add question tagmine and tagall capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze committed Feb 19, 2018
1 parent d1b4ca9 commit 34cd752
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lang/en/role.php
Expand Up @@ -343,6 +343,8 @@
$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';
Expand Down
22 changes: 22 additions & 0 deletions lib/db/access.php
Expand Up @@ -1483,6 +1483,28 @@
)
),

// 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,
Expand Down
2 changes: 1 addition & 1 deletion version.php
Expand Up @@ -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.

Expand Down

0 comments on commit 34cd752

Please sign in to comment.