Only call definition_after_data when we are editing an element so that we know data exists

This commit is contained in:
Mark Nelson 2013-07-23 17:01:27 +08:00
parent ffcd9cc879
commit 73cf11b043
7 changed files with 17 additions and 41 deletions

View file

@ -62,7 +62,7 @@ $PAGE->set_heading($course->fullname);
$PAGE->set_title(get_string('editcustomcert', 'customcert', format_string($customcert->name)));
$PAGE->set_url($pageurl);
$mform = new mod_customcert_edit_element_form($pageurl, array('element' => $element, 'cmid' => $cmid));
$mform = new mod_customcert_edit_element_form($pageurl, array('element' => $element, 'cmid' => $cmid, 'action' => $action));
// Check if they cancelled.
if ($mform->is_cancelled()) {