diff --git a/app/controllers/ec_courses_controller.rb b/app/controllers/ec_courses_controller.rb
index 3bd700a8..43fed5cb 100644
--- a/app/controllers/ec_courses_controller.rb
+++ b/app/controllers/ec_courses_controller.rb
@@ -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
diff --git a/app/controllers/ec_years_controller.rb b/app/controllers/ec_years_controller.rb
index 0a8a67a8..d6896157 100644
--- a/app/controllers/ec_years_controller.rb
+++ b/app/controllers/ec_years_controller.rb
@@ -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
diff --git a/app/views/common/index.html.erb b/app/views/common/index.html.erb
index a57b8276..9a65c1da 100644
--- a/app/views/common/index.html.erb
+++ b/app/views/common/index.html.erb
@@ -1 +1 @@
-
Educoder
\ No newline at end of file
+Educoder
\ No newline at end of file
diff --git a/public/react/build/asset-manifest.json b/public/react/build/asset-manifest.json
index 8226f726..4d989fd3 100644
--- a/public/react/build/asset-manifest.json
+++ b/public/react/build/asset-manifest.json
@@ -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",
diff --git a/public/react/build/index.html b/public/react/build/index.html
index 831c1476..d04055a2 100644
--- a/public/react/build/index.html
+++ b/public/react/build/index.html
@@ -1 +1 @@
-Educoder
\ No newline at end of file
+Educoder
\ No newline at end of file
diff --git a/public/react/build/service-worker.js b/public/react/build/service-worker.js
index ca9b7b38..1cbde84a 100644
--- a/public/react/build/service-worker.js
+++ b/public/react/build/service-worker.js
@@ -1 +1 @@
-"use strict";var precacheConfig=[["/react/build/index.html","53db08e0bd3a860421120e15f10c5e92"],["/react/build/static/css/main.c95e49c6.css","47b0f85747953242c9eb6a8bca7de850"],["/react/build/static/js/0.6b9d3c60.chunk.js","86d1b0acdda69ee7ea9472d5bd59c876"],["/react/build/static/js/1.5f152c98.chunk.js","ac5ce08ab4ccde5a7fc1acef53901cee"],["/react/build/static/js/10.8f4c2527.chunk.js","15d791b03b919adb47b83a6891a40eb8"],["/react/build/static/js/11.03d0c22e.chunk.js","7692b48d0425f1888d18ba1d4518874c"],["/react/build/static/js/12.37c4c6b6.chunk.js","54b9a7d94e32764d7dccc6cde0043cfc"],["/react/build/static/js/13.6d2ba6a0.chunk.js","fb0d5d5507e375cdb4f0fe8ef726377c"],["/react/build/static/js/14.22205a8a.chunk.js","d9ce23bf50d6004085145a85e00c0d1d"],["/react/build/static/js/15.0dcec662.chunk.js","aacf8ecb48fd4ea57003ddfb0f6879dd"],["/react/build/static/js/16.e8e3aa00.chunk.js","a7d79b87c883fd5d8198fcc0e68bbea3"],["/react/build/static/js/17.53cb6e35.chunk.js","ca84b3f506b2d91195535c7df9e0ec5c"],["/react/build/static/js/18.f46d552a.chunk.js","dc87043e047c5587d516ce8cdb685077"],["/react/build/static/js/19.5f9a9263.chunk.js","21e3c364e5bf2129fe3f14d83c9597d0"],["/react/build/static/js/2.eb0d1091.chunk.js","c67b449632022602b1f832e5ce6beddc"],["/react/build/static/js/20.6efcbe58.chunk.js","a08f41d751bc3587f752e4d9f1b67085"],["/react/build/static/js/21.6e5a22af.chunk.js","a5b991e1db81bd447775c0642822f498"],["/react/build/static/js/22.7c073e45.chunk.js","aa1e76265c783b7ec059eb6693098101"],["/react/build/static/js/23.0abe5b59.chunk.js","9e127e00de396452b24052f927ae4ffd"],["/react/build/static/js/24.e1553222.chunk.js","3c314f1d0c8a935e6849fe0341de300d"],["/react/build/static/js/25.7f05ced8.chunk.js","342129441d1b5a8d6993f8241f07a080"],["/react/build/static/js/26.e3927d38.chunk.js","e9dea1987d609421c42b050640fda9a2"],["/react/build/static/js/27.d2f21a4d.chunk.js","e5e44b9f2b194eb1fc36577d7818dd07"],["/react/build/static/js/28.db5cbded.chunk.js","43b595fb07ed0e097f04baae044769fc"],["/react/build/static/js/29.95e5a009.chunk.js","7af2dbe8fed064011d025c90e4a3f381"],["/react/build/static/js/3.123eae7e.chunk.js","fc210ea22071c70c68c84455ca99094d"],["/react/build/static/js/30.92e2f4a6.chunk.js","0aa90ff4b2a86c8f09b788b49f04d533"],["/react/build/static/js/31.3edb9173.chunk.js","25f518d21ee9c1f9edc1d582adf41f24"],["/react/build/static/js/32.23fc5ec4.chunk.js","37db77eb16324fede7346e4134737379"],["/react/build/static/js/4.a563b706.chunk.js","fca01a39f5a30c9a53a5c5474fc9c2a5"],["/react/build/static/js/5.459a49ba.chunk.js","b9c60fc81ef02338d20072869e20be21"],["/react/build/static/js/6.83516b55.chunk.js","ff45e63f5cb15291407c46c1fd713376"],["/react/build/static/js/7.accad232.chunk.js","6c0275ac609669198d25b1832c245638"],["/react/build/static/js/8.69fefc71.chunk.js","1364e519ea5789ddc3d798727a1c205a"],["/react/build/static/js/9.e77edf45.chunk.js","778457fbf6dc4c58b4f743cf3ff04142"],["/react/build/static/media/ERASBD.d5213044.ttf","d5213044cfad1e4f4b5d1f3138752a80"],["/react/build/static/media/background1.a34df396.png","a34df396b94e13a7ef19d1526317ae1c"],["/react/build/static/media/background2.22ee659e.png","22ee659e8abfe4c67e36db55be300d49"],["/react/build/static/media/courses.7b27495b.jpg","7b27495bc62c863b83094d6bfd373751"],["/react/build/static/media/group.2f91e9cd.png","2f91e9cde967613d9ad3037dbb3145c8"],["/react/build/static/media/introduceback.3d75d3db.jpg","3d75d3dbd2546c898755d856ea269b3f"],["/react/build/static/media/logo.5d5d9eef.svg","5d5d9eefa31e5e13a6610d9fa7a283bb"],["/react/build/static/media/match_ad.4e957369.jpg","4e957369790f079662eb2dca03ece6be"],["/react/build/static/media/message.c4f86b97.svg","c4f86b97ab715542fe13a14b86088b57"],["/react/build/static/media/messagegrey.31dd74f4.svg","31dd74f4e3dd0cb3a635f5356cdf9716"],["/react/build/static/media/nodata.cde5b659.png","cde5b65921644fe035fd62ab7297a47e"],["/react/build/static/media/passall.46817e26.png","46817e2696bbb2ac4bf0e5bc4e8b101e"],["/react/build/static/media/passpart.4aaf3e6b.png","4aaf3e6b4667dc531eee7f4e5f807d70"],["/react/build/static/media/rc-tree.776c7fe6.png","776c7fe67df0637005b1a1372066ed84"],["/react/build/static/media/search.0e1dcc19.svg","0e1dcc199dacdae66caeb45b0c7ab3e7"],["/react/build/static/media/vedio.6a98b4f1.png","6a98b4f1ff183501b71700f50d805f31"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,c){var a=new URL(e);return"/"===a.pathname.slice(-1)&&(a.pathname+=c),a.toString()},cleanResponse=function(c){return c.redirected?("body"in c?Promise.resolve(c.body):c.blob()).then(function(e){return new Response(e,{headers:c.headers,status:c.status,statusText:c.statusText})}):Promise.resolve(c)},createCacheKey=function(e,c,a,t){var s=new URL(e);return t&&s.pathname.match(t)||(s.search+=(s.search?"&":"")+encodeURIComponent(c)+"="+encodeURIComponent(a)),s.toString()},isPathWhitelisted=function(e,c){if(0===e.length)return!0;var a=new URL(c).pathname;return e.some(function(e){return a.match(e)})},stripIgnoredUrlParameters=function(e,a){var c=new URL(e);return c.hash="",c.search=c.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(c){return a.every(function(e){return!e.test(c[0])})}).map(function(e){return e.join("=")}).join("&"),c.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var c=e[0],a=e[1],t=new URL(c,self.location),s=createCacheKey(t,hashParamName,a,/\.\w{8}\./);return[t.toString(),s]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(t){return setOfCachedUrls(t).then(function(a){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(c){if(!a.has(c)){var e=new Request(c,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+c+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return t.put(c,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var a=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(c){return c.keys().then(function(e){return Promise.all(e.map(function(e){if(!a.has(e.url))return c.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(c){if("GET"===c.request.method){var e,a=stripIgnoredUrlParameters(c.request.url,ignoreUrlParametersMatching),t="index.html";(e=urlsToCacheKeys.has(a))||(a=addDirectoryIndex(a,t),e=urlsToCacheKeys.has(a));var s="/index.html";!e&&"navigate"===c.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],c.request.url)&&(a=new URL(s,self.location).toString(),e=urlsToCacheKeys.has(a)),e&&c.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(a)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',c.request.url,e),fetch(c.request)}))}});
\ No newline at end of file
+"use strict";var precacheConfig=[["/react/build/index.html","21422eab703fd6537d885188abe19f98"],["/react/build/static/css/main.c95e49c6.css","47b0f85747953242c9eb6a8bca7de850"],["/react/build/static/js/0.6b9d3c60.chunk.js","86d1b0acdda69ee7ea9472d5bd59c876"],["/react/build/static/js/1.5f152c98.chunk.js","ac5ce08ab4ccde5a7fc1acef53901cee"],["/react/build/static/js/10.2b2c6157.chunk.js","86a313a6b6e46e1e0bc60aa32c4da5e7"],["/react/build/static/js/11.03d0c22e.chunk.js","7692b48d0425f1888d18ba1d4518874c"],["/react/build/static/js/12.6c612282.chunk.js","9a2003dcd714ff6cbc7009be8ee01e23"],["/react/build/static/js/13.6d2ba6a0.chunk.js","fb0d5d5507e375cdb4f0fe8ef726377c"],["/react/build/static/js/14.22205a8a.chunk.js","d9ce23bf50d6004085145a85e00c0d1d"],["/react/build/static/js/15.0dcec662.chunk.js","aacf8ecb48fd4ea57003ddfb0f6879dd"],["/react/build/static/js/16.e8e3aa00.chunk.js","a7d79b87c883fd5d8198fcc0e68bbea3"],["/react/build/static/js/17.53cb6e35.chunk.js","ca84b3f506b2d91195535c7df9e0ec5c"],["/react/build/static/js/18.f46d552a.chunk.js","dc87043e047c5587d516ce8cdb685077"],["/react/build/static/js/19.5f9a9263.chunk.js","21e3c364e5bf2129fe3f14d83c9597d0"],["/react/build/static/js/2.eb0d1091.chunk.js","c67b449632022602b1f832e5ce6beddc"],["/react/build/static/js/20.6efcbe58.chunk.js","a08f41d751bc3587f752e4d9f1b67085"],["/react/build/static/js/21.6e5a22af.chunk.js","a5b991e1db81bd447775c0642822f498"],["/react/build/static/js/22.7c073e45.chunk.js","aa1e76265c783b7ec059eb6693098101"],["/react/build/static/js/23.0abe5b59.chunk.js","9e127e00de396452b24052f927ae4ffd"],["/react/build/static/js/24.e1553222.chunk.js","3c314f1d0c8a935e6849fe0341de300d"],["/react/build/static/js/25.7f05ced8.chunk.js","342129441d1b5a8d6993f8241f07a080"],["/react/build/static/js/26.e3927d38.chunk.js","e9dea1987d609421c42b050640fda9a2"],["/react/build/static/js/27.d2f21a4d.chunk.js","e5e44b9f2b194eb1fc36577d7818dd07"],["/react/build/static/js/28.db5cbded.chunk.js","43b595fb07ed0e097f04baae044769fc"],["/react/build/static/js/29.95e5a009.chunk.js","7af2dbe8fed064011d025c90e4a3f381"],["/react/build/static/js/3.123eae7e.chunk.js","fc210ea22071c70c68c84455ca99094d"],["/react/build/static/js/30.92e2f4a6.chunk.js","0aa90ff4b2a86c8f09b788b49f04d533"],["/react/build/static/js/31.3edb9173.chunk.js","25f518d21ee9c1f9edc1d582adf41f24"],["/react/build/static/js/32.23fc5ec4.chunk.js","37db77eb16324fede7346e4134737379"],["/react/build/static/js/4.a563b706.chunk.js","fca01a39f5a30c9a53a5c5474fc9c2a5"],["/react/build/static/js/5.459a49ba.chunk.js","b9c60fc81ef02338d20072869e20be21"],["/react/build/static/js/6.83516b55.chunk.js","ff45e63f5cb15291407c46c1fd713376"],["/react/build/static/js/7.accad232.chunk.js","6c0275ac609669198d25b1832c245638"],["/react/build/static/js/8.69fefc71.chunk.js","1364e519ea5789ddc3d798727a1c205a"],["/react/build/static/js/9.e77edf45.chunk.js","778457fbf6dc4c58b4f743cf3ff04142"],["/react/build/static/media/ERASBD.d5213044.ttf","d5213044cfad1e4f4b5d1f3138752a80"],["/react/build/static/media/background1.a34df396.png","a34df396b94e13a7ef19d1526317ae1c"],["/react/build/static/media/background2.22ee659e.png","22ee659e8abfe4c67e36db55be300d49"],["/react/build/static/media/courses.7b27495b.jpg","7b27495bc62c863b83094d6bfd373751"],["/react/build/static/media/group.2f91e9cd.png","2f91e9cde967613d9ad3037dbb3145c8"],["/react/build/static/media/introduceback.3d75d3db.jpg","3d75d3dbd2546c898755d856ea269b3f"],["/react/build/static/media/logo.5d5d9eef.svg","5d5d9eefa31e5e13a6610d9fa7a283bb"],["/react/build/static/media/match_ad.4e957369.jpg","4e957369790f079662eb2dca03ece6be"],["/react/build/static/media/message.c4f86b97.svg","c4f86b97ab715542fe13a14b86088b57"],["/react/build/static/media/messagegrey.31dd74f4.svg","31dd74f4e3dd0cb3a635f5356cdf9716"],["/react/build/static/media/nodata.cde5b659.png","cde5b65921644fe035fd62ab7297a47e"],["/react/build/static/media/passall.46817e26.png","46817e2696bbb2ac4bf0e5bc4e8b101e"],["/react/build/static/media/passpart.4aaf3e6b.png","4aaf3e6b4667dc531eee7f4e5f807d70"],["/react/build/static/media/rc-tree.776c7fe6.png","776c7fe67df0637005b1a1372066ed84"],["/react/build/static/media/search.0e1dcc19.svg","0e1dcc199dacdae66caeb45b0c7ab3e7"],["/react/build/static/media/vedio.6a98b4f1.png","6a98b4f1ff183501b71700f50d805f31"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,c){var a=new URL(e);return"/"===a.pathname.slice(-1)&&(a.pathname+=c),a.toString()},cleanResponse=function(c){return c.redirected?("body"in c?Promise.resolve(c.body):c.blob()).then(function(e){return new Response(e,{headers:c.headers,status:c.status,statusText:c.statusText})}):Promise.resolve(c)},createCacheKey=function(e,c,a,t){var s=new URL(e);return t&&s.pathname.match(t)||(s.search+=(s.search?"&":"")+encodeURIComponent(c)+"="+encodeURIComponent(a)),s.toString()},isPathWhitelisted=function(e,c){if(0===e.length)return!0;var a=new URL(c).pathname;return e.some(function(e){return a.match(e)})},stripIgnoredUrlParameters=function(e,a){var c=new URL(e);return c.hash="",c.search=c.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(c){return a.every(function(e){return!e.test(c[0])})}).map(function(e){return e.join("=")}).join("&"),c.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var c=e[0],a=e[1],t=new URL(c,self.location),s=createCacheKey(t,hashParamName,a,/\.\w{8}\./);return[t.toString(),s]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(t){return setOfCachedUrls(t).then(function(a){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(c){if(!a.has(c)){var e=new Request(c,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+c+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return t.put(c,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var a=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(c){return c.keys().then(function(e){return Promise.all(e.map(function(e){if(!a.has(e.url))return c.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(c){if("GET"===c.request.method){var e,a=stripIgnoredUrlParameters(c.request.url,ignoreUrlParametersMatching),t="index.html";(e=urlsToCacheKeys.has(a))||(a=addDirectoryIndex(a,t),e=urlsToCacheKeys.has(a));var s="/index.html";!e&&"navigate"===c.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],c.request.url)&&(a=new URL(s,self.location).toString(),e=urlsToCacheKeys.has(a)),e&&c.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(a)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',c.request.url,e),fetch(c.request)}))}});
\ No newline at end of file
diff --git a/public/react/build/static/js/10.2b2c6157.chunk.js b/public/react/build/static/js/10.2b2c6157.chunk.js
new file mode 100644
index 00000000..1d037dd7
--- /dev/null
+++ b/public/react/build/static/js/10.2b2c6157.chunk.js
@@ -0,0 +1,2 @@
+webpackJsonp([10],{1673:function(e,t,a){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=a(0),i=a.n(l),c=a(35),r=a.n(c),d=a(315),m=a(42),u=a(80),p=a(316),h=a(581),f=(a.n(h),a(1861)),g=(a.n(f),function(){function e(e,t){for(var a=0;a tag\n\n// load the styles\nvar content = __webpack_require__(1862);\nif(typeof content === 'string') content = [[module.i, content, '']];\n// Prepare cssTransformation\nvar transform;\n\nvar options = {\"hmr\":false}\noptions.transform = transform\n// add the styles to the DOM\nvar update = __webpack_require__(1656)(content, options);\nif(content.locals) module.exports = content.locals;\n\n\n/***/ }),\n\n/***/ 1862:\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(1655)(true);\n// imports\n\n\n// module\nexports.push([module.i, \".pagelistStudentList{position:absolute;padding-left:40%}.relative{position:relative}.changestudent{position:absolute;top:13px;left:50px}.changestudents{position:absolute;top:-1px;left:50px}.padbottom{padding-bottom:0}.deletelist{margin-top:10px;margin-bottom:10px}.deletelist:hover{color:#afafaf!important}.deletebth{width:64px;height:24px;border:1px solid #afafaf;border-radius:2px;color:#afafaf;background:#fff;line-height:24px}\", \"\", {\"version\":3,\"sources\":[\"/Users/yangshuming/Desktop/pgfqe6ch8/public/react/src/modules/ec/ecStudentList/ecStudentList.css\"],\"names\":[],\"mappings\":\"AAAA,qBACI,kBAAmB,AACnB,gBAAkB,CACrB,AAED,UACI,iBAAmB,CACtB,AACD,eACI,kBAAmB,AACnB,SAAU,AACV,SAAW,CACd,AACD,gBACI,kBAAmB,AACnB,SAAU,AACV,SAAW,CACd,AACD,WACI,gBAAoB,CACvB,AAED,YACI,gBAAiB,AACjB,kBAAoB,CACvB,AAED,kBACI,uBAAyB,CAC5B,AAED,WACI,WAAW,AACX,YAAY,AACZ,yBAAyB,AACzB,kBAAkB,AAClB,cAAc,AACd,gBAAgB,AAChB,gBAAiB,CACpB\",\"file\":\"ecStudentList.css\",\"sourcesContent\":[\".pagelistStudentList{\\n position: absolute;\\n padding-left: 40%;\\n}\\n\\n.relative{\\n position: relative;\\n}\\n.changestudent{\\n position: absolute;\\n top: 13px;\\n left: 50px;\\n}\\n.changestudents{\\n position: absolute;\\n top: -1px;\\n left: 50px;\\n}\\n.padbottom{\\n padding-bottom: 0px;\\n}\\n\\n.deletelist{\\n margin-top: 10px;\\n margin-bottom: 10px;\\n}\\n\\n.deletelist:hover{\\n color:#afafaf !important;\\n}\\n\\n.deletebth{\\n width:64px;\\n height:24px;\\n border:1px solid #afafaf;\\n border-radius:2px;\\n color:#afafaf;\\n background:#fff;\\n line-height:24px;\\n}\"],\"sourceRoot\":\"\"}]);\n\n// exports\n\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// static/js/10.2b2c6157.chunk.js","import React, { Component } from 'react';\n\nimport axios from 'axios';\n\nimport { TPMIndexHOC } from '../../tpm/TPMIndexHOC';\n\nimport { SnackbarHOC } from 'educoder'\n\nimport { Pagination,Upload,Modal,Checkbox } from 'antd';\n\nimport EcTitleCourseEvaluations from '../ecTitle/ecTitle'\n\nimport 'antd/dist/antd.css';\n\nimport './ecStudentList.css';\n\nconst $ = window.$;\n\nclass ecStudentList extends Component {\n constructor(props) {\n super(props)\n this.state={\n schooldata:{},\n majorschoollist:undefined,\n titlemessage:\"提示\",\n visible:false,\n Modallist:'',\n Modallisttypes:0,\n studentall:false,\n student_id:undefined,\n Modallisttypess:0,\n ismanager:false\n }\n }\n componentDidMount(){\n window.document.title = '学生列表';\n let major_id=this.props.match.params.major_id;\n let year_id=this.props.match.params.year_id;\n\n const jol =`/ec_major_schools/get_navigation_data?ec_year_id=`+year_id;\n axios.get(jol, {\n withCredentials: true,\n }).then((response) => {\n \n if(response.status===200){\n if(response.data.allow_visit===false){\n window.location.href=\"/403\"\n }\n this.setState({\n schooldata:response.data\n })\n }\n })\n .catch(function (error) {\n console.log(error);\n });\n\n const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data';\n axios.get(url, {\n withCredentials: true,\n }).then((response) => {\n if(response.status===200){\n this.setState({\n majorschoollist:response.data,\n ismanager:response.data.ismanager,\n })\n }\n })\n .catch(function (error) {\n console.log(error);\n });\n // let majorschoollist={\n // ec_students: [{index: 1, student_name: \"同意\", student_id: \"s20111458\"},\n // {index: 1, student_name: \"同意\", student_id: \"s20111458\"},\n // {index: 2, student_name: \"涛哥\", student_id: \"2011554f4\"},\n // {index: 3, student_name: \"例如\", student_id: \"20154787b\"},\n // {index: 4, student_name: \"问问\", student_id: \"201548580014\"},\n // {index: 5, student_name: \"嗯嗯\", student_id: \"2015748912321234\"},\n // {index: 6, student_name: \"让人\", student_id: \"20157456\"},\n // {index: 7, student_name: \"方法\", student_id: \"20159658\"},\n // {index: 8, student_name: \"全球\", student_id: \"20159632\"},\n // {index: 9, student_name: \"是说\", student_id: \"20154512\"},\n // {index: 10, student_name: \"谷歌\", student_id: \"20157932\"},\n // {index: 11, student_name: \"版本\", student_id: \"20159635\"},\n // {index: 12, student_name: \"捏捏\", student_id: \"20153451\"},\n // ],\n // import_url: \"/ec_major_schools/3/academic_years/10/import_students\",\n // show_name: true,\n // template_url: \"/attachments/download/227528/01_学生列表导入模板.xls\",\n // total_page: 1\n // }\n // this.setState({\n // majorschoollist:majorschoollist\n // })\n }\n uploadcomponentDidMount(){\n let major_id=this.props.match.params.major_id;\n let year_id=this.props.match.params.year_id;\n const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data';\n axios.get(url, {\n withCredentials: true,\n }).then((response) => {\n if(response.status===200){\n this.setState({\n majorschoollist:response.data,\n ismanager:response.data.ismanager,\n })\n }\n })\n .catch(function (error) {\n console.log(error);\n });\n }\n \n\n windowsgoblack=()=>{\n window.history.go(-1)\n }\n\n\n uploadfile=(file)=>{\n let {majorschoollist}=this.state;\n let Url =majorschoollist.import_url;\n const form = new FormData();\n form.append('file', file.file);\n axios.post(Url,form\n ).then((response) => {\n if(response.data.status===1){\n // message.success('已成功导入'+response.data.count+\"条数据!\");\n this.setState({\n // titlemessage: response.data.message+\"(支撑关系变更)\",\n Modallist: '已成功导入'+response.data.count+\"条数据!\",\n Modallisttype:true,\n Modallisttypes:1\n })\n }else if(response.data.status===0){\n // message.warning(response.data.message);\n this.setState({\n // titlemessage: response.data.message+\"(支撑关系变更)\",\n Modallist:response.data.message,\n Modallisttype:true,\n Modallisttypes:0\n })\n }\n }).catch((error) => {\n console.log(error)\n })\n }\n hidemodeldelete=()=>{\n let {Modallisttypes}=this.state;\n this.setState({\n Modallisttype:false,\n Modallist:'',\n Modallisttypess:0\n })\n if(Modallisttypes===1){\n // window.location.reload();\n this.uploadcomponentDidMount();\n }\n }\n\n showecStudentList=(page)=>{\n let major_id=this.props.match.params.major_id;\n let year_id=this.props.match.params.year_id;\n const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data?page='+page;\n axios.get(url, {\n withCredentials: true,\n }).then((response) => {\n if(response.status===200){\n this.setState({\n majorschoollist:response.data,\n ismanager:response.data.ismanager,\n })\n }\n }).catch(function (error) {\n console.log(error);\n });\n }\n\n onChangestudentall=(e)=>{\n let {majorschoollist}=this.state;\n let mewmajorschoollist=majorschoollist\n for(var i=0; i{\n let {majorschoollist,studentall}=this.state;\n let mewmajorschoollist=majorschoollist;\n let newstudentall=studentall;\n if(e.target.checked===false){\n newstudentall=false\n }\n for(var i=0; i{\n let {majorschoollist,studentall} =this.state;\n let studentalltype=0\n for(var i=0; i{\n let {majorschoollist,studentall} =this.state;\n let major_id=this.props.match.params.major_id;\n let year_id=this.props.match.params.year_id;\n let newstudent_id=[];\n if(studentall===false){\n for(var i=0; i {\n if(response.data.status===1){\n this.setState({\n // Modallist: \"删除成功!\",\n // Modallisttype:true,\n Modallisttypes:1,\n Modallisttypess:0\n })\n this.hidemodeldelete();\n }\n }).catch((error) => {\n console.log(error)\n })\n }\n\n render() {\n let {schooldata,\n majorschoollist,\n Modallisttype,\n titlemessage,\n Modallist,\n studentall,\n student_id,\n Modallisttypess,\n ismanager\n }=this.state;\n // ec_students: []\n // import_url: \"/ec_major_schools/:1/academic_years/:1/import_students\"\n // template_url: \"javascript:void(0);\"\n // total_page: 0\n const uploadProps = {\n name: 'file',\n\n onPreview(file) {\n // dispatch({ type: `${nameSpace}/updateState`, payload: { uploadPreviewVisible: true, uploadPreviewImage: file.url || file.thumbUrl } });\n },\n onChange(file) {\n // dispatch({ type: `${nameSpace}/updateState`, payload: { fileList: fileList } });\n },\n onRemove(option) {\n },\n customRequest: file => {\n this.uploadfile(file)\n }\n }\n return (\n \n
\n \n \n
取消\n {\n Modallisttypess===0?
确定:
确定\n }\n\n
\n \n
\n\n
\n
\n\n
\n\n
学生列表(\n {majorschoollist===undefined?\"\":majorschoollist.total_student}\n )
\n\n
\n {ismanager===false?\"\":\n
请使用导入模板(点击下载),将本学年所有参与的学生导入系统,以便录入教学活动相关数据\n }\n
\n {ismanager===false?\"\":\n 导入 \n }\n \n
\n\n
\n {ismanager===false?\"\":
\n 删除\n
}\n
\n\n
\n
\n \n \n 序号\n \n 姓名\n 学号\n
\n\n\n
\n {\n majorschoollist===undefined?\n \n
\n
学生数据为空,请导入数据
\n
\n :majorschoollist.ec_students.length===0?\n \n
\n
学生数据为空,请导入数据
\n
:majorschoollist.ec_students.map((item,key)=>{\n // console.log(item)\n return(\n - \n \n \n {item.index}\n \n {item.student_name}\n {item.student_id}\n
\n )\n })\n }\n\n
\n\n
\n {\n majorschoollist===undefined?\"\":majorschoollist.total_page===0||majorschoollist.total_student<51?\"\":
\n } \n
\n
\n
\n
\n\n
\n\n )\n\n }\n}\n\nexport default SnackbarHOC() ( TPMIndexHOC ( ecStudentList ) );\n\n\n// WEBPACK FOOTER //\n// ./src/modules/ec/ecStudentList/ecStudentList.js","module.exports = __webpack_public_path__ + \"static/media/nodata.cde5b659.png\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/modules/ec/ecStudentList/nodata.png\n// module id = 1716\n// module chunks = 10","// style-loader: Adds some css to the DOM by adding a \n '+t+'\n \n \n \n \n