使用新的作业提交界面

This commit is contained in:
guange 2015-09-02 18:09:52 +08:00
parent 9c17ad36e3
commit dd4e67ebdb
1 changed files with 1 additions and 0 deletions

View File

@ -134,6 +134,7 @@ class StudentWorkController < ApplicationController
end
def new
redirect_to new_user_commit_homework_users_path(homework_id: @homework.id) if @homework.homework_type==2
@student_work = @homework.student_works.where("user_id = ?",User.current.id).first
if @student_work.nil?
@student_work = StudentWork.new