课堂的设置

dev_forum
cxt 5 years ago
parent 88e839b48d
commit 9e331cba6d

@ -169,7 +169,7 @@ class CoursesController < ApplicationController
extra_params[:school_id] = @school.id
extra_params[:is_public] = params[:is_public].present? ? params[:is_public] : 0
if @course.is_end && (course_params[:end_date].nil? || course_params[:end_date].to_date > Date.today)
if @course.is_end && (course_params[:end_date].blank? || course_params[:end_date].to_date > Date.today)
extra_params[:is_end] = 0
elsif !@course.is_end && !course_params[:end_date].blank? && course_params[:end_date].to_date < Date.today
extra_params[:is_end] = 1

Loading…
Cancel
Save