Merge branch 'develop' into szzh

This commit is contained in:
sw 2015-07-21 15:54:28 +08:00
commit 70b822a641
1 changed files with 22 additions and 22 deletions

View File

@ -18,28 +18,28 @@ class HomeworkCommonController < ApplicationController
end end
def new def new
# @homework_type = "1" @homework_type = "1"
#
# @homework = HomeworkCommon.new @homework = HomeworkCommon.new
# @homework.safe_attributes = params[:homework_common] @homework.safe_attributes = params[:homework_common]
# @homework.late_penalty = 0 @homework.late_penalty = 0
# @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
# @homework.publish_time = Time.now.strftime('%Y-%m-%d') @homework.publish_time = Time.now.strftime('%Y-%m-%d')
#
# if @homework_type == "1" if @homework_type == "1"
# #匿评作业相关属性 #匿评作业相关属性
# @homework_detail_manual = HomeworkDetailManual.new @homework_detail_manual = HomeworkDetailManual.new
# @homework_detail_manual.ta_proportion = 0.6 @homework_detail_manual.ta_proportion = 0.6
# @homework_detail_manual.absence_penalty = 0 @homework_detail_manual.absence_penalty = 0
# @homework_detail_manual.evaluation_num = 3 @homework_detail_manual.evaluation_num = 3
# @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d') @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
# @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d') @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
# @homework.homework_detail_manual = @homework_detail_manual @homework.homework_detail_manual = @homework_detail_manual
# elsif @homework_type == "2" elsif @homework_type == "2"
# #编程作业相关属性 #编程作业相关属性
# @homework_detail_programing = HomeworkDetailPrograming.new @homework_detail_programing = HomeworkDetailPrograming.new
# @homework.homework_detail_programing = @homework_detail_programing @homework.homework_detail_programing = @homework_detail_programing
# end end
respond_to do |format| respond_to do |format|
format.html format.html
end end