From bf40f9c1ef30be762d1cca94d082347ada13b68b Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 26 Aug 2003 18:45:54 +0000 Subject: [PATCH] Added a hook when printing recent activity. If the Library module is activated, then a Library function is called to print a list of recently added pages in the library. --- course/lib.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/course/lib.php b/course/lib.php index 04b482395f..4aecfaaff1 100644 --- a/course/lib.php +++ b/course/lib.php @@ -210,7 +210,7 @@ function print_recent_activity($course) { // This function trawls through the logs looking for // anything new since the user's last login - global $CFG, $USER; + global $CFG, $USER, $THEME, $SESSION; if (! $USER->lastlogin ) { echo "

"; @@ -304,6 +304,17 @@ function print_recent_activity($course) { echo "

".$change["text"]."

"; } } + } + + + // If this site uses Library module, then print recent items + if (!empty($CFG->librarypath)) { + if (file_exists("$CFG->dirroot/$CFG->librarypath/librarylib.php")) { + include_once("$CFG->dirroot/$CFG->librarypath/librarylib.php"); + if (librarysummarize(5, '', date('YmdHis',$USER->lastlogin))) { + $content = true; + } + } } // Now display new things from each module -- 2.39.5