public static function export_item_data(\context $context, int $itemid, array $subcontext) {
        global $DB;

        $sql = "SELECT gi.id AS instanceid, gd.id AS definitionid, gd.method
                  FROM {grading_areas} ga
                  JOIN {grading_definitions} gd ON gd.areaid = ga.id
                  JOIN {grading_instances} gi ON gi.definitionid = gd.id AND gi.itemid = :itemid
                 WHERE ga.contextid = :contextid";
        $params = [
            'itemid' => $itemid,
            'contextid' => $context->id,
        ];
        $records = $DB->get_recordset_sql($sql, $params);
        foreach ($records as $record) {
            $instancedata = manager::component_class_callback(
                "gradingform_{$record->method}",
                gradingform_provider_v2::class,
                'export_gradingform_instance_data',
                [$context, $record->instanceid, $subcontext]
            );
        }
        $records->close();
    }