Merge branch 'cxt_course' into develop

This commit is contained in:
huang 2016-06-03 17:55:42 +08:00
commit e4ff4ad156
2 changed files with 4 additions and 4 deletions

View File

@ -570,7 +570,7 @@ class UsersController < ApplicationController
end
if !params[:search].nil?
search = "%#{params[:search].to_s.strip.downcase}%"
@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id} and #{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p",:p=>search).select { |course| @user.allowed_to?(:as_teacher,course)}
@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id} and (#{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p)",:p=>search).select { |course| @user.allowed_to?(:as_teacher,course)}
else
@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id}").select { |course| @user.allowed_to?(:as_teacher,course)}
end

View File

@ -115,7 +115,7 @@ class WechatService
data = {
touser:openid,
template_id:template_id,
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{Setting.protocol}://#{Setting.host_name}/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect",
url:"#{Setting.protocol}://#{Setting.host_name}/assets/wechat/app.html#/#{type}/#{id}",
topcolor:"#FF0000",
data:{
first: {
@ -143,7 +143,7 @@ class WechatService
data = {
touser:openid,
template_id:template_id,
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{Setting.protocol}://#{Setting.host_name}/assets/wechat/app.html#/#{type}/#{id}?response_type=code&scope=snsapi_base&state=123#wechat_redirect",
url:"#{Setting.protocol}://#{Setting.host_name}/assets/wechat/app.html#/#{type}/#{id}",
topcolor:"#FF0000",
data:{
first: {
@ -181,7 +181,7 @@ class WechatService
data = {
touser:uw.openid,
template_id:Wechat.config.binding_succ_notice,
url:"https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect",
url:"#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities",
topcolor:"#FF0000",
data:{
first: {