You are here

function CourseObjectAccessGrade::optionsForm in Course 6

Same name and namespace in other branches
  1. 7.2 plugins/course_object_access/grade.inc \CourseObjectAccessGrade::optionsForm()
  2. 7 plugins/course_object_access/grade.inc \CourseObjectAccessGrade::optionsForm()

Handlers can declare a form.

Overrides CourseHandler::optionsForm

File

plugins/course/access/grade.inc, line 45

Class

CourseObjectAccessGrade

Code

function optionsForm() {
  $form = array();
  $config = $this
    ->getOptions();
  $form['course_grade'] = array(
    '#title' => t('Course grade required'),
    '#type' => 'textfield',
    '#size' => 4,
    '#description' => t('The user will not be able to access this object until this course grade is met.'),
    '#default_value' => $config['course_grade'],
  );
  $form['course_grade_hidden'] = array(
    '#title' => t('Hide until grade met'),
    '#description' => t('The user will not see this object until the course grade is met.'),
    '#type' => 'checkbox',
    '#default_value' => $config['course_grade_hidden'],
  );
  return $form;
}