SQL Query – Lists All Students stats per Instructor Courses

Home Forums Legacy Support Support queries How-to & Troubleshooting SQL Query – Lists All Students stats per Instructor Courses

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #155811
    jqschied
    Spectator
    I am working on a custom stats on front-end and would like to output lists of students per instructor courses. Can you help me how to query the database? We have 8 instructors with each having 6 courses. The custom stats i am working on would be for each instructor to see the stats of the their students (progress). Attached is the screenshot of what I want to see on stats (per instructor stats). Also if you can guide me if there are already build in php files that have these query on (where to look and what else needed to accomplish this). Thank you in advance. I already built a stat page for each instructor, all I needed is to plug this queries and output the desired stats (per screenshots below). https://prnt.sc/jfen52
    #155911
    Diana
    Participant
    @jqschied, Check this file: vibe-customtypes/includes/statistics.php The statistics related all the information are coming from vibe customtypes plugin.  
    #155956
    jqschied
    Spectator
    This reply has been marked as private.
    #155959
    jqschied
    Spectator
    This reply has been marked as private.
    #156077
    Anshuman Sahu
    Keymaster
    Well this is the actual code that will provide you the start date of the cousre : function get_subs($user_id,$course_id){ global $bp; global $wpdb; return $wpdb->get_var($wpdb->prepare("SELECT date_recorded FROM {$bp->activity->table_name} WHERE type ='subscribe_course' AND item_id=%d AND component='course' AND user_id=%d ORDER BY id DESC LIMIT 1", $course_id,$user_id)); }
    #156086
    jqschied
    Spectator
    This reply has been marked as private.
    #156186
    Anshuman Sahu
    Keymaster
    for that you can check wp-content/plugins/vibe-course-module/includes/bp-course-ajax.php  : http://prntscr.com/jgin3x IF you want it we can also take it as a paid customization .
    #156277
    jqschied
    Spectator
    This reply has been marked as private.
    #156322
    Anshuman Sahu
    Keymaster
    This reply has been marked as private.
    #156577
    jqschied
    Spectator
    This reply has been marked as private.
    #156662
    Diana
    Participant
    This reply has been marked as private.
Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘SQL Query – Lists All Students stats per Instructor Courses’ is closed to new replies.