Merge branch 'develop' into educoder

dev_local
cxt 6 years ago
commit ee320c4c34

@ -15,8 +15,6 @@ unless RUBY_PLATFORM =~ /w32/
gem 'rqrcode_png' gem 'rqrcode_png'
gem 'roo-xls' gem 'roo-xls'
gem 'newrelic_rpm' gem 'newrelic_rpm'
gem 'seventeen_mon'
gem 'mobinfo'
end end
gem 'certified' gem 'certified'
gem 'net-ssh', '2.9.1' gem 'net-ssh', '2.9.1'
@ -24,6 +22,8 @@ unless RUBY_PLATFORM =~ /w32/
gem 'nokogiri' gem 'nokogiri'
end end
gem 'seventeen_mon'
gem 'mobinfo'
gem 'simple_xlsx_reader' gem 'simple_xlsx_reader'
gem 'wechat',path: 'lib/wechat' gem 'wechat',path: 'lib/wechat'
gem 'grack', path:'lib/grack' gem 'grack', path:'lib/grack'

@ -3,8 +3,8 @@ class EcCoursesController < ApplicationController
layout 'base_ec' layout 'base_ec'
before_filter :find_ec_course, :except => [:create, :get_calculation_data, :sync_all_course_data] before_filter :find_ec_course, :except => [:create, :get_calculation_data, :sync_all_course_data]
before_filter :find_year, :only => [:create, :get_calculation_data] before_filter :find_year, :only => [:create, :get_calculation_data]
before_filter :require_login before_filter :require_login, :except => [:sync_all_course_data]
before_filter :ec_auth, :except => [:sync_all_course_data] before_filter :ec_auth, :except => [:search_courses]
skip_before_filter :verify_authenticity_token, :only => [:crud_targets, :crud_score_level, :sync_all_course_data, :search_courses, skip_before_filter :verify_authenticity_token, :only => [:crud_targets, :crud_score_level, :sync_all_course_data, :search_courses,
:correlation_course, :delete_course] :correlation_course, :delete_course]
@ -349,11 +349,11 @@ class EcCoursesController < ApplicationController
if user.try(:admin?) if user.try(:admin?)
courses = Course.where(:is_delete => 0) courses = Course.where(:is_delete => 0)
else else
course_ids = Member.where("user_id = #{params[:user_id]} and course_id != -1").pluck(:course_id) course_ids = Member.where("user_id = #{user.try(:id)} and course_id != -1").pluck(:course_id)
courses = Course.where(:is_delete => 0, :id => course_ids) courses = Course.where(:is_delete => 0, :id => course_ids)
end end
if params[:search] && params[:search].strip != "" if params[:search] && params[:search].strip != ""
courses = courses.where("name like '%#{params[:search].strip}%'").reorder("created_at desc") courses = courses.where("name like ?", "%#{params[:search].strip}%").reorder("created_at desc")
else else
courses = courses.reorder("created_at desc") courses = courses.reorder("created_at desc")
end end

@ -31,12 +31,10 @@ class EcYearsController < ApplicationController
end end
@status = 1 @status = 1
end end
@major_manager = User.current.admin? || @major_manager = true
@major_school.school.ec_school_users.pluck(:user_id).include?(User.current.id) ||
@major_school.ec_major_school_users.pluck(:user_id).include?(User.current.id)
@btn_text = @major_school.template_major && User.current.admin? ? "立即配置" : @btn_text = @major_school.template_major && User.current.admin? ? "立即配置" :
(!@major_school.template_major && @major_manager ? "立即配置" : "查看") (!@major_school.template_major && @major_manager ? "立即配置" : "查看")
@years = @major_school.ec_years @years = EcYear.where(:ec_major_school_id => @major_school.id)
@years = paginateHelper @years, 10 @years = paginateHelper @years, 10
respond_to do |format| respond_to do |format|
format.js format.js

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/react/build/css/css_min_all.css"><link rel="stylesheet" href="/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.c95e49c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/react/build/js/js_min_all.js"></script><script type="text/javascript" src="/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/react/build/js/create_kindeditor.js"></script><script type="text/javascript" src="/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.533264d5.js"></script></body></html> <!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/react/build/css/css_min_all.css"><link rel="stylesheet" href="/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.c95e49c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/react/build/js/js_min_all.js"></script><script type="text/javascript" src="/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/react/build/js/create_kindeditor.js"></script><script type="text/javascript" src="/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.21bade1d.js"></script></body></html>

