Course and course categories invisible

Re: Course and course categories invisible

by Timothy Takemoto -
Number of replies: 0

Sorry, it was just a stupid mistake. I don't think that it deserves the developers attention. If one changes about like 40 of
moodle/blocks/course_list/block_course_list.php
if ($course->id == SITEID) {
To
                    if ($course->id == SITEID || !category_parent_visible($course->category)) {
Then courses in hidden parents will not be shown even if the following is added to config.php
$CFG->allowvisiblecoursesinhiddencategories = true


This way one can put "redirect courses" into various places in the category hierarchy, put the real courses with content in a hidden category, and only the redirect course (doorway course?) will be shown.

This means that the same course content can be called many things, or shared between many "courses" especially with the judicious use of auto-enrolling groups in those hidden "mother" courses.

Problems
1) It asks you if you want to join the redirect course before asking for the group enrolment key of the hidden course which is okay. But if there were no group or course enrolment key in the hidden course, then it would ask if you want to join the course TWICE.
2) Redirects are annoying.
3) Course activities (but not activity content) are visible in all the groups of the hidden course.

I have attached all of the required code to this post. Hack with care.

Tim