course/lib: print_courses() drop $hidesitecourse parameter

The $hidesitecourse and related code seem to be dead code. An audit of
the callers did not turn up any interesting/valid use of it.
This commit is contained in:
martinlanghoff 2007-09-19 07:50:41 +00:00
parent 49cd4d7934
commit 6c54240a61

View File

@ -1752,7 +1752,7 @@ function print_category_info($category, $depth, $files = false) {
}
function print_courses($category, $hidesitecourse = false) {
function print_courses($category) {
/// Category is 0 (for all courses) or an object
global $CFG;
@ -1778,9 +1778,6 @@ function print_courses($category, $hidesitecourse = false) {
if ($courses) {
foreach ($courses as $course) {
if ($hidesitecourse and ($course->id == SITEID)) {
continue;
}
if ($course->visible == 1
|| has_capability('moodle/course:viewhidden',$course->context)) {
print_course($course);