[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/mod/forum/ -> lib.php (summary)

(no description)

File Size: 6792 lines (246 kb)
Included or required: 13 times
Referenced: 3 times
Includes or requires: 0 files

Defines 139 functions

  forum_add_instance()
  forum_update_instance()
  forum_delete_instance()
  forum_cron()
  forum_make_mail_text()
  forum_make_mail_html()
  forum_user_outline()
  forum_user_complete()
  forum_print_overview()
  forum_print_recent_activity()
  forum_get_user_grades()
  forum_update_grades()
  forum_grade_item_update()
  forum_grade_item_delete()
  forum_get_participants()
  forum_scale_used()
  forum_scale_used_anywhere()
  forum_get_post_full()
  forum_get_discussion_posts()
  forum_get_all_discussion_posts()
  forum_get_child_posts()
  forum_get_readable_forums()
  forum_search_posts()
  forum_get_all_discussion_ratings()
  forum_get_all_user_ratings()
  forum_get_ratings()
  forum_get_unmailed_posts()
  forum_mark_old_posts_as_mailed()
  forum_get_user_posts()
  forum_get_user_involved_discussions()
  forum_count_user_posts()
  forum_get_post_from_log()
  forum_get_firstpost_from_discussion()
  forum_count_discussion_replies()
  forum_count_discussions()
  forum_count_unrated_posts()
  forum_get_discussions()
  forum_get_discussions_unread()
  forum_get_discussions_count()
  forum_get_user_discussions()
  forum_subscribed_users()
  forum_get_course_forum()
  forum_make_mail_post()
  forum_print_post()
  forum_print_discussion_header()
  forum_shorten_post()
  forum_print_ratings()
  forum_get_ratings_mean()
  forum_get_ratings_count()
  forum_get_ratings_max()
  forum_get_ratings_min()
  forum_get_ratings_sum()
  forum_get_ratings_summary()
  forum_print_rating_menu()
  forum_print_mode_form()
  forum_search_form()
  forum_set_return()
  forum_go_back_to()
  forum_file_area_name()
  forum_file_area()
  forum_delete_old_attachments()
  forum_move_attachments()
  forum_print_attachments()
  forum_add_attachment()
  forum_add_new_post()
  forum_update_post()
  forum_add_discussion()
  forum_delete_discussion()
  forum_delete_post()
  forum_count_replies()
  forum_forcesubscribe()
  forum_is_forcesubscribed()
  forum_is_subscribed()
  forum_get_subscribed_forums()
  forum_subscribe()
  forum_unsubscribe()
  forum_post_subscription()
  forum_get_subscribe_link()
  forum_get_tracking_link()
  forum_user_has_posted_discussion()
  forum_discussions_user_has_posted_in()
  forum_user_has_posted()
  forum_user_can_post_discussion()
  forum_user_can_post()
  forum_user_can_view_post()
  forum_user_can_see_discussion()
  forum_user_can_see_post()
  forum_print_latest_discussions()
  forum_print_discussion()
  forum_print_posts_flat()
  forum_print_posts_threaded()
  forum_print_posts_nested()
  forum_get_recent_mod_activity()
  forum_print_recent_mod_activity()
  forum_change_discussionid()
  forum_update_subscriptions_button()
  forum_role_assign()
  forum_role_unassign()
  forum_add_user_default_subscriptions()
  forum_remove_user_subscriptions()
  forum_remove_user_tracking()
  forum_tp_mark_posts_read()
  forum_tp_add_read_record()
  forum_tp_get_read_records()
  forum_tp_get_discussion_read_records()
  forum_tp_mark_post_read()
  forum_tp_mark_forum_read()
  forum_tp_mark_discussion_read()
  forum_tp_is_post_read()
  forum_tp_is_post_old()
  forum_tp_count_discussion_read_records()
  forum_tp_count_discussion_unread_posts()
  forum_tp_count_forum_posts()
  forum_tp_count_forum_read_records()
  forum_tp_get_course_unread_posts()
  forum_tp_count_forum_unread_posts()
  forum_tp_delete_read_records()
  forum_tp_get_untracked_forums()
  forum_tp_can_track_forums()
  forum_tp_is_tracked()
  forum_tp_start_tracking()
  forum_tp_stop_tracking()
  forum_tp_clean_read_records()
  forum_discussion_update_last_post()
  forum_get_view_actions()
  forum_get_post_actions()
  forum_get_separate_modules()
  forum_check_throttling()
  forum_reset_gradebook()
  forum_reset_userdata()
  forum_reset_course_form_definition()
  forum_reset_course_form_defaults()
  forum_convert_to_roles()
  forum_get_aggregate_types()
  forum_get_layout_modes()
  forum_get_forum_types()
  forum_get_forum_types_all()
  forum_get_open_modes()
  forum_get_extra_capabilities()

Functions
Functions that are not part of a class:

forum_add_instance($forum)   X-Ref
Given an object containing all the necessary data,
(defined by the form in mod.html) this function
will create a new instance and return the id number
of the new instance.

param: object $forum add forum instance (with magic quotes)
return: int intance id

forum_update_instance($forum)   X-Ref
Given an object containing all the necessary data,
(defined by the form in mod.html) this function
will update an existing instance with new data.

param: object $forum forum instance (with magic quotes)
return: bool success

forum_delete_instance($id)   X-Ref
Given an ID of an instance of this module,
this function will permanently delete the instance
and any data that depends on it.

param: int forum instance id
return: bool success

forum_cron()   X-Ref
Function to be run periodically according to the moodle cron
Finds all posts that have yet to be mailed out, and mails them
out to all subscribers

return: void

forum_make_mail_text($course, $forum, $discussion, $post, $userfrom, $userto, $bare = false)   X-Ref
Builds and returns the body of the email notification in plain text.

param: object $course
param: object $forum
param: object $discussion
param: object $post
param: object $userfrom
param: object $userto
param: boolean $bare
return: string The email body in plain text format.

forum_make_mail_html($course, $forum, $discussion, $post, $userfrom, $userto)   X-Ref
Builds and returns the body of the email notification in html format.

param: object $course
param: object $forum
param: object $discussion
param: object $post
param: object $userfrom
param: object $userto
return: string The email text in HTML format

forum_user_outline($course, $user, $mod, $forum)   X-Ref

param: object $course
param: object $user
param: object $mod TODO this is not used in this function, refactor
param: object $forum
return: object A standard object with 2 variables: info (number of posts for this user) and time (last modified)

forum_user_complete($course, $user, $mod, $forum)   X-Ref
No description

forum_print_overview($courses,&$htmlarray)   X-Ref
No description

forum_print_recent_activity($course, $viewfullnames, $timestart)   X-Ref
Given a course and a date, prints a summary of all the new
messages posted in the course since that date

param: object $course
param: bool $viewfullnames capability
param: int $timestart
return: bool success

forum_get_user_grades($forum, $userid=0)   X-Ref
Return grade for given user or all users.

param: int $forumid id of forum
param: int $userid optional user id, 0 means all users
return: array array of grades, false if none

forum_update_grades($forum=null, $userid=0, $nullifnone=true)   X-Ref
Update grades by firing grade_updated event

param: object $forum null means all forums
param: int $userid specific user only, 0 mean all
param: boolean $nullifnone return null if grade does not exist
return: void

forum_grade_item_update($forum, $grades=NULL)   X-Ref
Create/update grade item for given forum

param: object $forum object with extra cmidnumber
param: mixed optional array/object of grade(s); 'reset' means reset grades in gradebook
return: int 0 if ok

forum_grade_item_delete($forum)   X-Ref
Delete grade item for given forum

param: object $forum object
return: object grade_item

forum_get_participants($forumid)   X-Ref
Returns the users with data in one forum
(users with records in forum_subscriptions, forum_posts and forum_ratings, students)

param: int $forumid
return: mixed array or false if none

forum_scale_used($forumid,$scaleid)   X-Ref
This function returns if a scale is being used by one forum

param: int $forumid
param: int $scaleid negative number
return: bool

forum_scale_used_anywhere($scaleid)   X-Ref
Checks if scale is being used by any instance of forum

This is used to find out if scale used anywhere
param: $scaleid int
return: boolean True if the scale is used by any forum

forum_get_post_full($postid)   X-Ref
Gets a post with all info ready for forum_print_post
Most of these joins are just to get the forum id

param: int $postid
return: mixed array of posts or false

forum_get_discussion_posts($discussion, $sort, $forumid)   X-Ref
Gets posts with all info ready for forum_print_post
We pass forumid in because we always know it so no need to make a
complicated join to find it out.

return: mixed array of posts or false

forum_get_all_discussion_posts($discussionid, $sort, $tracking=false)   X-Ref
Gets all posts in discussion including top parent.

param: int $discussionid
param: string $sort
param: bool $tracking does user track the forum?
return: array of posts

forum_get_child_posts($parent, $forumid)   X-Ref
Gets posts with all info ready for forum_print_post
We pass forumid in because we always know it so no need to make a
complicated join to find it out.


forum_get_readable_forums($userid, $courseid=0)   X-Ref
An array of forum objects that the user is allowed to read/search through.

param: $userid
param: $courseid - if 0, we look for forums throughout the whole site.
return: array of forum objects, or false if no matches

forum_search_posts($searchterms, $courseid=0, $limitfrom=0, $limitnum=50,&$totalcount, $extrasql='')   X-Ref
Returns a list of posts found using an array of search terms.

param: $searchterms - array of search terms, e.g. word +word -word
param: $courseid - if 0, we search through the whole site
param: $page
param: $recordsperpage=50
param: &$totalcount
param: $extrasql
return: array of posts found

forum_get_all_discussion_ratings($discussion)   X-Ref
Returns a list of ratings for all posts in discussion

param: object $discussion
return: array of ratings or false

forum_get_all_user_ratings($userid, $discussions)   X-Ref
Returns a list of ratings for one specific user for all posts in discussion

param: object $discussions the discussions for which we return all ratings
param: int $userid the user for who we return all ratings
return: object

forum_get_ratings($postid, $sort="u.firstname ASC")   X-Ref
Returns a list of ratings for a particular post - sorted.

param: int $postid
param: string $sort
return: array of ratings or false

forum_get_unmailed_posts($starttime, $endtime, $now=null)   X-Ref
Returns a list of all new posts that have not been mailed yet

param: int $starttime - posts created after this time
param: int $endtime - posts created before this
param: int $now - used for timed discussions only

forum_mark_old_posts_as_mailed($endtime, $now=null)   X-Ref
Marks posts before a certain time as being mailed already


forum_get_user_posts($forumid, $userid)   X-Ref
Get all the posts for a user in a forum suitable for forum_print_post


forum_get_user_involved_discussions($forumid, $userid)   X-Ref
Get all the discussions user participated in

param: int $forumid
param: int $userid
return: array or false

forum_count_user_posts($forumid, $userid)   X-Ref
Get all the posts for a user in a forum suitable for forum_print_post

param: int $forumid
param: int $userid
return: array of counts or false

forum_get_post_from_log($log)   X-Ref
Given a log entry, return the forum post details for it.


forum_get_firstpost_from_discussion($discussionid)   X-Ref
Given a discussion id, return the first post from the discussion


forum_count_discussion_replies($forumid, $forumsort="", $limit=-1, $page=-1, $perpage=0)   X-Ref
Returns an array of counts of replies to each discussion


forum_count_discussions($forum, $cm, $course)   X-Ref
No description

forum_count_unrated_posts($discussionid, $userid)   X-Ref
How many unrated posts are in the given discussion for a given user?


forum_get_discussions($cm, $forumsort="d.timemodified DESC", $fullpost=true, $unused=-1, $limit=-1, $userlastmodified=false, $page=-1, $perpage=0)   X-Ref
Get all discussions in a forum


forum_get_discussions_unread($cm)   X-Ref
No description

forum_get_discussions_count($cm)   X-Ref
No description

forum_get_user_discussions($courseid, $userid, $groupid=0)   X-Ref
Get all discussions started by a particular user in a course (or group)
This function no longer used ...


forum_subscribed_users($course, $forum, $groupid=0)   X-Ref
Returns list of user objects that are subscribed to this forum


forum_get_course_forum($courseid, $type)   X-Ref
No description

forum_make_mail_post($course, $forum, $discussion, $post, $userfrom, $userto,$ownpost=false, $reply=false, $link=false, $rate=false, $footer="")   X-Ref
Given the data about a posting, builds up the HTML to display it and
returns the HTML in a string.  This is designed for sending via HTML email.


forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=false, $reply=false, $link=false,$ratings=NULL, $footer="", $highlight="", $post_read=null, $dummyifcantsee=true, $istracked=null)   X-Ref
Print a forum post

