From cff7e83d2d7286e62d1e0e0350a74f47e6091a58 Mon Sep 17 00:00:00 2001 From: Aparup Banerjee Date: Tue, 12 Feb 2013 16:19:40 +0800 Subject: [PATCH] MDL-37687 use $SITE to allow non-logged-in users to browse comment via ajax --- comment/comment_ajax.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/comment/comment_ajax.php b/comment/comment_ajax.php index 91b99cafa8d27..131a803888e78 100644 --- a/comment/comment_ajax.php +++ b/comment/comment_ajax.php @@ -35,6 +35,10 @@ list($context, $course, $cm) = get_context_info_array($contextid); +if ( $contextid == SYSCONTEXTID ) { + $course = $SITE; +} + $PAGE->set_url('/comment/comment_ajax.php'); // Allow anonymous user to view comments providing forcelogin now enabled