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