Please follow the below instructions for displaying remaining unit+quizzes time in course information section:
1. Go to WP Admin -> Plugins -> Editor -> WPLMS Customizer -> customizer_class.php
2. Add the following code in the _construct function :
function wplms_custom_course_details_information($details){ $course_id = get_the_ID(); foreach($details as $key => $value){ if($key == 'time'){ $custom_info = get_post_meta(get_the_ID(),'vibe_seminar_link',true); $d=get_post_meta($course_id,'vibe_duration',true); $course_duration_parameter = apply_filters('vibe_course_duration_parameter',86400); $seconds = get_user_meta($user_id,$course_id,true); if(!isset($seconds) || !$seconds){ $d=get_post_meta($course_id,'vibe_duration',true); $seconds = $d*$course_duration_parameter; }else{ $seconds = $seconds - time(); } $details['time']=' <li>'.tofriendlytime($seconds).' - '.__("Course Time","vibe-customtypes").' <i class="icon-clock"></i></a> </li>'; $units = bp_course_get_curriculum_units($course_id); if(is_user_logged_in()){ $user_id = get_current_user_id(); $remaining_time = 0; foreach($units as $k => $unit){ if(!bp_course_check_unit_complete($unit,$user_id)){ $d = get_post_meta($unit,'vibe_duration',true); $unit_duration_parameter = apply_filters('vibe_unit_duration_parameter',60); $remaining_time +=$d*$unit_duration_parameter; } } }else{ foreach($units as $k => $unit){ $d = get_post_meta($unit,'vibe_duration',true); $unit_duration_parameter = apply_filters('vibe_unit_duration_parameter',60); $remaining_time +=$d*$unit_duration_parameter; } } $details['time_remaining']=' <li>'.tofriendlytime($remaining_time).' - '.__("Course Units and Quizes Time","vibe-customtypes").' <i class="icon-clock"></i></a> </li>'; } } return $details; }
You can see the changes in course details: