Course is not completing

Home Forums Legacy Support Support queries Other issues Course is not completing

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #269135
    MrVibe
    Keymaster
    a. The button gets hidden if the course is already complete by the user. If you're not applying any custom CSS then this button should appear in all courses. IF this button gets hidden when the user completes the last quiz, check the course - activity if there is a activity stating "User completed Course". You have already shared site details with us, it would be great if you can tell, if this is happening for a specific course or all the courses ? If the issue is rare like 1 in 100 , then there is also a rare possibility of the complete course request failing . Like the user clicked on complete course button (or it gets auto triggered) and because this hit takes few seconds, as it does a lot of job in the backend ,(PDF certificate etc), the request terminates in between. Can you share a course url where we can replicate this ? b. There is a switch in WP admin - LMS - Setting to auto mark the course complete when the last unit/quiz is finished. Make sure that switch is checked.  
    #269140
    bang
    Blocked
    Hello, On looking at the settings you pointed me towards ... I can see that the following option was ticked: "Auto trigger finish course button" The explanation beside says - "Hides Finish course button and is automatically triggered on completion of all the units and quizzes." This would explain why the button was hidden, so it wasn't my doing which is good. So that CSS to force the button to show is not necessary. What is not happening is that the course is not auto completing. Would you be able to please tell me why this may be? Maybe even to have a look? There is only one course that has multiple quizzes. You will see on logging in though (also by looking back through my support tickets) that I have created a test course for exactly this purpose, one unit, one quiz. I kindly ask if it is at all possible for you to have a look at the site and tell me why the course is not auto completing please? Many thanks.
    #269439
    Anshuman Sahu
    Keymaster
      please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :     add_action('init',function(){ $init = WPLMS_tips::init(); remove_action('wplms_before_start_course',array($init,'finish_course_auto_trigger')); });   add_action('wplms_before_start_course','finish_course_auto_trigger_custom'); function finish_course_auto_trigger_custom(){ add_action('wp_footer',function(){   ?> <script> jQuery(document).ready(function($){ $('.unit_content').on('unit_traverse',function(){     var value= parseInt($('.course_progressbar').attr('data-value')); let time = parseInt($('span.unit_duration').attr('data-duration'));     if(value >= 100){   if(typeof time != 'undefined' && !isNaN(time)){   $('input[name="submit_course"]').addClass('hide');    setTimeout(function(){   $('input[name="submit_course"]').trigger('click');   },(time*1000));   }else{     $('input[name="submit_course"]').trigger('click');     }   }else{   $('input[name="submit_course"]').addClass('hide');    } }); $('.course_progressbar').on('increment',function(){   var value= parseInt($('.course_progressbar').attr('data-value'));   let time = parseInt($('span.unit_duration').attr('data-duration'));   if(value >= 100){     if(jQuery('.unit_content').hasClass('react_quiz')){   $('input[name="submit_course"]').trigger('click'); }       }else{         $('input[name="submit_course"]').addClass('hide');   } });   }); </script> <?php   }); }
    #269453
    bang
    Blocked
    Hello, Can you please tell me what that code is supposed to do? I ask because after adding the code where specified ... removing the CSS forcing the "Finish Course" button to show ... it still doesn't show on course completion. Also ... the course doesn't auto complete.
    #269613
    Anshuman Sahu
    Keymaster
    Well in last update we modified this code to wait upto unit duration before auto completing the course . The above suppose to straight away complete the course when progress triggers to 100.But its not working and has bug . So please remove the above code and add this one : add_action('init',function(){ $init = WPLMS_tips::init(); remove_action('wplms_before_start_course',array($init,'finish_course_auto_trigger')); });   add_action('wplms_before_start_course','finish_course_auto_trigger_custom'); function finish_course_auto_trigger_custom(){ add_action('wp_footer',function(){   ?> <script> jQuery(document).ready(function($){ $('.unit_content').on('unit_traverse',function(){     var value= parseInt($('.course_progressbar').attr('data-value')); let time = parseInt($('span.unit_duration').attr('data-duration'));     if(value >= 100){   $('input[name="submit_course"]').trigger('click');   }else{   $('input[name="submit_course"]').addClass('hide');    } }); $('.course_progressbar').on('increment',function(){   var value= parseInt($('.course_progressbar').attr('data-value'));   let time = parseInt($('span.unit_duration').attr('data-duration'));   if(value >= 100){     $('input[name="submit_course"]').trigger('click');       }else{         $('input[name="submit_course"]').addClass('hide');   } });   }); </script> <?php   }); }
    #269623
    bang
    Blocked
    Hi Alex, Ah I see. Initially I removed the code and replaced with the new one ... i got a critical error on the site. I removed it, site loaded fine ... added the code again and now it seems fine. Bit weird. Anyway, on checking the test course ... it now DOES auto complete. Thank you for your efforts. Is this a big that will be rectified in the next update? If so, would I need to remove the code from the file after update? Thanks!
    #269857
    Anshuman Sahu
    Keymaster
    No it was actually added in recent update that system will wait for the unit/quiz duration when autocompleting because there was one user who was experiencing issue in his last unit was auto completing and imeediately after completing course was triggered to be finish . The above code will retain on update  .
    #269862
    bang
    Blocked
    Ok thankyou.
    #270068
    Veronica
    Moderator
    thanks to confirm closing this topic
Viewing 9 posts - 16 through 24 (of 24 total)
  • The topic ‘Course is not completing’ is closed to new replies.