dev_SaaS
huang 6 years ago
commit e816387170

@ -102,13 +102,9 @@ class EcCoursesController < ApplicationController
end
def ec_course_support_setting_data
respond_to do |format|
format.json {
course_targets = @ec_course.ec_course_targets.includes(:ec_graduation_subitems)
json_data = target_list_data(course_targets)
render :json => json_data
}
end
course_targets = @ec_course.ec_course_targets.includes(:ec_graduation_subitems)
json_data = target_list_data(course_targets)
render :json => json_data
end
# 课程目标配置的更新操作()
@ -448,23 +444,19 @@ class EcCoursesController < ApplicationController
end
def score_level_data
respond_to do |format|
format.json{
levels = @ec_course.ec_score_levels
ls = []
if levels.present?
levels.each do |l|
ls << {score: l.score, level: l.level}
end
else
ls = [{score: 90, level: ""},
{score: 80, level: ""},
{score: 70, level: ""},
{score: 60, level: ""}]
end
render :json => {levels: ls, is_manager: @is_manager}
}
levels = @ec_course.ec_score_levels
ls = []
if levels.present?
levels.each do |l|
ls << {score: l.score, level: l.level}
end
else
ls = [{score: 90, level: ""},
{score: 80, level: ""},
{score: 70, level: ""},
{score: 60, level: ""}]
end
render :json => {levels: ls, is_manager: @is_manager}
end
def crud_score_level

@ -58,38 +58,34 @@ class EcYearsController < ApplicationController
end
def student_lists_data
respond_to do |format|
format.json {
template_file = EcTemplate.find_by_name "学生列表导入模板"
if template_file.present?
file = template_file.attachments.first
template_url = "/attachments/download/#{file.id}/#{file.filename}"
else
template_url = "javascript:void(0);"
end
template_file = EcTemplate.find_by_name "学生列表导入模板"
if template_file.present?
file = template_file.attachments.first
template_url = "/attachments/download/#{file.id}/#{file.filename}"
else
template_url = "javascript:void(0);"
end
students = @year.ec_year_students
show_name = @year.ec_year_students.where(:name => nil).count == 0
students = @year.ec_year_students
show_name = @year.ec_year_students.where(:name => nil).count == 0
page = params[:page] || 1
total_student = students.count
total_page = (total_student / 50.0).ceil
students = paginateHelper students, 50
page = params[:page] || 1
total_student = students.count
total_page = (total_student / 50.0).ceil
students = paginateHelper students, 50
ec_students = []
students.each_with_index do |student, index|
student = {index: (50*(page.to_i - 1) + index + 1),
student_name: student.name,
student_id: student.student_id}
ec_students << student
end
ec_students = []
students.each_with_index do |student, index|
student = {index: (50*(page.to_i - 1) + index + 1),
student_name: student.name,
student_id: student.student_id}
ec_students << student
end
import_url = "/ec_major_schools/#{@ec_major_school.id}/academic_years/#{@year.id}/import_students"
import_url = "/ec_major_schools/#{@ec_major_school.id}/academic_years/#{@year.id}/import_students"
render :json => {template_url: template_url, ec_students: ec_students, total_page: total_page, import_url: import_url,
show_name: show_name, :total_student => total_student, :is_manager => @template_major}
}
end
render :json => {template_url: template_url, ec_students: ec_students, total_page: total_page, import_url: import_url,
show_name: show_name, :total_student => total_student, :is_manager => @template_major}
end
# DELETE: /ec_major_schools/:major_id/academic_years/:year_id/destroy_students

@ -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.61755688.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.abd5a2e1.js"></script></body></html>

