Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Improvements to activity reports

  • Loading branch information...
commit bbfe835ba394f1df58d8efe78363cfd353dd8326 1 parent 7468bf0
martin authored

Showing 3 changed files with 26 additions and 6 deletions. Show diff stats Hide diff stats

  1. +24 4 course/user.php
  2. +1 1  lang/en/strings.php
  3. +1 1  user/index.php
28 course/user.php
@@ -5,7 +5,7 @@
5 5
6 6 require_variable($id); // course id
7 7 require_variable($user); // user id
8   - optional_variable($mode, "complete");
  8 + optional_variable($mode, "outline");
9 9
10 10 if (! $course = get_record("course", "id", $id)) {
11 11 error("Course id is incorrect.");
@@ -23,11 +23,31 @@
23 23
24 24 add_to_log($course->id, "course", "user record", "user.php?id=$course->id&user=$user->id", "$user->id");
25 25
26   - print_header("$course->shortname: Report", "$course->fullname",
  26 + print_header("$course->shortname: Activity Report", "$course->fullname",
27 27 "<A HREF=\"../course/view.php?id=$course->id\">$course->shortname</A> ->
28 28 <A HREF=\"../user/index.php?id=$course->id\">Participants</A> ->
29 29 <A HREF=\"../user/view.php?id=$user->id&course=$course->id\">$user->firstname $user->lastname</A> ->
30   - Full Report", "");
  30 + Activity Report ($mode)", "");
  31 + print_heading("$user->firstname $user->lastname");
  32 +
  33 + echo "<TABLE CELLPADDING=10 ALIGN=CENTER><TR>";
  34 + if ($mode != "summary") {
  35 + echo "<TD><A HREF=user.php?id=$course->id&user=$user->id&mode=summary>Summary</A></TD>";
  36 + } else {
  37 + echo "<TD>Summary</TD>";
  38 + }
  39 + if ($mode != "outline") {
  40 + echo "<TD><A HREF=user.php?id=$course->id&user=$user->id&mode=outline>Outline</A></TD>";
  41 + } else {
  42 + echo "<TD>Outline</TD>";
  43 + }
  44 + if ($mode != "complete") {
  45 + echo "<TD><A HREF=user.php?id=$course->id&user=$user->id&mode=complete>Complete</A></TD>";
  46 + } else {
  47 + echo "<TD>Complete</TD>";
  48 + }
  49 + echo "</TR></TABLE>";
  50 +
31 51
32 52 get_all_mods($course->id, $mods, $modtype);
33 53
@@ -96,7 +116,7 @@
96 116
97 117 function print_outline_row($mod, $instance, $info) {
98 118 $image = "<IMG SRC=\"../mod/$mod->modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\">";
99   - echo "<TR><TD ALIGN=right>$image</TD>";
  119 + echo "<TR><TD VALIGN=top>$image</TD>";
100 120 echo "<TD align=left width=200>";
101 121 echo "<A TITLE=\"$mod->modfullname\"";
102 122 echo " HREF=\"../mod/$mod->modname/view.php?id=$mod->id\">$instance->name</A></TD>";
2  lang/en/strings.php
... ... @@ -1,6 +1,7 @@
1 1 <?php
2 2 // Strings for Moodle site
3 3
  4 +$string[activity] = "Activity";
4 5 $string[address] = "Address";
5 6 $string[admin] = "Admin";
6 7 $string[adminpage] = "Admin page";
@@ -16,7 +17,6 @@
16 17 $string[changessaved] = "Changes saved";
17 18 $string[city] = "City/town";
18 19 $string[confirmed] = "Your registration has been confirmed";
19   -$string[contributions] = "Contributions";
20 20 $string[country] = "Country";
21 21 $string[course] = "Course";
22 22 $string[courses] = "Courses";
2  user/index.php
@@ -79,7 +79,7 @@ function print_user($user, $course, $teacherlinks) {
79 79 echo "<FONT SIZE=1>";
80 80 if ($teacherlinks) {
81 81 $timemidnight = usergetmidnight(time());
82   - echo "<A HREF=\"../course/user.php?id=$course->id&user=$user->id\">".get_string("contributions")."</A><BR>";
  82 + echo "<A HREF=\"../course/user.php?id=$course->id&user=$user->id\">".get_string("activity")."</A><BR>";
83 83 echo "<A HREF=\"../course/log.php?id=$course->id&user=$user->id&date=$timemidnight\">".get_string("todaylogs")."</A><BR>";
84 84 echo "<A HREF=\"../course/log.php?id=$course->id&user=$user->id\">".get_string("alllogs")."</A><BR>";
85 85 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.
Something went wrong with that request. Please try again.