After update 2.9.1, the total duration of the units is not seen (in the course details box). Please check this error.
https://prnt.sc/fm6v3u
This reply has been marked as private.
This does not correct the problem. The total duration of units appears with value zero (0)
Added fix in your .
Same fixed will be added in the next update of vibe custom types plugin .
Hello, this correction has not yet been implemented.
They could help me correct.
I need to show the duration of the course (units + exams) in hours (eg 80 hours). Not in days.
https://prnt.sc/fm6v3u
Thank you.
Please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :
add_filter('wplms_cs_get_course_unit_durations',function($html,$duration){
if(!empty($duration)){
return $duration/3600;
}
return $html;
});
Hello
I'm sorry, but it does not work.
Attached image of how it was added to the customizer plugin.
What I can do?
http://prntscr.com/j9zwqc
Thank you.
Please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :
add_filter('course_friendly_time',function($html,$duration){
if(!empty($duration)){
return round(($duration/3600)).' Hours';
}
return $html;
},9999,2);
Hello,
This is not the change I'm looking for.
Please see the image, I need to change the total duration of units (units + exams).
http://prntscr.com/jbym4c
Thanks.
Okay please remove all the codes given above and add this one :
add_filter('wplms_cs_get_course_unit_durations',function($html,$duration){
if(!empty($duration)){
return round(($duration/3600)).' Hours';
}
return $html;
},999999,2);
Okay, Thanks
It works perfectly in hours, but is it possible that it can be displayed in hours and minutes? Example: 36 hours 26 minutes
Thanks.
remove the code given above and try this code :
add_filter('wplms_cs_get_course_unit_durations',function($html,$duration){
if(!empty($duration)){
return tofriendlytime($duration,3600);
}
return $html;
},999999,2);