mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-47247 mod_folder: Apply site config when showexpanded is not set
This commit is contained in:
parent
be521ca625
commit
7c815adea4
1 changed files with 4 additions and 0 deletions
|
@ -105,6 +105,10 @@ function folder_add_instance($data, $mform) {
|
||||||
$draftitemid = $data->files;
|
$draftitemid = $data->files;
|
||||||
|
|
||||||
$data->timemodified = time();
|
$data->timemodified = time();
|
||||||
|
// If 'showexpanded' is not set, apply the site config.
|
||||||
|
if (!isset($data->showexpanded)) {
|
||||||
|
$data->showexpanded = get_config('folder', 'showexpanded');
|
||||||
|
}
|
||||||
$data->id = $DB->insert_record('folder', $data);
|
$data->id = $DB->insert_record('folder', $data);
|
||||||
|
|
||||||
// we need to use context now, so we need to make sure all needed info is already in db
|
// we need to use context now, so we need to make sure all needed info is already in db
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue