You are here

private function MatchingQuestion::getDefaultAltSettings in Quiz 7.4

Same name and namespace in other branches
  1. 7.6 question_types/matching/matching.classes.inc \MatchingQuestion::getDefaultAltSettings()
  2. 7.5 question_types/matching/matching.classes.inc \MatchingQuestion::getDefaultAltSettings()

Helper function provding the default settings for the creation form.

Return value

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 376
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;
}