コード例 #1
0
 /**
  * Render the status bar.
  *
  * @param structure $structure the quiz structure.
  * @return string HTML to output.
  */
 public function quiz_information(structure $structure)
 {
     list($currentstatus, $explanation) = $structure->get_dates_summary();
     $output = html_writer::span(get_string('numquestionsx', 'quiz', $structure->get_question_count()), 'numberofquestions') . ' | ' . html_writer::span($currentstatus, 'quizopeningstatus', array('title' => $explanation));
     return html_writer::div($output, 'statusbar');
 }