From c81bbb7f56dbbfab2497ce936036bf53d6a6c1a0 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 24 Jan 2013 22:27:16 +0100 Subject: Forbid guest-user to do queries --- sqlbox/view.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sqlbox') 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'); } -- cgit