From e61036f48ea605b69b07d33864d4cfce028fa410 Mon Sep 17 00:00:00 2001 From: David Balch Date: Fri, 12 Feb 2016 16:35:04 +0000 Subject: [PATCH] MDL-53077 assign: Set specific pagetype for pages with actions. --- mod/assign/locallib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index 46008dca86f..91fe95d8464 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -406,6 +406,7 @@ class assign { * @return string - The page output. */ public function view($action='') { + global $PAGE; $o = ''; $mform = null; @@ -529,6 +530,10 @@ class assign { 'useridlistid' => optional_param('useridlistid', $this->get_useridlist_key_id(), PARAM_ALPHANUM)); $this->register_return_link($action, $returnparams); + // Include any page action as part of the body tag CSS id. + if (!empty($action)) { + $PAGE->set_pagetype('mod-assign-' . $action); + } // Now show the right view page. if ($action == 'redirect') { $nextpageurl = new moodle_url('/mod/assign/view.php', $nextpageparams); -- 2.43.0