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
@jqschied,
Check this file: vibe-customtypes/includes/statistics.php
The statistics related all the information are coming from vibe customtypes plugin.
This reply has been marked as private.
This reply has been marked as private.
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));
}
This reply has been marked as private.
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 .
This reply has been marked as private.
This reply has been marked as private.
This reply has been marked as private.
This reply has been marked as private.