mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
Improvements to activity reports
This commit is contained in:
parent
7468bf014f
commit
bbfe835ba3
3 changed files with 26 additions and 6 deletions
|
@ -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>";
|
||||
|
|
|
@ -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[changedpassword] = "Changed password";
|
|||
$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";
|
||||
|
|
|
@ -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>";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue