original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Creates a new empty instance in DB and mark its status as INCOMPLETE