

<div class="ulp-course-enrolled-students-wrapper">

<h3>Current enrolled students on this course</h3>

 <div class="ulp-wrapper" style="padding:0px;">



   <div id="ulp_list_course_students">



    </div>



     <div class="input-group" style="margin: 25px 0;">

  					<span class="input-group-addon" id="basic-addon1"><?php _e('Add New Student', 'ulp');?></span>

  					<input type="text" class="form-control" value="" name="ulp_add_new_student" id="ulp_new_student" />

  	</div>

    <div class="ulp-clear"></div>

    <input name="save" type="button" class="button button-primary button-large" id="publish" value="<?php _e('Add New Student', 'ulp');?>" onClick="ulpAddUserToCourse(<?php echo $data ['post_id'];?>);" />

</div>



<script>

jQuery(document).ready(function(){

    jQuery( "#ulp_new_student" ).bind( "keydown", function( event ) {

      if ( event.keyCode === jQuery.ui.keyCode.TAB &&

        jQuery( this ).autocomplete( "instance" ).menu.active ) {

        event.preventDefault();

      }

    }).autocomplete({

    		minLength: 0,

    		source: decodeURI(window.ulp_url)+'/wp-admin/admin-ajax.php?action=ulp_autocomplete_users&term=',

    		focus: function() {},

    		select: function( event, ui ) {}

    });

    ulpLoadCourseStudents(<?php echo $data ['post_id'];?>);

});

</script>

