Browse: Home / Classes / Learndash_Admin_Data_Reports_Quizzes /

Learndash_Admin_Data_Reports_Quizzes::process_report_action

Learndash_Admin_Data_Reports_Quizzes::process_report_action( array $data = array() )

Handles the AJAX export request.


Description #

Resolves the export’s user scope, writes CSV headers, queues the first background chunk via Action Scheduler, and returns a queued-state snapshot. A scoped export (a group, a filter, or any non-administrator requester) stores its learner list here, where it is cheap. An administrator’s site-wide export stores none, leaving process_export_chunk() to enumerate the activity table in the background worker — too slow for this request’s origin timeout. Subsequent rounds are no longer driven by the browser: Action Scheduler chains chunks server-side, and progress (plus the final download link) surfaces through admin notices. A request received while an export is already running short-circuits to a running-state snapshot.


Parameters #

$data

(array) (Optional) Post data from AJAX call.

Default value: array()


Return #

(array) Response payload describing the queued export.


Source #

File: includes/admin/classes-data-reports-actions/class-learndash-admin-data-reports-user-quizzes.php


Changelog #

Changelog
Version Description
5.1.6 Iteration moved to Action Scheduler; this method only queues the export now.
5.1.10 Deferred an administrator's site-wide learner enumeration to the background worker, restricted a group export to the groups the requester administers, and pinned every other requester to the learners they may report on.
2.3.0 Introduced.