Merge branch 'MDL-38368-master' of git://github.com/FMCorz/moodle

This commit is contained in:
Damyon Wiese 2013-03-19 16:17:41 +08:00
commit 43087d02dd

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')),