$forform = file_prepare_standard_editor($forform, 'body', $editoroptions, $context, 'mod_facetoface', 'notification', $id); $forform = file_prepare_standard_editor($forform, 'managerprefix', $editoroptions, $context, 'mod_facetoface', 'notification', $id); $form->set_data($forform); } // Process data if ($form->is_cancelled()) { redirect($redirectto); } else if ($data = $form->get_data()) { // Set body and managerprefix to empty string to stop errors $data->body = ''; $data->managerprefix = ''; facetoface_notification::set_properties($notification, $data); if (!empty($data->booked)) { // If one of the booked radio boxes are selected then the value // will be taken from booked_type instead of booked (checkbox). $notification->booked = $data->booked_type; } else { $notification->booked = 0; } $notification->courseid = $course->id; $notification->facetofaceid = $facetoface->id; $notification->ccmanager = (isset($data->ccmanager) ? 1 : 0); $notification->status = (isset($data->status) ? 1 : 0); $notification->save();