public static function scale_used($scaleid, $workshopid=null) {
        global $DB;

        $conditions['grade'] = -$scaleid;
        if (!is_null($workshopid)) {
            $conditions['workshopid'] = $workshopid;
        }
        return $DB->record_exists('workshopform_accumulative', $conditions);
    }