MDL-38707 Display module name when the folder is displayed inline

This commit is contained in:
Marina Glancy
2013-07-19 15:53:13 +10:00
parent 7aed82f15d
commit 63e1765c91
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -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';
+6 -1
View File
@@ -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.