Warning for others regarding course formats in 3.2 (possibly earlier but we noticed it moving from 3.0 to 3.2):
Because of the function below, and because we do not include latest News as a default block, our courses with our custom theme all lose the Latest News block if the course settings are edited.
public function supports_news() {
// For backwards compatibility, check if default blocks include the news_items block.
$defaultblocks = $this->get_default_blocks();
foreach ($defaultblocks as $blocks) {
if (in_array('news_items', $blocks)) {
return true;
}
} // Return false by default.
return false;
}