Skip to content

Commit

Permalink
Merge branch 'wip-MDL-40191-2-m26' of git://github.com/marinaglancy/m…
Browse files Browse the repository at this point in the history
…oodle into MOODLE_26_STABLE
  • Loading branch information
danpoltawski committed Dec 4, 2013
2 parents 307d961 + dd75bf8 commit b01548e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mod/folder/renderer.php
Expand Up @@ -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;
}

Expand Down

0 comments on commit b01548e

Please sign in to comment.