diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 12cd48c94..8ea6afc5b 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -36,7 +36,7 @@ class CoursesController < ApplicationController before_filter :require_login, :only => [:join, :unjoin] #before_filter :allow_join, :only => [:join] require 'bundler/setup' - require 'simple_xlsx_reader' + #require 'simple_xlsx_reader' # params[:search] 搜索课程的名称 # params[:select] "join" "create" "all" 参与的 创建的 所有的课程 diff --git a/app/views/subjects/new.html.erb b/app/views/subjects/new.html.erb index 6e2fd1f6f..95e0779bd 100644 --- a/app/views/subjects/new.html.erb +++ b/app/views/subjects/new.html.erb @@ -1,3 +1,6 @@ +<%= content_for(:header_tags) do %> + <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> +<% end %>
@@ -23,14 +26,41 @@
<%= @subject.description.blank? ? "暂未填写" : (@subject.description) %>+
<%= @subject.description.blank? ? "暂未填写" : (@subject.description.html_safe) %>
<%= @subject.learning_notes.blank? ? "暂未填写" : @subject.learning_notes %>
<%= @subject.learning_notes.blank? ? "暂未填写" : @subject.learning_notes.html_safe %>
教学团队 diff --git a/public/javascripts/edu/base_edu.js b/public/javascripts/edu/base_edu.js index 88d9f4eaf..34e761a12 100644 --- a/public/javascripts/edu/base_edu.js +++ b/public/javascripts/edu/base_edu.js @@ -1094,19 +1094,21 @@ function submit_new_subject(){ } else{ $("#new_subject_name_notice").hide(); } - if($("#new_subject_description").val().trim() == ""){ + if(new_subject_description.isEmpty()){ check = false; $("#new_subject_description_notice").show(); } else{ $("#new_subject_description_notice").hide(); } - if($("#new_learning_notes").val().trim() == ""){ + if(new_learning_notes.isEmpty()){ check = false; $("#new_learning_notes_notice").show(); } else { $("#new_learning_notes_notice").hide(); } if(check){ + new_subject_description.sync(); + new_learning_notes.sync(); $("#new_subject").submit(); } }