You are here

function course_object_options_form_submit in Course 6

Form submission handler for course_object_options_form().

See also

course_object_options_form_validate()

File

./course.module, line 519
course.module Core functionality for Courses.

Code

function course_object_options_form_submit(&$form, &$form_state) {
  if ($form_state['values']['uniqid']) {
    $nid = $form_state['values']['nid'];

    // Get course object from session/database.
    $courseObject = course_object_load($form_state['values']['uniqid']);
    $course = $courseObject
      ->getCourse();

    // Start editing session.
    course_editing_start($course);
    $courseObject
      ->setId($form_state['values']['uniqid']);
    $courseObject
      ->optionsSubmit($form, $form_state);
  }
}