MDL-74321 mod_forum: Forum_check_throttling improvements and fixes
commit8a9fea33e2d4ad27ad268aa9d69288e588472e85
authorJun Pataleta <jun@moodle.com>
Mon, 28 Mar 2022 05:08:47 +0000 (28 13:08 +0800)
committerJun Pataleta <jun@moodle.com>
Mon, 28 Mar 2022 06:40:28 +0000 (28 14:40 +0800)
tree3b491cf0aac50a67787cc651e93debcd2c847826
parent9d827a29a41a6fc81a34870fe9eb20094f0ab10f
MDL-74321 mod_forum: Forum_check_throttling improvements and fixes

* Fetch only the fields required by the function.
* Quick validation of the passed forum parameter. If the forum parameter
is an object, it should have the forum ID and the course ID.
* Default return when there's no need to show a warning yet.
mod/forum/lib.php