QuizzesReportsGenerator::formatData( $activity )

Format the activity results for each column

Description

Source

File: bp-integrations/learndash/buddypress/generators/QuizzesReportsGenerator.php

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
protected function formatData($activity)
{
    return [
        'user_id'         => $activity->user_id,
        'user'            => $activity->user_display_name,
        'course_id'       => $activity->activity_course_id,
        'course'          => $activity->activity_course_title,
        'quiz'            => $activity->post_title,
        'completion_date' => $this->completionDate($activity),
        'updated_date'    => $this->updatedDate($activity),
        'score'           => $activity->activity_score,
        'time_spent'      => $this->timeSpent($activity),
        'quiz_points'     => $activity->activity_points,
        'attempts'        => $activity->activity_attemps,
    ];
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.