Commit 4af1d644 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon
Browse files

Bug 1625388: Added short name to screen institutions.php

Added shortname of institution to:
 - Table in institution screen as a column
 - individual institution form as a non editable field

behatnotneeded

Change-Id: I37ba89d5d7c801852f970ce2ff82d7193c85f8d1
(cherry picked from commit 799efd20)
parent 114ba20c
......@@ -290,6 +290,15 @@ if ($institution || $add) {
'help' => true,
),
);
if (!$add) {
$elements['shortname'] = array(
'type' => 'select',
'title' => get_string('institutionshortname', 'admin'),
'defaultvalue' => $data->name,
'description' => get_string('institutionshortnamedescription', 'admin'),
'options' => array($data->name => $data->name),
);
}
if ($USER->get('admin') && $institution != 'mahara') {
$elements['expiry'] = array(
'type' => 'date',
......
......@@ -910,9 +910,11 @@ $string['institutiondeletedsuccessfully'] = 'Institution deleted successfully';
$string['noauthpluginforinstitution'] = 'Your site administrator has not configured an authentication plugin for this institution.';
$string['adminnoauthpluginforinstitution'] = 'Please configure an authentication plugin for this institution.';
$string['institutionname'] = 'Institution name';
$string['institutionshortname'] = 'Institution short name';
$string['institutionnamealreadytaken'] = 'This institution name is already taken.';
$string['institutiondisplayname'] = 'Institution display name';
$string['institutionexpiry'] = 'Institution expiry date';
$string['institutionshortnamedescription'] = 'The shortname is generated automatically and cannot be changed.';
$string['institutionexpirydescription'] = 'The date at which this institutions membership of %s will be suspended.';
$string['institutionlanguage'] = 'Language';
$string['institutionlanguagedescription'] = 'The default language for users in this institution.';
......@@ -1035,6 +1037,7 @@ $string['institutionmaxusersexceeded'] = 'This institution is full. You will hav
$string['institutionuserserrortoomanyusers'] = 'The users were not added. The number of members cannot exceed the maximum allowed for the institution. You can add fewer users, remove some users from the institution or ask the site administrator to increase the maximum number of users.';
$string['institutionuserserrortoomanyinvites'] = 'Your invitations were not sent. The number of existing members plus the number of outstanding invitations cannot exceed the institution\'s maximum number of users. You can invite fewer users, remove some users from the institution or ask the site administrator to increase the maximum number of users.';
$string['Shortname'] = 'Shortname';
$string['Members'] = 'Members';
$string['Maximum'] = 'Maximum';
$string['Staff'] = 'Staff';
......
......@@ -92,6 +92,7 @@
<thead>
<tr>
<th>{str tag="institution"}</th>
<th>{str tag="Shortname" section="admin"}</th>
<th>{str tag="Members" section="admin"}</th>
<th>{str tag="Maximum" section="admin"}</th>
<th>{str tag="Staff" section="admin"}</th>
......
......@@ -5,6 +5,9 @@
{$institution->displayname}
{if !$institution->site}</a>{/if}
</td>
<td class="center">
{$institution->name}
</td>
<td class="center">
{if !$institution->site}
<a href="{$WWWROOT}admin/users/institutionusers.php?usertype=members&amp;institution={$institution->name}">{$institution->members}</a>
......
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