Skip to content

Commit

Permalink
rating MDL-21657 changed ratings rendering to avoid a nonconstant ele…
Browse files Browse the repository at this point in the history
…ment name
  • Loading branch information
Andrew Davis committed Mar 19, 2010
1 parent 5bdf001 commit c82ed0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ function render_rating(rating $rating) {
}

$scalearray = array(RATING_UNSET_RATING => $strrate.'...') + $scalearray;
$strratings .= html_writer::select($scalearray, 'rating'.$rating->itemid, $rating->rating, false, array('class'=>'postratingmenu ratinginput'));
$strratings .= html_writer::select($scalearray, 'rating', $rating->rating, false, array('class'=>'postratingmenu ratinginput','id'=>'menurating'.$rating->itemid));

//output submit button
$strratings .= '<span class="ratingsubmit"><input type="submit" class="postratingmenusubmit" id="postratingsubmit'.$rating->itemid.'" value="'.s(get_string('rate', 'rating')).'" />';
Expand Down
2 changes: 1 addition & 1 deletion rating/rate.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
$contextid = required_param('contextid', PARAM_INT);
$itemid = required_param('itemid', PARAM_INT);
$scaleid = required_param('scaleid', PARAM_INT);
$userrating = required_param('rating'.$itemid, PARAM_INT);
$userrating = required_param('rating', PARAM_INT);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);//will only be supplied for non-ajax requests

$result = new stdClass;
Expand Down

0 comments on commit c82ed0a

Please sign in to comment.