Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-28710 rating: added some more classes to the html for entering ra…

…tings
  • Loading branch information...
commit 8d15f0880dc48542c1e3853b73cdbc757b1228a9 1 parent 464d605
@andyjdavis andyjdavis authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 lib/outputrenderers.php
View
9 lib/outputrenderers.php
@@ -1432,14 +1432,13 @@ function render_rating(rating $rating) {
$aggregatelabel = $ratingmanager->get_aggregate_label($rating->settings->aggregationmethod);
$aggregatestr = $rating->get_aggregate_string();
- $aggregatehtml = html_writer::tag('span', $aggregatestr, array('id' => 'ratingaggregate'.$rating->itemid)).' ';
- $aggregatehtml .= html_writer::start_tag('span', array('id'=>"ratingcount{$rating->itemid}"));
+ $aggregatehtml = html_writer::tag('span', $aggregatestr, array('id' => 'ratingaggregate'.$rating->itemid, 'class' => 'ratingaggregate')).' ';
if ($rating->count > 0) {
- $aggregatehtml .= "({$rating->count})";
+ $countstr = "({$rating->count})";
} else {
- $aggregatehtml .= '-';
+ $countstr = '-';
}
- $aggregatehtml .= html_writer::end_tag('span').' ';
+ $aggregatehtml .= html_writer::tag('span', $countstr, array('id'=>"ratingcount{$rating->itemid}", 'class' => 'ratingcount')).' ';
$ratinghtml .= html_writer::tag('span', $aggregatelabel, array('class'=>'rating-aggregate-label'));
if ($rating->settings->permissions->viewall && $rating->settings->pluginpermissions->viewall) {
Please sign in to comment.
Something went wrong with that request. Please try again.