Added capability for showing documentation links

This commit is contained in:
moodler
2006-09-03 16:26:55 +00:00
parent 72df7e1ebd
commit 7191a1fa27
3 changed files with 16 additions and 3 deletions
+13
View File
@@ -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
View File
@@ -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
View File
@@ -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