You are here

public function CourseObjectUbercart::optionsSubmit in Course 7

Same name and namespace in other branches
  1. 8.3 modules/course_uc/course_uc.classes.inc \CourseObjectUbercart::optionsSubmit()
  2. 8.2 modules/course_uc/course_uc.classes.inc \CourseObjectUbercart::optionsSubmit()
  3. 6 modules/course_uc/course_uc.classes.inc \CourseObjectUbercart::optionsSubmit()
  4. 7.2 modules/course_uc/course_uc.classes.inc \CourseObjectUbercart::optionsSubmit()

Set a specialized instance ID.

Either the course node ID, or another ubercart node ID.

Overrides CourseObjectNode::optionsSubmit

File

modules/course_uc/course_uc.classes.inc, line 54

Class

CourseObjectUbercart

Code

public function optionsSubmit(&$form, &$form_state) {
  if (isset($form_state['values']['instance'])) {
    if (!$form_state['values']['instance']) {
      $form_state['values']['instance'] = $this
        ->getCourseNid();
    }
  }
  parent::optionsSubmit($form, $form_state);
}