You are here

private function MultichoiceQuestion::saveUserSettings in Quiz 7.5

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 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::saveUserSettings()
  4. 7.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::saveUserSettings()

Save the users default settings to the database.

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

File

question_types/multichoice/multichoice.classes.inc, line 748
Multichoice classes.

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();
}