@ -17,7 +17,7 @@
</div> </div>
<li class="clearfix mt10 edu-txt-center"> <li class="clearfix mt10 edu-txt-center">
<a href="javascript:void(0);" class="task-btn mr10" onclick="hideModal()">取消</a> <a href="javascript:void(0);" class="task-btn mr10" onclick="hideModal()">取消</a>
<a href="javascript:void(0);" class="task-btn task-btn-orange ml20" onclick="submit_data();">确定</a> <a href="javascript:void(0);" class="task-btn task-btn-orange ml20" onclick="submit_data(); hideModal();">确定</a>
</li> </li>
</div> </div>
</div> </div>

@ -1,6 +1,7 @@
<% if @status.to_i == -1 %> <% if @status.to_i == -1 %>
notice_box("该界别已经存在,请勿重复创建") notice_box("该界别已经存在,请勿重复创建")
<% else %> <% else %>
$("#year_list").html('<%= j(render :partial => "ec_major_schools/year_list") %>') window.location.reload();
hideModal(); console.log("##########<%= @years.count %>")
//$("#year_list").html('<%#= j(render :partial => "ec_major_schools/year_list") %>')
<% end %> <% end %>

@ -17,8 +17,8 @@
"./static/js/15.0dcec662.chunk.js.map": "./static/js/15.0dcec662.chunk.js.map", "./static/js/15.0dcec662.chunk.js.map": "./static/js/15.0dcec662.chunk.js.map",
"./static/js/16.e8e3aa00.chunk.js": "./static/js/16.e8e3aa00.chunk.js", "./static/js/16.e8e3aa00.chunk.js": "./static/js/16.e8e3aa00.chunk.js",
"./static/js/16.e8e3aa00.chunk.js.map": "./static/js/16.e8e3aa00.chunk.js.map", "./static/js/16.e8e3aa00.chunk.js.map": "./static/js/16.e8e3aa00.chunk.js.map",
"./static/js/17.9edde574.chunk.js": "./static/js/17.9edde574.chunk.js", "./static/js/17.709dcd2a.chunk.js": "./static/js/17.709dcd2a.chunk.js",
"./static/js/17.9edde574.chunk.js.map": "./static/js/17.9edde574.chunk.js.map", "./static/js/17.709dcd2a.chunk.js.map": "./static/js/17.709dcd2a.chunk.js.map",
"./static/js/18.5fe45ac4.chunk.js": "./static/js/18.5fe45ac4.chunk.js", "./static/js/18.5fe45ac4.chunk.js": "./static/js/18.5fe45ac4.chunk.js",
"./static/js/18.5fe45ac4.chunk.js.map": "./static/js/18.5fe45ac4.chunk.js.map", "./static/js/18.5fe45ac4.chunk.js.map": "./static/js/18.5fe45ac4.chunk.js.map",
"./static/js/19.5f9a9263.chunk.js": "./static/js/19.5f9a9263.chunk.js", "./static/js/19.5f9a9263.chunk.js": "./static/js/19.5f9a9263.chunk.js",
@ -67,8 +67,8 @@
"./static/js/9.e77edf45.chunk.js.map": "./static/js/9.e77edf45.chunk.js.map", "./static/js/9.e77edf45.chunk.js.map": "./static/js/9.e77edf45.chunk.js.map",
"main.css": "./static/css/main.c95e49c6.css", "main.css": "./static/css/main.c95e49c6.css",
"main.css.map": "./static/css/main.c95e49c6.css.map", "main.css.map": "./static/css/main.c95e49c6.css.map",
"main.js": "./static/js/main.533264d5.js", "main.js": "./static/js/main.21bade1d.js",
"main.js.map": "./static/js/main.533264d5.js.map", "main.js.map": "./static/js/main.21bade1d.js.map",
"static/media/ERASBD.ttf": "static/media/ERASBD.d5213044.ttf", "static/media/ERASBD.ttf": "static/media/ERASBD.d5213044.ttf",
"static/media/background1.png": "static/media/background1.a34df396.png", "static/media/background1.png": "static/media/background1.a34df396.png",
"static/media/background2.png": "static/media/background2.22ee659e.png", "static/media/background2.png": "static/media/background2.22ee659e.png",

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/css/css_min_all.css"><link rel="stylesheet" href="http://testbdweb.educoder.net/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.c95e49c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/js/js_min_all.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/js/create_kindeditor.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.533264d5.js"></script></body></html> <!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/css/css_min_all.css"><link rel="stylesheet" href="http://testbdweb.educoder.net/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.c95e49c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/js/js_min_all.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/js/create_kindeditor.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.21bade1d.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -660,10 +660,11 @@ class ecCourseEvaluations extends Component {
let{checkevalue}=this.state; let{checkevalue}=this.state;
let ec_course_id=this.props.match.params.ec_course_id; let ec_course_id=this.props.match.params.ec_course_id;
let tuser_id=this.props.current_user.user_id;
let Url =`/ec_courses/`+ec_course_id+`/correlation_course.json`; let Url =`/ec_courses/`+ec_course_id+`/correlation_course.json`;
axios.post(Url,{ axios.post(Url,{
course_id:checkevalue, course_id:checkevalue,
user_id:this.props.current_user.user_id user_id:tuser_id
},{ },{
withCredentials: true withCredentials: true
} }
@ -701,10 +702,11 @@ class ecCourseEvaluations extends Component {
if(e.keyCode == 13){ if(e.keyCode == 13){
let {assclassvalue}=this.state; let {assclassvalue}=this.state;
let ec_course_id=this.props.match.params.ec_course_id; let ec_course_id=this.props.match.params.ec_course_id;
let tuser_id=this.props.current_user.user_id;
let Url =`/ec_courses/`+ec_course_id+`/search_courses.json`; let Url =`/ec_courses/`+ec_course_id+`/search_courses.json`;
axios.post(Url,{ axios.post(Url,{
search:assclassvalue, search:assclassvalue,
user_id:this.props.current_user.user_id user_id:tuser_id
},{ },{
withCredentials: true withCredentials: true
} }
@ -721,10 +723,11 @@ class ecCourseEvaluations extends Component {
assclassnamesearch=()=>{ assclassnamesearch=()=>{
let {assclassvalue}=this.state; let {assclassvalue}=this.state;
let ec_course_id=this.props.match.params.ec_course_id; let ec_course_id=this.props.match.params.ec_course_id;
let tuser_id=this.props.current_user.user_id;
let Url =`/ec_courses/`+ec_course_id+`/search_courses.json`; let Url =`/ec_courses/`+ec_course_id+`/search_courses.json`;
axios.post(Url,{ axios.post(Url,{
search:assclassvalue, search:assclassvalue,
user_id:this.props.current_user.user_id user_id:tuser_id
},{ },{
withCredentials: true withCredentials: true
} }
@ -870,8 +873,8 @@ class ecCourseEvaluations extends Component {
{/*课程考核方式与数据来源*/} {/*课程考核方式与数据来源*/}
{/* <span className="fl font-18 courseSystem"></span> */} {/* <span className="fl font-18 courseSystem"></span> */}
{/* <a href="javascript:void(0)" className="fr white-btn edu-blueback-btn mt4">导出培养目标</a> */} {/* <a href="javascript:void(0)" className="fr white-btn edu-blueback-btn mt4">导出培养目标</a> */}
<a class="white-btn edu-blueline-btn fr mr10 mt2 associatedclass" onClick={this.associatedclass} style={{display:course_url!=""&&ecmanager===true?"block":"none"}}>关联课堂</a> <a class="white-btn edu-blueline-btn fr mr10 mt2 associatedclass" onClick={this.associatedclass} style={{display:course_url===""&&ecmanager===true?"block":"none"}}>关联课堂</a>
<a class="white-btn edu-blueline-btn fr mr10 mt2 associatedclass" onClick={this.deleteassociatedclass} style={{display:course_url===""||ecmanager===true?"none":"block"}}>取消关联</a> <a class="white-btn edu-blueline-btn fr mr10 mt2 associatedclass" onClick={this.deleteassociatedclass} style={{display:course_url!=""&&ecmanager===true?"block":"none"}}>取消关联</a>
<span className="Importclassroomdata" style={{top: '22px',display:ecmanager===false?"none":""}}> <span className="Importclassroomdata" style={{top: '22px',display:ecmanager===false?"none":""}}>
<a className="white-btn edu-blueback-btn fr mb10 mr10" target="_blank" href={'/ec_courses/'+ec_course_id+'/export_ec_course_targets?format=xls'}>导出考核方法</a> <a className="white-btn edu-blueback-btn fr mb10 mr10" target="_blank" href={'/ec_courses/'+ec_course_id+'/export_ec_course_targets?format=xls'}>导出考核方法</a>
</span> </span>

Loading…
Cancel
Save