moved set_defaults to main script out of definition method.

This commit is contained in:
jamiesensei 2007-01-12 05:07:22 +00:00
parent 26d932b109
commit ccbef0e2b7
2 changed files with 4 additions and 7 deletions

View File

@ -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);

View File

@ -369,13 +369,6 @@ class course_edit_form extends moodleform {
// now override defaults if course already exists
if (!empty($course)) {
$this->set_defaults($course);
}
}