mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Whoops ... don't put unenrol button unless the user is the current user!
This commit is contained in:
parent
be0d1cd55a
commit
18798c6f55
@ -103,12 +103,14 @@
|
||||
echo "</TD></TR></TABLE></TABLE>";
|
||||
|
||||
// Print other functions
|
||||
echo "<CENTER><TABLE ALIGN=CENTER><TR>";
|
||||
echo "<TD NOWRAP><P><FORM ACTION=\"../course/unenrol.php\" METHOD=GET>";
|
||||
echo "<INPUT type=hidden name=id value=\"$course->id\">";
|
||||
echo "<INPUT type=submit value=\"Unenrol me from $course->shortname\">";
|
||||
echo "</FORM></P></TD>";
|
||||
echo "</TR></TABLE></CENTER>\n";
|
||||
if ($id == $USER->id) {
|
||||
echo "<CENTER><TABLE ALIGN=CENTER><TR>";
|
||||
echo "<TD NOWRAP><P><FORM ACTION=\"../course/unenrol.php\" METHOD=GET>";
|
||||
echo "<INPUT type=hidden name=id value=\"$course->id\">";
|
||||
echo "<INPUT type=submit value=\"Unenrol me from $course->shortname\">";
|
||||
echo "</FORM></P></TD>";
|
||||
echo "</TR></TABLE></CENTER>\n";
|
||||
}
|
||||
|
||||
print_footer($course);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user