|  |  |  | @ -1103,6 +1103,7 @@ class ExercisesController < ApplicationController | 
			
		
	
		
			
				
					|  |  |  |  |     ActiveRecord::Base.transaction do | 
			
		
	
		
			
				
					|  |  |  |  |       begin | 
			
		
	
		
			
				
					|  |  |  |  |         can_commit_exercise = false | 
			
		
	
		
			
				
					|  |  |  |  |         user_left_time = nil | 
			
		
	
		
			
				
					|  |  |  |  |         if @user_course_identity > Course::ASSISTANT_PROFESSOR  #为学生时 | 
			
		
	
		
			
				
					|  |  |  |  |           if params[:commit_method].to_i == 2   #自动提交时 | 
			
		
	
		
			
				
					|  |  |  |  |             user_left_time = get_exercise_left_time(@exercise,current_user) | 
			
		
	
	
		
			
				
					|  |  |  | @ -1131,7 +1132,7 @@ class ExercisesController < ApplicationController | 
			
		
	
		
			
				
					|  |  |  |  |             CommitExercsieNotifyJobJob.perform_later(@exercise.id, current_user.id) | 
			
		
	
		
			
				
					|  |  |  |  |             normal_status(0,"试卷提交成功!") | 
			
		
	
		
			
				
					|  |  |  |  |           else | 
			
		
	
		
			
				
					|  |  |  |  |             normal_status(-1,"提交失败,未到截止时间!") | 
			
		
	
		
			
				
					|  |  |  |  |             normal_status(-2,"#{user_left_time.to_i}") | 
			
		
	
		
			
				
					|  |  |  |  |           end | 
			
		
	
		
			
				
					|  |  |  |  |         else | 
			
		
	
		
			
				
					|  |  |  |  |           normal_status(-1,"提交失败,当前用户不为课堂学生!") | 
			
		
	
	
		
			
				
					|  |  |  | 
 |