@ -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