function CourseObjectBook::optionsForm in Course 6
Same name and namespace in other branches
- 7.2 modules/course_book/course_book.classes.inc \CourseObjectBook::optionsForm()
- 7 modules/course_book/course_book.classes.inc \CourseObjectBook::optionsForm()
Default options form for all course objects.
Overrides CourseObjectNode::optionsForm
File
- modules/
course_book/ course_book.classes.inc, line 29
Class
Code
function optionsForm(&$form, &$form_state) {
$config = $this
->optionsDefinition();
parent::optionsForm($form, $form_state);
$form['book_tracking'] = array(
'#title' => t('Completion criteria'),
'#type' => 'select',
'#options' => array(
'one' => 'View any page',
'all' => 'View all pages',
),
'#default_value' => $config['book_tracking'],
);
// Add a book-specific configuration for course outline list item type, only
// if the standard course list outline handler is selected.
if ($this
->getCourse()
->getNode()->course['outline'] == 'course_outline_list') {
$form['outline_list_item_type'] = array(
'#title' => t('Course outline list item type'),
'#type' => 'select',
'#options' => array(
'all_pages' => t('All book pages as an expanded, nested list'),
'active_tree' => t('Only the active book menu tree items, with a count indicator'),
'count' => t('A count indicator only'),
),
'#default_value' => $config['outline_list_item_type'],
);
}
}