summaryrefslogtreecommitdiff
path: root/sqlbox/lib.php
diff options
context:
space:
mode:
Diffstat (limited to 'sqlbox/lib.php')
-rw-r--r--sqlbox/lib.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/sqlbox/lib.php b/sqlbox/lib.php
index 0e9d5c5..f762532 100644
--- a/sqlbox/lib.php
+++ b/sqlbox/lib.php
@@ -390,4 +390,11 @@ function sqlbox_extend_navigation(navigation_node $navref, stdclass $course, std
* @param navigation_node $sqlboxnode {@link navigation_node}
*/
function sqlbox_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $sqlboxnode=null) {
+ global $PAGE;
+
+ if (has_capability('mod/sqlbox:readqueries', $PAGE->cm->context)) {
+ $sqlboxnode->add(get_string('viewresults', 'sqlbox'),
+ new moodle_url('/mod/sqlbox/report.php',
+ array('id'=>$PAGE->cm->id)));
+ }
}