Merge branch 'MDL-50547-master' of git://github.com/jleyva/moodle
[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.3 ===
5   * External function get_forums_by_courses now returns and additional field "istracked" that indicates if the user
6    is tracking the related forum.
8 === 3.2 ===
9  * The setting $CFG->forum_replytouser has been removed in favour of a centralized noreplyaddress setting.
10    Please use $CFG->noreplyaddress setting instead.
11  * The following functions have been finally deprecated and should no longer be used.
12   - forum_count_unrated_posts
13   - forum_tp_count_discussion_read_records
14   - forum_get_user_discussions
15   - forum_tp_count_forum_posts
16   - forum_tp_count_forum_read_records
17   - forum_get_open_modes
18   - forum_get_child_posts
19   - forum_get_discussion_posts
20   - forum_get_ratings
21   - forum_get_tracking_link
22   - forum_tp_count_discussion_unread_posts
23   - forum_convert_to_roles
24   - forum_tp_get_read_records
25   - forum_tp_get_discussion_read_records
26   - forum_user_enrolled
27   - forum_user_can_view_post
28   - forum_shorten_post
29   - forum_is_subscribed
30   - forum_subscribe
31   - forum_unsubscribe
32   - forum_subscribed_users
33   - forum_is_forcesubscribed
34   - forum_forcesubscribe
35   - forum_get_forcesubscribed
36   - forum_get_subscribed_forums
37   - forum_get_optional_subscribed_forums
38   - forum_get_potential_subscribers
39  * External functions that were returning file information now return the following file fields:
40    filename, filepath, mimetype, filesize, timemodified and fileurl.
41    Those fields are now marked as VALUE_OPTIONAL for backwards compatibility.
43 === 3.1 ===
44  * The inteface to forum_get_email_message_id() has changed and no longer needs the $host argument.
46 === 3.0 ===
47  * External function get_forums_by_courses now returns and additional field "cancreatediscussions" that indicates if the user
48    can create discussions in the forum.
49  * A new optional parameter (groupid) has been added to get_forum_discussions.
50    This parameter can override the automatically calculated current group.
51  * New constant FORUM_POSTS_ALL_USER_GROUPS, to be used as parameter in functions where we'd need to retrieve all the user posts.
53 === 2.8 ===
54  * The following functions have all been marked as deprecated. Many of
55    these have not been supported in many releases and should not be relied
56    upon:
57      forum_count_unrated_posts
58      forum_tp_count_discussion_read_records
59      forum_get_user_discussions
60      forum_tp_count_forum_posts
61      forum_tp_count_forum_read_records
62      forum_get_open_modes
63      forum_get_child_posts
64      forum_get_discussion_posts
65      forum_get_ratings
66      forum_get_tracking_link
67      forum_tp_count_discussion_unread_posts
68      forum_convert_to_roles
69      forum_tp_get_read_records
70      forum_tp_get_discussion_read_records
71      forum_user_enrolled
72      forum_user_can_view_post
73  * The following functions have been deprecated and replaced. Please see the phpdoc for each on the new function to use instead:
74    * forum_is_subscribed
75    * forum_subscribe
76    * forum_unsubscribe
77    * forum_subscribed_users
78    * forum_is_forcesubscribed
79    * forum_forcesubscribe
80    * forum_get_forcesubscribed
81    * forum_get_subscribed_forums
82    * forum_get_optional_subscribed_forums
83    * forum_get_potential_subscribers
84  * External function mod_forum_external::get_forum_discussions has been deprecated.
85    Use mod_forum_external::get_forum_discussions_paginated instead.
87 === 2.6 ===
89 * The file post_form.php should not be included, the class it contained has
90   been moved so that it can benefit from autoloading.
91 * The function forum_shorten_post() has been deprecated. It was doing a poor
92   job of shortening forum post text and the shorten_text() function does a
93   much better job.
94 * The constant FORUM_TRACKING_ON has been depreciated and replaced by
95   FORUM_TRACKING_FORCED. The value between them is maintained, so they are
96   interchangeable, but code should migrate to the new name.
98 === 2.5 ===
100 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
101 '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
102 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.
104 === 2.3.5, 2.4.2 ===
106 * mod/forum:allowforcesubscribe capability will be forcefully assigned to frontpage role, as it was mistakenly missed off
107 when the capability was initially created. If you don't want users with frontpage role to get forum (with forcesubscribe) emails,
108 then please remove this capability for frontpage role.