Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-38551

Comments Report does not show every information that was collected

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.4.3, 2.5.1
    • Fix Version/s: None
    • Component/s: Comments
    • Labels:
      None
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE

      Description

      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;
      ++                    }
      ++                }
      ...
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rdebleu Renaat Debleu
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: