mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
moved set_defaults to main script out of definition method.
This commit is contained in:
parent
26d932b109
commit
ccbef0e2b7
@ -60,6 +60,10 @@ if (!empty($course)) {
|
||||
|
||||
/// first create the form
|
||||
$editform = new course_edit_form('edit.php', compact('course', 'category'));
|
||||
// now override defaults if course already exists
|
||||
if (!empty($course)) {
|
||||
$editform->set_defaults($course);
|
||||
}
|
||||
if ($editform->is_cancelled()){
|
||||
if (empty($course)) {
|
||||
redirect($CFG->wwwroot);
|
||||
|
@ -369,13 +369,6 @@ class course_edit_form extends moodleform {
|
||||
|
||||
|
||||
|
||||
// now override defaults if course already exists
|
||||
if (!empty($course)) {
|
||||
$this->set_defaults($course);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user