diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-24 17:18:46 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-24 18:32:15 +0100 |
commit | 2df5a673112d41f2045720572fce7af74194f1fe (patch) | |
tree | ffa4408fc7092cb3574901a310e867163169599b /sqlbox/lib.php | |
parent | 4439a7ad9912bab7e8a36fa1f81281301e43009e (diff) | |
download | sqltutor-plugin-2df5a673112d41f2045720572fce7af74194f1fe.tar.gz sqltutor-plugin-2df5a673112d41f2045720572fce7af74194f1fe.tar.bz2 sqltutor-plugin-2df5a673112d41f2045720572fce7af74194f1fe.zip |
Add report of queries for a sqlbox
Diffstat (limited to 'sqlbox/lib.php')
-rw-r--r-- | sqlbox/lib.php | 7 |
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))); + } } |