Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 195a0848ec32bee0d19e7937f6e53a566bdeb0bd 1 parent 54b7b59
@stronk7 stronk7 authored
View
2  mod/data/view.php
@@ -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
2  mod/forum/lib.php
@@ -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
2  mod/glossary/view.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.