MDL-38368 folder: No edit button when displayed inline

This commit is contained in:
Frederic Massart 2013-03-14 14:03:17 +08:00
parent 8673a98d1d
commit 9f1b00a85d

View File

@ -61,7 +61,8 @@ class mod_folder_renderer extends plugin_renderer_base {
$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')),