hi
you need to use this code:
add_action('wplms_course_stats_process','process_custom_course_stat',10,8);
add_filter('wplms_course_stats_list','add_custom_course_stat');
function add_custom_course_stat($list){
$new_list = array(
'email'=>'Email'
//add another element like same above 'user_field3'=>'Gender'
);
$list=array_merge($list,$new_list);
return $list;
}
function process_custom_course_stat(&$csv_title, &$csv,&$i,&$course_id,&$user_id,&$field,&$ccsv,&$k){
if($field != 'email') // Ensures the field was checked.
return;
$title=__('Email','wplms');
if(!in_array($title,$csv_title))
$csv_title[$k]=array('title'=>$title,'field'=>'Email');
$ifield = 'Email';
$user = get_user_by('id',$user_id);
$field_val = $user->data->user_email;
if(isset($field_val) && $field_val){
$csv[$i][]= $field_val;
$ccsv[$i]['Email'] = $field_val;
}else{
$csv[$i][]= 'NA';
$ccsv[$i]['Email'] = 'NA';
}
}
change the field name accordingly
here in the code Email fields is added