]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes to visibility of unenrol button
authormartin <martin>
Sat, 10 Aug 2002 15:16:00 +0000 (15:16 +0000)
committermartin <martin>
Sat, 10 Aug 2002 15:16:00 +0000 (15:16 +0000)
user/view.php

index 0a390e0be610b42879d79cfb0bc499bd5758c9f7..573c098a7ef000652cbd328484a41c6695220583 100644 (file)
 
 //  Print other functions
     echo "<CENTER><TABLE ALIGN=CENTER><TR>";
-    if ($course->category and !isguest() and (isteacher($course->id) and ($user->id != $USER->id)) ) {
+    if ((isstudent($course->id) and ($user->id == $USER->id)) or 
+        (isteacher($course->id) and isstudent($course->id, $user->id)) ) {
         echo "<TD NOWRAP><P><FORM ACTION=\"../course/unenrol.php\" METHOD=GET>";
         echo "<INPUT type=hidden name=id value=\"$course->id\">";
         echo "<INPUT type=hidden name=user value=\"$user->id\">";