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

HTML resource page views are not logged when blocks are showing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.1
    • Fix Version/s: 1.9.2
    • Component/s: Resource
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Currently mod/resource/type/html/resource.class.php display() does not log resource page views if blocks are showing:-

      /// Are we displaying the course blocks?
      if ($this->resource->options == 'showblocks')

      { parent::display_course_blocks_start(); // logging missing here echo format_text($this->resource->alltext, FORMAT_HTML, $formatoptions, $this->course->id); parent::display_course_blocks_end(); }

      else {

      /// Set up generic stuff first, including checking for access
      parent::display();

      /// Set up some shorthand variables
      $cm = $this->cm;
      $course = $this->course;
      $resource = $this->resource;

      $pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));
      $inpopup = optional_param('inpopup', '', PARAM_BOOL);

      // fix for MDL-9021, thanks Etienne Roz
      add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id); // OK here

      Easily resolved, but is there any reason not to make this correction?

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Jul/08