Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 402] [Versions 400 and 403]
A scheduled task for forum cron.
Copyright: | 2014 Dan Poltawski <dan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 546 lines (20 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
cron_task:: (12 methods):
get_name()
execute()
process_post_data()
fill_course_cache()
fill_forum_cache()
fill_discussion_cache()
fill_digest_cache()
add_data_for_post()
fill_user_subscription_cache()
queue_user_tasks()
fetch_posts_for_user()
get_unmailed_posts()
get_name() X-Ref |
Get a descriptive name for this task (shown to admins). return: string |
execute() X-Ref |
Execute the scheduled task. |
process_post_data($posts) X-Ref |
Process all posts and convert to appropriated hoc tasks. param: \stdClass[] $posts |
fill_course_cache($courseids) X-Ref |
Fill the course cache. param: int[] $courseids |
fill_forum_cache($forumids) X-Ref |
Fill the forum cache. param: int[] $forumids |
fill_discussion_cache($discussionids) X-Ref |
Fill the discussion cache. param: int[] $discussionids |
fill_digest_cache() X-Ref |
Fill the cache of user digest preferences. |
add_data_for_post($post) X-Ref |
Add dsta for the current forum post to the structure of adhoc data. param: \stdClass $post |
fill_user_subscription_cache() X-Ref |
Fill the cache of user subscriptions. |
queue_user_tasks() X-Ref |
Queue the user tasks. |
fetch_posts_for_user($user) X-Ref |
Fetch posts for this user. param: \stdClass $user The user to fetch posts for. |
get_unmailed_posts($starttime, $endtime, $now = null) X-Ref |
Returns a list of all new posts that have not been mailed yet return: array param: int $starttime posts created after this time param: int $endtime posts created before this param: int $now used for timed discussions only |