mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MDL-38632 folder: observe show_expanded on course page
This commit is contained in:
parent
373a8e052c
commit
d86db37c44
1 changed files with 2 additions and 1 deletions
|
@ -426,7 +426,7 @@ function folder_dndupload_handle($uploadinfo) {
|
|||
function folder_get_coursemodule_info($cm) {
|
||||
global $DB;
|
||||
if (!($folder = $DB->get_record('folder', array('id' => $cm->instance),
|
||||
'id, name, display, intro, introformat'))) {
|
||||
'id, name, display, show_expanded, intro, introformat'))) {
|
||||
return NULL;
|
||||
}
|
||||
$cminfo = new cached_cm_info();
|
||||
|
@ -434,6 +434,7 @@ function folder_get_coursemodule_info($cm) {
|
|||
if ($folder->display == FOLDER_DISPLAY_INLINE) {
|
||||
// prepare folder object to store in customdata
|
||||
$fdata = new stdClass();
|
||||
$fdata->show_expanded = $folder->show_expanded;
|
||||
if ($cm->showdescription && strlen(trim($folder->intro))) {
|
||||
$fdata->intro = $folder->intro;
|
||||
if ($folder->introformat != FORMAT_MOODLE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue