|
|
@ -134,6 +134,7 @@ class StudentWorkController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def new
|
|
|
|
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
|
|
|
|
@student_work = @homework.student_works.where("user_id = ?",User.current.id).first
|
|
|
|
if @student_work.nil?
|
|
|
|
if @student_work.nil?
|
|
|
|
@student_work = StudentWork.new
|
|
|
|
@student_work = StudentWork.new
|
|
|
|