private function MultichoiceQuestion::getDefaultAltSettings in Quiz 6.4
Same name and namespace in other branches
- 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()
- 7.5 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getDefaultAltSettings()
Helper function provding the default settings for the creation form.
Return value
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 620 - The main classes for the multichoice question type.
Class
- MultichoiceQuestion
- Extension of QuizQuestion.
Code
private function getDefaultAltSettings() {
// If the node is beeing 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;
}