From: moodler Date: Sat, 24 May 2003 07:33:22 +0000 (+0000) Subject: Users were able to see their own user activity reports. This was a hang-over X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=40343df7fd3f3888038a5c3e18760f2e9204d693;p=moodle.git Users were able to see their own user activity reports. This was a hang-over from long time ago. As there is no GUI for this, I'm removing it for now so that students are not able to see their own activity reports. This issue probably needs to be discussed, and a GUI developed for it. --- diff --git a/course/user.php b/course/user.php index 214c97e1ab..bb2f5b5fe7 100644 --- a/course/user.php +++ b/course/user.php @@ -5,27 +5,26 @@ require_once("../config.php"); require_once("lib.php"); + $modes = array("outline", "complete", "todaylogs", "alllogs"); + require_variable($id); // course id require_variable($user); // user id optional_variable($mode, "outline"); - $modes = array("outline", "complete", "todaylogs", "alllogs"); + require_login(); if (! $course = get_record("course", "id", $id)) { error("Course id is incorrect."); } - require_login($course->id); + if (!isteacher($course->id)) { + error("You are not allowed to look at this page"); + } if (! $user = get_record("user", "id", $user)) { error("User ID is incorrect"); } - if (!isteacher($course->id) and $user->id != $USER->id ) { - error("You are not allowed to look at this page"); - } - - add_to_log($course->id, "course", "user report", "user.php?id=$course->id&user=$user->id&mode=$mode", "$user->id"); $stractivityreport = get_string("activityreport"); @@ -49,17 +48,18 @@ } print_heading("$user->firstname $user->lastname"); - echo ""; - echo ""; + echo "
Reports:
"; + echo ""; + foreach ($modes as $listmode) { $strmode = get_string($listmode); if ($mode == $listmode) { - echo ""; + echo ""; } else { - echo ""; + echo ""; } } - echo "
reports: $strmode$strmodeid&user=$user->id&mode=$listmode>$strmodeid&user=$user->id&mode=$listmode>$strmode
"; + echo ""; get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);