In the wplms version 4
when we set the unit duration in hours it shows in days
here:
but to change this on course status page
check this gits:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('bp_course_get_full_course_curriculum',function($curriculum){ | |
if(!empty($curriculum)){ | |
foreach($curriculum as $i=>$item){ | |
if($item['type'] == 'unit'){ | |
$duration = get_post_meta($item['id'],'vibe_duration',true); | |
if(is_numeric($duration)){ | |
$duration_parameter = get_post_meta($item['id'],'vibe_unit_duration_parameter',true); | |
$item['duration'] = floor($duration*$duration_parameter/3600).' hours'; | |
$curriculum[$i]=$item; | |
} | |
} | |
} | |
} | |
return $curriculum; | |
}); |
add this in
wplms-customizer/wplms-customizer.php file
after that it will show like:
Leave A Comment?