Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-15387 Always call add_to_log() even in case blocks are showing

  • Loading branch information...
commit 1e509794de707619df41107484cfef07adfce564 1 parent 7a8039c
mudrd8mz authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 mod/resource/type/html/resource.class.php
View
7 mod/resource/type/html/resource.class.php
@@ -50,6 +50,10 @@ function display() {
$formatoptions = new object();
$formatoptions->noclean = true;
+ // fix for MDL-9021, thanks Etienne Roz
+ // fix for MDL-15387, thanks to John Beedell
+ add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
+
/// Are we displaying the course blocks?
if ($this->resource->options == 'showblocks') {
@@ -72,9 +76,6 @@ function display() {
$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);
-
if ($resource->popup) {
if ($inpopup) { /// Popup only
Please sign in to comment.
Something went wrong with that request. Please try again.