Prevent guests from submitting choices or assignments

This commit is contained in:
martin 2002-09-24 09:02:34 +00:00
parent 17b365f829
commit 3182314d5c
2 changed files with 4 additions and 2 deletions

View 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>";

View 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);