From: moodler Date: Thu, 15 Jan 2004 07:17:47 +0000 (+0000) Subject: Added log links for teachers from each activity page X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3da47524340e3e6c1e54c3240304069ba7819471;p=moodle.git Added log links for teachers from each activity page --- diff --git a/lib/weblib.php b/lib/weblib.php index 309928f5bb..c53a1683df 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -576,7 +576,7 @@ function filter_text($text) { } -function clean_text($text, $format) { +function clean_text($text, $format=FORMAT_MOODLE) { /// Given raw text (eg typed in by a user), this function cleans it up /// and removes any nasty tags that could mess up Moodle pages. @@ -1645,6 +1645,7 @@ function navmenu($course, $cm=NULL, $targetwindow="self") { $previousmod = NULL; $backmod = NULL; $nextmod = NULL; + $logslink = NULL; $flag = false; foreach ($modinfo as $mod) { @@ -1664,6 +1665,7 @@ function navmenu($course, $cm=NULL, $targetwindow="self") { } if ($cm == $mod->cm) { $selected = $url; + $selectmod = $mod; $backmod = $previousmod; $flag = true; // set flag so we know to use next mod for "next" } @@ -1678,6 +1680,12 @@ function navmenu($course, $cm=NULL, $targetwindow="self") { $previousmod = $mod; } } + if ($selected and $isteacher) { + $logslink = "wwwroot/course/log.php?chooselog=1&user=0&date=0&id=$course->id&url=". + urlencode($selected). + "\">pixpath/i/log.gif\">"; + + } if ($backmod) { $backmod = "
wwwroot/mod/$backmod->mod/view.php\" target=\"$CFG->framename\">". "cm\">". @@ -1688,7 +1696,7 @@ function navmenu($course, $cm=NULL, $targetwindow="self") { "cm\">". "
"; } - return "
$backmod" . + return "$logslink
$backmod" . popup_form("$CFG->wwwroot/mod/", $menu, "navmenu", $selected, get_string("jumpto"), "", "", true, $targetwindow). "$nextmod
";