private function MultichoiceQuestion::getUserSettings in Quiz 7.6
Same name and namespace in other branches
- 6.4 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()
- 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 734 - The main classes for the multichoice question type.
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;
}
}