MDL-47555 core_availability: Fixed issue with page layout and grade restriction

* Set pagelayout before getting section info, otherwise conditional activity renderers will default to the default 'base' layout. This causes blocks on a page to be removed.