Skip to content

Commit

Permalink
MDL-21951, replace $COURSE with $PAGE->course
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongsheng Cai committed Apr 9, 2010
1 parent c7f4e3e commit 513a73d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blog/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function print_html($return=false) {
// Comments
$cmt = new stdClass();
$cmt->context = get_context_instance(CONTEXT_USER, $user->id);
$cmt->courseid = $COURSE->id;
$cmt->courseid = $PAGE->course->id;
$cmt->area = 'format_blog';
$cmt->env = 'blog';
$cmt->itemid = $this->id;
Expand Down Expand Up @@ -149,9 +149,9 @@ public function print_html($return=false) {
$topiccell->text = $OUTPUT->container($template['title'], 'subject');
$topiccell->text .= $OUTPUT->container_start('author');

$fullname = fullname($user, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $COURSE->id)));
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $PAGE->course->id)));
$by = new object();
$by->name = html_writer::link(new moodle_url('/user/view.php', array('id' => $user->id, 'course' => $COURSE->id)), $fullname);
$by->name = html_writer::link(new moodle_url('/user/view.php', array('id' => $user->id, 'course' => $PAGE->course->id)), $fullname);
$by->date = $template['created'];

$topiccell->text .= get_string('bynameondate', 'forum', $by);
Expand Down

0 comments on commit 513a73d

Please sign in to comment.