dev_local
daiao 6 years ago
commit 3d59d46ec0

@ -1,10 +1,10 @@
#encoding: utf-8 #encoding: utf-8
class EcCoursesController < ApplicationController 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, :search_courses]
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 => [:search_courses, :correlation_course]
before_filter :ec_auth, :except => [:sync_all_course_data] before_filter :ec_auth, :except => [:sync_all_course_data, :search_courses, :correlation_course]
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

@ -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>

@ -0,0 +1,8 @@
class MigratePollQuestionType < ActiveRecord::Migration
def up
change_column :poll_questions, :question_title, :text
end
def down
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
} }

Loading…
Cancel
Save