Home › Forums › Legacy Support › Support queries › Other issues › Quiz Duration Problem When Drip Feed Activated
- This topic has 13 replies, 3 voices, and was last updated 4 years, 2 months ago by Anshuman Sahu.
Viewing 14 posts - 1 through 14 (of 14 total)
-
AuthorPosts
-
August 25, 2020 at 5:01 am #297909hilmanfSpectatorHi, I have problem with unlimited quiz duration when course drip feed is activated. When I add 9999 minutes to quiz duration to make it unlimited (no quiz duration), it also applied as unit/quiz timing. User can't proceed from the quiz to the next unit before 9999 minutes. It should not happen because quiz duration (when disabled) is not unit timing/duration. Setting: Drip feed origin: Previous unit Drip feed type: Unit Drip Feed duration type: Unit Duration Refer: http://prntscr.com/u5cgxs http://prntscr.com/u5chd4August 26, 2020 at 7:44 am #298303JacksonBlockedHello, First, you have to set time limit 9999 days for unlimited access not set in minutes, After that if you have to face any type of issue, please share admin credentials in private reply , also share the replicate steps after that i will follow same on your website, Thanks,August 28, 2020 at 5:35 am #298847hilmanfSpectatorThis reply has been marked as private.August 29, 2020 at 1:32 pm #299313Anshuman SahuKeymasterYes this is an issue , the code logic acutally follows the duration of unit/quiz if you have set the drip feed type to unit duration . But this can be fixed if you select a fixed duration like 1 day . Changing the logic would require custom code and we need to check it as well if its possible or notAugust 30, 2020 at 3:05 pm #299385hilmanfSpectatorHi Alex Thanks for replied. Yes please. I am looking forward for the custom code that changing the logic. How about Issue #2 (jumping quiz timer) and Issue #3 (can't go to next unit in drip feed course)?September 1, 2020 at 3:15 pm #299928Anshuman SahuKeymasterplease try adding this given code in your wplms-customizer.php file in wplms customizer plugin :
add_filter('vibe_total_drip_duration',array($this,'total_drip_duration'),11,4); function total_drip_duration($value,$course_id,$unit_id,$pre_unit_id){ $course_drip_duration_type = get_post_meta($course_id,'vibe_course_drip_duration_type',true); if(vibe_validate($course_drip_duration_type)){ //unit duration $unit_duration = get_post_meta($pre_unit_id,'vibe_duration',true); $unit_duration_parameter = apply_filters('vibe_unit_duration_parameter',60,$pre_unit_id); if(intval($unit_duration) >= 9999){ $value = $unit_duration*$unit_duration_parameter; } } return $value; }
September 2, 2020 at 2:24 am #300018hilmanfSpectatorHi Alex, The code is not working on my side, after pasting the code, my website cannot be accessedSeptember 2, 2020 at 2:12 pm #300196Anshuman SahuKeymasterIm sorry here is the coreect code :add_filter('vibe_total_drip_duration','total_drip_duration',11,4); function total_drip_duration($value,$course_id,$unit_id,$pre_unit_id){ $course_drip_duration_type = get_post_meta($course_id,'vibe_course_drip_duration_type',true); if(vibe_validate($course_drip_duration_type)){ //unit duration $unit_duration = get_post_meta($pre_unit_id,'vibe_duration',true); $unit_duration_parameter = apply_filters('vibe_unit_duration_parameter',60,$pre_unit_id); if(intval($unit_duration) >= 9999){ $value = $unit_duration*$unit_duration_parameter; } } return $value; }
September 3, 2020 at 4:10 am #300267hilmanfSpectatorThis reply has been marked as private.September 3, 2020 at 1:49 pm #300505Anshuman SahuKeymasterWell the code was provided to disable the drip feed when quiz duration is 9999 to disable the timer . also for the timer jumping 4 seconds issue : This issue is usually appears when there is script minification is in place of third party plugin using the same timer library is loading on course status . So i would recommend your to clear all kinds of cache and disable the caching plugin and secondly try deactvating all your third party plugins at once .September 8, 2020 at 2:40 am #301535hilmanfSpectatorThis reply has been marked as private.September 8, 2020 at 3:29 pm #301771Anshuman SahuKeymasteryes again the code provided was wrong : this will work :add_filter('vibe_total_drip_duration','total_drip_duration',11,4); function total_drip_duration($value,$course_id,$unit_id,$pre_unit_id){ $course_drip_duration_type = get_post_meta($course_id,'vibe_course_drip_duration_type',true); if(vibe_validate($course_drip_duration_type)){ //unit duration $unit_duration = get_post_meta($pre_unit_id,'vibe_duration',true); $unit_duration_parameter = apply_filters('vibe_unit_duration_parameter',60,$pre_unit_id); if(intval($unit_duration) >= 9999){ $value = 0; } } return $value; }
September 9, 2020 at 3:52 am #301841hilmanfSpectatorThank you Alex, the code work now.. If I want to disable dripfeed to all quizes, what code should I change?September 10, 2020 at 2:36 pm #302821Anshuman SahuKeymasteradd_filter('vibe_total_drip_duration','total_drip_duration',11,4); function total_drip_duration($value,$course_id,$unit_id,$pre_unit_id){ if(get_post_type($pre_unit_id)=='quiz'){ //unit duration $value = 0; } return $value; }
-
AuthorPosts
Viewing 14 posts - 1 through 14 (of 14 total)
- The topic ‘Quiz Duration Problem When Drip Feed Activated’ is closed to new replies.