Permalink
Browse files

Improvements to activity reports

  • Loading branch information...
1 parent 7468bf0 commit bbfe835ba394f1df58d8efe78363cfd353dd8326 martin committed Jul 23, 2002
Showing with 26 additions and 6 deletions.
  1. +24 −4 course/user.php
  2. +1 −1 lang/en/strings.php
  3. +1 −1 user/index.php
View
28 course/user.php
@@ -5,7 +5,7 @@
require_variable($id); // course id
require_variable($user); // user id
- optional_variable($mode, "complete");
+ optional_variable($mode, "outline");
if (! $course = get_record("course", "id", $id)) {
error("Course id is incorrect.");
@@ -23,11 +23,31 @@
add_to_log($course->id, "course", "user record", "user.php?id=$course->id&user=$user->id", "$user->id");
- print_header("$course->shortname: Report", "$course->fullname",
+ print_header("$course->shortname: Activity Report", "$course->fullname",
"<A HREF=\"../course/view.php?id=$course->id\">$course->shortname</A> ->
<A HREF=\"../user/index.php?id=$course->id\">Participants</A> ->
<A HREF=\"../user/view.php?id=$user->id&course=$course->id\">$user->firstname $user->lastname</A> ->
- Full Report", "");
+ Activity Report ($mode)", "");
+ print_heading("$user->firstname $user->lastname");
+
+ echo "<TABLE CELLPADDING=10 ALIGN=CENTER><TR>";
+ if ($mode != "summary") {
+ echo "<TD><A HREF=user.php?id=$course->id&user=$user->id&mode=summary>Summary</A></TD>";
+ } else {
+ echo "<TD>Summary</TD>";
+ }
+ if ($mode != "outline") {
+ echo "<TD><A HREF=user.php?id=$course->id&user=$user->id&mode=outline>Outline</A></TD>";
+ } else {
+ echo "<TD>Outline</TD>";
+ }
+ if ($mode != "complete") {
+ echo "<TD><A HREF=user.php?id=$course->id&user=$user->id&mode=complete>Complete</A></TD>";
+ } else {
+ echo "<TD>Complete</TD>";
+ }
+ echo "</TR></TABLE>";
+
get_all_mods($course->id, $mods, $modtype);
@@ -96,7 +116,7 @@
function print_outline_row($mod, $instance, $info) {
$image = "<IMG SRC=\"../mod/$mod->modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\">";
- echo "<TR><TD ALIGN=right>$image</TD>";
+ echo "<TR><TD VALIGN=top>$image</TD>";
echo "<TD align=left width=200>";
echo "<A TITLE=\"$mod->modfullname\"";
echo " HREF=\"../mod/$mod->modname/view.php?id=$mod->id\">$instance->name</A></TD>";
View
2 lang/en/strings.php
@@ -1,6 +1,7 @@
<?php
// Strings for Moodle site
+$string[activity] = "Activity";
$string[address] = "Address";
$string[admin] = "Admin";
$string[adminpage] = "Admin page";
@@ -16,7 +17,6 @@
$string[changessaved] = "Changes saved";
$string[city] = "City/town";
$string[confirmed] = "Your registration has been confirmed";
-$string[contributions] = "Contributions";
$string[country] = "Country";
$string[course] = "Course";
$string[courses] = "Courses";
View
2 user/index.php
@@ -79,7 +79,7 @@ function print_user($user, $course, $teacherlinks) {
echo "<FONT SIZE=1>";
if ($teacherlinks) {
$timemidnight = usergetmidnight(time());
- echo "<A HREF=\"../course/user.php?id=$course->id&user=$user->id\">".get_string("contributions")."</A><BR>";
+ echo "<A HREF=\"../course/user.php?id=$course->id&user=$user->id\">".get_string("activity")."</A><BR>";
echo "<A HREF=\"../course/log.php?id=$course->id&user=$user->id&date=$timemidnight\">".get_string("todaylogs")."</A><BR>";
echo "<A HREF=\"../course/log.php?id=$course->id&user=$user->id\">".get_string("alllogs")."</A><BR>";
echo "<A HREF=\"../course/unenrol.php?id=$course->id&user=$user->id\">".get_string("unenrol")."</A><BR>";

0 comments on commit bbfe835

Please sign in to comment.