protected function execute_condition() {

        // No grades on the front page.
        if ($this->get_courseid() == SITEID) {
            return false;
        }

        return plugin_supports('mod', $this->get_task()->get_modulename(), FEATURE_ADVANCED_GRADING, false);
    }