Added capability for showing documentation links
This commit is contained in:
@@ -753,6 +753,19 @@ $moodle_capabilities = array(
|
||||
'coursecreator' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
),
|
||||
|
||||
'moodle/site:doclinks' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'legacy' => array(
|
||||
'guest' => CAP_PREVENT,
|
||||
'student' => CAP_PREVENT,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
+2
-2
@@ -5178,7 +5178,7 @@ function print_tabs($tabrows, $selected=NULL, $inactive=NULL, $activetwo=NULL, $
|
||||
function page_doc_link($text='', $iconpath='') {
|
||||
global $ME, $CFG;
|
||||
|
||||
if (empty($CFG->docroot) || !isteacherinanycourse()) {
|
||||
if (empty($CFG->docroot) || !has_capability('moodle/site:doclinks')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -5213,4 +5213,4 @@ function page_doc_link($text='', $iconpath='') {
|
||||
|
||||
|
||||
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
|
||||
?>
|
||||
?>
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
// This is compared against the values stored in the database to determine
|
||||
// whether upgrades should be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2006090200; // YYYYMMDD = date
|
||||
$version = 2006090300; // YYYYMMDD = date
|
||||
// XY = increments within a single day
|
||||
|
||||
$release = '1.7 dev'; // Human-friendly version name
|
||||
|
||||
Reference in New Issue
Block a user