diff --git a/app/controllers/colleges_controller.rb b/app/controllers/colleges_controller.rb index ebf33df3..85a09d0b 100644 --- a/app/controllers/colleges_controller.rb +++ b/app/controllers/colleges_controller.rb @@ -160,7 +160,7 @@ class CollegesController < ApplicationController end def student_hot_evaluations - games = Game.unscoped().joins(:myshixun).joins('join shixun_tag_repertoires str on str.shixun_id = myshixuns.shixun_id') + games = Game.joins(:myshixun).joins('join shixun_tag_repertoires str on str.shixun_id = myshixuns.shixun_id') games = games.joins('join tag_repertoires tr on tr.id = str.tag_repertoire_id') games = games.joins("join user_extensions ue on ue.user_id = myshixuns.user_id and ue.school_id = #{@school.id}") evaluate_count_map = games.group('tr.name').reorder('sum_games_evaluate_count desc').limit(10).sum('games.evaluate_count') diff --git a/public/javascripts/create_kindeditor.js b/public/javascripts/create_kindeditor.js index fb5db05b..822e3f7f 100644 --- a/public/javascripts/create_kindeditor.js +++ b/public/javascripts/create_kindeditor.js @@ -206,8 +206,10 @@ function sd_check_editor_form_field(params){ if(params.content.isEmpty()){ result=false; } + console.log(params.content) if(params.content.html()!=params.textarea.html() || params.issubmit==true){ params.textarea.html(params.content.html()); + params.content.sync(); if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.textarea.html())){ params.contentmsg.html('内容不能为空');