Default time unit for the lesson

Home Forums Legacy Support Support queries How-to & Troubleshooting Default time unit for the lesson

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #246976
    huandras
    Participant
    How can I set default time unit for the lesson? Now the default the sec but I would like to use the minute. Please give me advice. Br András
    #247013
    Steve
    Member
    Hello @huandras, You can change time unit from, Click on course>Edit Course>Set Curriculum>hover on lession/unit and click on edit icon>click on settings>UNIT DURATION PARAMETER Refer: https://www.screencast.com/t/MQsfJ4JdZ0 Thank you,
    #247045
    huandras
    Participant
    Hi Steve Thank you very much your video. I use this option, but I would like to change the default parameter. sec to min When I create a new unit then firstly will appear the minute. Can I do it?
    #247150
    Diana
    Participant
    @huandras, Initially the default parameter for units is set as minutes: http://prntscr.com/rm2pwh Add this code in wp-admin > Plugins > Editor > Select WPLMS Customizer plugin > wplms-customizer.php at the end of the file add this add_filter('vibe_unit_duration_parameter','wplms_custom_unit_parameter'); function wplms_custom_unit_parameter($return){     $return = 1; //set to 1 second.     return $return; } add_filter('wplms_curriculum_time_filter','wplms_custom_unit_curriculum_time_filter',10,2); function wplms_custom_unit_curriculum_time_filter($html,$min){      $minutes=0;      $seconds=0;     $unit_duration_parameter = apply_filters('vibe_unit_duration_parameter',60);     if($unit_duration_parameter == 1){ // Checks if unit duration parameter is set in seconds        if($min > 60){            $minutes = intval($min/60);            $seconds = $min - $minutes*60;           }else{             $seconds = $min;           }            $html = '<span><i class="icon-clock"></i> '.((isset($minutes) && $minutes)?$minutes.(' Minutes','vibe'):'').' '.$seconds.' '.('seconds','vibe').'</span><b>'.((isset($hours) && $hours)?sprintf('%02d',$hours):"00").':'.sprintf('%02d', $minutes).'</b>';       }     return $html; }   refer: http://prntscr.com/rm2qwh Now the default parameter will be seconds instead of minutes
    #247239
    huandras
    Participant
    This reply has been marked as private.
    #247419
    Diana
    Participant
    @huandras, The default unit parameter is actually minutes that's why shared the code to change it in seconds  
    #247433
    huandras
    Participant
    @Diana The default unit of time in my template has always been seconds. I'd like to change this to the minute. please help me
    #247603
    Diana
    Participant
    @huandras, Please check this, when I was trying to create a new unit. As you can see the default parameter is minutes and that's why I am not sure why are you saying that your default parameter is seconds. If it is seconds then it refers you had already added the code before. Just remove that and it will work refer: http://somup.com/cYetjw1INX
    #247606
    huandras
    Participant
    Hi @Diana You are right. I checked the default unit. When I create a new lesson from the wp-admin the unit is good. But when I make a new lesson from the front-end the unit not correct. please check the video. https://1drv.ms/v/s!AjiDrAIdi45FiQBcq4NwDD8owKeR?e=ZFGrec
    #248180
    MrVibe
    Keymaster
    Thank you for reporting this, but there is no control available for setting this. We're recreating the course creation process in 4.0 update so making custom changes in this format is just additional work. We have added provisions for this in the next update already.  
    #248191
    huandras
    Participant
    Hi Mr.Vibe Thank you so much. I'm waiting for the 4.0 BR András
    #248292
    Diana
    Participant
    @huandras, Yeah...!! we are working on it too.. Closing this topic
Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Default time unit for the lesson’ is closed to new replies.