Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

mod forum-subscriptions: Difference between revisions

From MoodleDocs
No edit summary
(Note about plan not to migrate this page to the new developer resources. See template for more info.)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:WillNotMigrate}}
= Feature proposal/specification for increased granularity to mod_forum subscription digest settings =
= Feature proposal/specification for increased granularity to mod_forum subscription digest settings =
MDL-4908
== Summary ==
== Summary ==
To reduce the amount of e-mail that users receive, but still allow them to be notified of changes, this proposal suggests adding granularity to the user Daily Digest options. Specifically, this feature proposal suggests adding a per-forum Daily Digest setting rather than a per-user setting.
At present, forum digest settings are a user profile setting and the same setting applies to every forum in Moodle.
 
This proposal suggests adding granularity to the digest settings to allow users to have a per-forum digest setting.
 
This would hope to give users the ability to reduce the amount of e-mail they receive for forums that may be high traffic, whilst still allow them to receive a summary of notifications.
 
To do so:
* the existing user profile digest setting will be converted into a user default preference;
* a per-forum instance setting will be added to allow each user to select their own digest preference; and
* the forum subscription summary interface will be updated to allow users to select their own digest preferences for each forum.


== Background ==
== Background ==
We've encountered a number of issues relating to forum subscriptions, and the granularity of the options within them. These broadly fit into four groups:
Over the past year, we've encountered a number of issues relating to the amount of e-mail received as a result of forum subscriptions. Primarily, we feel that these would be solved by increased control over which discussions and posts result in a notification. The issues we've noticed broadly fit into four categories:
# inability for some staff to unsubscribe from forced subscription forums;
# too much e-mail from forum threads that users are not interested in (addressed by MDL-39707);
# inability for other staff to subscribe to forced subscription forums;
# inability for some staff to unsubscribe from forced subscription forums (addressed by MDL-40483);
# too much e-mail from forums that users are not interested in;
# inability for other staff to subscribe to forced subscription forums (addressed by MDL-40483); and
# too much e-mail from forum threads that users are not interested in.
# too much e-mail from forums that users are not interested in.


Several of these issues may be addressed shortly by MDL-39707 and MDL-40483:
Several of these issues may be addressed shortly by MDL-39707 and MDL-40483:
Line 15: Line 26:


However, there is still a lack of granularity for forum subscriptions on the whole and this is the final area that this proposal seeks to address.
However, there is still a lack of granularity for forum subscriptions on the whole and this is the final area that this proposal seeks to address.
== Proposal in brief ==
At present, forum digest settings are a user profile setting and the same setting applies to every forum in Moodle.
As a solution to the issue described, the proposal we're putting forward is to introduce additional granularity to the forum subscription type that users may choose. This will:
* convert the existing user profile digest setting into a user default preference; and
* add a per-forum instance setting for each user to select the digest preference.
Effectively, this will give each user the option of whether they wish to receive a digest e-mail, or a single e-mail for each of their forums.


== Changes required ==
== Changes required ==
Line 39: Line 42:
status is.
status is.


The current subscription setting will be a dropdown with options:
The current subscription setting will be a dropdown (single_select) with options:
* Profile Default - always reflects the current profile field setting;
* Profile Default - always reflects the current profile field setting;
* Single e-mail - always send an e-mail per forum discussion;
* Single e-mail - always send an e-mail per forum discussion;
* Daily Digest Complete - send a daily e-mail each day with the complete contents of each post in this forum;
* Daily Digest Complete - send a daily e-mail each day with the complete contents of each post in this forum;
* Daily Digest Subjects - send a daily e-mail each day with the subject of each post in this forum;
* Daily Digest Subjects - send a daily e-mail each day with the subject of each post in this forum;
These names may be shortened to reduce complexity of the user interface.
This will use JavaScript where possible to allow AJAX changes of the settings without requiring a full page reload.


