From: martin Date: Tue, 4 Jun 2002 06:49:52 +0000 (+0000) Subject: Added a message if the student is not a member of the current course X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8a3b358be974dc47d4d6d841c8c39170f7019d06;p=moodle.git Added a message if the student is not a member of the current course --- diff --git a/user/view.php b/user/view.php index e78c2eaf1a..63903d2eda 100644 --- a/user/view.php +++ b/user/view.php @@ -23,6 +23,7 @@ $fullname = "$user->firstname $user->lastname"; + add_to_log($course->id, "user", "view", "view.php?id=$user->id&course=$course->id", "$user->id"); if ($course->category) { @@ -33,6 +34,12 @@ print_header("Personal profile: $fullname", "Personal profile: $fullname", "$fullname", ""); } + if (!isstudent($course->id, $user->id) && !isteacher($course->id, $user->id)) { + print_heading("$fullname is not enrolled in this course"); + print_footer($course); + die; + } + echo "
"; echo "";