From 813ec7ad6538fc6d82e0372aad2955f01c3fd588 Mon Sep 17 00:00:00 2001
From: moodler
Date: Tue, 6 May 2003 03:06:06 +0000
Subject: [PATCH] Prevent guests from taking surveys
---
mod/survey/view.php | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/mod/survey/view.php b/mod/survey/view.php
index 12091a6e9c..26f95ad0b5 100644
--- a/mod/survey/view.php
+++ b/mod/survey/view.php
@@ -36,6 +36,10 @@
get_string("viewsurveyresponses", "survey", $numusers)."
";
}
+ if (isguest()) {
+ notify(get_string("guestsnotallowed", "survey"));
+ }
+
// Check the survey hasn't already been filled out.
@@ -94,6 +98,12 @@
}
}
+ if (isguest()) {
+ echo "";
+ print_footer($course);
+ exit;
+ }
+
?>
--
2.39.5