@ -3,12 +3,12 @@
"./static/js/0.6b9d3c60.chunk.js.map": "./static/js/0.6b9d3c60.chunk.js.map",
"./static/js/1.5f152c98.chunk.js": "./static/js/1.5f152c98.chunk.js",
"./static/js/1.5f152c98.chunk.js.map": "./static/js/1.5f152c98.chunk.js.map",
"./static/js/10.8f4c2527.chunk.js": "./static/js/10.8f4c2527.chunk.js",
"./static/js/10.8f4c2527.chunk.js.map": "./static/js/10.8f4c2527.chunk.js.map",
"./static/js/10.2b2c6157.chunk.js": "./static/js/10.2b2c6157.chunk.js",
"./static/js/10.2b2c6157.chunk.js.map": "./static/js/10.2b2c6157.chunk.js.map",
"./static/js/11.03d0c22e.chunk.js": "./static/js/11.03d0c22e.chunk.js",
"./static/js/11.03d0c22e.chunk.js.map": "./static/js/11.03d0c22e.chunk.js.map",
"./static/js/12.37c4c6b6.chunk.js": "./static/js/12.37c4c6b6.chunk.js",
"./static/js/12.37c4c6b6.chunk.js.map": "./static/js/12.37c4c6b6.chunk.js.map",
"./static/js/12.6c612282.chunk.js": "./static/js/12.6c612282.chunk.js",
"./static/js/12.6c612282.chunk.js.map": "./static/js/12.6c612282.chunk.js.map",
"./static/js/13.6d2ba6a0.chunk.js": "./static/js/13.6d2ba6a0.chunk.js",
"./static/js/13.6d2ba6a0.chunk.js.map": "./static/js/13.6d2ba6a0.chunk.js.map",
"./static/js/14.22205a8a.chunk.js": "./static/js/14.22205a8a.chunk.js",
@ -67,8 +67,8 @@
"./static/js/9.e77edf45.chunk.js.map": "./static/js/9.e77edf45.chunk.js.map",
"main.css": "./static/css/main.c95e49c6.css",
"main.css.map": "./static/css/main.c95e49c6.css.map",
"main.js": "./static/js/main.61755688.js",
"main.js.map": "./static/js/main.61755688.js.map",
"main.js": "./static/js/main.abd5a2e1.js",
"main.js.map": "./static/js/main.abd5a2e1.js.map",
"static/media/ERASBD.ttf": "static/media/ERASBD.d5213044.ttf",
"static/media/background1.png": "static/media/background1.a34df396.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.61755688.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.abd5a2e1.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

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

@ -84,7 +84,7 @@ class EcCourseSupportSetting extends Component {
fetchCourseTargets = () => {
const ec_course_id = this.props.match.params.ec_course_id;
const url = `/ec_courses/${ec_course_id}/ec_course_support_setting_data.json`
const url = `/ec_courses/${ec_course_id}/ec_course_support_setting_data`
axios.get(url, {
})

@ -75,7 +75,7 @@ class ecGradeEvaluations extends Component {
}
componentDidMount(){
let ec_course_id=this.props.match.params.ec_course_id;
let Url = `/ec_courses/`+ec_course_id+`/score_level_data.json`;
let Url = `/ec_courses/`+ec_course_id+`/score_level_data`;
axios.get(Url, {
withCredentials: true,
}
@ -126,7 +126,7 @@ class ecGradeEvaluations extends Component {
updalevels=()=>{
let ec_course_id=this.props.match.params.ec_course_id;
let Url = `/ec_courses/`+ec_course_id+`/score_level_data.json`;
let Url = `/ec_courses/`+ec_course_id+`/score_level_data`;
axios.get(Url, {
withCredentials: true,
}

@ -55,7 +55,7 @@ class ecStudentList extends Component {
console.log(error);
});
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data.json';
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data';
axios.get(url, {
withCredentials: true,
}).then((response) => {
@ -96,7 +96,7 @@ class ecStudentList extends Component {
uploadcomponentDidMount(){
let major_id=this.props.match.params.major_id;
let year_id=this.props.match.params.year_id;
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data.json';
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data';
axios.get(url, {
withCredentials: true,
}).then((response) => {
@ -162,7 +162,7 @@ class ecStudentList extends Component {
showecStudentList=(page)=>{
let major_id=this.props.match.params.major_id;
let year_id=this.props.match.params.year_id;
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data.json?page='+page;
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data?page='+page;
axios.get(url, {
withCredentials: true,
}).then((response) => {

Loading…
Cancel
Save