MDL-64656 core_tag: Return tags in modules and blog
[moodle.git] / mod / forum / upgrade.txt
CommitLineData
afd5e85c
RT
1This files describes API changes in /mod/forum/*,
2information provided here is intended especially for developers.
3
f30f46db
RW
4=== 3.7 ===
5 * Changed the forum discussion rendering to use templates rather than print functions.
6 * Added new forum entities, factories, exporters, renderers, and vaults in the local namespace to better encapsulate the forum data.
7 * Deprecated all of the forum_print_* functions in lib.php.
a79c2c92 8 * The forum_print_latest_discussions function has been deprecated and will not be replaced.
bc4c7337 9 * The get_forum_discussion_posts web service has been deprecated in favour of get_discussion_posts.
15dc885a
AN
10 * The forum_count_replies function has been deprecated in favour of get_reply_count_for_post_id_in_discussion_id in
11 the Post vault.
6c344ff2 12 * External function get_forum_discussion_posts now returns an additional field "tags" returning the post tags.
f30f46db 13
2015327b 14=== 3.6 ===
bc4c7337 15
2015327b
DW
16 * 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.
17
b7ce46df
JL
18=== 3.4 ===
19 * External function get_forum_discussion_posts now returns an additional field "ratinginfo" containing rating information.
20
4669389d
PFO
21=== 3.3 ===
22 * External function get_forums_by_courses now returns and additional field "istracked" that indicates if the user
23 is tracking the related forum.
581e75bf 24 * The legacy forum.js file has been removed, this includes the js functions:
56882be6
DP
25 forum_produce_subscribe_link, forum_produce_tracking_link, lockoptions_timetoitems,
26 lockoptions_timefromitems, lockoptions, lockoption, unlockoption
581e75bf
JL
27 * External function can_add_discussion now returns two additional fields:
28 "canpindiscussions" that indicates if the user can add pinned discussions.
29 "cancreateattachment" that indicates if the user can add attachments to the discussion.
4669389d 30
d16185fd 31=== 3.2 ===
9715f61a 32 * The setting $CFG->forum_replytouser has been removed in favour of a centralized noreplyaddress setting.
253ae230 33 Please use $CFG->noreplyaddress setting instead.
d16185fd
AN
34 * The following functions have been finally deprecated and should no longer be used.
35 - forum_count_unrated_posts
36 - forum_tp_count_discussion_read_records
37 - forum_get_user_discussions
38 - forum_tp_count_forum_posts
39 - forum_tp_count_forum_read_records
40 - forum_get_open_modes
41 - forum_get_child_posts
42 - forum_get_discussion_posts
43 - forum_get_ratings
44 - forum_get_tracking_link
45 - forum_tp_count_discussion_unread_posts
46 - forum_convert_to_roles
47 - forum_tp_get_read_records
48 - forum_tp_get_discussion_read_records
49 - forum_user_enrolled
50 - forum_user_can_view_post
51 - forum_shorten_post
52 - forum_is_subscribed
53 - forum_subscribe
54 - forum_unsubscribe
55 - forum_subscribed_users
56 - forum_is_forcesubscribed
57 - forum_forcesubscribe
58 - forum_get_forcesubscribed
59 - forum_get_subscribed_forums
60 - forum_get_optional_subscribed_forums
61 - forum_get_potential_subscribers
14590070
JL
62 * External functions that were returning file information now return the following file fields:
63 filename, filepath, mimetype, filesize, timemodified and fileurl.
64 Those fields are now marked as VALUE_OPTIONAL for backwards compatibility.
d16185fd 65
54dceeed
BH
66=== 3.1 ===
67 * The inteface to forum_get_email_message_id() has changed and no longer needs the $host argument.
68
ea5b910b
JL
69=== 3.0 ===
70 * External function get_forums_by_courses now returns and additional field "cancreatediscussions" that indicates if the user
71 can create discussions in the forum.
4f3a2d21
JL
72 * A new optional parameter (groupid) has been added to get_forum_discussions.
73 This parameter can override the automatically calculated current group.
74 * New constant FORUM_POSTS_ALL_USER_GROUPS, to be used as parameter in functions where we'd need to retrieve all the user posts.
ea5b910b 75
39de876c
AN
76=== 2.8 ===
77 * The following functions have all been marked as deprecated. Many of
df7a4d65 78 these have not been supported in many releases and should not be relied
39de876c
AN
79 upon:
80 forum_count_unrated_posts
81 forum_tp_count_discussion_read_records
82 forum_get_user_discussions
83 forum_tp_count_forum_posts
84 forum_tp_count_forum_read_records
85 forum_get_open_modes
86 forum_get_child_posts
87 forum_get_discussion_posts
88 forum_get_ratings
89 forum_get_tracking_link
90 forum_tp_count_discussion_unread_posts
91 forum_convert_to_roles
92 forum_tp_get_read_records
93 forum_tp_get_discussion_read_records
94 forum_user_enrolled
95 forum_user_can_view_post
59075a43
AN
96 * The following functions have been deprecated and replaced. Please see the phpdoc for each on the new function to use instead:
97 * forum_is_subscribed
98 * forum_subscribe
99 * forum_unsubscribe
100 * forum_subscribed_users
101 * forum_is_forcesubscribed
102 * forum_forcesubscribe
103 * forum_get_forcesubscribed
104 * forum_get_subscribed_forums
105 * forum_get_optional_subscribed_forums
106 * forum_get_potential_subscribers
b235aef0
JL
107 * External function mod_forum_external::get_forum_discussions has been deprecated.
108 Use mod_forum_external::get_forum_discussions_paginated instead.
39de876c 109
2ecd2847
FM
110=== 2.6 ===
111
112* The file post_form.php should not be included, the class it contained has
113 been moved so that it can benefit from autoloading.
02d10ca0
MR
114* The function forum_shorten_post() has been deprecated. It was doing a poor
115 job of shortening forum post text and the shorten_text() function does a
116 much better job.
90b735b1 117* The constant FORUM_TRACKING_ON has been deprecated and replaced by
bd8f5d45
EM
118 FORUM_TRACKING_FORCED. The value between them is maintained, so they are
119 interchangeable, but code should migrate to the new name.
2ecd2847 120
f5ad424b
MN
121=== 2.5 ===
122
123The 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
124'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
125as 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.
afd5e85c
RT
126
127=== 2.3.5, 2.4.2 ===
f5ad424b 128
afd5e85c
RT
129* mod/forum:allowforcesubscribe capability will be forcefully assigned to frontpage role, as it was mistakenly missed off
130when the capability was initially created. If you don't want users with frontpage role to get forum (with forcesubscribe) emails,
2ecd2847 131then please remove this capability for frontpage role.