From 2c5a4f8a13573ba4a40d9df9f56c72323727df01 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 31 Dec 2015 11:36:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=92=8C=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=97=B6=E7=9A=84=E5=90=AF=E7=94=A8=E5=8C=BF?= =?UTF-8?q?=E8=AF=84=E6=94=B9=E4=B8=BA=E7=A6=81=E7=94=A8=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=EF=BC=8C=E9=BB=98=E8=AE=A4=E4=B8=8D=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 2 +- app/controllers/users_controller.rb | 2 +- app/views/users/_user_homework_form.html.erb | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 46362c2d3..d345fba5f 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -63,7 +63,7 @@ class HomeworkCommonController < ApplicationController end @homework.end_time = params[:homework_common][:end_time] || Time.now @homework.course_id = params[:course_id] - @homework.anonymous_comment = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment] : 1 + @homework.anonymous_comment = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment] : 0 homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new if @homework.publish_time <= Date.today && homework_detail_manual.comment_status == 0 diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 78d8e2b46..85d42e189 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -522,7 +522,7 @@ class UsersController < ApplicationController else homework.publish_time = params[:homework_common][:publish_time] end - homework.anonymous_comment = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment] : 1 + homework.anonymous_comment = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment] : 0 homework.homework_type = params[:homework_type].to_i || 1 homework.late_penalty = 10 homework.teacher_priority = 1 diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb index 29be69a23..d145dab90 100644 --- a/app/views/users/_user_homework_form.html.erb +++ b/app/views/users/_user_homework_form.html.erb @@ -5,9 +5,9 @@ @@ -53,8 +53,8 @@ <% if !edit_mode || edit_mode && homework.homework_detail_manual.comment_status < 2 %>
- - 启用匿评 + + 禁用匿评
<% end %>