Hey - that patch was written in the heat of things and inexcusably bogus – it would not show any courses! I've reverted it, and it will never see HEAD.
Now – the hidesitecourse thing intrigued me, and I did a walk of the callers. The $hidesitecourse option is never used in its default (false), so it is effectively dead code.
And and I cannot think of a valid use case to list the sitecourse along other courses in an end-user list of the kind print_courses() will.
Callers will do any of these
- call with $hidesitecourse=true (index.php)
- call with a specific category - which will never show sitecourse (course/category.php)
- calls to print_courses(0) which could trigger display of the sitecourse have condionals that mean the sitecourse will never be shown. See the if() conditions around course/index.php
So I'll craft a patch to remove it as dead code. OTOH, if anyone can tell me of a valid use case for it I'll resurrect it (and revert the related change to get_courses_wmanager() - which automatically skips sitecourse).
Hey - that patch was written in the heat of things and inexcusably bogus – it would not show any courses! I've reverted it, and it will never see HEAD.
Now – the hidesitecourse thing intrigued me, and I did a walk of the callers. The $hidesitecourse option is never used in its default (false), so it is effectively dead code.
And and I cannot think of a valid use case to list the sitecourse along other courses in an end-user list of the kind print_courses() will.
Callers will do any of these
So I'll craft a patch to remove it as dead code. OTOH, if anyone can tell me of a valid use case for it I'll resurrect it (and revert the related change to get_courses_wmanager() - which automatically skips sitecourse).
- call with $hidesitecourse=true (index.php)
- call with a specific category - which will never show sitecourse (course/category.php)
- calls to print_courses(0) which could trigger display of the sitecourse have condionals that mean the sitecourse will never be shown. See the if() conditions around course/index.php
So I'll craft a patch to remove it as dead code. OTOH, if anyone can tell me of a valid use case for it I'll resurrect it (and revert the related change to get_courses_wmanager() - which automatically skips sitecourse).