MDL-38707 Display module name when the folder is displayed inline
This commit is contained in:
@@ -45,7 +45,7 @@ $string['page-mod-folder-view'] = 'Folder module main page';
|
||||
$string['pluginadministration'] = 'Folder administration';
|
||||
$string['pluginname'] = 'Folder';
|
||||
$string['display'] = 'Display folder contents';
|
||||
$string['display_help'] = 'If you choose to display the folder contents on a course page, there will be no link to a separate page and the title will not be displayed.
|
||||
$string['display_help'] = 'If you choose to display the folder contents on a course page, there will be no link to a separate page.
|
||||
The description will be displayed only if "Display description on course page" is checked.<br />
|
||||
Also note that participants view actions can not be logged in this case.';
|
||||
$string['displaypage'] = 'On a separate page';
|
||||
|
||||
@@ -58,7 +58,12 @@ class mod_folder_renderer extends plugin_renderer_base {
|
||||
}
|
||||
}
|
||||
|
||||
$output .= $this->output->box($this->render(new folder_tree($folder, $cm)),
|
||||
$foldertree = new folder_tree($folder, $cm);
|
||||
if ($folder->display == FOLDER_DISPLAY_INLINE) {
|
||||
// Display module name as the name of the root directory.
|
||||
$foldertree->dir['dirname'] = $cm->get_formatted_name();
|
||||
}
|
||||
$output .= $this->output->box($this->render($foldertree),
|
||||
'generalbox foldertree');
|
||||
|
||||
// Do not append the edit button on the course page.
|
||||
|
||||
Reference in New Issue
Block a user