Quiz Duration Problem When Drip Feed Activated

Home Forums Legacy Support Support queries Other issues Quiz Duration Problem When Drip Feed Activated

Tagged: ,

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #297909
    hilmanf
    Spectator
    Hi, 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/u5chd4
    #298303
    Jackson
    Blocked
    Hello, 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,
    #298847
    hilmanf
    Spectator
    This reply has been marked as private.
    #299313
    Anshuman Sahu
    Keymaster
    Yes 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 not
    #299385
    hilmanf
    Spectator
    Hi 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)?
    #299928
    Anshuman Sahu
    Keymaster
    please 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;
    }
    #300018
    hilmanf
    Spectator
    Hi Alex, The code is not working on my side, after pasting the code, my website cannot be accessed
    #300196
    Anshuman Sahu
    Keymaster
    Im 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;
    }
    #300267
    hilmanf
    Spectator
    This reply has been marked as private.
    #300505
    Anshuman Sahu
    Keymaster
    Well 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 .
    #301535
    hilmanf
    Spectator
    This reply has been marked as private.
    #301771
    Anshuman Sahu
    Keymaster
    yes 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;
    }
    #301841
    hilmanf
    Spectator
    Thank you Alex, the code work now.. If I want to disable dripfeed to all quizes, what code should I change?
    #302821
    Anshuman Sahu
    Keymaster
    add_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;
    }
Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Quiz Duration Problem When Drip Feed Activated’ is closed to new replies.