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

Wrong contexts used for string formatting in content notification task

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.2.6, 4.3.3
    • 4.2.6
    • Course
    • MOODLE_402_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-80809-403
    • Hide
      1. Log in as admin
      2. Navigate to Plugins > Filters > Manage filters in site administration
      3. Set Multi-language content to On and apply to Content and headings
      4. Create a user
      5. Create a course with the following full name:

        <span lang="en" class="multilang">Course (EN)</span><span lang="de" class="multilang">Course (DE)</span>
        

      6. Enrol user in the course as a student
      7. Edit the course Announcements forum
        • Forum name:

          <span lang="en" class="multilang">Announcements (EN)</span><span lang="de" class="multilang">Announcements (DE)</span>
          

        • Send content change notification: Yes
      8. Wait for cron to run, or manually execute it
      9. Log out
      10. Log in as test user
      11. Open Notifications drawer
      12. Confirm the notification content shows:
        • Course (EN) content change
        • Forum Announcements (EN) has been changed in the course Course (EN).
        • Go to: Announcements (EN)
      13. Log out
      14. Log in as admin
      15. Navigate to course Announcements (EN) forum
      16. Select More > Filters from navigation
      17. Change Multi-language content to Off and save
      18. Edit the forum settings
        • Description: Blah
        • Send content change notification: Yes
      19. Wait for cron to run, or manually execute it
      20. Log out
      21. Log in as test user
      22. Open Notifications drawer
      23. Confirm the notification content shows:
        • Course (EN) content change
        • Forum Announcements (EN)Announcements (DE) has been changed in the course Course (EN).
        • Go to: Announcements (EN)Announcements (DE)
      Show
      Log in as admin Navigate to Plugins > Filters > Manage filters in site administration Set Multi-language content to On and apply to Content and headings Create a user Create a course with the following full name: <span lang="en" class="multilang">Course (EN)</span><span lang="de" class="multilang">Course (DE)</span> Enrol user in the course as a student Edit the course Announcements forum Forum name: <span lang="en" class="multilang">Announcements (EN)</span><span lang="de" class="multilang">Announcements (DE)</span> Send content change notification: Yes Wait for cron to run, or manually execute it Log out Log in as test user Open Notifications drawer Confirm the notification content shows: Course (EN) content change Forum Announcements (EN) has been changed in the course Course (EN). Go to: Announcements (EN) Log out Log in as admin Navigate to course Announcements (EN) forum Select More > Filters from navigation Change Multi-language content to Off and save Edit the forum settings Description: Blah Send content change notification: Yes Wait for cron to run, or manually execute it Log out Log in as test user Open Notifications drawer Confirm the notification content shows: Course (EN) content change Forum Announcements (EN)Announcements (DE) has been changed in the course Course (EN). Go to: Announcements (EN)Announcements (DE)

      See following lines: https://github.com/moodle/moodle/blob/f30110b5ebf9090ee484986e020d43a7819fc436/course/classes/task/content_notification_task.php#L84-L86

      1. The course name should be formatted using the course context (not the module context);
      2. The module name formatting has got the arguments mixed up, passing a context ID as the second argument ($striplinks) rather than as part of the $options argument

      Noticed while looking at MDL-80803

        1. MDL-80809.png
          180 kB
          Ron Carl Alfon Yu

            pholden Paul Holden
            pholden Paul Holden
            Mikel Martín Corrales Mikel Martín Corrales
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 42 minutes
                1h 42m

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