From bf5dcc8abb04a7657d4ff2eed21d5e71500f3e58 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Thu, 3 Nov 2016 22:13:10 +0800 Subject: [PATCH] MDL-56724 mod_choice: coding style fixes For the lines affected by this patch. --- mod/choice/renderer.php | 13 ++++++++----- mod/choice/report.php | 10 +++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/mod/choice/renderer.php b/mod/choice/renderer.php index 8848c95a81d..6d813006e5d 100644 --- a/mod/choice/renderer.php +++ b/mod/choice/renderer.php @@ -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)); diff --git a/mod/choice/report.php b/mod/choice/report.php index 1fc4c0518b6..ef144972680 100644 --- a/mod/choice/report.php +++ b/mod/choice/report.php @@ -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();