private function MatchingQuestion::getDefaultAltSettings in Quiz 7.5
Same name and namespace in other branches
- 7.6 question_types/matching/matching.classes.inc \MatchingQuestion::getDefaultAltSettings()
- 7.4 question_types/matching/matching.classes.inc \MatchingQuestion::getDefaultAltSettings()
Helper function providing the default settings for the creation form.
Return value
array Array with the default settings
1 call to MatchingQuestion::getDefaultAltSettings()
- MatchingQuestion::getCreationForm in question_types/
matching/ matching.classes.inc - Implementation of getCreationForm().
File
- question_types/
matching/ matching.classes.inc, line 366 - Matching classes.
Class
- MatchingQuestion
- 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_penalty'] = $this->node->choice_penalty;
}
else {
$settings['choice_penalty'] = 0;
}
return $settings;
}