隐藏迟交扣分和缺评扣分

This commit is contained in:
sw 2015-06-04 10:32:59 +08:00
parent b7dbaca15b
commit aa0dc475aa
3 changed files with 6 additions and 6 deletions

View File

@ -17,14 +17,14 @@ class HomeworkCommonController < ApplicationController
def new
@homework = HomeworkCommon.new
@homework.safe_attributes = params[:homework_common]
@homework.late_penalty = 2
@homework.late_penalty = 0
@homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
@homework.publish_time = Time.now.strftime('%Y-%m-%d')
#匿评作业相关属性
@homework_detail_manual = HomeworkDetailManual.new
@homework_detail_manual.ta_proportion = 0.6
@homework_detail_manual.absence_penalty = 2
@homework_detail_manual.absence_penalty = 0
@homework_detail_manual.evaluation_num = 3
@homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
@homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')

View File

@ -3,7 +3,7 @@ module HomeworkCommonHelper
#迟交扣分下拉框
def late_penalty_option
type = []
for i in (1..5)
for i in (0..5)
option = []
option << i
option << i
@ -29,7 +29,7 @@ module HomeworkCommonHelper
#缺评扣分
def absence_penalty_option
type = []
i = 1
i = 0
while i <= 5
option = []
option << i

View File

@ -45,7 +45,7 @@
<p class="fl ml20 f14 mb10 c_orange">基本规则设置总分为100分</p>
<div class="cl"></div>
<ul class="ml10">
<li>
<li style="display: none;">
<label class="label02">迟交扣分:&nbsp;</label>
<%= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
<span class="fl mt5">&nbsp;分</span>
@ -97,7 +97,7 @@
<div class="cl"></div>
</li>
<li >
<li style="display: none;">
<label class="label02">缺评扣分:&nbsp;</label>
<%= select_tag :absence_penalty,options_for_select(absence_penalty_option,homework.homework_detail_manual.absence_penalty), {:class => "fl mb10 h26 w70"} %>
<span class="fl mt5">&nbsp;分</span>