From 6409d383778cd213914b9cdb2aeffc47a1def4b2 Mon Sep 17 00:00:00 2001 From: Rossiani Wijaya Date: Mon, 20 Jun 2011 15:13:59 +0800 Subject: [PATCH] MDL-27906 calendar event: fixed retrieving coursemodule by replacing get_coursemodule_from_id() to get_coursemodule_from_instance() --- calendar/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/lib.php b/calendar/lib.php index 92fd12c6bc5..926a551364d 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -1887,7 +1887,7 @@ class calendar_event { $context = get_context_instance(CONTEXT_USER); } else if (isset($data->userid) && $data->userid > 0 && $data->userid != $USER->id && isset($data->instance) && $data->instance > 0) { - $cm = get_coursemodule_from_id('', $data->instance, 0, false, MUST_EXIST); + $cm = get_coursemodule_from_instance($data->modulename, $data->instance, 0, false, MUST_EXIST); $context = get_context_instance(CONTEXT_COURSE, $cm->course); } else { $context = get_context_instance(CONTEXT_USER);