MDL-66074 mod_forum: Add sorting in WS for discussion fetching
[moodle.git] / mod / forum / amd / build / repository.min.js
CommitLineData
61d508be 1define ("mod_forum/repository",["core/ajax"],function(a){return{setDiscussionSubscriptionState:function setDiscussionSubscriptionState(b,c,d){return a.call([{methodname:"mod_forum_set_subscription_state",args:{forumid:b,discussionid:c,targetstate:d}}])[0]},addDiscussionPost:function addDiscussionPost(b,c,d,e,f,g){return a.call([{methodname:"mod_forum_add_discussion_post",args:{postid:b,message:d,messageformat:e,subject:c,options:[{name:"private",value:f},{name:"topreferredformat",value:g}]}}])[0]},setDiscussionLockState:function setDiscussionLockState(b,c,d){return a.call([{methodname:"mod_forum_set_lock_state",args:{forumid:b,discussionid:c,targetstate:d}}])[0]},setFavouriteDiscussionState:function setFavouriteDiscussionState(b,c,d){return a.call([{methodname:"mod_forum_toggle_favourite_state",args:{discussionid:c,targetstate:d}}])[0]},setPinDiscussionState:function setPinDiscussionState(b,c,d){return a.call([{methodname:"mod_forum_set_pin_state",args:{discussionid:c,targetstate:d}}])[0]},getDiscussionByUserID:function getDiscussionByUserID(b,c){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"modified",e=3<arguments.length&&arguments[3]!==void 0?arguments[3]:"DESC";return a.call([{methodname:"mod_forum_get_discussion_posts_by_userid",args:{userid:b,cmid:c,sortby:d,sortdirection:e}}])[0]},getDiscussionPosts:function getDiscussionPosts(b){var c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"created",d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"ASC";return a.call([{methodname:"mod_forum_get_discussion_posts",args:{discussionid:b,sortby:c,sortdirection:d}}])[0]}}});
195ea448 2//# sourceMappingURL=repository.min.js.map