Merge branch 'develop' into dev_aliyun

dev_forum
cxt 5 years ago
commit 7ecc9116a4

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

Loading…
Cancel
Save