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

Revert deprecation of $OUTPUT->notify_*

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide
      1. Navigate to Dashboard ► Site administration ► Users ► Permissions ► Assign user roles for entire cohort
      2. Confirm that when you don't have roles to assign, a warning is displayed
      3. Confirm that when you can assign roles, you see a confirmation message after form submission
      4. Confirm that you also see a confirmation message when removing a cohort to sync
      5. Create a blank course and add a competency to it
      6. Navigate to the course competencies page and follow a competency
      7. Confirm that a warning tells you that there are no participants in the course
      8. Head to the 'Report > Competency breakdown', you should see the same error
      9. Navigate to 'Admin > Competencies > Templates'
      10. Set a template as hidden
      11. For that template confirm that a notice lets you know that:
        • cohorts won't be synced when the template is hidden
        • you cannot create learning plans as the tempalte is hidden
        • a message
      Show
      Navigate to Dashboard ► Site administration ► Users ► Permissions ► Assign user roles for entire cohort Confirm that when you don't have roles to assign, a warning is displayed Confirm that when you can assign roles, you see a confirmation message after form submission Confirm that you also see a confirmation message when removing a cohort to sync Create a blank course and add a competency to it Navigate to the course competencies page and follow a competency Confirm that a warning tells you that there are no participants in the course Head to the 'Report > Competency breakdown', you should see the same error Navigate to 'Admin > Competencies > Templates' Set a template as hidden For that template confirm that a notice lets you know that: cohorts won't be synced when the template is hidden you cannot create learning plans as the tempalte is hidden a message
    • Affected Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-53786-master

      Description

      Quoting myself from MDL-30811:

      I would like to oppose to the deprecation of $OUTPUT->notify_*(), they are much simpler to use than creating a renderable and calling an output method. Note that replacing them with \core\notification::add() causes a different behaviour as the messages are moved to another part of the DOM on page load.

      Source: https://tracker.moodle.org/browse/MDL-30811?focusedCommentId=402228&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-402228

      In CBE this was our workaround: https://github.com/FMCorz/moodle/blob/cbe/admin/tool/lp/classes/output/renderer.php#L227

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: