title: Is there any function in Leandash to mark complete COURSE programmatically
body: <p>I am working on Leandash Project , Now my requirement is some students have completed the course offline , So I have created a screen for a group leader in which the group leader can select group/user/course and also add date like this ( <a href="https://prnt.sc/1bfcq3a" rel="nofollow noreferrer">https://prnt.sc/1bfcq3a</a> ) and can mark complete <strong>COURSE</strong>.</p>
  <p>So my question is how do I mark complete <strong>COURSE</strong>. programmatically on link click.</p>
  <p>here is my code , which is not working</p>
  <pre><code>jQuery(document).on('click', '.course_complete_save', function(event) {
      event.preventDefault();
  
      var selected_group_id = jQuery('#group_name_select_dropdown').val();
      var selected_user_id = jQuery('#user_name_select_dropdown').val();
      var selected_course_id = jQuery('#course_name_select_dropdown').val();
      var mark_complete_date = jQuery('#input_date_field').val();
  
      var params =  {&quot;mark_complete_date&quot;:mark_complete_date,&quot;selected_group_id&quot;:selected_group_id,&quot;selected_user_id&quot;:selected_user_id,&quot;selected_course_id&quot;:selected_course_id,action:&quot;mark_complete_course_ajax&quot;}
  
      jQuery.post(groupcustomisation.ajaxurl,params,function(data){
          if(data){
              jQuery(&quot;.mark_complete_success&quot;).empty().append(&quot;Mark Completed&quot;);
          }else{
              jQuery(&quot;.mark_complete_success&quot;).empty().append(&quot;No data Found&quot;);
          }
  
      });
  });
  
  
  &lt;?php 
  add_action('wp_ajax_nopriv_mark_complete_course_ajax', 'mark_complete_course_ajax');
  add_action('wp_ajax_mark_complete_course_ajax', 'mark_complete_course_ajax');
  function mark_complete_course_ajax() {
  
      $selected_group_id = $_POST['selected_group_id'];
      $selected_user_id = $_POST['selected_user_id'];
      $selected_course_id = $_POST['selected_course_id'];
      $mark_complete_date = $_POST['mark_complete_date'];
  
      learndash_process_mark_complete( $selected_user_id, $selected_course_id, true, $selected_course_id );
          
      echo &quot;1&quot;;
           
      die();
  }
  </code></pre>