diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index f56703bc7..4989d907c 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -242,7 +242,8 @@ class WorksController < ApplicationController def set_score_rule # 未启动在线评审时才能更改评审参数 if @contestwork.work_status < 3 - @contestwork.online_evaluation = params[:online_evaluation] ? 1 : 0 + @contestwork.online_evaluation = params[:online_evaluation].to_i ? 1 : 0 + @contestwork.save # 如果开启在线评审 if params[:online_evaluation] diff --git a/app/views/admin/contests.html.erb b/app/views/admin/contests.html.erb index 953d28483..df018625e 100644 --- a/app/views/admin/contests.html.erb +++ b/app/views/admin/contests.html.erb @@ -21,25 +21,25 @@ 序号 - + 竞赛 公开 - + 创建者 - + 成员数 - + 提交数 - + 创建于 - + 最新动态时间 diff --git a/app/views/contestant_works/_has_commit_work.html.erb b/app/views/contestant_works/_has_commit_work.html.erb index bbfc6e042..9f58bda3c 100644 --- a/app/views/contestant_works/_has_commit_work.html.erb +++ b/app/views/contestant_works/_has_commit_work.html.erb @@ -1,12 +1,17 @@ -
-
-

您已提交过作品,请不要重复提交,如果想修改作品请点击编辑。

+
+
+

提示

+ +
+
+
+

您已提交过作品,请不要重复提交,如果想修改作品请点击编辑。

diff --git a/app/views/contestant_works/_work_edit_information.html.erb b/app/views/contestant_works/_work_edit_information.html.erb index e3e0227f7..994980004 100644 --- a/app/views/contestant_works/_work_edit_information.html.erb +++ b/app/views/contestant_works/_work_edit_information.html.erb @@ -1,39 +1,49 @@ -
-
- 请您确认刚刚上传的作品信息 -

- 作品名称:<%=@student_work.name%> -

-
-
作品描述:
-
<%=@student_work.description.html_safe %>
-
-
-

- 件: - <% if @student_work.attachments.empty? %> - <%= "无附件"%> - <% else %> -

- <% @student_work.attachments.each_with_index do |attachment,i| %> -
- <%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%> - <%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %> - (<%= number_to_human_size attachment.filesize %>) -
-
- <% end -%> - <%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %> -
- <% end %> +
+
+

作品确认

+ +
+
+
+
+ 请您确认刚刚上传的作品信息 + +

+ 作品名称:<%= @student_work.name %> +

+ +
+
作品描述:
+
<%= @student_work.description.html_safe %>
+
+
+

+ 件: + <% if @student_work.attachments.empty? %> + 无附件 + <% else %> +

+ <% @student_work.attachments.each_with_index do |attachment, i| %> +
+ <%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%> + <%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %> + (<%= number_to_human_size attachment.filesize %>) + +
+
+ <% end -%> + <%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %> +
+ <% end %>

-
+
+