Commit 29a7c2e2 authored by Nigel McNie's avatar Nigel McNie
Browse files

Improved the wording for the Upload CSV page, especially in the case of...

Improved the wording for the Upload CSV page, especially in the case of institutional admins. Fixes #2214.

Previously, Institutional Admins were given links to pages they couldn't edit.
parent 299c850a
......@@ -389,12 +389,22 @@ foreach (array_keys(ArtefactTypeProfile::get_all_fields()) as $type) {
}
$fields .= "</ul>\n";
if ($USER->get('admin')) {
$uploadcsvpagedescription = get_string('uploadcsvpagedescription2', 'admin',
get_config('wwwroot') . 'admin/extensions/pluginconfig.php?plugintype=artefact&pluginname=internal&type=profile',
get_config('wwwroot') . 'admin/users/institutions.php',
$fields
);
}
else {
$uploadcsvpagedescription = get_string('uploadcsvpagedescription2institutionaladmin', 'admin',
get_config('wwwroot') . 'admin/users/institutions.php',
$fields
);
}
$smarty = smarty();
$smarty->assign('uploadcsvpagedescription', get_string('uploadcsvpagedescription', 'admin',
get_config('wwwroot') . 'admin/extensions/pluginconfig.php?plugintype=artefact&pluginname=internal&type=profile',
get_config('wwwroot') . 'admin/users/institutions.php',
$fields
));
$smarty->assign('uploadcsvpagedescription', $uploadcsvpagedescription);
$smarty->assign('uploadcsvform', pieform($form));
$smarty->display('admin/users/uploadcsv.tpl');
......
......@@ -215,13 +215,24 @@ $string['uploadcsverrorinvalidusername'] = 'Error on line %s of your file: The u
$string['uploadcsverrormandatoryfieldnotspecified'] = 'Line %s of the file does not have the required "%s" field';
$string['uploadcsverroruseralreadyexists'] = 'Line %s of the file specifies the username "%s" that already exists';
$string['uploadcsverroremailaddresstaken'] = 'Line %s of the file specifies the e-mail address "%s" that is already taken by another user';
$string['uploadcsvpagedescription'] = '<p>You may use this facility to upload new users via a <acronym title="Comma Separated Values">CSV</acronym> file.</p>
$string['uploadcsvpagedescription2'] = '<p>You may use this facility to upload new users via a <acronym title="Comma Separated Values">CSV</acronym> file.</p>
<p>The first row of your CSV file should specify the format of your CSV data. For example, it should look like this:</p>
<pre>username,password,email,firstname,lastname,studentid</pre>
<p>This row must include the <tt>username</tt>, <tt>password</tt>, <tt>email</tt>, <tt>firstname</tt> and <tt>lastname</tt> fields always, and then any fields that are both mandatory and locked for the institution you are uploading the users for. You can <a href="%s">configure the mandatory fields</a> for all institutions, or <a href="%s">configure the locked fields for each institution</a>.</p>
<p>This row must include the <tt>username</tt>, <tt>password</tt>, <tt>email</tt>, <tt>firstname</tt> and <tt>lastname</tt> fields. It must also includes fields that you have made mandatory for all users to fill out, and any fields locked for the institution you are uploading the users for. You can <a href="%s">configure the mandatory fields</a> for all institutions, or <a href="%s">configure the locked fields for each institution</a>.</p>
<p>Your CSV file may include any other profile fields as you require. The full list of fields is:</p>
%s';
$string['uploadcsvpagedescription2institutionaladmin'] = '<p>You may use this facility to upload new users via a <acronym title="Comma Separated Values">CSV</acronym> file.</p>
<p>The first row of your CSV file should specify the format of your CSV data. For example, it should look like this:</p>
<pre>username,password,email,firstname,lastname,studentid</pre>
<p>This row must include the <tt>username</tt>, <tt>password</tt>, <tt>email</tt>, <tt>firstname</tt> and <tt>lastname</tt> fields. It must also include any fields that the site administrator has made mandatory, and any fields that are locked for your institution. You can <a href="%s">configure the locked fields</a> for the institution(s) you manage.</p>
<p>Your CSV file may include any other profile fields as you require. The full list of fields is:</p>
......
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