Added navmenu in more places

This commit is contained in:
moodler
2002-11-10 08:43:44 +00:00
parent 3e50a13968
commit dfc9ba9bbe
10 changed files with 27 additions and 11 deletions
+6 -2
View File
@@ -387,7 +387,7 @@ function update_module_button($moduleid, $courseid, $string) {
}
function navmenu($course, $cm) {
function navmenu($course, $cm=NULL) {
// Given a course and a (current) coursemodule
// This function returns a small popup menu with all the
// course activity modules in it, as a navigation menu
@@ -396,6 +396,10 @@ function navmenu($course, $cm) {
global $CFG;
if ($cm) {
$cm = $cm->id;
}
if ($course->format == 'weeks') {
$strsection = get_string("week");
} else {
@@ -413,7 +417,7 @@ function navmenu($course, $cm) {
}
$section = $mod->section;
$url = "$mod->mod/view.php?id=$mod->cm";
if ($cm->id == $mod->cm) {
if ($cm == $mod->cm) {
$selected = $url;
}
$mod->name = urldecode($mod->name);