Skip to content

Commit

Permalink
MDL-26272 ratings - fix uses breaking after last modinfo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Feb 4, 2011
1 parent 54b7b59 commit 195a084
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mod/data/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@
require_once($CFG->dirroot.'/rating/lib.php');
if ($data->assessed!=RATING_AGGREGATE_NONE) {
$ratingoptions = new stdclass();
$ratingoptions->context = $cm->context;
$ratingoptions->context = $context;
$ratingoptions->items = $records;
$ratingoptions->aggregate = $data->assessed;//the aggregation method
$ratingoptions->scaleid = $data->scale;
Expand Down
2 changes: 1 addition & 1 deletion mod/forum/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5318,7 +5318,7 @@ function forum_print_discussion($course, $cm, $forum, $discussion, $post, $mode,
//load ratings
if ($forum->assessed!=RATING_AGGREGATE_NONE) {
$ratingoptions = new stdclass();
$ratingoptions->context = $cm->context;
$ratingoptions->context = $modcontext;
$ratingoptions->items = $posts;
$ratingoptions->aggregate = $forum->assessed;//the aggregation method
$ratingoptions->scaleid = $forum->scale;
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
require_once($CFG->dirroot.'/rating/lib.php');
if ($glossary->assessed!=RATING_AGGREGATE_NONE) {
$ratingoptions = new stdclass();
$ratingoptions->context = $cm->context;
$ratingoptions->context = $context;
$ratingoptions->items = $allentries;
$ratingoptions->aggregate = $glossary->assessed;//the aggregation method
$ratingoptions->scaleid = $glossary->scale;
Expand Down

0 comments on commit 195a084

Please sign in to comment.