summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sqlbox/view.php7
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');
}