Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-49172

Displaying additional name fields in ruby (side annotation) format

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.8.3, 3.0
    • General, Language
    • MOODLE_28_STABLE, MOODLE_30_STABLE
    • MDL-49172-master
    • Hide
      Automated test
      1. Initialise PHPUnit (e.g. mdk phpunit) and ensure that no errors are thrown by fullname().
      2. Run PHPUnit with the file lib/tests/moodlelib_test.php and verify there are no failures.
      Manual test
      1. Set up a bunch of users with phonetic information for their names (i.e. using firstnamephonetic and lastnamephonetic).
        • You can accomplish this easily by using the attached MDK script (jpusers.php) - just copy it to your MDK scripts folder (e.g. /usr/local/lib/python2.7/dist-packages/mdk/scripts/ ) and then run mdk run jpusers
      2. Create and enrol them all in a course.
      3. View the course's list of users.
        • Verify that the names in the list render normally.
      4. Navigate to Site administration -> Users -> Permissions -> User policies.
        • Verify that there is a new checkbox, fullnamedisplayrubyphonetics.
      5. Tick the checkbox, then go back to the course you created and view the course's list of users.

      IE, Chrome, Firefox

      1. Verify that the phonetic information for each user's name is now displayed using ruby.
      Show
      Automated test Initialise PHPUnit (e.g. mdk phpunit) and ensure that no errors are thrown by fullname(). Run PHPUnit with the file lib/tests/moodlelib_test.php and verify there are no failures. Manual test Set up a bunch of users with phonetic information for their names (i.e. using firstnamephonetic and lastnamephonetic). You can accomplish this easily by using the attached MDK script (jpusers.php) - just copy it to your MDK scripts folder (e.g. /usr/local/lib/python2.7/dist-packages/mdk/scripts/ ) and then run mdk run jpusers Create and enrol them all in a course. View the course's list of users. Verify that the names in the list render normally. Navigate to Site administration -> Users -> Permissions -> User policies . Verify that there is a new checkbox, fullnamedisplayrubyphonetics . Tick the checkbox, then go back to the course you created and view the course's list of users. IE, Chrome, Firefox Verify that the phonetic information for each user's name is now displayed using ruby.

      I appreciate all contributors of additional name fields.

      https://tracker.moodle.org/browse/MDL-31776

      Now our univ.'s Moodle has these settings as:

      fullnamedisplay=lastname firstname (lastnamephonetic firstnamephonetic) alternatename
      alternativefullnameformat=lastname firstname (lastnamephonetic firstnamephonetic) alternatename

      But these settings make user-list page very wide and inconvenient. I'm not willing to shorten these settings, because

      1. 'lastname' and 'firstname' are useful for Japanese teachers,
      2. 'alternatename' is useful for non-Japanese teachers,
      3. phonetic fields are useful for both teachers (phonetic order is similar as students' ID order).

      Please consider to make displaying variant in ruby (side annotation) format. I attach a dirty patch to display fullname in ruby format in case of 'Site administration' -> 'Users' -> 'Accounts' -> 'Browse list of users'. I know it is too dirty to merge into trunk, but I hope it shows what I think.

      The function 'fullname' in lib/moodlelib.php is referenced 482 times (counted with PHPXref), but I had not reviewed all referers yet. The case of 'Browse list of users' is just one example.

      FYI: ruby format (side annotation)
      https://en.wikipedia.org/wiki/Ruby_character

        1. admin_user_php.patch
          0.4 kB
        2. jpusers.php
          5 kB
        3. lib_moodlelib_php.patch
          4 kB
        4. non_ruby_style.png
          non_ruby_style.png
          8 kB
        5. ruby_style.png
          ruby_style.png
          7 kB

            Unassigned Unassigned
            topstone ISHIKAWA Takayuki
            Votes:
            10 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.