mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-62279 assign: Properly set the defaults
Before an assignment has been created, we need to use the site defaults, not the per instance defaults for the settings.
This commit is contained in:
parent
6e8235c7d3
commit
cc9384f121
1 changed files with 4 additions and 2 deletions
|
@ -69,11 +69,13 @@ class assign_submission_file extends assign_submission_plugin {
|
||||||
public function get_settings(MoodleQuickForm $mform) {
|
public function get_settings(MoodleQuickForm $mform) {
|
||||||
global $CFG, $COURSE;
|
global $CFG, $COURSE;
|
||||||
|
|
||||||
$defaultmaxfilesubmissions = $this->get_config('maxfilesubmissions');
|
|
||||||
$defaultmaxsubmissionsizebytes = $this->get_config('maxsubmissionsizebytes');
|
|
||||||
if ($this->assignment->has_instance()) {
|
if ($this->assignment->has_instance()) {
|
||||||
|
$defaultmaxfilesubmissions = $this->get_config('maxfilesubmissions');
|
||||||
|
$defaultmaxsubmissionsizebytes = $this->get_config('maxsubmissionsizebytes');
|
||||||
$defaultfiletypes = $this->get_config('filetypeslist');
|
$defaultfiletypes = $this->get_config('filetypeslist');
|
||||||
} else {
|
} else {
|
||||||
|
$defaultmaxfilesubmissions = get_config('assignsubmission_file', 'maxfiles');
|
||||||
|
$defaultmaxsubmissionsizebytes = get_config('assignsubmission_file', 'maxbytes');
|
||||||
$defaultfiletypes = get_config('assignsubmission_file', 'filetypes');
|
$defaultfiletypes = get_config('assignsubmission_file', 'filetypes');
|
||||||
}
|
}
|
||||||
$defaultfiletypes = (string)$defaultfiletypes;
|
$defaultfiletypes = (string)$defaultfiletypes;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue