private function ScaleQuestion::makeOptions in Quiz 6.4
Same name and namespace in other branches
- 8.6 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleQuestion.php \ScaleQuestion::makeOptions()
- 8.5 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleQuestion.php \ScaleQuestion::makeOptions()
- 6.6 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
- 7.6 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
- 7 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
- 7.4 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
- 7.5 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
Makes options array for form elements.
Parameters
$collections: collections array, from getPresetCollections() for instance...
Return value
#options array.
1 call to ScaleQuestion::makeOptions()
- ScaleQuestion::getCreationForm in question_types/
scale/ scale.classes.inc - Implementation of getCreationForm
File
- question_types/
scale/ scale.classes.inc, line 465 - The main classes for the scale question type.
Class
- ScaleQuestion
- Extension of QuizQuestion.
Code
private function makeOptions(array $collections = NULL) {
$options = array();
foreach ($collections as $col_id => $obj) {
$options[$col_id] = $obj->name;
}
return $options;
}