Permalink
Browse files

Prevent guests from submitting choices or assignments

  • Loading branch information...
1 parent 17b365f commit 3182314d5c52030f50c1ff111fd3ea2fea93fe05 martin committed Sep 24, 2002
Showing with 4 additions and 2 deletions.
  1. +1 −1 mod/assignment/view.php
  2. +3 −1 mod/choice/view.php
@@ -70,7 +70,7 @@
print_simple_box_end();
echo "<BR>";
- if (!isteacher($course->id)) {
+ if (!isteacher($course->id) and !isguest()) {
if ($submission = assignment_get_submission($assignment, $USER)) {
print_simple_box_start("center");
echo "<CENTER>";
View
@@ -86,7 +86,9 @@
echo "</TR></TABLE>";
echo "<INPUT type=hidden name=id value=\"$cm->id\">";
- echo "<INPUT type=submit value=\"".get_string("savemychoice","choice")."\">";
+ if (!isguest()) {
+ echo "<INPUT type=submit value=\"".get_string("savemychoice","choice")."\">";
+ }
echo "</P></FORM></CENTER>";
print_footer($course);

0 comments on commit 3182314

Please sign in to comment.