$(document).ready(function() {
  
          var campus = $(".abba_display_campus option:selected").val();
          var userID = $('#user_id_teacher').val();
          var usertype = $('#user_type_holder').val();
          var institution = $('#institutionid_header').val();
          
          
          prosloadclassforassignmentdash(campus,userID,usertype,institution);
            
});



    
  $('body').on('change','.abba_display_campus', function() {
      
       var campus = $(this).val();
       var userID = $('#user_id_teacher').val();
       var usertype = $('#user_type_holder').val();
       var institution = $('#institutionid_header').val();
      
     
     prosloadclassforassignmentdash(campus,userID,usertype,institution);
      
  });
  
  
      function prosloadclassforassignmentdash(campus,userID,usertype,institution)
     {
         
             
             $('.prosselectclassforgressreport').html(`<option value="NULL">load..</option>`);
        
        
            $.ajax({
                type: "POST",
                url: "../../controller/scripts/teacher/dashboard/prosloadtecherdash.php",
                data: {
                  
                      campus: campus,
                      userID: userID,
                      usertype:usertype,
                      institution:institution
                   },
            
                success: function (output) { 
                    $('.prosloadassignmentdropdown').html(output);
                    $('.prosselectclassforgressreport').html(output);
                    
                    
                     
                      var progressclassID = $('.prosselectclassforgressreport').val();
                    
                       
                        prosloadprogressreportdashboard(campus,userID,usertype,institution,progressclassID);
                    
                }
            });
                
        }
        
        
         $('body').on('change','.prosselectclassforgressreport', function() {
      
               var campus =  $(".abba_display_campus option:selected").val();
               var userID = $('#user_id_teacher').val();
               var usertype = $('#user_type_holder').val();
               var institution = $('#institutionid_header').val();
               var progressclassID = $(this).val();
              
             
               prosloadprogressreportdashboard(campus,userID,usertype,institution,progressclassID);
              
          });
  
        
        
        
        
        
        
         // prosload progress report here
    
            function  prosloadprogressreportdashboard(campus,userID,usertype,institution,progressclassID)
            {
                
                
              
               $('.prosloadprogressreportcontent').html('<div class="text-center p-5 "> <span class="spinner-border spinner-border-lg" role="status" aria-hidden="true" style="color:#007ffb;"></span></div>');
               
                
                 $.ajax({
                        type: "POST",
                        url: "../../controller/scripts/teacher/dashboard/prosloadprogressreportdash.php",
                        data: {
                               campus:campus,
                              userID:userID,
                              usertype:usertype,
                              institution:institution,
                              progressclassID:progressclassID,
                           },
                    
                        success: function (output) {
                            
                                $('.prosloadprogressreportcontent').html(output);
                            
                        }
                            
                });
                
                
                
                
            }
    
     // prosload progress report here
  
  
  
  