MDL-37206 preload course format renderer in course/view.php

Also fixed bug with hardcoded default 'weeks' format