mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
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:
parent
49cd4d7934
commit
6c54240a61
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user