Skip to content

Commit

Permalink
MDL-38368 folder: No edit button when displayed inline
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart committed Mar 14, 2013
1 parent 8673a98 commit 9f1b00a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mod/folder/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
Expand Down

0 comments on commit 9f1b00a

Please sign in to comment.