mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-34444 course: Dont display links to hidden sections
This is what happens when you dont use the navigation api
This commit is contained in:
parent
29eaccab15
commit
569747faec
1 changed files with 2 additions and 2 deletions
|
@ -448,7 +448,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
|||
$links = array('previous' => '', 'next' => '');
|
||||
$back = $sectionno - 1;
|
||||
while ($back > 0 and empty($links['previous'])) {
|
||||
if ($canviewhidden || $sections[$back]->visible) {
|
||||
if ($canviewhidden || $sections[$back]->uservisible) {
|
||||
$params = array();
|
||||
if (!$sections[$back]->visible) {
|
||||
$params = array('class' => 'dimmed_text');
|
||||
|
@ -462,7 +462,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
|||
|
||||
$forward = $sectionno + 1;
|
||||
while ($forward <= $course->numsections and empty($links['next'])) {
|
||||
if ($canviewhidden || $sections[$forward]->visible) {
|
||||
if ($canviewhidden || $sections[$forward]->uservisible) {
|
||||
$params = array();
|
||||
if (!$sections[$forward]->visible) {
|
||||
$params = array('class' => 'dimmed_text');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue