Commit fa9e3f4e authored by Elliot Pahl's avatar Elliot Pahl Committed by Elliot Pahl
Browse files

Rename relevant elements from institutionexpiry... to...

Rename relevant elements from institutionexpiry... to institutionmembershipexpiry... to avoid naming clash.
parent 1beacab4
......@@ -341,7 +341,7 @@ foreach ($user->get('institutions') as $i) {
'description' => get_string('membershipexpirydescription', 'admin'),
'minyear' => $currentdate['year'],
'maxyear' => $currentdate['year'] + 20,
'defaultvalue' => $i->expiry
'defaultvalue' => $i->membership_expiry
),
$i->institution.'_studentid' => array(
'type' => 'text',
......
......@@ -1348,10 +1348,10 @@ function auth_handle_account_expiries() {
foreach ($users as $user) {
$displayname = display_name($user);
email_user($user, null,
get_string('institutionexpirywarning'),
get_string('institutionexpirywarningtext', 'mahara', $displayname, $user->institutionname,
get_string('institutionmembershipexpirywarning'),
get_string('institutionmembershipexpirywarningtext', 'mahara', $displayname, $user->institutionname,
$sitename, $daystoexpire, $wwwroot . 'contact.php', $sitename),
get_string('institutionexpirywarninghtml', 'mahara', $displayname, $user->institutionname,
get_string('institutionmembershipexpirywarninghtml', 'mahara', $displayname, $user->institutionname,
$sitename, $daystoexpire, $wwwroot . 'contact.php', $sitename)
);
set_field('usr_institution', 'expirymailsent', 1, 'usr', $user->id,
......
......@@ -178,8 +178,8 @@ $string['accountexpirywarninghtml'] = '<p>Dear %s,</p>
<p>If you wish to extend your account access or have any questions regarding the above, please feel free to <a href="%s">Contact Us</a>.</p>
<p>Regards, %s Site Administrator</p>';
$string['institutionexpirywarning'] = 'Institution membership expiry warning';
$string['institutionexpirywarningtext'] = 'Dear %s,
$string['institutionmembershipexpirywarning'] = 'Institution membership expiry warning';
$string['institutionmembershipexpirywarningtext'] = 'Dear %s,
Your membership of %s on %s will expire within %s.
......@@ -188,8 +188,8 @@ If you wish to extend your membership or have any questions regarding the above,
%s
Regards, %s Site Administrator';
$string['institutionexpirywarninghtml'] = '<p>Dear %s,</p>
$string['institutionmembershipexpirywarninghtml'] = '<p>Dear %s,</p>
<p>Your membership of %s on %s will expire within %s.</p>
<p>If you wish to extend your membership or have any questions regarding the above, please feel free to <a href="%s">Contact Us</a>.</p>
......
......@@ -955,7 +955,7 @@ function load_user_institutions($userid) {
throw new InvalidArgumentException("couldn't load institutions, no user id specified");
}
if ($institutions = get_records_sql_assoc('
SELECT u.institution,'.db_format_tsfield('ctime').','.db_format_tsfield('expiry').',u.studentid,u.staff,u.admin,i.theme
SELECT u.institution,'.db_format_tsfield('ctime').','.db_format_tsfield('u.expiry', 'membership_expiry').',u.studentid,u.staff,u.admin,i.theme
FROM {usr_institution} u INNER JOIN {institution} i ON u.institution = i.name
WHERE u.usr = ?', array($userid))) {
return $institutions;
......
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