Commit 75bd9a91 authored by Doris Tam's avatar Doris Tam
Browse files

Bug 1907718: Removing duplicated unused code in editlayout.php

Format display name options are not used in the basic elements
of the config but in the advanced elements.

Change-Id: I6f4c8dd2a374e767b3b08f697159f69e019f3871
parent ad6652d2
...@@ -227,22 +227,6 @@ function create_settings_pieform() { ...@@ -227,22 +227,6 @@ function create_settings_pieform() {
function get_basic_elements() { function get_basic_elements() {
global $view, $urlallowed, $group, $institution, $USER; global $view, $urlallowed, $group, $institution, $USER;
$formatstring = '%s (%s)';
$ownerformatoptions = array(
FORMAT_NAME_FIRSTNAME => sprintf($formatstring, get_string('firstname'), $USER->get('firstname')),
FORMAT_NAME_LASTNAME => sprintf($formatstring, get_string('lastname'), $USER->get('lastname')),
FORMAT_NAME_FIRSTNAMELASTNAME => sprintf($formatstring, get_string('fullname'), full_name())
);
$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);
}
$createtagsoptions = array(); $createtagsoptions = array();
$typecast = is_postgres() ? '::varchar' : ''; $typecast = is_postgres() ? '::varchar' : '';
if ($selecttags = get_records_sql_array(" if ($selecttags = get_records_sql_array("
......
Supports Markdown
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