private function MultichoiceQuestion::getDefaultAltSettings in Quiz 7.5
Same name and namespace in other branches
- 6.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getDefaultAltSettings()
- 7.6 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getDefaultAltSettings()
- 7 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getDefaultAltSettings()
- 7.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getDefaultAltSettings()
Helper function providing the default settings for the creation form.
Return value
array Array with the default settings.
1 call to MultichoiceQuestion::getDefaultAltSettings()
- MultichoiceQuestion::getCreationForm in question_types/
multichoice/ multichoice.classes.inc - Implementation of getCreationForm().
File
- question_types/
multichoice/ multichoice.classes.inc, line 705 - Multichoice classes.
Class
- MultichoiceQuestion
- Extension of QuizQuestion.
Code
private function getDefaultAltSettings() {
// If the node is being updated the default settings are those stored in the
// node.
if (isset($this->node->nid)) {
$settings['choice_multi'] = $this->node->choice_multi;
$settings['choice_random'] = $this->node->choice_random;
$settings['choice_boolean'] = $this->node->choice_boolean;
}
elseif ($settings = $this
->getUserSettings()) {
}
else {
$settings['choice_multi'] = 0;
$settings['choice_random'] = 0;
$settings['choice_boolean'] = 0;
}
return $settings;
}