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

Information for user email templates should be consistent

XMLWordPrintable

    • MOODLE_36_STABLE, MOODLE_405_STABLE
    • MOODLE_405_STABLE
    • MDL-64148-main
    • Hide

      1. PHPUnit testing

      Most of the changes have been covered by Unit test.

      vendor/bin/phpunit --filter="test_email_greetings"

      2. Manual testing

      Only user edit profile page that need to test manually.

      2.1 Setup requirements

      1. Install an email catcher. Example: Mailpit (https://github.com/axllent/mailpit)
      2. SMTP Outgoing mail configuration:  0.0.0.0:1025 to smtphosts setting in Site administration > Server > Email > Outgoing mail configuration. Still on that page, set No-reply address to noreply@example.com.
      3. Enabled the emailchangeconfirmation in the Site administration > General > Securitry > Site Security Settings.
      4. Create a new user with "First" as the first name and "Last" as the last name.

      2.2 Testing request of email changes

      1. Login as a newly created user
      2. Navigate to the Edit profile page
      3. Change the email address
      4. Click the Update profile button
      5. Open new browser tab and access *http://0.0.0.0:8025* (The Mailpit web UI)
      6. VERIFY the new email has the greeting text "Hi First,"
      7. Logout
      8. Login as admin
      9. Navigate to Site admin >> General >> Language >> Language customisation
      10. Choose English (en) in the dropdown.
      11. Click the Open language pack for editing button.
      12. Wait until the progress bar is completed and then click the continue button.
      13. In the Filter strings:
        Select core >> auth.php in the Show strings of these components selection box.
        Fill the string identifier input with: emailupdatemessage
      14. Click the Show strings button
      15. Fill in the local customisation textarea with the below:

        Hi {$a->lastname}, You have requested a change of your email address for your account on {$a->site}.

        # Click the Save changes to the language pack button.

      16. Logout
      17. Login as a newly created user
      18. Navigate to the Edit profile page
      19. Click the cancel email change link
      20. Change the email address again
      21. Open new browser tab and access *http://0.0.0.0:8025* (The Mailpit web UI)
      22. VERIFY the new email has the greeting text "Hi Last,"

       

      Show
      1. PHPUnit testing Most of the changes have been covered by Unit test. vendor/bin/phpunit --filter= "test_email_greetings" 2. Manual testing Only user edit profile page that need to test manually. 2.1 Setup requirements Install an email catcher. Example: Mailpit ( https://github.com/axllent/mailpit) SMTP Outgoing mail configuration:   0.0.0.0:1025 to smtphosts setting in Site administration > Server > Email > Outgoing mail configuration. Still on that page, set No-reply address to noreply@example.com . Enabled the emailchangeconfirmation in the Site administration > General > Securitry > Site Security Settings. Create a new user with " First " as the first name and " Last " as the last name. 2.2 Testing request of email changes Login as a newly created user Navigate to the Edit profile page Change the email address Click the Update profile button Open new browser tab and access * http://0.0.0.0:8025* (The Mailpit web UI) VERIFY the new email has the greeting text "Hi First," Logout Login as admin Navigate to Site admin >> General >> Language >> Language customisation Choose English (en) in the dropdown. Click the Open language pack for editing button. Wait until the progress bar is completed and then click the continue button. In the Filter strings: Select core >> auth.php in the Show strings of these components selection box. Fill the string identifier input with: emailupdatemessage Click the Show strings button Fill in the local customisation textarea with the below: Hi {$a->lastname}, You have requested a change of your email address for your account on {$a->site}. # Click the Save changes to the language pack button. Logout Login as a newly created user Navigate to the Edit profile page Click the cancel email change link Change the email address again Open new browser tab and access * http://0.0.0.0:8025* (The Mailpit web UI) VERIFY the new email has the greeting text "Hi Last,"  
    • 6
    • Team Hedgehog 2024 Sprint 2.3, Team Hedgehog 2024 Review 2

      Name information filled for email templates is not the same for all emails sent to users. For example, right now we have:

      Fullname value in 'firstname' field, but no firstname or lastname for:

      • send_confirmation_email
      • setnew_password_and_mail
      • newusernewpasswordtext

      Firstname and lastname, but no fullname for:

      • reset_password_and_mail
      • login_lock_account
      • send_password_change_confirmation_email
      • send_password_change_info

      We should have same the information for all user email templates, and refer to them using the same name convention (eg "Hi Firstname").

      The above list may not be exhaustive, as part of this issue we should do a quick audit of all to ensure we are consistent across the board.

        1. MDL-64148.png
          164 kB
          Ron Carl Alfon Yu

            meirza.arson@moodle.com Meirza
            amaia Amaia Anabitarte
            David Woloszyn David Woloszyn
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 minutes
                4m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 5 hours, 53 minutes
                3d 5h 53m

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