param: object $post The post to print.
param: integer $courseid The course this post belongs to.
param: boolean $ownpost Whether this post belongs to the current user.
param: boolean $reply Whether to print a 'reply' link at the bottom of the message.
param: boolean $link Just print a shortened version of the post as a link to the full post.
param: object $ratings -- I don't really know --
param: string $footer Extra stuff to print after the message.
param: string $highlight Space-separated list of terms to highlight.
param: int $post_read true, false or -99. If we already know whether this user
param: boolean $dummyifcantsee When forum_user_can_see_post says that

forum_print_discussion_header(&$post, $forum, $group=-1, $datestring="",$cantrack=true, $forumtracked=true, $canviewparticipants=true, $modcontext=NULL)   X-Ref
This function prints the overview of a discussion in the forum listing.
It needs some discussion information and some post information, these
happen to be combined for efficiency in the $post parameter by the function
that calls this one: forum_print_latest_discussions()

param: object $post The post object (passed by reference for speed).
param: object $forum The forum object.
param: int $group Current group.
param: string $datestring Format to use for the dates.
param: boolean $cantrack Is tracking enabled for this forum.
param: boolean $forumtracked Is the user tracking this forum.
param: boolean $canviewparticipants True if user has the viewparticipants permission for this course

forum_shorten_post($message)   X-Ref
Given a post object that we already know has a long message
this function truncates the message nicely to the first
sane place between $CFG->forum_longpost and $CFG->forum_shortpost


