MDL-55173 mod_forum: Perform final deprecations
[moodle.git] / mod / forum / upgrade.txt
1 This files describes API changes in /mod/forum/*,
2 information provided here is intended especially for developers.
4 === 3.2 ===
5  * The following functions have been finally deprecated and should no longer be used.
6   - forum_count_unrated_posts
7   - forum_tp_count_discussion_read_records
8   - forum_get_user_discussions
9   - forum_tp_count_forum_posts
10   - forum_tp_count_forum_read_records
11   - forum_get_open_modes
12   - forum_get_child_posts
13   - forum_get_discussion_posts
14   - forum_get_ratings
15   - forum_get_tracking_link
16   - forum_tp_count_discussion_unread_posts
17   - forum_convert_to_roles
18   - forum_tp_get_read_records
19   - forum_tp_get_discussion_read_records
20   - forum_user_enrolled
21   - forum_user_can_view_post
22   - forum_shorten_post
23   - forum_is_subscribed
24   - forum_subscribe
25   - forum_unsubscribe
26   - forum_subscribed_users
27   - forum_is_forcesubscribed
28   - forum_forcesubscribe
29   - forum_get_forcesubscribed
30   - forum_get_subscribed_forums
31   - forum_get_optional_subscribed_forums
32   - forum_get_potential_subscribers
34 === 3.1 ===
35  * The inteface to forum_get_email_message_id() has changed and no longer needs the $host argument.
37 === 3.0 ===
38  * External function get_forums_by_courses now returns and additional field "cancreatediscussions" that indicates if the user
39    can create discussions in the forum.
40  * A new optional parameter (groupid) has been added to get_forum_discussions.
41    This parameter can override the automatically calculated current group.
42  * New constant FORUM_POSTS_ALL_USER_GROUPS, to be used as parameter in functions where we'd need to retrieve all the user posts.
44 === 2.8 ===
45  * The following functions have all been marked as deprecated. Many of
46    these have not been supported in many releases and should not be relied
47    upon:
48      forum_count_unrated_posts
49      forum_tp_count_discussion_read_records
50      forum_get_user_discussions
51      forum_tp_count_forum_posts
52      forum_tp_count_forum_read_records
53      forum_get_open_modes
54      forum_get_child_posts
55      forum_get_discussion_posts
56      forum_get_ratings
57      forum_get_tracking_link
58      forum_tp_count_discussion_unread_posts
59      forum_convert_to_roles
60      forum_tp_get_read_records
61      forum_tp_get_discussion_read_records
62      forum_user_enrolled
63      forum_user_can_view_post
64  * The following functions have been deprecated and replaced. Please see the phpdoc for each on the new function to use instead:
65    * forum_is_subscribed
66    * forum_subscribe
67    * forum_unsubscribe
68    * forum_subscribed_users
69    * forum_is_forcesubscribed
70    * forum_forcesubscribe
71    * forum_get_forcesubscribed
72    * forum_get_subscribed_forums
73    * forum_get_optional_subscribed_forums
74    * forum_get_potential_subscribers
75  * External function mod_forum_external::get_forum_discussions has been deprecated.
76    Use mod_forum_external::get_forum_discussions_paginated instead.
78 === 2.6 ===
80 * The file post_form.php should not be included, the class it contained has
81   been moved so that it can benefit from autoloading.
82 * The function forum_shorten_post() has been deprecated. It was doing a poor
83   job of shortening forum post text and the shorten_text() function does a
84   much better job.
85 * The constant FORUM_TRACKING_ON has been depreciated and replaced by
86   FORUM_TRACKING_FORCED. The value between them is maintained, so they are
87   interchangeable, but code should migrate to the new name.
89 === 2.5 ===
91 The function forum_check_throttling has been changed so that a warning object is returned when a user has reached the 'Post threshold for warning' or
92 'Post threshold for blocking' setting, rather than echoing this on screen. This allows the warning to be moved inside the post form as it can be added
93 as a HTML element, where it is more noticeable. False is returned if there is no need to warn, or restrict the user from posting - see MDL-39182.
95 === 2.3.5, 2.4.2 ===
97 * mod/forum:allowforcesubscribe capability will be forcefully assigned to frontpage role, as it was mistakenly missed off
98 when the capability was initially created. If you don't want users with frontpage role to get forum (with forcesubscribe) emails,
99 then please remove this capability for frontpage role.