|  |  |  | @ -739,8 +739,6 @@ class CoursesController < ApplicationController | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   # 获取历史课堂,即用户管理的所有课堂以及课堂下的分班(去除当前课堂) | 
			
		
	
		
			
				
					|  |  |  |  |   def get_historical_courses | 
			
		
	
		
			
				
					|  |  |  |  |     user_id = current_user.id | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @courses = Course.where.not(id: @course.id).joins(:course_members). | 
			
		
	
		
			
				
					|  |  |  |  |         where(is_delete: 0, course_members: {user_id: current_user.id, role: %i[CREATOR PROFESSOR ASSISTANT_PROFESSOR]}).includes(:course_groups) | 
			
		
	
		
			
				
					|  |  |  |  |     # @courses = Course.includes(:course_groups).where(id: current_user.course_members, is_delete: 0) | 
			
		
	
	
		
			
				
					|  |  |  | @ -756,6 +754,7 @@ class CoursesController < ApplicationController | 
			
		
	
		
			
				
					|  |  |  |  |       @students = @students.where(course_group_id: course_group_id) | 
			
		
	
		
			
				
					|  |  |  |  |     end | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @students = @students.includes(user: [user_extension: :school]) | 
			
		
	
		
			
				
					|  |  |  |  |     @students_count = @students.size | 
			
		
	
		
			
				
					|  |  |  |  |   end | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |