/** * HTML for a page, with ids stripped, so it can be used as a javascript template. * * @param structure $structure object containing the structure of the quiz. * @param \stdClass $quiz the quiz settings. * @return string HTML for a new icon */ protected function add_page_icon_template(structure $structure, $quiz) { if (!$structure->has_questions()) { return ''; } $question = $structure->get_question_in_slot(1); $html = $this->page_split_join_button($quiz, $question, true); return str_replace('&slot=1&', '&slot=%%SLOT%%&', $html); }