This is a spinoff to
MDL-26707 which addresses how we should create the News Forum in Moodle. Right now the News Forum is added by a call to forum_get_course_forum() from the Latest News block. This has three (to my mind) unexpected downstream effects:
- The News Forum isn't added on course creation, but rather on the first instance of the course page being loaded after course creation.
- If a course doesn't have a Latest News block added, whether from error or a deliberate choice, the news forum doesn't get created at all.
- If you decide to delete the News Forum but have the Latest News block added, the News Forum will reappear on page load.
There was an inconclusive discussion in
MDL-26707 about the best way to handle this. I proposed a simple expedient of adding the forum_get_course_forum() call to the course creation function. This would bring it into line with current documentation and I think user expectations. There's more than one forum thread about the anomalous behavior of the News Forum. Martin proposed rolling out a course template system as a more comprehensive solution and while I completely support the idea I see no reason why we can't move this simpler solution forward.
Add the forum_get_course_forum() call to the course creation function. This will cause some additional load during bulk course creation. This solution is developed and was already peer-reviewed last year. Update documentation to warn that the Latest News block will reappear.
Same as above but remove the forum_get_course_forum() from the block; instead have the block display an error that the News Forum is required with a link to add it.
Same as the short-term solutions, but the Latest News block allows you to select a forum.
Develop course template system which includes blocks, modules, and sections. Not currently in the roadmap and would require some significant developer and designer time.
Divorce news completely from forums in the form of a simple block like https://github.com/moodleou/moodle-block_news
Will require some thought about upgrades, as the news posts won't have replies, won't be included in digests, won't use all the same messaging infrastructure, won't allow attachments etc.
Leave the code as-is but update the documentation to reflect that the Latest News block is required in order to use the News Forum.