Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-34444 course: show section availability info

When available, rather than a capability error.
  • Loading branch information...
commit 87a31bb5d8fedd4447cf99cef13c5dd367c3ea3e 1 parent b44ae5f
@danpoltawski danpoltawski authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  course/view.php
View
2  course/view.php
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.