隐藏迟交扣分和缺评扣分
This commit is contained in:
parent
b7dbaca15b
commit
aa0dc475aa
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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">迟交扣分: </label>
|
||||
<%= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
|
||||
<span class="fl mt5"> 分</span>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<li style="display: none;">
|
||||
<label class="label02">缺评扣分: </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"> 分</span>
|
||||
|
|
Loading…
Reference in New Issue