was working with some old (Moodle 1.4) backups.... trying to restore them to 1.8 and 1.9... and under 1.9, course blocks are lost.
Reviewing revisions I've arrived to
It seems that the
condition, is being applied when the course is an old one (containing course->blockinfo, instead of instances). I think that, in those backups, there are only PAGE_COURSE_VIEW blocks so, the check of $CFG->showblocksonmodpages isn't correct there at all.
Instead, it should be (and there it's) in the restore_create_block_instances() method, that is the one used when we have block instances from different pages.
So... I'm going to delete that condition when restoring old courses.