diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb index 5d2b134a8..9391aab37 100644 --- a/app/views/student_work/new.html.erb +++ b/app/views/student_work/new.html.erb @@ -127,7 +127,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 => "请输入作品名称", :onkeyup => "regexStudentWorkName();" %> + <%= f.text_field "name", :required => true, :size => 60, :class => "InputBox W700", :maxlength => 200, :placeholder => "请输入作品名称",:value=>"#{@homework.name}的作品提交", :onkeyup => "regexStudentWorkName();" %>

diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb index 3c0c4969b..f8ce5cee4 100644 --- a/app/views/users/new_user_commit_homework.html.erb +++ b/app/views/users/new_user_commit_homework.html.erb @@ -85,7 +85,7 @@ style="display-hidden" id="data-language">
- <%= f.text_area :name, id: 'program-title', class:"InputBox W700", placeholder:"请概括你的代码的功能" %> + <%= f.text_area :name, id: 'program-title', class:"InputBox W700", placeholder:"请概括你的代码的功能", value:"#{@homework.name}的作品提交" %>
<%= f.text_area :description, id: 'program-src', class:"InputBox W700 H150", placeholder:"请贴入你的代码", rows: 10 %>