I regularly offer course with an online forum that is open until date X. After that, they can still read what's already posted on the forum, but no longer post new messages.
Of course, technically they still can.
I'd love it if it were possible to actually close the forum so posting is literally no longer possible, instead of only mentioning that a forum is closed in a pinned post.