创建班级,和班级设置里面,开始学期和结束学期的范围,请往前扩大3年

This commit is contained in:
cxt 2016-10-13 11:30:41 +08:00
parent 59f2478cae
commit b240f801b8
2 changed files with 3 additions and 3 deletions

View File

@ -629,7 +629,7 @@ module CoursesHelper
month = Time.now.month
now_year = year.nil? ? Time.now.year : (Time.now.year <= year ? Time.now.year : year)
year = month < 2 && now_year >=Time.now.year ? now_year - 1 : now_year
for i in (year..year + 10)
for i in (year-3..year + 10)
option = []
option << i
option << i

View File

@ -32,14 +32,14 @@
<div class="cl"></div>
<li class="ml45 mb10">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_course_term)%>&nbsp;&nbsp;</label>
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {:id=>"new_time"} %>
<%= select_tag :time,options_for_select(course_time_option(@course.time),Time.now.year), {:id=>"new_time"} %>
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"new_term"} %>
<span class="c_red" id="new_course_time_term_notice"></span>
</li>
<div class="cl"></div>
<li class="ml45 mb10">
<label><span class="c_red">*</span>&nbsp;结束学期&nbsp;&nbsp;</label>
<%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),@course.end_time), {:id=>"new_end_time"} %>
<%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),Time.now.year), {:id=>"new_end_time"} %>
<%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"new_end_term"} %>
<span class="mr15 c_red">仅针对跨越多个学期的班级,否则与开始学期保持一致。</span>
</li>