]> git.mjollnir.org Git - moodle.git/commitdiff
Prevent guests from submitting choices or assignments
authormartin <martin>
Tue, 24 Sep 2002 09:02:34 +0000 (09:02 +0000)
committermartin <martin>
Tue, 24 Sep 2002 09:02:34 +0000 (09:02 +0000)
mod/assignment/view.php
mod/choice/view.php

index a1513aee7a4a53919b7df1a9508afa3cc6648574..d3737e4934b214fabee022bf644084f7570b4726 100644 (file)
@@ -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>";
index a6e615b1231162b88737d40c1a4e53825a98e83d..db0e96043c9c401c39d05027bfa535af037c9124 100644 (file)
@@ -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);