In a forum with a post threshold for blocking, the student sees an error message AFTER trying to post beyond the posting threshold, not during the process of posting
When a forum has a post threshold for blocking, the student is warned as they approach the maximum number of posts within the defined time period. (See 'warning' image attached)
However, after this student has reached the posting threshold, they can still the action of adding a new post or replying to post. Moodle does not prevent this student from actually writing the post, nor is there a warning shown that they are going to exceed the posting threshold.
However, immediately after the student tries to publish the post, an error message is thrown. (See 'exception thrown after post made' image attached)
The bug is not in how the feature works but in the user experience. On one hand, Moodle has blocked the student from posting beyond the threshold, which is the expected behaviour. On the other hand, the student is allowed to write a post after reaching the blocking limit, but the actual blocking happens only when they try to publish the post. This can be quite annoying for the student.
One solution might be to display a warning message to tell the student that they have reached the posting threshold and any message they try to post before the 'time period for blocking' is reset will not be accepted.