Skip to content

Commit

Permalink
Choice MDL-18602 - don't need these extra sql calls. - thanks to Bria…
Browse files Browse the repository at this point in the history
…n Gray for pointing it out!
  • Loading branch information
danmarsden committed Jul 16, 2010
1 parent 84bbd5b commit b723a4f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mod/choice/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,7 @@ function choice_show_results($choice, $course, $cm, $allresponses, $forcepublish
echo $columncount[$optionid];
echo "<br/>";
echo get_string("limit", "choice").":";
$choice_option = $DB->get_record("choice_options", array("id" => $optionid));
echo $choice_option->maxanswers;
echo $choice->maxanswers[$optionid];
} else {
if (isset($columncount[$optionid])) {
echo $columncount[$optionid];
Expand Down Expand Up @@ -634,8 +633,7 @@ function choice_show_results($choice, $course, $cm, $allresponses, $forcepublish
echo get_string("taken", "choice").":";
echo $column[$optionid].'<br />';
echo get_string("limit", "choice").":";
$choice_option = $DB->get_record("choice_options", array("id" => $optionid));
echo $choice_option->maxanswers;
echo $choice->maxanswers[$optionid];
} else {
echo $column[$optionid];
echo '<br />('.format_float(((float)$column[$optionid]/(float)$totalresponsecount)*100.0,1).'%)';
Expand Down

0 comments on commit b723a4f

Please sign in to comment.