forum_print_ratings($postid, $scale, $aggregatetype, $link=true, $ratings=null)   X-Ref
Print the multiple ratings on a post given to the current user by others.
Forumid prevents the double lookup of the forumid in discussion to determine the aggregate type
Scale is an array of ratings


forum_get_ratings_mean($postid, $scale, $ratings=NULL)   X-Ref
Return the mean rating of a post given to the current user by others.
Scale is an array of possible ratings in the scale
Ratings is an optional simple array of actual ratings (just integers)
Forumid is the forum id field needed - passing it avoids a double query of lookup up the discusion and then the forum id to get the aggregate type


forum_get_ratings_count($postid, $scale, $ratings=NULL)   X-Ref
Return the count of the ratings of a post given to the current user by others.
Scale is an array of possible ratings in the scale - the end of the scale is the highest or max grade
Ratings is an optional simple array of actual ratings (just integers)


forum_get_ratings_max($postid, $scale, $ratings=NULL)   X-Ref
Return the max rating of a post given to the current user by others.
Scale is an array of possible ratings in the scale
Ratings is an optional simple array of actual ratings (just integers)


forum_get_ratings_min($postid, $scale, $ratings=NULL)   X-Ref
Return the min rating of a post given to the current user by others.
Scale is an array of possible ratings in the scale
Ratings is an optional simple array of actual ratings (just integers)


