-
Improvement
-
Resolution: Won't Fix
-
Minor
-
None
-
2.4.3, 2.5.1
-
None
-
MOODLE_24_STABLE, MOODLE_25_STABLE
The comments report relies on the basic plugin_callback function to generate links. Most of the comments created in glossaries, blocks, blogs, ... do not get a link so the reader does not have a clue where the comment was created.
Some information is available in the database, so it should be used.
A suggestion :
comment/locallib.php |
public function print_comments($page = 0) {
|
...
|
if (!empty($this->plugintype)) {
|
$context_url = plugin_callback($this->plugintype, $this->pluginname, 'comment', 'url', array($c));
|
++ if ($context_url == '') {
|
++ switch ($this->context->contextlevel) {
|
++ case CONTEXT_COURSE:
|
++ $context_url = new moodle_url('/course/view.php', array('id' => $this->context->instanceid));
|
++ break;
|
++ case CONTEXT_BLOCK:
|
++ break;
|
++ case CONTEXT_MODULE:
|
++ $base = get_component_directory($this->plugintype . '_' . $this->pluginname);
|
++ if (file_exists("$base/view.php")) {
|
++ $context_url = new moodle_url('/'. $this->plugintype .'/'. $this->pluginname .'/view.php', array('id' => $this->cm->id));
|
++ }
|
++ break;
|
++ }
|
++ }
|
...
|
}
|
- has been marked as being related by
-
MDL-60984 Improve support for mod_xxx_comment_url callback in core
-
- Open
-