Commit 0e1e9dba authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon

Bug 1855614: added missing check for isolated institution property

behatnotneeded

Change-Id: Ic7d7a0a3ac8ae154ffdcd020b051577ad86d4cdb
(cherry picked from commit 39be1d1d)
(cherry picked from commit f3d00085)
parent 6eb7b451
......@@ -92,7 +92,7 @@ $restrictedview = !can_view_view($viewid);
if ($restrictedview && !$USER->is_logged_in()) {
throw new AccessDeniedException(get_string('accessdenied', 'error'));
}
else if ($restrictedview) {
else if ($restrictedview && is_isolated()) {
// Check if isolated institutions are on and user being viewed is a site admin
// or both users are in no institution
$userinsts = $userobj->get('institutions');
......@@ -103,6 +103,8 @@ else if ($restrictedview) {
}
}
$blocksjs = '';
$layoutjs = array();
if (!$restrictedview) {
$viewcontent = $view->build_rows(); // Build content before initialising smarty in case pieform elements define headers.
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment