Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

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