You are here

private function MultichoiceQuestion::saveUserSettings in Quiz 7

Same name and namespace in other branches
  1. 6.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::saveUserSettings()
  2. 7.6 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::saveUserSettings()
  3. 7.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::saveUserSettings()
  4. 7.5 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::saveUserSettings()

Fetches the users default settings from the creation form

1 call to MultichoiceQuestion::saveUserSettings()
MultichoiceQuestion::saveNodeProperties in question_types/multichoice/multichoice.classes.inc
Implementation of save

File

question_types/multichoice/multichoice.classes.inc, line 719
The main classes for the multichoice question type.

Class

MultichoiceQuestion
Extension of QuizQuestion.

Code

private function saveUserSettings() {
  global $user;
  db_merge('quiz_multichoice_user_settings')
    ->key(array(
    'uid' => $user->uid,
  ))
    ->fields(array(
    'choice_random' => $this->node->choice_random,
    'choice_multi' => $this->node->choice_multi,
    'choice_boolean' => $this->node->choice_boolean,
  ))
    ->execute();
}