forum_get_ratings_sum($postid, $scale, $ratings=NULL)   X-Ref
Return the sum or total of ratings of a post given to the current user by others.
Scale is an array of possible ratings in the scale
Ratings is an optional simple array of actual ratings (just integers)


forum_get_ratings_summary($postid, $scale, $ratings=NULL)   X-Ref
Return a summary of post ratings given to the current user by others.
Scale is an array of possible ratings in the scale
Ratings is an optional simple array of actual ratings (just integers)


forum_print_rating_menu($postid, $userid, $scale, $myrating=NULL)   X-Ref
Print the menu of ratings as part of a larger form.
If the post has already been - set that value.
Scale is an array of ratings


forum_print_mode_form($id, $mode, $forumtype='')   X-Ref
Print the drop down that allows the user to select how they want to have
the discussion displayed.

param: $id - forum id if $forumtype is 'single',
param: $mode - forum layout mode
param: $forumtype - optional

forum_search_form($course, $search='')   X-Ref
No description

forum_set_return()   X-Ref
No description

forum_go_back_to($default)   X-Ref
No description

forum_file_area_name($post)   X-Ref
Creates a directory file name, suitable for make_upload_directory()


forum_file_area($post)   X-Ref
No description

forum_delete_old_attachments($post, $exception="")   X-Ref
No description

