private function MultichoiceQuestion::getUserSettings in Quiz 7.5
Same name and namespace in other branches
- 6.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getUserSettings()
- 7.6 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getUserSettings()
- 7 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getUserSettings()
- 7.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getUserSettings()
Fetches the users default settings for the creation form.
Return value
array|false The users default node settings or FALSE if nothing found.
1 call to MultichoiceQuestion::getUserSettings()
- MultichoiceQuestion::getDefaultAltSettings in question_types/
multichoice/ multichoice.classes.inc - Helper function providing the default settings for the creation form.
File
- question_types/
multichoice/ multichoice.classes.inc, line 732 - Multichoice classes.
Class
- MultichoiceQuestion
- Extension of QuizQuestion.
Code
private function getUserSettings() {
global $user;
$res = db_query('SELECT choice_multi, choice_boolean, choice_random
FROM {quiz_multichoice_user_settings}
WHERE uid = :uid', array(
':uid' => $user->uid,
))
->fetchAssoc();
if ($res) {
return $res;
}
else {
return FALSE;
}
}