public static function create_new($definitionid, $raterid, $itemid) {
        global $DB;
        $instance = new stdClass();
        $instance->definitionid = $definitionid;
        $instance->raterid = $raterid;
        $instance->itemid = $itemid;
        $instance->status = self::INSTANCE_STATUS_INCOMPLETE;
        $instance->timemodified = time();
        $instance->feedbackformat = FORMAT_MOODLE;
        $instanceid = $DB->insert_record('grading_instances', $instance);
        return $instanceid;
    }
public static function create_new($definitionid, $raterid, $itemid) {
        global $DB;
        $instance = new stdClass();
        $instance->definitionid = $definitionid;
        $instance->raterid = $raterid;
        $instance->itemid = $itemid;
        $instance->status = self::INSTANCE_STATUS_INCOMPLETE;
        $instance->timemodified = time();
        $instance->feedbackformat = FORMAT_MOODLE;
        $instanceid = $DB->insert_record('grading_instances', $instance);
        return $instanceid;
    }
public static function create_new ( $ definitionid , $ raterid , $ itemid ) { global $ DB ; $ instance = new stdClass ( ) ; $ instance -> definitionid = $ definitionid ; $ instance -> raterid = $ raterid ; $ instance -> itemid = $ itemid ; $ instance -> status = self :: INSTANCE_STATUS_INCOMPLETE ; $ instance -> timemodified = time ( ) ; $ instance -> feedbackformat = FORMAT_MOODLE ; $ instanceid = $ DB -> insert_record ( 'grading_instances' , $ instance ) ; return $ instanceid ; }
Creates a new empty instance in DB and mark its status as INCOMPLETE

@param int $definitionid
@param int $raterid
@param int $itemid
@return int id of the created instance
Creates a new empty instance in DB and mark its status as INCOMPLETE