|
|
@ -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
|
|
|
|