}
$output .= $panel->render_before_button_bits($this);
- $output .= html_writer::start_tag('div', array('class' => 'qn_buttons'));
+ $bcc = $panel->get_button_container_class();
+ $output .= html_writer::start_tag('div', array('class' => "qn_buttons $bcc"));
foreach ($panel->get_question_buttons() as $button) {
$output .= $this->render($button);
}
$output .= html_writer::end_tag('div');
$output .= html_writer::end_tag('form');
+ $output .= $this->connection_warning();
+
return $output;
}
return $this->heading($title, 3) . html_writer::tag('div', $graph, array('class' => 'graph'));
}
+
+ /**
+ * Output the connection warning messages, which are initially hidden, and
+ * only revealed by JavaScript if necessary.
+ */
+ public function connection_warning() {
+ $options = array('filter' => false, 'newlines' => false);
+ $warning = format_text(get_string('connectionerror', 'quiz'), FORMAT_MARKDOWN, $options);
+ $ok = format_text(get_string('connectionok', 'quiz'), FORMAT_MARKDOWN, $options);
+ return html_writer::tag('div', $warning, array('id' => 'connection-error', 'style' => 'display: none;', 'role' => 'alert')) .
+ html_writer::tag('div', $ok, array('id' => 'connection-ok', 'style' => 'display: none;', 'role' => 'alert'));
+ }
}
class mod_quiz_links_to_other_attempts implements renderable {