public static function has_annotations_or_comments($gradeid, $includedraft) {
        global $DB;
        $params = array('gradeid'=>$gradeid);
        if (!$includedraft) {
            $params['draft'] = 0;
        }
        if ($DB->count_records('assignfeedback_editpdf_cmnt', $params)) {
            return true;
        }
        if ($DB->count_records('assignfeedback_editpdf_annot', $params)) {
            return true;
        }
        return false;
    }