From: moodler Date: Sun, 3 Sep 2006 16:26:55 +0000 (+0000) Subject: Added capability for showing documentation links X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7191a1fa27bfcc017efe2b5818074015ca3c62f1;p=moodle.git Added capability for showing documentation links --- diff --git a/lib/db/access.php b/lib/db/access.php index a533ec2847..d29e889f65 100644 --- a/lib/db/access.php +++ b/lib/db/access.php @@ -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 + ) ) ); diff --git a/lib/weblib.php b/lib/weblib.php index a568ac1796..273d1426a4 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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: -?> \ No newline at end of file +?> diff --git a/version.php b/version.php index 9f6bce77a1..e913367aa0 100644 --- a/version.php +++ b/version.php @@ -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