Get list of all active students in course

Home Forums Legacy Support Support queries How-to & Troubleshooting Get list of all active students in course

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #237850
    Makarand Mane
    Spectator
    Hi I want to get list of all active students in course (Whose course status is active and not expired.) I used this function bp_course_get_students_undertaking( $course_id ); It returns all student under course. Is there another function in WPLMS which return only active students?
    #237888
    logan
    Member
    hello, please have a look on the developers guide: https://vibethemes.github.io/wplms-docs/developer-guide.html
    #238074
    Makarand Mane
    Spectator
    Hi I have already bookmarked that link. but I didn't get function I need as described above. If you know other ready function bp_course_get_students_undertaking from WPLMS then let me know. wplms_user_course_active_check function check status. But I want to fetch list of students who are active and on current course, how I can get it in one query?
    #238143
    Diana
    Participant
    @makarand In LMS > Statistics Section, in students tab we are showing active students as well. So, you need to check the statistics code. Please check vibe customtypes plugin > statistics.php This Function lms_stats_student_content
    #240639
    Makarand Mane
    Spectator
    @Diana I am not asking who is active on website. I need list of students for course who have access to class.
    #240641
    Makarand Mane
    Spectator
    @diana Here is solution I was looking for
    global $wpdb;
    $query = $wpdb->prepare( "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = %d AND meta_value > UNIX_TIMESTAMP( NOW() )", $course_id );
    return $wpdb->get_col( $query );
    #240651
    Veronica
    Moderator
    so it's showing all active students. as you find the way to show it. can we close the topic?
    #240692
    Makarand Mane
    Spectator
    @veronica & @diana with closing ticket, please note that, understand question & reply. None of you gave a proper reply and my lot of time was waste here.
    #240723
    logan
    Member
    Ohh dear Friend, i will ensure that they will be more supportive. much respect :) logan support head - vibe team
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Get list of all active students in course’ is closed to new replies.