Permalink
Browse files

MDL-34444 course: show section availability info

When available, rather than a capability error.
  • Loading branch information...
1 parent b44ae5f commit 87a31bb5d8fedd4447cf99cef13c5dd367c3ea3e @danpoltawski danpoltawski committed Aug 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 course/view.php
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 87a31bb

Please sign in to comment.