AssignmentsReportsGenerator::addAdditionalFields( $strFields )
Add additional field sql statement
Description
Source
File: bp-integrations/learndash/buddypress/generators/AssignmentsReportsGenerator.php
public function addAdditionalFields($strFields) { global $wpdb; $quizPostType = learndash_get_post_type_slug('quiz'); $fields = " users.ID as user_id, users.display_name as user_display_name, users.user_email as user_email, {$wpdb->posts}.ID as assignment_id, {$wpdb->posts}.post_title as assignment_title, {$wpdb->posts}.post_date_gmt as assignment_post_date, {$wpdb->posts}.post_modified_gmt as assignment_modify_date, ( SELECT meta_value FROM {$wpdb->postmeta} as course_meta WHERE course_meta.post_id = {$wpdb->posts}.ID AND course_meta.meta_key = 'course_id' ) as activity_course_id, ( SELECT post_title FROM {$wpdb->posts} as courses WHERE activity_course_id = courses.ID ) as activity_course_title "; return $fields; }
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.