Skip to content

Commit

Permalink
MDL-28710 rating: added some more classes to the html for entering ra…
Browse files Browse the repository at this point in the history
…tings
  • Loading branch information
andyjdavis committed Dec 5, 2011
1 parent d0e016f commit 6278ce4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/outputrenderers.php
Expand Up @@ -1469,14 +1469,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) {
Expand Down

0 comments on commit 6278ce4

Please sign in to comment.