Hi,
Please can you tell me how to remove the "0 hours" from the quiz duration?
I followed the instructions here: https://wplms.io/support/knowledge-base/change-unit-duration-from-minutes-to-seconds-in-curriculum/ , but that only turns the minutes into seconds and doesn't hide the "0 hours" text.
Thank you!! :)
Hi Alex,
I followed the tip. However im a little lost.
For wp admin - plugins - editor - wplms customizer - customizer_class.php, is it the page shown in screenshot 1?
How to we add the codes in _construct function and in Class?
Regards.
sorry, screenshot as attached.
Add this code in your wplms-customizer.php file in wplms-customizer pluginat the end and before " ?> " .
add_filter('wplms_curriculum_time_filter','wplms_custom_curriculum_time_filter_remove_hours',10,2);
function wplms_custom_curriculum_time_filter_remove_hours($html,$minutes){
if($minutes < 60){
$html = '<span><i class="icon-clock"></i>'.$minutes.' '.__('minutes','vibe').'</span>';
}
return $html;
}
That's brilliant, thank you :)
Got it, thanks Alex.
Regards.
I'm not getting the error ": call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in on line " on the course curriculum :(
CAn you attach your wplms customizer plugin here to check this?
I seem to have fixed the issue now, thank you :)
Is there a way to completely get rid of the time? I'd love for the minutes not to be displayed also.
Thank you! :)
Try adding the given css from wp-admin -> appearance -> customize -> custom css :
.course_lesson>span {
display: none;
}