protected function process_assign_userflag($data) {
        global $DB;

        $data = (object)$data;
        $oldid = $data->id;

        $data->assignment = $this->get_new_parentid('assign');

        $data->userid = $this->get_mappingid('user', $data->userid);
        if (!empty($data->allocatedmarker)) {
            $data->allocatedmarker = $this->get_mappingid('user', $data->allocatedmarker);
        }
        if (!empty($data->extensionduedate)) {
            $data->extensionduedate = $this->apply_date_offset($data->extensionduedate);
        } else {
            $data->extensionduedate = 0;
        }
        // Flags mailed and locked need no translation on restore.

        $newitemid = $DB->insert_record('assign_user_flags', $data);
    }
protected function process_assign_userflag($data) {
        global $DB;

        $data = (object)$data;
        $oldid = $data->id;

        $data->assignment = $this->get_new_parentid('assign');

        $data->userid = $this->get_mappingid('user', $data->userid);
        if (!empty($data->allocatedmarker)) {
            $data->allocatedmarker = $this->get_mappingid('user', $data->allocatedmarker);
        }
        if (!empty($data->extensionduedate)) {
            $data->extensionduedate = $this->apply_date_offset($data->extensionduedate);
        } else {
            $data->extensionduedate = 0;
        }
        // Flags mailed and locked need no translation on restore.

        $newitemid = $DB->insert_record('assign_user_flags', $data);
    }
protected function process_assign_userflag ( $ data ) { global $ DB ; $ data = ( object ) $ data ; $ oldid = $ data -> id ; $ data -> assignment = $ this -> get_new_parentid ( 'assign' ) ; $ data -> userid = $ this -> get_mappingid ( 'user' , $ data -> userid ) ; if ( ! empty ( $ data -> allocatedmarker ) ) { $ data -> allocatedmarker = $ this -> get_mappingid ( 'user' , $ data -> allocatedmarker ) ; } if ( ! empty ( $ data -> extensionduedate ) ) { $ data -> extensionduedate = $ this -> apply_date_offset ( $ data -> extensionduedate ) ; } else { $ data -> extensionduedate = 0 ; } // Flags mailed and locked need no translation on restore. $ newitemid = $ DB -> insert_record ( 'assign_user_flags' , $ data ) ; }
Process a user_flags restore
@param object $data The data in object form
@return void
Process a user_flags restore