protected function is_tagging_enabled() {
        if (!empty($this->tagsoptions['itemtype']) && !empty($this->tagsoptions['component'])) {
            $enabled = core_tag_tag::is_enabled($this->tagsoptions['component'], $this->tagsoptions['itemtype']);
            if ($enabled === false) {
                return false;
            }
        }
        // Backward compatibility with code developed before Moodle 3.0 where itemtype/component were not specified.
        return true;
    }