Remove "0 hours" from quiz duration

Home Forums Legacy Support Support queries Styling issues Remove "0 hours" from quiz duration

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #11446
    koreancandy
    Spectator
    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!! :)
    #11576
    Anshuman Sahu
    Keymaster
    It seems you have applied wrong tip to remove the zeroes from that . Please refer this tip :  https://wplms.io/support/knowledge-base/remove-hours-from-curriculum-units-time-if-hours-is-0/
    #11730
    ulyssesw
    Spectator
    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.
    #11731
    ulyssesw
    Spectator
    sorry, screenshot as attached.
    #11749
    Anshuman Sahu
    Keymaster
    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; }
    #11831
    koreancandy
    Spectator
    That's brilliant, thank you :)
    #11878
    ulyssesw
    Spectator
    Got it, thanks Alex. Regards.
    #11901
    koreancandy
    Spectator
    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 :(
    #12032
    Anshuman Sahu
    Keymaster
    CAn you attach your  wplms customizer  plugin here to check this?
    #12079
    koreancandy
    Spectator
    I seem to have fixed the issue now, thank you :)
    #12080
    koreancandy
    Spectator
    Is there a way to completely get rid of the time? I'd love for the minutes not to be displayed also. Thank you! :)
    #12160
    Anshuman Sahu
    Keymaster
    Try adding the given css from wp-admin -> appearance -> customize -> custom css : .course_lesson>span { display: none; }
Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Remove "0 hours" from quiz duration’ is closed to new replies.