Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Adhoc task that updates all of the existing forum_post records with no wordcount or no charcount.

Copyright: 2019 David Monllao
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 81 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

refresh_forum_post_counts:: (2 methods):
  execute()
  update_null_forum_post_counts()


Class: refresh_forum_post_counts  - X-Ref

Adhoc task that updates all of the existing forum_post records with no wordcount or no charcount.

execute()   X-Ref
Run the task to populate word and character counts on existing forum posts.
If the maximum number of records are updated, the task re-queues itself,
as there may be more records to process.


update_null_forum_post_counts()   X-Ref
Updates null forum post counts according to the post message.

return: bool Whether there may be more rows to process