Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes to visibility of unenrol button

  • Loading branch information...
commit 923566789055a57c906716da2e1577a9603419f2 1 parent 726020a
martin authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  user/view.php
View
3  user/view.php
@@ -113,7 +113,8 @@
// 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\">";
Please sign in to comment.
Something went wrong with that request. Please try again.