private function MultichoiceQuestion::getUserSettings in Quiz 6.4
Same name and namespace in other branches
- 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()
- 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;
}
}