/** * Render any warnings that might be required about the state of the quiz, * e.g. if it has been attempted, or if the shuffle questions option is * turned on. * * @param structure $structure the quiz structure. * @return string HTML to output. */ public function quiz_state_warnings(structure $structure) { $warnings = $structure->get_edit_page_warnings(); if (empty($warnings)) { return ''; } $output = array(); foreach ($warnings as $warning) { $output[] = \html_writer::tag('p', $warning); } return $this->box(implode("\n", $output), 'statusdisplay'); }