diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index aa77e2d51..a698823e5 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -1,3 +1,4 @@ +#encoding: utf-8 class StudentWorkController < ApplicationController layout "base_courses" include StudentWorkHelper @@ -282,7 +283,7 @@ class StudentWorkController < ApplicationController @submit_result = true student_work = StudentWork.find(params[:student_work_id]) if params[:student_work_id] student_work ||= StudentWork.new - student_work.name = params[:student_work][:name] + student_work.name = params[:student_work][:name] == "#{@homework.name}的作品提交(可修改)" ? "#{@homework.name}的作品提交" : params[:student_work][:name] student_work.description = params[:student_work][:description] student_work.homework_common_id = @homework.id student_work.user_id = User.current.id diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb index c43482299..0a29d2f6e 100644 --- a/app/views/student_work/new.html.erb +++ b/app/views/student_work/new.html.erb @@ -242,7 +242,7 @@ <%=hidden_field_tag 'group_member_ids', params[:group_member_ids], :value=>User.current.id %> <% end %>