From 87a31bb5d8fedd4447cf99cef13c5dd367c3ea3e Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Wed, 1 Aug 2012 10:28:36 +0800 Subject: [PATCH] MDL-34444 course: show section availability info When available, rather than a capability error. --- course/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/view.php b/course/view.php index ad495dd7a85..028a3f49673 100644 --- a/course/view.php +++ b/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. -- 2.43.0