Merge branches 'dev_aliyun' and 'dev_hjm_a' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_hjm_a

dev_unstable
杨树明 6 years ago
commit 6944ec49cc

@ -1129,7 +1129,7 @@ class CoursesController < ApplicationController
def validate_course_name
tip_exception("课堂名称不能为空!") if params[:course][:name].blank?
if params[:subject_id].blank? || (@course && @course.subject.blank?)
if params[:subject_id].blank? && @course.blank? || (@course && @course.subject.blank?)
tip_exception("课程名称不能为空!") if params[:course_list_name].blank?
tip_exception("课堂名称应以课程名称开头命名") unless params[:course][:name].index(params[:course_list_name]) &&
params[:course][:name].index(params[:course_list_name]) == 0

@ -36,7 +36,7 @@ class HomeworkCommon < ApplicationRecord
validates :name, length: { maximum: 60 }
validates :description, length: { maximum: 15000 }
validates :reference_answer, length: { maximum: 5000 }
validates :reference_answer, length: { maximum: 15000 }
# after_update :update_activity
before_destroy :update_homework_bank_quotes

@ -8,3 +8,4 @@ json.downloads_count attachment.downloads_count
json.created_on attachment.created_on
json.url attachment_path(attachment, type: 'history').gsub("/api","")
json.is_pdf attachment.is_history_pdf?
json.attachment_id attachment.attachment_id

Loading…
Cancel
Save