Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-23867 - removing some extra whitespaces.

  • Loading branch information...
commit f7e9300061ae627489535d407f5e34c6993a7b7b 1 parent 40b87a5
Rossiani Wijaya authored
Showing with 15 additions and 16 deletions.
  1. +6 −6 mod/choice/lib.php
  2. +9 −10 mod/choice/view.php
View
12 mod/choice/lib.php
@@ -339,8 +339,8 @@ function prepare_choice_show_results($choice, $course, $cm, $allresponses, $forc
$display = clone($choice);
$display->coursemoduleid = $cm->id;
- $display->courseid = $course->id;
-
+ $display->courseid = $course->id;
+
//overwrite options value;
$display->options = array();
$totaluser = 0;
@@ -362,7 +362,7 @@ function prepare_choice_show_results($choice, $course, $cm, $allresponses, $forc
$display->viewresponsecapability = has_capability('mod/choice:readresponses', $context);
$display->deleterepsonsecapability = has_capability('mod/choice:deleteresponses',$context);
$display->fullnamecapability = has_capability('moodle/site:viewfullnames', $context);
-
+
if (empty($allresponses)) {
echo $OUTPUT->heading(get_string("nousersyet"));
return false;
@@ -681,8 +681,8 @@ function choice_reset_userdata($data) {
if (!empty($data->reset_choice)) {
$choicessql = "SELECT ch.id
- FROM {choice} ch
- WHERE ch.course=?";
+ FROM {choice} ch
+ WHERE ch.course=?";
$DB->delete_records_select('choice_answers', "choiceid IN ($choicessql)", array($data->courseid));
$status[] = array('component'=>$componentstr, 'item'=>get_string('removeresponses', 'choice'), 'error'=>false);
@@ -739,7 +739,7 @@ function choice_get_response_data($choice, $cm, $groupmode) {
unset($allresponses[0][$response->userid]); // Remove from unanswered column
}
}
- }
+ }
return $allresponses;
}
View
19 mod/choice/view.php
@@ -115,7 +115,7 @@
// They haven't made their choice yet or updates allowed and choice is open
$options = choice_prepare_options($choice, $USER, $cm, $allresponses);
- $renderer = $PAGE->get_renderer('mod_choice');
+ $renderer = $PAGE->get_renderer('mod_choice');
echo $renderer->display_options($options, $cm->id, $choice->display);
$choiceformshown = true;
} else {
@@ -128,7 +128,7 @@
if (isguestuser()) {
// Guest account
echo $OUTPUT->confirm(get_string('noguestchoose', 'choice').'<br /><br />'.get_string('liketologin'),
- get_login_url(), new moodle_url('/course/view.php', array('id'=>$course->id)));
+ get_login_url(), new moodle_url('/course/view.php', array('id'=>$course->id)));
} else if (!is_enrolled($context)) {
// Only people enrolled can make a choice
$SESSION->wantsurl = $FULLME;
@@ -139,26 +139,25 @@
echo $OUTPUT->container_start('continuebutton');
echo $OUTPUT->single_button(new moodle_url('/enrol/index.php?', array('id'=>$course->id)), get_string('enrolme', 'core_enrol', format_string($course->shortname)));
echo $OUTPUT->container_end();
- echo $OUTPUT->box_end();
+ echo $OUTPUT->box_end();
}
}
// print the results at the bottom of the screen
if ( $choice->showresults == CHOICE_SHOWRESULTS_ALWAYS or
- ($choice->showresults == CHOICE_SHOWRESULTS_AFTER_ANSWER and $current ) or
- ($choice->showresults == CHOICE_SHOWRESULTS_AFTER_CLOSE and !$choiceopen )) {
+ ($choice->showresults == CHOICE_SHOWRESULTS_AFTER_ANSWER and $current) or
+ ($choice->showresults == CHOICE_SHOWRESULTS_AFTER_CLOSE and !$choiceopen)) {
if (!empty($choice->showunanswered)) {
$choice->option[0] = get_string('notanswered', 'choice');
$choice->maxanswers[0] = 0;
}
-
- $results = prepare_choice_show_results($choice, $course, $cm, $allresponses);
- $renderer = $PAGE->get_renderer('mod_choice');
-
+ $results = prepare_choice_show_results($choice, $course, $cm, $allresponses);
+ $renderer = $PAGE->get_renderer('mod_choice');
echo $renderer->display_result($results);
- } else if (!$choiceformshown) {
+
+ } else if (!$choiceformshown) {
echo $OUTPUT->box(get_string('noresultsviewable', 'choice'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.