forum_move_attachments($discussion, $forumid)   X-Ref
Given a discussion object that is being moved to forumid,
this function checks all posts in that discussion
for attachments, and if any are found, these are
moved to the new forum directory.


forum_print_attachments($post, $return=NULL)   X-Ref
if return=html, then return a html string.
if return=text, then return a text-only string.
otherwise, print HTML for non-images, and return image HTML


forum_add_attachment($post, $inputname,&$message)   X-Ref
No description

forum_add_new_post($post,&$message)   X-Ref
No description

forum_update_post($post,&$message)   X-Ref
No description

forum_add_discussion($discussion,&$message)   X-Ref
Given an object containing all the necessary data,
create a new discussion and return the id


forum_delete_discussion($discussion, $fulldelete=false)   X-Ref
No description

forum_delete_post($post, $children=false)   X-Ref
No description

forum_count_replies($post, $children=true)   X-Ref
No description

forum_forcesubscribe($forumid, $value=1)   X-Ref
No description

forum_is_forcesubscribed($forum)   X-Ref
No description

forum_is_subscribed($userid, $forum)   X-Ref
No description

forum_get_subscribed_forums($course)   X-Ref
No description

forum_subscribe($userid, $forumid)   X-Ref
Adds user to the subscriber list


forum_unsubscribe($userid, $forumid)   X-Ref
Removes user from the subscriber list


forum_post_subscription($post, $forum)   X-Ref
Given a new post, subscribes or unsubscribes as appropriate.
Returns some text which describes what happened.


