Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Default time unit for the lesson
Tagged: #default time;#time#lesson
- This topic has 11 replies, 4 voices, and was last updated 4 years ago by Diana.
Viewing 12 posts - 1 through 12 (of 12 total)
-
AuthorPosts
-
March 23, 2020 at 11:52 pm #246976huandrasParticipantHow 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ásMarch 24, 2020 at 6:39 am #247013SteveMemberHello @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,March 24, 2020 at 9:35 am #247045huandrasParticipantHi 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?March 24, 2020 at 6:43 pm #247150DianaParticipant@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 minutesMarch 25, 2020 at 10:13 am #247239huandrasParticipantThis reply has been marked as private.March 26, 2020 at 10:49 am #247419DianaParticipant@huandras, The default unit parameter is actually minutes that's why shared the code to change it in secondsMarch 26, 2020 at 11:19 am #247433huandrasParticipant@Diana The default unit of time in my template has always been seconds. I'd like to change this to the minute. please help meMarch 27, 2020 at 8:34 am #247603DianaParticipant@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/cYetjw1INXMarch 27, 2020 at 9:10 am #247606huandrasParticipantHi @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=ZFGrecMarch 31, 2020 at 2:36 pm #248180MrVibeKeymasterThank 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.March 31, 2020 at 2:56 pm #248191huandrasParticipantHi Mr.Vibe Thank you so much. I'm waiting for the 4.0 BR AndrásApril 1, 2020 at 6:16 am #248292DianaParticipant@huandras, Yeah...!! we are working on it too.. Closing this topic
-
AuthorPosts
Viewing 12 posts - 1 through 12 (of 12 total)
- The topic ‘Default time unit for the lesson’ is closed to new replies.