From 119b12349b3c665952176314569ab857a9314e17 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Mar 2016 10:56:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=90=8D=E7=A7=B0=E7=9A=84?= =?UTF-8?q?=E7=BC=BA=E7=9C=81=E5=80=BC=E4=B8=BA=20=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=90=8D=E7=A7=B0+=E7=9A=84=E4=BD=9C=E5=93=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4(=E5=8F=AF=E4=BF=AE=E6=94=B9)=20=20=E8=8B=A5=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E4=B8=8D=E4=BF=AE=E6=94=B9=E5=88=99=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E4=B8=BA=20=E4=BD=9C=E4=B8=9A=E5=90=8D=E7=A7=B0+=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E5=93=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 3 ++- app/views/student_work/new.html.erb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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 %>
- <%= f.text_field "name", :required => true, :size => 60, :class => "InputBox W700", :maxlength => 200, :placeholder => "请输入作品名称",:value=>"#{@homework.name}的作品提交", :onkeyup => "regexStudentWorkName();" %> + <%= f.text_field "name", :required => true, :size => 60, :class => "InputBox W700", :maxlength => 200, :placeholder => "请输入作品名称",:value=>"#{@homework.name}的作品提交(可修改)", :onkeyup => "regexStudentWorkName();" %>