Check $PAGE state for specific page types, else breaks mods (e.g. lesson) with custom renderers
Ver. 2013052004 Release 1.3 (Build 2014012300)