function quiz_question_module_for_type in Quiz 7
Same name and namespace in other branches
- 8.4 quiz.module \quiz_question_module_for_type()
- 6.4 quiz.module \quiz_question_module_for_type()
- 7.6 quiz.module \quiz_question_module_for_type()
- 7.4 quiz.module \quiz_question_module_for_type()
- 7.5 quiz.module \quiz_question_module_for_type()
Parameters
$type:
Return value
string Name of module matching the question type, as given by quiz_question_info() hook.
Related topics
4 calls to quiz_question_module_for_type()
- quiz_calculate_score in ./
quiz.module - Calculates the score user received on quiz.
- quiz_report_form in ./
quiz.pages.inc - Form for showing feedback, and for editing the feedback if necessary...
- quiz_take_quiz in ./
quiz.module - Handles quiz taking.
- _quiz_get_answers in ./
quiz.module - Get answer data for a specific result.
File
- ./
quiz.module, line 2779 - Quiz Module
Code
function quiz_question_module_for_type($type) {
$types = _quiz_get_question_types();
if (!isset($types[$type])) {
drupal_set_message(t('The module for the questiontype %type is not enabled', array(
'%type' => $type,
)), 'warning');
return FALSE;
}
return $types[$type]['module'];
}