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

Introduce notification stack to moodle sessions

    XMLWordPrintable

Details

    • MOODLE_23_STABLE
    • MOODLE_31_STABLE
    • MDL-30811-master
    • Hide
      1. Open any Moodle forum
      2. Create a new forum post
      3. After creation you should be redirected immediately without the need to be shown a notice on it's own on a page
      4. Have a go at adding your own message using both the PHP stack, and the JS stack.
      5. Browse around other moodle areas with redirects
      Show
      Open any Moodle forum Create a new forum post After creation you should be redirected immediately without the need to be shown a notice on it's own on a page Have a go at adding your own message using both the PHP stack, and the JS stack. Browse around other moodle areas with redirects

    Description

      We often need to display information to users about an action that has just been performed.
      Often when we do this, we make use of the redirect() function and an intermediary page is displayed to users with an optional "Continue" link before they are redirected.

      This kind of interruption in the user workflow can be damaging to the user interaction, to the overall user experience, and to productivity as a whole.

      One example of where this is currently present is within the forum module. Whenever a user posts a new post they are given this intermediary page and must click, or wait, before they continue.

      I propose that we add a notification system which interacts with the session to allow messages to be created before a redirect, and displayed after the redirect completes.
      This will improve the user experience considerably in my opinion.

      This kind of user notification can also be used to remove a number of workarounds in Moodle where we append a URL parameter to ensure that a message is displayed after the redirect, or even where the message itself is added to the URL. An example of where we currently do this in core can be seen at https://github.com/moodle/moodle/blob/master/admin/tool/task/scheduledtasks.php#L89 and line 111 of the same file.

      A session message would also mean that where change are made deep in the API, information can be presented to users. An example of this recently is in MDL-49146, in which the activity in a single_activity course format is unhidden whenever a user tries to hide it. This information cannot currently be presented to the user and may lead to confusion when they are unable to hide the activity.

      This was discussed at https://moodle.org/mod/forum/discuss.php?d=328161

      Attachments

        1. before.gif
          before.gif
          342 kB
        2. new.gif
          new.gif
          300 kB

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              dobedobedoh Andrew Lyons
              Simey Lameze Simey Lameze
              Dan Poltawski Dan Poltawski
              John Okely John Okely
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              7 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                23/May/16