From 46054fa87375983e788b582d6318e751d8e2dc26 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 28 Aug 2003 12:10:03 +0000 Subject: [PATCH] Unfinished and unlinked, but I'll check it in for hacking on --- course/recent.php | 101 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 course/recent.php diff --git a/course/recent.php b/course/recent.php new file mode 100644 index 0000000000..e625270778 --- /dev/null +++ b/course/recent.php @@ -0,0 +1,101 @@ +id); + + add_to_log($course->id, "course", "recent", "recent.php?id=$course->id", "$course->id"); + + if (empty($THEME->custompix)) { + $pixpath = "../pix"; + $modpixpath = "../mod"; + } else { + $pixpath = "../theme/$CFG->theme/pix"; + $modpixpath = "../theme/$CFG->theme/pix/mod"; + } + + $strrecentactivity = get_string("recentactivity"); + + $loggedinas = "

".user_login_string($course, $USER)."

"; + + print_header("$course->fullname: $strrecentactivity", "$course->fullname", + "id\">$course->shortname -> $strrecentactivity", + "", "", true, "", $loggedinas); + + get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused); + + print_heading("Since: Last Login | 1 day | 7 days | 14 days | 21 days | 30 days"); + + if (empty($days)) { + $timestart = $USER->lastlogin; + } else { + $timestart = time() - ($days * 3600 * 24); + } + + print_heading(get_string("activitysince", "", userdate($timestart))); + + $sections = get_all_sections($course->id); + + for ($i=0; $i<=$course->numsections; $i++) { + + if (isset($sections[$i])) { // should always be true + + $section = $sections[$i]; + + if ($section->sequence) { + echo "
"; + echo "

"; + switch ($course->format) { + case "weeks": print_string("week"); break; + case "topics": print_string("topic"); break; + default: print_string("section"); break; + } + echo " $i

"; + + echo ""; + } + } + } + + print_footer($course); + +?> + -- 2.39.5