Commit 97525515 authored by Stacey Walker's avatar Stacey Walker Committed by Francois Marier
Browse files

Removed unnecessary second 'display name' option from view owners name option list


Signed-off-by: default avatarStacey Walker <stacey@catalyst.net.nz>
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent 6c6b718c
......@@ -71,15 +71,14 @@ $ownerformatoptions = array(
FORMAT_NAME_FIRSTNAMELASTNAME => sprintf($formatstring, get_string('fullname'), full_name())
);
$preferredname = $USER->get('preferredname');
if ($preferredname !== '') {
$ownerformatoptions[FORMAT_NAME_PREFERREDNAME] = sprintf($formatstring, get_string('preferredname'), $preferredname);
$displayname = display_name($USER);
if ($displayname !== '') {
$ownerformatoptions[FORMAT_NAME_DISPLAYNAME] = sprintf($formatstring, get_string('preferredname'), $displayname);
}
$studentid = (string)get_field('artefact', 'title', 'owner', $USER->get('id'), 'artefacttype', 'studentid');
if ($studentid !== '') {
$ownerformatoptions[FORMAT_NAME_STUDENTID] = sprintf($formatstring, get_string('studentid'), $studentid);
}
$ownerformatoptions[FORMAT_NAME_DISPLAYNAME] = sprintf($formatstring, get_string('displayname'), display_name($USER));
$editview = array(
'name' => 'editview',
......
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