Skip to content
Browse files

MDL-38368 folder: No edit button when displayed inline

  • Loading branch information...
1 parent 8673a98 commit 9f1b00a85df8f70c3ca16badc237d0efd26d90ef @FMCorz FMCorz committed Mar 14, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 mod/folder/renderer.php
View
3 mod/folder/renderer.php
@@ -61,7 +61,8 @@ public function display_folder(stdClass $folder) {
$output .= $this->output->box($this->render(new folder_tree($folder, $cm)),
'generalbox foldertree');
- if (has_capability('mod/folder:managefiles', $context)) {
+ // Do not append the edit button on the course page.
+ if ($folder->display != FOLDER_DISPLAY_INLINE && has_capability('mod/folder:managefiles', $context)) {
$output .= $this->output->container(
$this->output->single_button(new moodle_url('/mod/folder/edit.php',
array('id' => $cm->id)), get_string('edit')),

0 comments on commit 9f1b00a

Please sign in to comment.
Something went wrong with that request. Please try again.