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

Salutation in Course-Approved-Email

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_500_STABLE
    • Hide
      1. Log in as admin
      2. Amend the Manager role, allow the following capability:

        moodle/course:request
        

      3. Create a new user
      4. Assign the new user the Manager system role
      5. Navigate to Language > Language customisation in site administration
      6. Choose English
      7. Press Open language pack for editing
      8. Search in moodle.php for the following String identifier:

        courseapprovedemail2
        

      9. Change Local customisation to the following:

        Dear {$a->fullname}, your requested course is approved: <a href="{$a->url}">{$a->name}</a>
        

      10. Save changes (and confirm you want to do that)
      11. Log out
      12. Log in as test user
      13. Manually navigate to <WWWROOT>/course/request.php
      14. Fill in the form and submit
      15. Log out
      16. Log in as admin
      17. Navigate to Courses > Pending requests in site administration
      18. Approve the pending course request and save form
      19. Log out
      20. Log in as test user
      21. Open notifications
      22. View the full Your request has been approved notification
      23. Confirm the notification body contains the fullname of your test user ("Dear ...")
      Show
      Log in as admin Amend the Manager role, allow the following capability: moodle/course:request Create a new user Assign the new user the Manager system role Navigate to Language > Language customisation in site administration Choose English Press Open language pack for editing Search in moodle.php for the following String identifier : courseapprovedemail2 Change Local customisation to the following: Dear {$a->fullname}, your requested course is approved: <a href="{$a->url}">{$a->name}</a> Save changes (and confirm you want to do that) Log out Log in as test user Manually navigate to <WWWROOT>/course/request.php Fill in the form and submit Log out Log in as admin Navigate to Courses > Pending requests in site administration Approve the pending course request and save form Log out Log in as test user Open notifications View the full Your request has been approved notification Confirm the notification body contains the fullname of your test user ("Dear ...")
    • Hide

      Code verified against automated checks.

      Checked MDL-83265 using repository: https://github.com/paulholden/moodle/

      More information about this report

      Built on: Tue Mar 4 04:53:45 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-83265 using repository: https://github.com/paulholden/moodle/ main (0 errors / 0 warnings) [branch: MDL-83265 | CI Job ] More information about this report Built on: Tue Mar 4 04:53:45 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-83265 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18390/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62991/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62992/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62993/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62994/ App tests (stable app version) Built on: Sun Mar 2 20:25:16 UTC 2025

      We want to have a proper salution in the response email sent to the course requester after his request has been approved. In order to do that, we added the following line in Moodle-Core:

      File: course/lib.php

      Line: 2930

       $a->user = $user->firstname.' '.$user->lastname;
        $this->notify($user, $USER, 'courserequestapproved', get_string('courseapprovedsubject'), get_string('courseapprovedemail2', 'moodle', $a), $course->id);

       

      And in the language package, the string "courseapprovedemail2", has been changed to:

      Sehr geehrte/r  {$a->user},

      der von Ihnen beantragte Kurs '{$a->name}' wurde angelegt. Sie finden ihn unter "Meine Kurse" aufgelistet sowie in Ihrem persönlichen Kursbereich Ihrer Fakultät. Zum neuen Kurs gelangen Sie über {$a->url} .

      We would be very thankfull if you would include this change in the next Moodle Version.

       

      Best Regards,

      Moodle-Support Team, University of Applied Sceinces in Landshut, Germany

            pholden Paul Holden
            ljupka.grabsch@haw-landshut.de Ljupka Grabsch
            Luca Bösch Luca Bösch
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            8 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 29 minutes
                2h 29m

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