diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-24 22:27:16 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-24 22:30:27 +0100 |
commit | c81bbb7f56dbbfab2497ce936036bf53d6a6c1a0 (patch) | |
tree | cc566820ef9bbdf0588dbaf4bcd750fc9c37e329 /sqlbox/view.php | |
parent | de6f8313a068572c56ae1acfef3e68c7fdce2886 (diff) | |
download | sqltutor-plugin-c81bbb7f56dbbfab2497ce936036bf53d6a6c1a0.tar.gz sqltutor-plugin-c81bbb7f56dbbfab2497ce936036bf53d6a6c1a0.tar.bz2 sqltutor-plugin-c81bbb7f56dbbfab2497ce936036bf53d6a6c1a0.zip |
Forbid guest-user to do queries
Diffstat (limited to 'sqlbox/view.php')
-rw-r--r-- | sqlbox/view.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sqlbox/view.php b/sqlbox/view.php index e522a75..9efe93b 100644 --- a/sqlbox/view.php +++ b/sqlbox/view.php @@ -64,6 +64,13 @@ $PAGE->set_focuscontrol('id_sqlbox_query'); echo $OUTPUT->header(); +if (isguestuser()) { + echo $OUTPUT->confirm("Guest not allowed, Login?", + get_login_url(), new moodle_url('/course/view.php', array('id'=>$course->id))); + echo $OUTPUT->footer(); + exit; +} + if ($sqlbox->intro) { // Conditions to show the intro can change to look for own settings or whatever echo $OUTPUT->box(format_module_intro('sqlbox', $sqlbox, $cm->id), 'generalbox mod_introbox', 'sqlboxintro'); } |