public static function export_bulk_export_data($id, $itemids, $exportfeedback, $onlyactive, $displaytype,
                                                   $decimalpoints, $updatedgradesonly = null, $separator = null) {

        $formdata = new \stdClass();
        $formdata->id = $id;
        $formdata->itemids = self::convert_flat_itemids_to_array($itemids);
        $formdata->exportfeedback = $exportfeedback;
        $formdata->export_onlyactive = $onlyactive;
        $formdata->display = self::convert_flat_displaytypes_to_array($displaytype);
        $formdata->decimals = $decimalpoints;

        if (!empty($updatedgradesonly)) {
            $formdata->updatedgradesonly = $updatedgradesonly;
        }

        if (!empty($separator)) {
            $formdata->separator = $separator;
        }

        return $formdata;
    }