protected static function export_monitor_subscriptions(array $subscriptions, \context_user $context) {
        foreach ($subscriptions as $subscription) {
            $subscriptiondata = new \stdClass();
            $subscriptiondata->instancename = $subscription->get_instance_name();
            $subscriptiondata->eventname = $subscription->get_event_name();
            $subscriptiondata->frequency = $subscription->get_filters_description();
            $subscriptiondata->name = $subscription->get_name($context);
            $subscriptiondata->description = $subscription->get_description($context);
            $subscriptiondata->pluginname = $subscription->get_plugin_name();
            $subscriptiondata->course = $subscription->get_course_name($context);
            $subscriptiondata->timecreated = transform::datetime($subscription->timecreated);
            $subscriptiondata->lastnotificationsent = transform::datetime($subscription->lastnotificationsent);
            writer::with_context($context)->export_data([get_string('privacy:subscriptions', 'tool_monitor'),
                    $subscriptiondata->name . '_' . $subscription->id, $subscriptiondata->course, $subscriptiondata->instancename],
                    $subscriptiondata);
        }
    }