Issue Details (XML | Word | Printable)

Key: MDL-10586
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mathieu Petit-Clair
Reporter: Mitsuhiro Yoshida
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

$table->head of admin/user.php needs some fix.

Created: 24/Jul/07 06:57 PM   Updated: 10/Jul/08 04:37 PM
Return to search
Component/s: Administration
Affects Version/s: 1.8.4, 1.9
Fix Version/s: 1.8.6, 1.9.2

File Attachments: 1. Text File user.php.patch (1 kB)


Participants: Eloy Lafuente (stronk7), Mathieu Petit-Clair, Mitsuhiro Yoshida and Petr Skoda
Security Level: None
QA Assignee: Petr Skoda
Resolved date: 10/Jul/08
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
Now $table->head of admin/user.php is fixed as "Firstname / Lastname".
We need to change this title order depends on $CFG->fullnamedisplay as below.

Index: user.php
===================================================================
RCS file: /cvsroot/moodle/moodle/admin/user.php,v
retrieving revision 1.108
diff -u -r1.108 user.php
--- user.php 30 Apr 2007 17:08:41 -0000 1.108
+++ user.php 24 Jul 2007 10:34:08 -0000
@@ -303,7 +303,20 @@
 
         $mainadmin = get_admin();
 
- $table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
+ $override->firstname = 'firstname';
+ $override->lastname = 'lastname';
+ $fullnamelanguage = get_string('fullnamedisplay', '', $override);
+ if ($CFG->fullnamedisplay == 'firstname lastname') {
+ $table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
+ } else if ($CFG->fullnamedisplay == 'language') {
+ if ($fullnamelanguage == 'firstname lastname') {
+ $table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
+ } else {
+ $table->head = array ("$lastname / $firstname", $email, $city, $country, $lastaccess, "", "", "");
+ }
+ } else {
+ $table->head = array ("$lastname / $firstname", $email, $city, $country, $lastaccess, "", "", "");
+ }
         $table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
         $table->width = "95%";
         foreach ($users as $user) {


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 09/Apr/08 08:39 AM
Agree that the $CFG->fullnamedisplay should be respected there (both permutations and lag based setting).

+1 for this from 18_STABLE to HEAD.

Assigning to Mathieu. Confirm with MD.

Thanks for the report and initial patch, Mits! B-)

Ciao


Eloy Lafuente (stronk7) made changes - 09/Apr/08 08:39 AM
Field Original Value New Value
Assignee Martin Dougiamas [ dougiamas ] Mathieu Petit-Clair [ scyrma ]
Eloy Lafuente (stronk7) made changes - 09/Apr/08 08:39 AM
Affects Version/s 1.8.2 [ 10220 ]
Affects Version/s 1.7.2 [ 10174 ]
Affects Version/s 1.8.4 [ 10242 ]
Affects Version/s 1.6.5 [ 10210 ]
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 10/Jul/08 11:34 AM
MDL-10586: Fix header to show the right display order. (Initial patch by Mitsuhiro Yoshida)
MODIFY admin/user.php   Rev. 1.103.2.8    (+12 -2 lines)
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 10/Jul/08 11:36 AM
MDL-10586: Fix header to show the right display order. (Initial patch by Mitsuhiro Yoshida)
MODIFY admin/user.php   Rev. 1.109.2.3    (+12 -2 lines)
Mathieu Petit-Clair committed 1 file to 'Moodle CVS' - 10/Jul/08 11:37 AM
MDL-10586: Fix header to show the right display order. (Initial patch by Mitsuhiro Yoshida) (merge from 1.8/1.9)
MODIFY admin/user.php   Rev. 1.116    (+12 -2 lines)
Mathieu Petit-Clair added a comment - 10/Jul/08 11:38 AM
Tested, adjusted & committed to 1.8/1.9/head. Thanks.

Mathieu Petit-Clair made changes - 10/Jul/08 11:38 AM
Fix Version/s 1.8.6 [ 10270 ]
Resolution Fixed [ 1 ]
Fix Version/s 1.9.2 [ 10280 ]
Status Open [ 1 ] Resolved [ 5 ]
Petr Skoda committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 10/Jul/08 04:36 PM
MDL-10586 fixed coding style
MODIFY admin/user.php   Rev. 1.109.2.4    (+2 -1 lines)
Petr Skoda committed 1 file to 'Moodle CVS' - 10/Jul/08 04:36 PM
MDL-10586 fixed coding style; merged from MOODLE_19_STABLE
MODIFY admin/user.php   Rev. 1.117    (+2 -1 lines)
Petr Skoda committed 1 file to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 10/Jul/08 04:37 PM
MDL-10586 fixed coding style; merged from MOODLE_19_STABLE
MODIFY admin/user.php   Rev. 1.103.2.9    (+2 -1 lines)
Petr Skoda added a comment - 10/Jul/08 04:37 PM
closing, next time please do not forget to initialise all objects (fixed in cvs)

Petr Skoda made changes - 10/Jul/08 04:37 PM
QA Assignee skodak
Status Resolved [ 5 ] Closed [ 6 ]