课程的学校ID自动设置为开课教师的学校ID

去掉课程添加界面上的学校选择
This commit is contained in:
Wen 2014-04-22 15:25:50 +08:00
parent 00e62ec8f7
commit 3dbe7c5896
2 changed files with 2 additions and 7 deletions

View File

@ -392,7 +392,8 @@ class ProjectsController < ApplicationController
# added by bai
@course.term = params[:term]
@course.time = params[:time]
@course.school_id = params[:occupation]
#@course.school_id = params[:occupation]
@course.school_id = User.current.user_extensions.school_id
@course.setup_time = params[:setup_time]
@course.endup_time = params[:endup_time]
@course.class_period = params[:class_period]

View File

@ -284,13 +284,7 @@
<!--added by Wen -->
<p style="margin-left:-76px;">
<strong><%=l(:label_new_course_school)%></strong><span class="required">*</span>&nbsp;&nbsp;&nbsp;
<%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province), :onclick => "get_options(this.value)" %>
<%= select_tag "occupation" %>
</p>
<!-- end -->