MDL-58919 mod_assign: fix check for existing setting

This commit is contained in:
Marina Glancy 2017-06-22 10:57:30 +08:00 committed by Eloy Lafuente (stronk7)
parent b78887cc4b
commit 412a56027b

View File

@ -71,8 +71,9 @@ class assign_submission_file extends assign_submission_plugin {
$defaultmaxfilesubmissions = $this->get_config('maxfilesubmissions');
$defaultmaxsubmissionsizebytes = $this->get_config('maxsubmissionsizebytes');
$defaultfiletypes = $this->get_config('filetypeslist');
if ($defaultfiletypes === false) {
if ($this->assignment->has_instance()) {
$defaultfiletypes = $this->get_config('filetypeslist');
} else {
$defaultfiletypes = get_config('assignsubmission_file', 'filetypes');
}
$defaultfiletypes = (string)$defaultfiletypes;