MDL-40732 choice: improve heading levels and styling

This commit is contained in:
Rossiani Wijaya 2013-08-20 16:05:01 +08:00
parent 838d78a9ff
commit 8f0767f10c
4 changed files with 7 additions and 4 deletions

View File

@ -374,7 +374,7 @@ function prepare_choice_show_results($choice, $course, $cm, $allresponses, $forc
$display->fullnamecapability = has_capability('moodle/site:viewfullnames', $context);
if (empty($allresponses)) {
echo $OUTPUT->heading(get_string("nousersyet"));
echo $OUTPUT->heading(get_string("nousersyet"), 3, null);
return false;
}

View File

@ -123,7 +123,7 @@ class mod_choice_renderer extends plugin_renderer_base {
public function display_publish_name_vertical($choices) {
global $PAGE;
$html ='';
$html .= html_writer::tag('h2',format_string(get_string("responses", "choice")), array('class'=>'main'));
$html .= html_writer::tag('h3',format_string(get_string("responses", "choice")));
$attributes = array('method'=>'POST');
$attributes['action'] = new moodle_url($PAGE->url);
@ -364,7 +364,7 @@ class mod_choice_renderer extends plugin_renderer_base {
$truserpercentage = new html_table_row($rows['userpercentage']);
$table->data = array($trgraph, $trusernumber, $truserpercentage);
$header = html_writer::tag('h2',format_string(get_string("responses", "choice")));
$header = html_writer::tag('h3',format_string(get_string("responses", "choice")));
$html .= html_writer::tag('div', $header, array('class'=>'responseheader'));
$html .= html_writer::tag('a', get_string('skipresultgraph', 'choice'), array('href'=>'#skipresultgraph', 'class'=>'skip-block'));
$html .= html_writer::tag('div', html_writer::table($table), array('class'=>'response'));
@ -460,7 +460,7 @@ class mod_choice_renderer extends plugin_renderer_base {
$table->data = $rows;
$html = '';
$header = html_writer::tag('h2',format_string(get_string("responses", "choice")));
$header = html_writer::tag('h3',format_string(get_string("responses", "choice")));
$html .= html_writer::tag('div', $header, array('class'=>'responseheader'));
$html .= html_writer::table($table);

View File

@ -55,6 +55,7 @@
$PAGE->set_title(format_string($choice->name).": $strresponses");
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading($choice->name, 2, null);
/// Check to see if groups are being used in this choice
$groupmode = groups_get_activity_groupmode($cm);
if ($groupmode) {

View File

@ -69,9 +69,11 @@
choice_user_submit_response($answer, $choice, $USER->id, $course, $cm);
}
echo $OUTPUT->header();
echo $OUTPUT->heading($choice->name, 2, null);
echo $OUTPUT->notification(get_string('choicesaved', 'choice'),'notifysuccess');
} else {
echo $OUTPUT->header();
echo $OUTPUT->heading($choice->name, 2, null);
}