mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
merged fix for MDL-8885, teachers should not be able to set course as hidden if they can not view hidden courses
This commit is contained in:
parent
7563c86771
commit
cbc943f755
1 changed files with 2 additions and 1 deletions
|
@ -330,7 +330,8 @@
|
||||||
'<img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.'" /></a> ';
|
'<img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.'" /></a> ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_capability('moodle/course:visibility', $coursecontext)) {
|
// MDL-8885, users with no capability to view hidden courses, should not be able to lock themselves out
|
||||||
|
if (has_capability('moodle/course:visibility', $coursecontext) && has_capability('moodle/course:viewhiddencourses', $coursecontext)) {
|
||||||
if (!empty($acourse->visible)) {
|
if (!empty($acourse->visible)) {
|
||||||
echo '<a title="'.$strhide.'" href="category.php?id='.$category->id.'&page='.$page.
|
echo '<a title="'.$strhide.'" href="category.php?id='.$category->id.'&page='.$page.
|
||||||
'&perpage='.$perpage.'&hide='.$acourse->id.'&sesskey='.$USER->sesskey.'">'.
|
'&perpage='.$perpage.'&hide='.$acourse->id.'&sesskey='.$USER->sesskey.'">'.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue