function theme_long_answer_view_unscored in Quiz 6.5
Same name and namespace in other branches
- 8.4 question_types/long_answer/long_answer.theme.inc \theme_long_answer_view_unscored()
- 6.6 question_types/long_answer/long_answer.admin.inc \theme_long_answer_view_unscored()
- 6.3 question_types/long_answer/long_answer.admin.inc \theme_long_answer_view_unscored()
- 6.4 question_types/long_answer/theme/long_answer.theme.inc \theme_long_answer_view_unscored()
- 7.6 question_types/long_answer/theme/long_answer.theme.inc \theme_long_answer_view_unscored()
- 7 question_types/long_answer/theme/long_answer.theme.inc \theme_long_answer_view_unscored()
- 7.4 question_types/long_answer/theme/long_answer.theme.inc \theme_long_answer_view_unscored()
Theme the list of unscored long answer questions.
Parameters
$unscored: An array of objects, each with the quist_nid, question_vid, and result_id of an unscored question.
1 theme call to theme_long_answer_view_unscored()
- long_answer_view_unscored in question_types/
long_answer/ long_answer.admin.inc - Generate a view of all unscored answer questions.
File
- question_types/
long_answer/ long_answer.admin.inc, line 182 - Administration pages for the long answer questions module.
Code
function theme_long_answer_view_unscored($unscored) {
$output = '';
$header = array(
t('Quiz ID'),
t('Question'),
t('Time Finished'),
t('Action'),
);
$rows = array();
foreach ($unscored as $item) {
if ($item->time_end > 0) {
$rows[] = array(
$item->result_id,
$item->title,
date('Y-m-d H:i', $item->time_end),
l('score this response', 'admin/quiz/score-long-answer/' . $item->question_vid . '/' . $item->result_id),
);
}
}
if (!empty($rows)) {
$output .= theme('table', $header, $rows);
}
else {
$output .= t('There are no unscored essays.');
}
return $output;
}