public function has_hidden_grades($groupsql="", array $params=null, $groupwheresql="") {
        global $DB;
        $params = (array)$params;
        $params['itemid'] = $this->id;

        return $DB->get_field_sql("SELECT COUNT(*) FROM {grade_grades} g LEFT JOIN "
                            ."{user} u ON g.userid = u.id $groupsql WHERE itemid = :itemid AND hidden = 1 $groupwheresql", $params);
    }