Permalink
Browse files

MDL-26272 ratings - fix uses breaking after last modinfo changes

  • Loading branch information...
1 parent 54b7b59 commit 195a0848ec32bee0d19e7937f6e53a566bdeb0bd @stronk7 stronk7 committed Feb 4, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 mod/data/view.php
  2. +1 −1 mod/forum/lib.php
  3. +1 −1 mod/glossary/view.php
View
@@ -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;
View
@@ -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;
View
@@ -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;

0 comments on commit 195a084

Please sign in to comment.