From 559c9187f8e667983f0a9a6ec99d8d465cbc2137 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 1 Jul 2008 22:26:38 +0000 Subject: [PATCH] MDL-15387 fixing regression spotted by John Beedell; merged from MOODLE_19_STABLE --- mod/resource/type/html/resource.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mod/resource/type/html/resource.class.php b/mod/resource/type/html/resource.class.php index 03a6bf28ae..a89c582040 100644 --- a/mod/resource/type/html/resource.class.php +++ b/mod/resource/type/html/resource.class.php @@ -50,6 +50,11 @@ function display() { $formatoptions = new object(); $formatoptions->noclean = true; + /// Set up some shorthand variables + $cm = $this->cm; + $course = $this->course; + $resource = $this->resource; + // 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); @@ -68,11 +73,6 @@ function display() { /// 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); -- 2.39.5