You are here

public function CourseObjectQuiz::optionsForm in Course 7

Same name and namespace in other branches
  1. 6 modules/course_quiz/course_quiz.classes.inc \CourseObjectQuiz::optionsForm()
  2. 7.2 modules/course_quiz/course_quiz.classes.inc \CourseObjectQuiz::optionsForm()

Add an option only pertinent to quiz?

Overrides CourseObjectNode::optionsForm

File

modules/course_quiz/course_quiz.classes.inc, line 65

Class

CourseObjectQuiz

Code

public function optionsForm(&$form, &$form_state) {
  parent::optionsForm($form, $form_state);
  $defaults = $this
    ->getOptions();
  $form['quiz_goto'] = array(
    '#type' => 'select',
    '#title' => t('Quiz entry point'),
    '#options' => array(
      'view' => t('View Quiz'),
      'take' => t('Take Quiz'),
    ),
    '#default_value' => $defaults['quiz_goto'],
    '#description' => t('Selecting "Take Quiz" will launch the user directly into taking the quiz, without viewing the quiz body.'),
  );
  $form['grading']['passing_grade'] = array(
    '#title' => t('Passing grade'),
    '#type' => 'textfield',
    '#size' => 4,
    '#default_value' => $defaults['passing_grade'],
    '#description' => t('The user will not be able to proceed past this object unless this grade is met.'),
  );
}