File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,10 @@ angular.module('mm.addons.mod_forum')
193193 function addAllParticipantsOption ( groups , check ) {
194194 var promise ;
195195
196- if ( check ) {
196+ if ( ! $mmaModForum . isAllParticipantsFixed ( ) ) {
197+ // All participants has a bug, don't add it.
198+ return $q . when ( groups ) ;
199+ } else if ( check ) {
197200 // We need to check if the user can add a discussion to all participants.
198201 promise = $mmaModForum . canAddDiscussionToAll ( forumId ) . catch ( function ( ) {
199202 // The call failed, let's assume he can't.
Original file line number Diff line number Diff line change @@ -267,6 +267,18 @@ angular.module('mm.addons.mod_forum')
267267 return undefined ;
268268 } ;
269269
270+ /**
271+ * There was a bug adding new discussions to All Participants (see MDL-57962). Check if it's fixed.
272+ *
273+ * @module mm.addons.mod_forum
274+ * @ngdoc method
275+ * @name $mmaModForum#isAllParticipantsFixed
276+ * @return {Boolean } True if fixed, false otherwise.
277+ */
278+ self . isAllParticipantsFixed = function ( ) {
279+ return $mmSite . isVersionGreaterEqualThan ( [ '3.1.5' , '3.2.2' ] ) ;
280+ } ;
281+
270282 /**
271283 * Check if canAddDiscussion is available.
272284 *
You can’t perform that action at this time.
0 commit comments