Commit c2d60a96 authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon

Reload institution blogs page to get institution's real name

Bug 1520067

behatnotneeded

Change-Id: Ib5943225f48fbacc96986397eb34b94c9db4047b
parent bc404d65
......@@ -43,6 +43,19 @@ if ($institution = param_alphanum('institution', null)) {
}
else {
$s = institution_selector_for_page($institution, get_config('wwwroot') . 'artefact/blog/index.php');
// Special case: institution=1 means "any institution".
// If it comes back with a different institution than that,
// then reload so we know the institution by name.
// (This makes pagination a lot easier!)
if ($institution == 1 && $s['institution'] != 1) {
if (empty($s['institution'])) {
// we have no institutions yet (only 'mahara')
$s['institution'] = 'mahara';
}
redirect($CFG->wwwroot . 'artefact/blog/index.php?institution=' . $s['institution']);
}
$institutionname = $s['institution'];
if (!($USER->get('admin') || $USER->is_institutional_admin())) {
throw new AccessDeniedException();
......
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