Affects Version/s: 2.3
Fix Version/s: 3.1
- 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
Pull from Repository:
Pull Master Branch:
Pull Master Diff URL:
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