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

HTML resource page views are not logged when blocks are showing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9.2
    • 1.9.1
    • Resource
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      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?

            mudrd8mz David Mudrák (@mudrd8mz)
            jb23347 John Beedell
            Petr Skoda Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.