forum_get_subscribe_link($forum, $context, $messages = array()   X-Ref
Generate and return the subscribe or unsubscribe link for a forum.

param: object $forum the forum. Fields used are $forum->id and $forum->forcesubscribe.
param: object $context the context object for this forum.
param: array $messages text used for the link in its various states
param:

forum_get_tracking_link($forum, $messages=array()   X-Ref
Generate and return the track or no track link for a forum.

param: object $forum the forum. Fields used are $forum->id and $forum->forcesubscribe.

forum_user_has_posted_discussion($forumid, $userid)   X-Ref
Returns true if user created new discussion already

param: int $forumid
param: int $userid
return: bool

forum_discussions_user_has_posted_in($forumid, $userid)   X-Ref
No description

forum_user_has_posted($forumid, $did, $userid)   X-Ref
No description

forum_user_can_post_discussion($forum, $currentgroup=null, $unused=-1, $cm=NULL, $context=NULL)   X-Ref
No description

forum_user_can_post($forum, $discussion, $user=NULL, $cm=NULL, $course=NULL, $context=NULL)   X-Ref
This function checks whether the user can reply to posts in a forum
discussion. Use forum_user_can_post_discussion() to check whether the user
can start dicussions.

param: $forum - forum object
param: $user - user object

forum_user_can_view_post($post, $course, $cm, $forum, $discussion, $user=NULL)   X-Ref
No description

forum_user_can_see_discussion($forum, $discussion, $context, $user=NULL)   X-Ref
No description

forum_user_can_see_post($forum, $discussion, $post, $user=NULL, $cm=NULL)   X-Ref
No description

forum_print_latest_discussions($course, $forum, $maxdiscussions=-1, $displayformat='plain', $sort='',$currentgroup=-1, $groupmode=-1, $page=-1, $perpage=100, $cm=NULL)   X-Ref
Prints the discussion view screen for a forum.

param: object $course The current course object.
param: object $forum Forum to be printed.
param: int $maxdiscussions .
param: string $displayformat The display format to use (optional).
param: string $sort Sort arguments for database query (optional).
param: int $groupmode Group mode of the forum (optional).
param: void $unused (originally current group)
param: int $page Page mode, page to display (optional).
param: int perpage The maximum number of discussions per page(optional)

forum_print_discussion($course, $cm, $forum, $discussion, $post, $mode, $canreply=NULL, $canrate=false)   X-Ref
No description

forum_print_posts_flat($course, &$cm, $forum, $discussion, $post, $mode, $ratings, $reply, $forumtracked, $posts)   X-Ref
No description

forum_print_posts_threaded($course, &$cm, $forum, $discussion, $parent, $depth, $ratings, $reply, $forumtracked, $posts)   X-Ref
TODO document


forum_print_posts_nested($course, &$cm, $forum, $discussion, $parent, $ratings, $reply, $forumtracked, $posts)   X-Ref
No description

forum_get_recent_mod_activity(&$activities, &$index, $timestart, $courseid, $cmid, $userid=0, $groupid=0)   X-Ref
Returns all forum posts since a given time in specified forum.


forum_print_recent_mod_activity($activity, $courseid, $detail, $modnames, $viewfullnames)   X-Ref
No description

forum_change_discussionid($postid, $discussionid)   X-Ref
recursively sets the discussion field to $discussionid on $postid and all its children
used when pruning a post


forum_update_subscriptions_button($courseid, $forumid)   X-Ref
Prints the editing button on subscribers page


forum_role_assign($userid, $context, $roleid)   X-Ref
No description

forum_role_unassign($userid, $context)   X-Ref
This function gets run whenever a role is assigned to a user in a context

param: integer $userid
param: object $context
return: bool

forum_add_user_default_subscriptions($userid, $context)   X-Ref
Add subscriptions for new users


forum_remove_user_subscriptions($userid, $context)   X-Ref
Remove subscriptions for a user in a context


forum_remove_user_tracking($userid, $context)   X-Ref
Remove post tracking for a user in a context


forum_tp_mark_posts_read($user, $postids)   X-Ref
Mark posts as read.

param: object $user object
param: array $postids array of post ids
return: boolean success

forum_tp_add_read_record($userid, $postid)   X-Ref
Mark post as read.


forum_tp_get_read_records($userid=-1, $postid=-1, $discussionid=-1, $forumid=-1)   X-Ref
Returns all records in the 'forum_read' table matching the passed keys, indexed
by userid.


forum_tp_get_discussion_read_records($userid, $discussionid)   X-Ref
Returns all read records for the provided user and discussion, indexed by postid.


forum_tp_mark_post_read($userid, $post, $forumid)   X-Ref
If its an old post, do nothing. If the record exists, the maintenance will clear it up later.


forum_tp_mark_forum_read($user, $forumid, $groupid=false)   X-Ref
Marks a whole forum as read, for a given user


forum_tp_mark_discussion_read($user, $discussionid)   X-Ref
Marks a whole discussion as read, for a given user


forum_tp_is_post_read($userid, $post)   X-Ref
No description

forum_tp_is_post_old($post, $time=null)   X-Ref
No description

forum_tp_count_discussion_read_records($userid, $discussionid)   X-Ref
Returns the count of records for the provided user and discussion.


forum_tp_count_discussion_unread_posts($userid, $discussionid)   X-Ref
Returns the count of records for the provided user and discussion.


forum_tp_count_forum_posts($forumid, $groupid=false)   X-Ref
Returns the count of posts for the provided forum and [optionally] group.


forum_tp_count_forum_read_records($userid, $forumid, $groupid=false)   X-Ref
Returns the count of records for the provided user and forum and [optionally] group.


forum_tp_get_course_unread_posts($userid, $courseid)   X-Ref
Returns the count of records for the provided user and course.
Please note that group access is ignored!


forum_tp_count_forum_unread_posts($cm, $course)   X-Ref
Returns the count of records for the provided user and forum and [optionally] group.


forum_tp_delete_read_records($userid=-1, $postid=-1, $discussionid=-1, $forumid=-1)   X-Ref
Deletes read records for the specified index. At least one parameter must be specified.


forum_tp_get_untracked_forums($userid, $courseid)   X-Ref
Get a list of forums not tracked by the user.

param: int $userid The id of the user to use.
param: int $courseid The id of the course being checked.
return: mixed An array indexed by forum id, or false.

forum_tp_can_track_forums($forum=false, $user=false)   X-Ref
Determine if a user can track forums and optionally a particular forum.
Checks the site settings, the user settings and the forum settings (if
requested).

param: mixed $forum The forum object to test, or the int id (optional).
param: mixed $userid The user object to check for (optional).
return: boolean

forum_tp_is_tracked($forum, $user=false)   X-Ref
Tells whether a specific forum is tracked by the user. A user can optionally
be specified. If not specified, the current user is assumed.

param: mixed $forum If int, the id of the forum being checked; if object, the forum object
param: int $userid The id of the user being checked (optional).
return: boolean

forum_tp_start_tracking($forumid, $userid=false)   X-Ref
No description

forum_tp_stop_tracking($forumid, $userid=false)   X-Ref
No description

forum_tp_clean_read_records()   X-Ref
Clean old records from the forum_read table.


forum_discussion_update_last_post($discussionid)   X-Ref
Sets the last post for a given discussion


forum_get_view_actions()   X-Ref
No description

forum_get_post_actions()   X-Ref
No description

forum_get_separate_modules($courseid)   X-Ref
this function returns all the separate forum ids, given a courseid

param: int $courseid
return: array

forum_check_throttling($forum, $cm=null)   X-Ref
No description

forum_reset_gradebook($courseid, $type='')   X-Ref
Removes all grades from gradebook

param: int $courseid
param: string optional type

forum_reset_userdata($data)   X-Ref
This function is used by the reset_course_userdata function in moodlelib.
This function will remove all posts from the specified forum
and clean up any related data.

param: $data the data submitted from the reset course.
return: array status array

forum_reset_course_form_definition(&$mform)   X-Ref
Called by course/reset.php

param: $mform form passed by reference

forum_reset_course_form_defaults($course)   X-Ref
Course reset form defaults.


forum_convert_to_roles($forum, $forummodid, $teacherroles=array()   X-Ref
Converts a forum to use the Roles System

param: $forum        - a forum object with the same attributes as a record
param: $forummodid   - the id of the forum module, from the modules table
param: $teacherroles - array of roles that have moodle/legacy:teacher
param: $studentroles - array of roles that have moodle/legacy:student
param: $guestroles   - array of roles that have moodle/legacy:guest
param: $cmid         - the course_module id for this forum instance
return: boolean      - forum was converted or not

forum_get_aggregate_types()   X-Ref
Returns array of forum aggregate types


forum_get_layout_modes()   X-Ref
Returns array of forum layout modes


forum_get_forum_types()   X-Ref
Returns array of forum types


forum_get_forum_types_all()   X-Ref
Returns array of all forum layout modes


forum_get_open_modes()   X-Ref
Returns array of forum open modes


forum_get_extra_capabilities()   X-Ref
Returns all other caps used in module




Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7