function theme_matching_question_form in Quiz 7.6
Same name and namespace in other branches
- 8.6 question_types/quiz_matching/theme/matching.theme.inc \theme_matching_question_form()
- 8.4 question_types/matching/matching.theme.inc \theme_matching_question_form()
- 8.5 question_types/quiz_matching/theme/matching.theme.inc \theme_matching_question_form()
- 6.4 question_types/matching/theme/matching.theme.inc \theme_matching_question_form()
- 7 question_types/matching/theme/matching.theme.inc \theme_matching_question_form()
- 7.4 question_types/matching/theme/matching.theme.inc \theme_matching_question_form()
- 7.5 question_types/matching/theme/matching.theme.inc \theme_matching_question_form()
Theme the matching question form.
Parameters
$form: drupal form array
1 theme call to theme_matching_question_form()
- MatchingQuestion::getCreationForm in question_types/
matching/ matching.classes.inc - Implementation of getCreationForm
File
- question_types/
matching/ theme/ matching.theme.inc, line 15 - Themes for the matching module.
Code
function theme_matching_question_form($variables) {
$form = $variables['form'];
$rows = array();
$header = array(
'question' => t('Question'),
'answer' => t('Correct answer'),
'feedback' => t('Feedback'),
);
foreach (element_children($form) as $key) {
$rows[] = array(
'question' => drupal_render($form[$key]['question']),
'answer' => drupal_render($form[$key]['answer']),
'feedback' => drupal_render($form[$key]['feedback']),
);
}
// Theme output and display to screen.
return theme('table', array(
'header' => $header,
'rows' => $rows,
));
}