You are here

private function MultichoiceQuestion::getUserSettings in Quiz 6.4

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

Fetches the users default settings for the creation form

Return value

The users default node settings

1 call to MultichoiceQuestion::getUserSettings()
MultichoiceQuestion::getDefaultAltSettings in question_types/multichoice/multichoice.classes.inc
Helper function provding the default settings for the creation form.

File

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

Class

MultichoiceQuestion
Extension of QuizQuestion.

Code

private function getUserSettings() {
  global $user;
  $sql = 'SELECT choice_multi, choice_boolean, choice_random
            FROM {quiz_multichoice_user_settings}
            WHERE uid = %d';
  $res = db_query($sql, $user->uid);
  if ($arr = db_fetch_array($res)) {
    return $arr;
  }
  else {
    return FALSE;
  }
}