新建班级时的课程下拉列表应包含所在课程教师团队的课程
This commit is contained in:
parent
7f3bb0be63
commit
1fa07b97e3
|
@ -3578,7 +3578,9 @@ def get_group_member_names work
|
|||
end
|
||||
|
||||
def course_syllabus_option user = User.current
|
||||
syllabuses = user.syllabuses
|
||||
syllabus_members = SyllabusMember.where("user_id = #{user.id}")
|
||||
syllabus_ids = syllabus_members.empty? ? "(-1)" : "(" + syllabus_members.map{|mem| mem.syllabus_id}.join(',') + ")"
|
||||
syllabuses = Syllabus.where("id in #{syllabus_ids}")
|
||||
type = []
|
||||
option1 = []
|
||||
option1 << "请选择课程"
|
||||
|
|
Loading…
Reference in New Issue