You are here

function theme_cloze_view_unscored in Cloze 6

Theme the list of unscored short answer questions.

Parameters

$unscored: An array of objects with information about the unscored questions

File

theme/cloze.theme.inc, line 14
Theme functions for cloze.

Code

function theme_cloze_view_unscored($unscored) {
  $output = '';
  $header = array(
    t('Question'),
    t('Time Finished'),
    t('Action'),
  );
  $rows = array();
  foreach ($unscored as $item) {
    if ($item->time_end > 0) {
      $rows[] = array(
        $item->title,
        date('Y-m-d H:i', $item->time_end),
        l(t('score this response'), 'admin/quiz/reports/score-short-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;
}