|
|
|
@ -562,7 +562,7 @@ class ShixunsController < ApplicationController
|
|
|
|
|
commit_id = commit["id"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
如果该实训是金课中的实训,则将当前用户加入到当期开课的课堂
|
|
|
|
|
# 如果该实训是金课中的实训,则将当前用户加入到当期开课的课堂
|
|
|
|
|
if StageShixun.exists?(shixun_id: @shixun.id, subject_id: Subject.where(excellent: 1))
|
|
|
|
|
subject = Subject.where(id: StageShixun.where(shixun_id: @shixun.id).pluck(:subject_id), excellent: 1).take(1)
|
|
|
|
|
course = subject.courses.where("start_date is not null and start_date <= '#{Date.today}' and end_date is not null and end_date >= '#{Date.today}'").take
|
|
|
|
|