Hide finish course button until student finishes the last unit,quiz

Please add this script from wp-admin – >WPlms- >Footer -> Google anaylitics  Code :

 

<script>
jQuery(document).ready(function($){
 $('.unit_content').on('unit_traverse',function(){
      var value= parseInt($('.course_progressbar').attr('data-value'));
      if(value >= 100){
        $('input[name="submit_course"]').removeClass('hide');
      }else{
    
         $('input[name="submit_course"]').addClass('hide');
      }
  });
  $('.course_progressbar').on('increment',function(){
      var value= parseInt($('.course_progressbar').attr('data-value'));
      if(value >= 100){
        $('input[name="submit_course"]').removeClass('hide');
      }else{
    
         $('input[name="submit_course"]').addClass('hide');
      }
  });
   var value= parseInt($('.course_progressbar').attr('data-value'));
      if(value >= 100){
        $('input[name="submit_course"]').removeClass('hide');
      }else{
    
         $('input[name="submit_course"]').addClass('hide');
      }
});
</script>

 

Was this article helpful?

Related Articles