[[File:modforum-subscription-ui1.png]]
[[File:modforum-subscription-ui1.png]]
Line 51: Line 60:
To cater for this, the forum_subscriptions table will be modified to incorporate any overrides to the standard settings. The following fields will be added
To cater for this, the forum_subscriptions table will be modified to incorporate any overrides to the standard settings. The following fields will be added
{|
{|
| field | type | length | default value | nullable |
| table || field || type || length || default value || nullable |
| maildigest | int | 1 | -1 | not null |
|-
| forum_subscriptions || maildigest || int || 1 || -1 || not null |
|}
|}


No additional database call is required for this, but the existing call to retrieve a list of all forums will be modified to outer join the forum_subscriptions table against the current user.
No additional database call is required for this, but the existing call to retrieve a list of all forums will be modified to outer join the forum_subscriptions table against the current user.
A single_select will be used to change the selection.


== TODO ==
== TODO ==

Latest revision as of 14:10, 24 June 2022


Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.


Feature proposal/specification for increased granularity to mod_forum subscription digest settings

MDL-4908

Summary

At present, forum digest settings are a user profile setting and the same setting applies to every forum in Moodle.

This proposal suggests adding granularity to the digest settings to allow users to have a per-forum digest setting.

This would hope to give users the ability to reduce the amount of e-mail they receive for forums that may be high traffic, whilst still allow them to receive a summary of notifications.

To do so:

  • the existing user profile digest setting will be converted into a user default preference;
  • a per-forum instance setting will be added to allow each user to select their own digest preference; and
  • the forum subscription summary interface will be updated to allow users to select their own digest preferences for each forum.

Background

Over the past year, we've encountered a number of issues relating to the amount of e-mail received as a result of forum subscriptions. Primarily, we feel that these would be solved by increased control over which discussions and posts result in a notification. The issues we've noticed broadly fit into four categories:

  1. too much e-mail from forum threads that users are not interested in (addressed by MDL-39707);
  2. inability for some staff to unsubscribe from forced subscription forums (addressed by MDL-40483);
  3. inability for other staff to subscribe to forced subscription forums (addressed by MDL-40483); and
  4. too much e-mail from forums that users are not interested in.

Several of these issues may be addressed shortly by MDL-39707 and MDL-40483:

  • The issue of forum thread subscription will be resolved by MDL-39707 if it is implemented, however I don't believe that the rest will based on the descriptions available; and
  • MDL-40483 attempts to address the first two issues by introducing a new capability which allows you to define which users can unsubscribe from a forum.

However, there is still a lack of granularity for forum subscriptions on the whole and this is the final area that this proposal seeks to address.

Changes required

User profile settings

Wording will be changed to indicate that the setting selected is the user's default setting.

mod_forum UI changes

The existing per-course forum index (/mod/forum/index.php?id=X) will be updated to display the current subscription settings. This information may also be displayed on a summary page for all forums a user is subscribed to (depending on performance aspects).

Where a user has the appropriate capability to both subscribe and unsubscribe from a forum's email notifications, a dropdown with these options will be displayed. Where they are unable to change their subscription options, text/an icon will be displayed indicating that that they cannot change their subscription and what their current subscription status is.

The current subscription setting will be a dropdown (single_select) with options:

  • Profile Default - always reflects the current profile field setting;
  • Single e-mail - always send an e-mail per forum discussion;
  • Daily Digest Complete - send a daily e-mail each day with the complete contents of each post in this forum;
  • Daily Digest Subjects - send a daily e-mail each day with the subject of each post in this forum;

These names may be shortened to reduce complexity of the user interface.

This will use JavaScript where possible to allow AJAX changes of the settings without requiring a full page reload.


modforum-subscription-ui1.png

mod_forum back-end changes

To cater for this, the forum_subscriptions table will be modified to incorporate any overrides to the standard settings. The following fields will be added

table field type length default value
forum_subscriptions maildigest int 1 -1

No additional database call is required for this, but the existing call to retrieve a list of all forums will be modified to outer join the forum_subscriptions table against the current user.

TODO

  • navigation changes to show and allow cyclic toggling of the setting?
  • improve perf of cron so it does not make an additional call per forum per message per user (on developed PoC patch)
  • determine UI changes required
  • UI mockups