MDL-52252 core_course: removed unused variables
authorMark Nelson <markn@moodle.com>
Thu, 10 Mar 2016 03:13:53 +0000 (11:13 +0800)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 10 Mar 2016 12:17:11 +0000 (13:17 +0100)
The call to 'context_coursecat::instance($COURSE->category);'
was causing Moodle to throw an exception due to non-existent
category.

course/moodleform_mod.php

index c01aeb7..841a261 100644 (file)
@@ -598,8 +598,6 @@ abstract class moodleform_mod extends moodleform {
         }
 
         // Populate module tags.
-        $categorycontext = context_coursecat::instance($COURSE->category);
-        $coursecontext = context_course::instance($COURSE->id);
         if (core_tag_tag::is_enabled('core', 'course_modules')) {
             $mform->addElement('header', 'tagshdr', get_string('tags', 'tag'));
             $mform->addElement('tags', 'tags', get_string('tags'), array('itemtype' => 'course_modules', 'component' => 'core'));