private function ScaleQuestion::makeOptions in Quiz 8.4
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/ lib/ Drupal/ scale/ ScaleQuestion.php - Implementation of getCreationForm
File
- question_types/
scale/ lib/ Drupal/ scale/ ScaleQuestion.php, line 518 - The main classes for the short answer question type.
Class
- ScaleQuestion
- Extension of QuizQuestion.
Namespace
Drupal\scaleCode
private function makeOptions(array $collections = NULL) {
$options = array();
foreach ($collections as $col_id => $obj) {
$options[$col_id] = $obj->name;
}
return $options;
}