Permalink
Browse files

Merge branch 'MDL-34444' of git://github.com/danpoltawski/moodle into…

… MOODLE_23_STABLE
  • Loading branch information...
2 parents 363b35f + 4486aa9 commit 6c475847fb3ab70a4b7293a4d352ed3bb71369e8 @stronk7 stronk7 committed Aug 22, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 course/format/renderer.php
  2. +1 −1 course/view.php
@@ -448,7 +448,7 @@ protected function get_nav_links($course, $sections, $sectionno) {
$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 @@ protected function get_nav_links($course, $sections, $sectionno) {
$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');
View
@@ -105,7 +105,7 @@
$coursesections = $modinfo->get_section_info($section, MUST_EXIST);
// Check user is allowed to see it.
- if (!$coursesections->uservisible) {
+ if (!$coursesections->uservisible && !empty($section->availableinfo)) {
// Note: We actually already know they don't have this capability
// or uservisible would have been true; this is just to get the
// correct error message shown.

0 comments on commit 6c47584

Please sign in to comment.