mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-78763 tool_policy: Initialise returnurl as a moodle_url in viewall
This commit is contained in:
parent
d4cec28c30
commit
a18da528cc
@ -48,15 +48,18 @@ use tool_policy\policy_version;
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user