MDL-52252 core_course: removed unused variables
MDL-52252 core_course: removed unused variables

The call to 'context_coursecat::instance($COURSE->category);'
was causing Moodle to throw an exception due to non-existent
category.

dilawar/moodle