Skip to content

Commit

Permalink
Change course sideblock title depending on contents
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Feb 20, 2004
1 parent 4101e99 commit 352d94c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion course/lib.php
Expand Up @@ -1339,6 +1339,7 @@ function print_courses_sideblock($category=0, $width="100%") {
$modicon[]=$icon;
}
$fulllist = "<p><a href=\"$CFG->wwwroot/course/\">".get_string("searchcourses")."</a>...";
$blocktitle = get_string("categories");
} else { // Just print course names of single category
$category = array_shift($categories);
$courses = get_courses($category->id);
Expand All @@ -1356,9 +1357,10 @@ function print_courses_sideblock($category=0, $width="100%") {
$modicon = array();
$fulllist = get_string("nocoursesyet");
}
$blocktitle = get_string("courses");
}

print_side_block( get_string("courses"), "", $moddata, $modicon, $fulllist, $width);
print_side_block($blocktitle, "", $moddata, $modicon, $fulllist, $width);
}


Expand Down

0 comments on commit 352d94c

Please sign in to comment.