Skip to content

Commit

Permalink
MDL-78763 tool_policy: Initialise returnurl as a moodle_url in viewall
Browse files Browse the repository at this point in the history
  • Loading branch information
mickhawkins authored and HuongNV13 committed Aug 10, 2023
1 parent 9a200b3 commit 3f5aeb8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions admin/tool/policy/classes/output/page_viewalldoc.php
Expand Up @@ -48,15 +48,18 @@
*/
class page_viewalldoc implements renderable, templatable {

/** @var string Return url */
private $returnurl;
/** @var ?moodle_url Return url */
private $returnurl = null;

/**
* Prepare the page for rendering.
*
*/
public function __construct($returnurl) {
$this->returnurl = $returnurl;
if (!empty($returnurl)) {
$this->returnurl = new moodle_url($returnurl);
}

$this->prepare_global_page_access();
$this->prepare_policies();
}
Expand Down

0 comments on commit 3f5aeb8

Please sign in to comment.