MDL-56724 mod_choice: coding style fixes

For the lines affected by this patch.
This commit is contained in:
Damyon Wiese
2016-11-14 11:38:36 +08:00
parent eaf45bce09
commit bf5dcc8abb
2 changed files with 13 additions and 10 deletions
+8 -5
View File
@@ -44,7 +44,7 @@ class mod_choice_renderer extends plugin_renderer_base {
$disabled = empty($options['previewonly']) ? array() : array('disabled' => 'disabled');
$html = html_writer::start_tag('form', $attributes);
$html .= html_writer::start_tag('ul', array('class'=>'choices list-unstyled unstyled' ));
$html .= html_writer::start_tag('ul', array('class' => 'choices list-unstyled unstyled'));
$availableoption = count($options['options']);
$choicecount = 0;
@@ -83,8 +83,11 @@ class mod_choice_renderer extends plugin_renderer_base {
if ($availableoption < 1) {
$html .= html_writer::tag('label', get_string('choicefull', 'choice'));
} else {
$html .= html_writer::empty_tag('input',
array('type' => 'submit', 'value' => get_string('savemychoice', 'choice'), 'class' => 'btn btn-primary'));
$html .= html_writer::empty_tag('input', array(
'type' => 'submit',
'value' => get_string('savemychoice', 'choice'),
'class' => 'btn btn-primary'
));
}
if (!empty($options['allowupdate']) && ($options['allowupdate'])) {
@@ -238,8 +241,8 @@ class mod_choice_renderer extends plugin_renderer_base {
}
$mediabody .= html_writer::tag('div', $attemptaction, array('class'=>'media-left p-t-1'));
}
$userimage = $this->output->user_picture($user, array('courseid'=>$choices->courseid));
$mediabody .= html_writer::tag('div', $userimage, array('class'=>'media-left'));
$userimage = $this->output->user_picture($user, array('courseid' => $choices->courseid));
$mediabody .= html_writer::tag('div', $userimage, array('class' => 'media-left'));
$userlink = new moodle_url('/user/view.php', array('id'=>$user->id,'course' => $choices->courseid));
$name = html_writer::tag('a', $userfullname, array('href' => $userlink));
+5 -5
View File
@@ -257,19 +257,19 @@
$options["id"] = "$cm->id";
$options["download"] = "ods";
$button = $OUTPUT->single_button(new moodle_url("report.php", $options), get_string("downloadods"));
$downloadoptions[] = html_writer::tag('li', $button, array('class'=>'reportoption list-inline-item'));
$downloadoptions[] = html_writer::tag('li', $button, array('class' => 'reportoption list-inline-item'));
$options["download"] = "xls";
$button = $OUTPUT->single_button(new moodle_url("report.php", $options), get_string("downloadexcel"));
$downloadoptions[] = html_writer::tag('li', $button, array('class'=>'reportoption list-inline-item'));
$downloadoptions[] = html_writer::tag('li', $button, array('class' => 'reportoption list-inline-item'));
$options["download"] = "txt";
$button = $OUTPUT->single_button(new moodle_url("report.php", $options), get_string("downloadtext"));
$downloadoptions[] = html_writer::tag('li', $button, array('class'=>'reportoption list-inline-item'));
$downloadoptions[] = html_writer::tag('li', $button, array('class' => 'reportoption list-inline-item'));
$downloadlist = html_writer::tag('ul', implode('', $downloadoptions), array('class' => 'list-inline inline'));
$downloadlist .= html_writer::tag('div', '', array('class'=>'clearfloat'));
echo html_writer::tag('div',$downloadlist, array('class'=>'downloadreport m-t-1'));
$downloadlist .= html_writer::tag('div', '', array('class' => 'clearfloat'));
echo html_writer::tag('div',$downloadlist, array('class' => 'downloadreport m-t-1'));
}
echo $OUTPUT->footer();