/ ► 網站管理
/ ► 報表
/ ► 回應
Invalid component used in plugin/component_callback():mod_
commit 6a3984fe0f94914cb4c3a1e6f809d520341a6797
Author: Chris Wharton <chrisw@catalyst.net.nz>
Date: Fri Aug 3 13:38:23 2012 +1200
comment/locallib.php: Fix broken comments report
WR96765: Workaround for issue MDL-31010
Signed-off-by: Chris Wharton <chrisw@catalyst.net.nz>
diff --git a/comment/locallib.php b/comment/locallib.php
index fd62b61..079bf00 100644
--- a/comment/locallib.php
+++ b/comment/locallib.php
@@ -127,6 +127,10 @@ class comment_manager {
$this->cm = get_coursemodule_from_id(”, $this->context->instanceid);
$this->setup_course($this->cm->course);
$this->modinfo = get_fast_modinfo($this->course);
+ if (!isset($this->modinfo->cms[$this->cm->id]->modname)) {
+ $this->pluginname = $this->cm->modname;
+ break;
+ }
$this->pluginname = $this->modinfo->cms[$this->cm->id]->modname;
break;
}