mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
Make sure that the Site never shows up in My Courses
This commit is contained in:
parent
7cdcb42239
commit
c81696e599
@ -1004,6 +1004,9 @@ function print_courses_sideblock($category=0, $width="100%") {
|
||||
if (isset($USER->id) and !isadmin()) { // Just print My Courses
|
||||
if ($courses = get_my_courses($USER->id)) {
|
||||
foreach ($courses as $course) {
|
||||
if (!$course->category) {
|
||||
continue;
|
||||
}
|
||||
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
|
||||
$moddata[]="<a $linkcss title=\"$course->shortname\" ".
|
||||
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
|
||||
@ -1156,6 +1159,9 @@ function print_my_moodle() {
|
||||
|
||||
if ($courses = get_my_courses($USER->id)) {
|
||||
foreach ($courses as $course) {
|
||||
if (!$course->category) {
|
||||
continue;
|
||||
}
|
||||
print_course($course, "100%");
|
||||
echo "<br />\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user