Skip to content
Permalink
Browse files

Merge branch 'wip-MDL-40191-2-m25' of git://github.com/marinaglancy/m…

…oodle into MOODLE_25_STABLE
  • Loading branch information...
danpoltawski committed Dec 4, 2013
2 parents f0b9fd3 + 90e0c51 commit f1c88bc16cdddbfa1437ce11181b720f76612596
Showing with 4 additions and 5 deletions.
  1. +4 −5 mod/folder/renderer.php
@@ -40,11 +40,10 @@ public function display_folder(stdClass $folder) {
$folderinstances = get_fast_modinfo($folder->course)->get_instances_of('folder');
if (!isset($folderinstances[$folder->id]) ||
!($cm = $folderinstances[$folder->id]) ||
!$cm->uservisible ||
!($context = context_module::instance($cm->id)) ||
!has_capability('mod/folder:view', $context)) {
// some error in parameters or module is not visible to the user
// don't throw any errors in renderer, just return empty string
!($context = context_module::instance($cm->id))) {
// Some error in parameters.
// Don't throw any errors in renderer, just return empty string.
// Capability to view module must be checked before calling renderer.
return $output;
}

0 comments on commit f1c88bc

Please sign in to comment.
You can’t perform that action at this time.