on-demand release 4.0dev+
[moodle.git] / mod / forum / upgrade.txt
... / ...
CommitLineData
1This files describes API changes in /mod/forum/*,
2information provided here is intended especially for developers.
3
4=== 4.0 ===
5
6* The forum_count_replies() function has been removed from core.
7* The mod_forum_get_forum_discussion_posts web service has been removed from core.
8
9=== 3.11 ===
10
11* The get_forum_discussions_paginated web service has been deprecated in favour of get_forum_discussions.
12* The forum post exporter now includes a "timemodified" field for each post, which is included in several WS methods:
13 * mod_forum_get_discussion_posts
14 * get_discussion_posts_by_userid
15 * get_discussion_post
16 * add_discussion_post
17
18=== 3.10 ===
19
20* Changes in external function mod_forum_external::get_discussion_posts_by_userid
21 Now returns the posts of a given user checking the current user capabilities ($USER, the user who is requesting the posts).
22 Previously, it returned the posts checking the capabilities of the user that created the posts.
23
24=== 3.8 ===
25
26* The following functions have been finally deprecated and can not be used anymore:
27 * forum_scale_used()
28* In order for the forum summary report to calculate word count and character count data, those details are now stored
29 for each post in the database when posts are created or updated. For posts that existed prior to a Moodle 3.8 upgrade, these
30 are calculated by the refresh_forum_post_counts ad-hoc task in chunks of 5000 posts by default. Site admins are able to modify this
31 default, by setting $CFG->forumpostcountchunksize to the required integer value.
32
33=== 3.7 ===
34 * Changed the forum discussion rendering to use templates rather than print functions.
35 * Added new forum entities, factories, exporters, renderers, and vaults in the local namespace to better encapsulate the forum data.
36 * Deprecated all of the forum_print_* functions in lib.php.
37 * The forum_print_latest_discussions function has been deprecated and will not be replaced.
38 * The get_forum_discussion_posts web service has been deprecated in favour of get_discussion_posts.
39 * The forum_count_replies function has been deprecated in favour of get_reply_count_for_post_id_in_discussion_id in
40 the Post vault.
41 * External function get_forums_by_courses now returns two additional fields "duedate" and "cutoffdate" containing the due date and the cutoff date for posting to the forums respectively.
42 * External function get_forum_discussion_posts now returns an additional field "tags" returning the post tags.
43 * New external function mod_forum_external::get_forum_discussions returns a list of forum discussions optionally sorted and paginated.
44 Use mod_forum_external::get_forum_discussions instead.
45 * External function mod_forum_external::add_discussion_post() has a new 'messageformat' param to be able to handle other formats different from FORMAT_HTML (that continues being the default one). Also a new 'topreferredformat' option enables the automatic conversion between any format and the preferred format (given the editor preference) before contents are saved.
46
47=== 3.6 ===
48
49 * forum_print_post should be surrounded with calls to forum_print_post_start and forum_print_post_end to create the proper HTML structure for the post.
50
51=== 3.4 ===
52 * External function get_forum_discussion_posts now returns an additional field "ratinginfo" containing rating information.
53
54=== 3.3 ===
55 * External function get_forums_by_courses now returns and additional field "istracked" that indicates if the user
56 is tracking the related forum.
57 * The legacy forum.js file has been removed, this includes the js functions:
58 forum_produce_subscribe_link, forum_produce_tracking_link, lockoptions_timetoitems,
59 lockoptions_timefromitems, lockoptions, lockoption, unlockoption
60 * External function can_add_discussion now returns two additional fields:
61 "canpindiscussions" that indicates if the user can add pinned discussions.
62 "cancreateattachment" that indicates if the user can add attachments to the discussion.
63
64=== 3.2 ===
65 * The setting $CFG->forum_replytouser has been removed in favour of a centralized noreplyaddress setting.
66 Please use $CFG->noreplyaddress setting instead.
67 * The following functions have been finally deprecated and should no longer be used.
68 - forum_count_unrated_posts
69 - forum_tp_count_discussion_read_records
70 - forum_get_user_discussions
71 - forum_tp_count_forum_posts
72 - forum_tp_count_forum_read_records
73 - forum_get_open_modes
74 - forum_get_child_posts
75 - forum_get_discussion_posts
76 - forum_get_ratings
77 - forum_get_tracking_link
78 - forum_tp_count_discussion_unread_posts
79 - forum_convert_to_roles
80 - forum_tp_get_read_records
81 - forum_tp_get_discussion_read_records
82 - forum_user_enrolled
83 - forum_user_can_view_post
84 - forum_shorten_post
85 - forum_is_subscribed
86 - forum_subscribe
87 - forum_unsubscribe
88 - forum_subscribed_users
89 - forum_is_forcesubscribed
90 - forum_forcesubscribe
91 - forum_get_forcesubscribed
92 - forum_get_subscribed_forums
93 - forum_get_optional_subscribed_forums
94 - forum_get_potential_subscribers
95 * External functions that were returning file information now return the following file fields:
96 filename, filepath, mimetype, filesize, timemodified and fileurl.
97 Those fields are now marked as VALUE_OPTIONAL for backwards compatibility.
98
99=== 3.1 ===
100 * The inteface to forum_get_email_message_id() has changed and no longer needs the $host argument.
101
102=== 3.0 ===
103 * External function get_forums_by_courses now returns and additional field "cancreatediscussions" that indicates if the user
104 can create discussions in the forum.
105 * A new optional parameter (groupid) has been added to get_forum_discussions.
106 This parameter can override the automatically calculated current group.
107 * New constant FORUM_POSTS_ALL_USER_GROUPS, to be used as parameter in functions where we'd need to retrieve all the user posts.
108
109=== 2.8 ===
110 * The following functions have all been marked as deprecated. Many of
111 these have not been supported in many releases and should not be relied
112 upon:
113 forum_count_unrated_posts
114 forum_tp_count_discussion_read_records
115 forum_get_user_discussions
116 forum_tp_count_forum_posts
117 forum_tp_count_forum_read_records
118 forum_get_open_modes
119 forum_get_child_posts
120 forum_get_discussion_posts
121 forum_get_ratings
122 forum_get_tracking_link
123 forum_tp_count_discussion_unread_posts
124 forum_convert_to_roles
125 forum_tp_get_read_records
126 forum_tp_get_discussion_read_records
127 forum_user_enrolled
128 forum_user_can_view_post
129 * The following functions have been deprecated and replaced. Please see the phpdoc for each on the new function to use instead:
130 * forum_is_subscribed
131 * forum_subscribe
132 * forum_unsubscribe
133 * forum_subscribed_users
134 * forum_is_forcesubscribed
135 * forum_forcesubscribe
136 * forum_get_forcesubscribed
137 * forum_get_subscribed_forums
138 * forum_get_optional_subscribed_forums
139 * forum_get_potential_subscribers
140 * External function mod_forum_external::get_forum_discussions has been deprecated.
141 Use mod_forum_external::get_forum_discussions_paginated instead.
142
143=== 2.6 ===
144
145* The file post_form.php should not be included, the class it contained has
146 been moved so that it can benefit from autoloading.
147* The function forum_shorten_post() has been deprecated. It was doing a poor
148 job of shortening forum post text and the shorten_text() function does a
149 much better job.
150* The constant FORUM_TRACKING_ON has been deprecated and replaced by
151 FORUM_TRACKING_FORCED. The value between them is maintained, so they are
152 interchangeable, but code should migrate to the new name.
153
154=== 2.5 ===
155
156The 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
157'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
158as 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.
159
160=== 2.3.5, 2.4.2 ===
161
162* mod/forum:allowforcesubscribe capability will be forcefully assigned to frontpage role, as it was mistakenly missed off
163when the capability was initially created. If you don't want users with frontpage role to get forum (with forcesubscribe) emails,
164then please remove this capability for frontpage role.