Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
This files describes API changes in /mod/forum/*,
2
information provided here is intended especially for developers.
3
 
4
=== 4.4 ===
5
 
6
* The mod_forum_get_forum_discussions_paginated web service has been removed from core.
7
 
8
=== 4.3 ===
9
 
10
* The forum_print_discussion_header function has been deprecated and will not be replaced.
11
 
12
=== 4.1 ===
13
 
14
* The following code, previously used (exclusively) by upgrade steps is not available anymore
15
  because of the upgrade cleanup performed for this version. See MDL-71747 for more info:
16
    - \mod_forum\task\refresh_forum_post_counts adhoc task.
17
 
18
=== 4.0 ===
19
 
20
* The forum_count_replies() function has been removed from core.
21
* The mod_forum_get_forum_discussion_posts web service has been removed from core.
22
* Final deprecations of the following functions:
23
    * forum_make_mail_text
24
    * forum_make_mail_html
25
    * forum_make_mail_post
26
    * forum_cron_minimise_user_record
27
    * forum_cron
28
    * forum_print_discussion
29
    * forum_post_nesting_cache
30
    * forum_should_start_post_nesting
31
    * forum_should_end_post_nesting
32
    * forum_print_post_start
33
    * forum_print_post_end
34
    * forum_print_post
35
    * forum_print_posts_flat
36
    * forum_print_posts_threaded
37
    * forum_print_posts_nested
38
    * forum_print_latest_discussions
39
    * forum_get_user_grades
40
* The method forum_update_subscriptions_button() has been deprecated as it is no longer used.
41
  The 'Manage subscribers' button has been replaced with tertiary navigation.
42
 
43
=== 3.11 ===
44
 
45
* The get_forum_discussions_paginated web service has been deprecated in favour of get_forum_discussions.
46
* The forum post exporter now includes a "timemodified" field for each post, which is included in several WS methods:
47
    * mod_forum_get_discussion_posts
48
    * get_discussion_posts_by_userid
49
    * get_discussion_post
50
    * add_discussion_post
51
 
52
=== 3.10 ===
53
 
54
* Changes in external function mod_forum_external::get_discussion_posts_by_userid
55
  Now returns the posts of a given user checking the current user capabilities ($USER, the user who is requesting the posts).
56
  Previously, it returned the posts checking the capabilities of the user that created the posts.
57
 
58
=== 3.8 ===
59
 
60
* The following functions have been finally deprecated and can not be used anymore:
61
    * forum_scale_used()
62
* In order for the forum summary report to calculate word count and character count data, those details are now stored
63
    for each post in the database when posts are created or updated. For posts that existed prior to a Moodle 3.8 upgrade, these
64
    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
65
    default, by setting $CFG->forumpostcountchunksize to the required integer value.
66
 
67
=== 3.7 ===
68
  * Changed the forum discussion rendering to use templates rather than print functions.
69
  * Added new forum entities, factories, exporters, renderers, and vaults in the local namespace to better encapsulate the forum data.
70
  * Deprecated all of the forum_print_* functions in lib.php.
71
  * The forum_print_latest_discussions function has been deprecated and will not be replaced.
72
  * The get_forum_discussion_posts web service has been deprecated in favour of get_discussion_posts.
73
  * The forum_count_replies function has been deprecated in favour of get_reply_count_for_post_id_in_discussion_id in
74
    the Post vault.
75
  * 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.
76
  * External function get_forum_discussion_posts now returns an additional field "tags" returning the post tags.
77
  * New external function mod_forum_external::get_forum_discussions returns a list of forum discussions optionally sorted and paginated.
78
    Use mod_forum_external::get_forum_discussions instead.
79
  * 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.
80
 
81
=== 3.6 ===
82
 
83
  * 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.
84
 
85
=== 3.4 ===
86
  * External function get_forum_discussion_posts now returns an additional field "ratinginfo" containing rating information.
87
 
88
=== 3.3 ===
89
  * External function get_forums_by_courses now returns and additional field "istracked" that indicates if the user
90
   is tracking the related forum.
91
  * The legacy forum.js file has been removed, this includes the js functions:
92
    forum_produce_subscribe_link, forum_produce_tracking_link, lockoptions_timetoitems,
93
    lockoptions_timefromitems, lockoptions, lockoption, unlockoption
94
  * External function can_add_discussion now returns two additional fields:
95
   "canpindiscussions" that indicates if the user can add pinned discussions.
96
   "cancreateattachment" that indicates if the user can add attachments to the discussion.
97
 
98
=== 3.2 ===
99
 * The setting $CFG->forum_replytouser has been removed in favour of a centralized noreplyaddress setting.
100
   Please use $CFG->noreplyaddress setting instead.
101
 * The following functions have been finally deprecated and should no longer be used.
102
  - forum_count_unrated_posts
103
  - forum_tp_count_discussion_read_records
104
  - forum_get_user_discussions
105
  - forum_tp_count_forum_posts
106
  - forum_tp_count_forum_read_records
107
  - forum_get_open_modes
108
  - forum_get_child_posts
109
  - forum_get_discussion_posts
110
  - forum_get_ratings
111
  - forum_get_tracking_link
112
  - forum_tp_count_discussion_unread_posts
113
  - forum_convert_to_roles
114
  - forum_tp_get_read_records
115
  - forum_tp_get_discussion_read_records
116
  - forum_user_enrolled
117
  - forum_user_can_view_post
118
  - forum_shorten_post
119
  - forum_is_subscribed
120
  - forum_subscribe
121
  - forum_unsubscribe
122
  - forum_subscribed_users
123
  - forum_is_forcesubscribed
124
  - forum_forcesubscribe
125
  - forum_get_forcesubscribed
126
  - forum_get_subscribed_forums
127
  - forum_get_optional_subscribed_forums
128
  - forum_get_potential_subscribers
129
 * External functions that were returning file information now return the following file fields:
130
   filename, filepath, mimetype, filesize, timemodified and fileurl.
131
   Those fields are now marked as VALUE_OPTIONAL for backwards compatibility.
132
 
133
=== 3.1 ===
134
 * The inteface to forum_get_email_message_id() has changed and no longer needs the $host argument.
135
 
136
=== 3.0 ===
137
 * External function get_forums_by_courses now returns and additional field "cancreatediscussions" that indicates if the user
138
   can create discussions in the forum.
139
 * A new optional parameter (groupid) has been added to get_forum_discussions.
140
   This parameter can override the automatically calculated current group.
141
 * New constant FORUM_POSTS_ALL_USER_GROUPS, to be used as parameter in functions where we'd need to retrieve all the user posts.
142
 
143
=== 2.8 ===
144
 * The following functions have all been marked as deprecated. Many of
145
   these have not been supported in many releases and should not be relied
146
   upon:
147
     forum_count_unrated_posts
148
     forum_tp_count_discussion_read_records
149
     forum_get_user_discussions
150
     forum_tp_count_forum_posts
151
     forum_tp_count_forum_read_records
152
     forum_get_open_modes
153
     forum_get_child_posts
154
     forum_get_discussion_posts
155
     forum_get_ratings
156
     forum_get_tracking_link
157
     forum_tp_count_discussion_unread_posts
158
     forum_convert_to_roles
159
     forum_tp_get_read_records
160
     forum_tp_get_discussion_read_records
161
     forum_user_enrolled
162
     forum_user_can_view_post
163
 * The following functions have been deprecated and replaced. Please see the phpdoc for each on the new function to use instead:
164
   * forum_is_subscribed
165
   * forum_subscribe
166
   * forum_unsubscribe
167
   * forum_subscribed_users
168
   * forum_is_forcesubscribed
169
   * forum_forcesubscribe
170
   * forum_get_forcesubscribed
171
   * forum_get_subscribed_forums
172
   * forum_get_optional_subscribed_forums
173
   * forum_get_potential_subscribers
174
 * External function mod_forum_external::get_forum_discussions has been deprecated.
175
   Use mod_forum_external::get_forum_discussions_paginated instead.
176
 
177
=== 2.6 ===
178
 
179
* The file post_form.php should not be included, the class it contained has
180
  been moved so that it can benefit from autoloading.
181
* The function forum_shorten_post() has been deprecated. It was doing a poor
182
  job of shortening forum post text and the shorten_text() function does a
183
  much better job.
184
* The constant FORUM_TRACKING_ON has been deprecated and replaced by
185
  FORUM_TRACKING_FORCED. The value between them is maintained, so they are
186
  interchangeable, but code should migrate to the new name.
187
 
188
=== 2.5 ===
189
 
190
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
191
'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
192
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.
193
 
194
=== 2.3.5, 2.4.2 ===
195
 
196
* mod/forum:allowforcesubscribe capability will be forcefully assigned to frontpage role, as it was mistakenly missed off
197
when the capability was initially created. If you don't want users with frontpage role to get forum (with forcesubscribe) emails,
198
then please remove this capability for frontpage role.