Compare commits

...

188 Commits

Author SHA1 Message Date
Hjqreturn 549b0df2b5 create pipeline
3 years ago
daiao cfad9f7a75 实训课程权限
6 years ago
huang 4c58e97d94 未完待续
6 years ago
huang 03b67d1b4d 数据库记录用户行为数据
6 years ago
huang dcec874401 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
huang 2b28b60828 移动云企业业务开通重构
6 years ago
hjm 29b2a85e8d COURSE
6 years ago
hjm e09c93f93d DEVELOPMENT COMMUNITY
6 years ago
guange e04f29aa44 json
6 years ago
guange 7e35e1af0d json
6 years ago
guange 0a176e78ad Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange 5c0e656dd3 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange 6f15d83b87 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
huang 0e445b3209 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
huang 0f4886906a ecloud授权和取消授权的一些修改
6 years ago
cxt b0386586c9 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt d52fec1f51 超级管理员的课堂列表导出时会有部分数据缺失
6 years ago
huang f1a3459a83 .
6 years ago
huang 7e6c250e7b Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
huang 5113d5cb36 ecloud_user添加status标记
6 years ago
caishi 33071e6cb4 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
caishi 66b12ec493 实训报告页面-图形统计页
6 years ago
daiao 33e49c039b Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
daiao c267b69fea 迁移实训通关后没得分的记录
6 years ago
caishi 2627a5da13 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
caishi fab470bc0a 实训报告页面
6 years ago
huang 7e168f42a6 测试
6 years ago
huang d6a20f1cae Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
huang e7298c7d6f ecloud
6 years ago
cxt f1e0510b3b Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange 618fc93c80 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange 166332c936 .
6 years ago
huang 6121b985f0 ecloud一些修改
6 years ago
cxt 2f83f54915 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt de3c5e6d42 查看成绩,关卡耗时错误
6 years ago
杨树明 09f52a4a1b build
6 years ago
cxt 6411e81440 Merge branch 'educoder' into develop
6 years ago
cxt 9fa4ac729f Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt 1f6da8629f Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange 456ec13058 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange b7d2d9d189 remove index
6 years ago
cxt 7e3a4ea2b6 合并
6 years ago
cxt 519bee1851 调整
6 years ago
杨树明 7c36bbc0fa build
6 years ago
杨树明 815d64936c 认证权限调整
6 years ago
hjm 731cf53ce1 Merge branch 'develop' into educoder
6 years ago
hjm fd6195b9c8 b
6 years ago
hjm e69de3d59b 2.“课堂”→“翻转课堂”
6 years ago
杨树明 dcc04f5448 Merge branch 'develop' into educoder
6 years ago
杨树明 d03e256822 Merge remote-tracking branch 'origin/develop' into develop
6 years ago
杨树明 6808284192 build
6 years ago
cxt f925960655 调整
6 years ago
cxt 008a1412f1 Merge branch 'develop' into educoder
6 years ago
cxt e1e02682d7 隐藏学年的导出
6 years ago
cxt 84b16ed361 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt 1d71d9ddff 调整
6 years ago
杨树明 35b3872b51 Merge remote-tracking branch 'origin/develop' into develop
6 years ago
杨树明 9b37e699d0 build
6 years ago
cxt 02c008f696 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt febf6555a9 调整
6 years ago
杨树明 6ad7734813 Merge remote-tracking branch 'origin/develop' into develop
6 years ago
杨树明 7047360b63 build
6 years ago
cxt c595ef49b3 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt bbc2c6c387 权限调整
6 years ago
杨树明 5edaa19761 Merge remote-tracking branch 'origin/develop' into develop
6 years ago
杨树明 1193340214 build
6 years ago
cxt 8470090933 调整
6 years ago
cxt 28aca2571a Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt f588b0d765 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
huang e274be5924 sign验证
6 years ago
cxt e58d7693ec 调整
6 years ago
huang e816387170 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
huang b72c93074a ecloud相关接口修正
6 years ago
杨树明 81c0906734 build
6 years ago
cxt d7b1e1986f Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt 649e2a7ba6 调整
6 years ago
hjm f01796beb5 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
hjm 915fb90ec8 .json
6 years ago
cxt 81ab00f482 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt e40adab480 调整
6 years ago
杨树明 e4caf5da9d build
6 years ago
cxt 5adf21dffc Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt d892fc0640 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt a3c7087a48 调整
6 years ago
hjm 2fd2ffc777 _data
6 years ago
jingquan huang 5fee87148a Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
jingquan huang ec87aef778 认证
6 years ago
cxt 7970754e84 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt a9c5b791b5 调整
6 years ago
杨树明 f57f7813bb Merge remote-tracking branch 'origin/develop' into develop
6 years ago
杨树明 afe9158b0f 工程认证权限调整
6 years ago
jingquan huang d1925971f7 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
jingquan huang 82a1a21993 签名认证
6 years ago
cxt 1fb0c4771a Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt f9351e259d 调整
6 years ago
jingquan huang 91c95a7988 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
jingquan huang 9f0e30676c ecloud认证
6 years ago
hjm d5a8f3a1dc Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
hjm 045ac6bff7 is_manager
6 years ago
daiao d97281b04d Merge branch 'educoder' into develop
6 years ago
daiao 7d6c48e86c 【认证】工程认证的界别复制,没有复制毕业要求 vs 培养目标和 毕业要求 vs 通用标准两个矩阵
6 years ago
cxt 4859ce7046 权限调整
6 years ago
cxt 2fcc555ada Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
hjm e58628b38b && is_manager
6 years ago
cxt a05f1f4739 访问权限的判断
6 years ago
cxt b1a79f27ca Merge branch 'educoder' into develop
6 years ago
daiao eb6f911df5 Merge branch 'educoder' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into educoder
6 years ago
hjm 6d92d7700a Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
daiao bcdbd5a74d 工程认证问题
6 years ago
hjm 916b27d3ca b
6 years ago
cxt 9aa9b2f6a5 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt 2f9860d05c 专业管理员无删除权限
6 years ago
hjm c75168a648 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
hjm 6142022d74 is_manager
6 years ago
cxt a17d9f2126 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt d3fee9b877 Merge branch 'educoder' into develop
6 years ago
hjm 95a3f43ca3 this.props.showModal('提示', '您没权限编辑,请联系管理员。')
6 years ago
cxt eab8ccec8b 权限调整
6 years ago
hjm fc4bcca5de is_manager
6 years ago
hjm 59e369f442 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
hjm c174191336 real_value_total
6 years ago
guange e5252fa87e 获取用户信息
6 years ago
guange 5a3e818836 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange 8da79f8125 获取用户信息
6 years ago
hjm 280d1c8d24 b
6 years ago
hjm 2d4310c4f2 real_value_total != 0
6 years ago
guange 2cd1ce8171 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange 325f5c9b15 获取用户信息
6 years ago
hjm 6885ce6cdf b
6 years ago
hjm 3b8750dd2b Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
hjm 537a3cbf2e total value
6 years ago
guange ddba3d844d 获取用户信息
6 years ago
jingquan huang dc578ec876 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange 9fd268b7d8 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange d2f8f13237 增加签名
6 years ago
jingquan huang 28949535d8 services添加相关字段
6 years ago
huang 4d5716ea97 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
huang 19ece63edb 移动云联调相关
6 years ago
guange cfcd3fef14 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
杨树明 3097a01b7b 工程认证
6 years ago
guange 9d349fe567 Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
guange defbbe1c84 ecloud oauth2认证
6 years ago
杨树明 71b3b1ce4a Merge branch 'educoder' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
cxt 97179ce628 Merge branch 'educoder' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into educoder
6 years ago
cxt afa8d8f1f3 调整
6 years ago
jingquan huang befe1381c5 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
jingquan huang 8267a5645e 企业开通
6 years ago
daiao 4fa4e2d199 在接口里增加指示点内容 (后端增加参数)
6 years ago
cxt 3bd2a00768 重置myshixun时更新用户关联的作业
6 years ago
caishi ff0115675c Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
caishi 3957f5b94c 课程体系列表-评价结果显示错误
6 years ago
jingquan huang cb73a97425 接口调试
6 years ago
段甲生 36b0e3d97f Delete
6 years ago
jasder duan 354d51ce1a Merge
6 years ago
jasder duan 9ed8741829 FIX 解决冲突文件
6 years ago
jingquan huang 3afe376f94 ecloud表结构调整
6 years ago
jingquan huang a6445b85f1 ..
6 years ago
jingquan huang e3961027a3 delete
6 years ago
jingquan huang 6517ee418f ..
6 years ago
huang 784172afcb ..
6 years ago
huang a49e220b1c Merge branch 'develop' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
huang 265a928109 ecloud相关表结构
6 years ago
daiao 4aadc998b9 允许跳关的实训参数调整
6 years ago
jasder duan c5150fd29b FIX bug
6 years ago
jasder duan 9a53cebc60 Update .gitignore
6 years ago
daiao 1d53060af9 工程认证相关任务
6 years ago
caishi 54061e6a7a 工程认证首页列表-专业列表的点击事件
6 years ago
hjm 9d245f3922 b
6 years ago
daiao cb4ecb8a0f 调试问题
6 years ago
hjm 5c2eb8b1d3 snackbarOpen
6 years ago
jingquan huang 528996f57d 业务开通接口
6 years ago
jingquan huang d58ddee8d3 ecloud params
6 years ago
jingquan huang 1ad16ed3f0 Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop
6 years ago
jingquan huang 9cf02eaf28 oauth test
6 years ago
huang 850ca0e010 http.rb
6 years ago
daiao b136a7a13d Merge branch 'educoder' of https://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into educoder
6 years ago
daiao 582e8921db 通关却没有获得金币
6 years ago
jingquan huang c8e7166d02 Merge branch 'educoder' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into educoder
6 years ago
jingquan huang 045b8f7655 单点登录初步
6 years ago
jingquan huang f59338005b Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into educoder
6 years ago
daiao fa1af83d6d 参考答案前端显示问题
6 years ago
daiao d26c4a62ba 通过却没有得到金币奖励
6 years ago
jingquan huang da14bbed6f 通关没加金币的问题
6 years ago
jingquan huang bdbb982cf1 金币
6 years ago
jingquan huang 6d944721a8 答案问题
6 years ago
jingquan huang 113981f593 Merge branch 'master' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into educoder
6 years ago
jingquan huang a95dc01665 ecloud
6 years ago
cxt 4fe67139a0 Merge branch 'develop' into educoder
6 years ago

6
.gitignore vendored

@ -45,4 +45,8 @@ config/oneapm.yml
/public/react-mobile7/build/.project
/public/npm-debug.log
/vendor
/workspace/*
/workspace/*
.ruby-gemset
.rvmrc

@ -9,8 +9,8 @@ module Mobile
desc "ecloud接口测试"
get 'list' do
EcloudService.new.list
post 'list' do
EcloudService.new.list(params)
end
end

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

@ -0,0 +1,3 @@
// Place all the styles related to the ecloud controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

@ -0,0 +1,3 @@
// Place all the styles related to the oauth controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

@ -65,6 +65,23 @@ class ApplicationController < ActionController::Base
include Redmine::MenuManager::MenuController
helper Redmine::MenuManager::MenuHelper
def ec_public_auth major_school
unless User.current.admin? || major_school.template_major || major_school.school.users.where(:id => User.current.id).count > 0 ||
major_school.ec_major_school_users.where(:user_id => User.current.id).count > 0 ||
EcCourseUser.where(:user_id => User.current.id, :ec_course_id => EcCourse.where(:ec_year_id => major_school.ec_years.pluck(:id)).pluck(:id)).count > 0
render_403
else
true
end
end
# saas平台认证权限
def saas_auth user=nil
logger.info("###################saas_auth:####{params}")
true
end
def user_agent
logger.info "HTTP_USER_AGENT #{request.env["HTTP_USER_AGENT"]}"
end
@ -274,6 +291,7 @@ class ApplicationController < ActionController::Base
true
end
def require_admin
return unless require_login
if !User.current.admin?

@ -2,6 +2,7 @@
class EcCourseAchievementMethodsController < ApplicationController
before_filter :find_target, :only => [:edit_course_target, :create_evaluation_methods]
skip_before_filter :verify_authenticity_token, :only => [:create_evaluation_methods, :sync_course_data]
before_filter :find_ec_course, :only => [:index]
include ApplicationHelper
@ -59,11 +60,9 @@ class EcCourseAchievementMethodsController < ApplicationController
###############################################################
def index
achievement_list = []
# 具体工程课程
ec_course = EcCourse.find params[:ec_course_id]
# 课程的所有目标
targets = ec_course.ec_course_targets
targets = @ec_course.ec_course_targets
targets.each do |target|
evaluate_data = []
# 评价环节
@ -95,7 +94,7 @@ class EcCourseAchievementMethodsController < ApplicationController
end
achievement_list << {target_id: target.id, target_evaluate_data: evaluate_data}
end
render :json => {achievement_list: achievement_list}
render :json => {achievement_list: achievement_list, is_manager: @is_manager}
end
@ -306,4 +305,13 @@ class EcCourseAchievementMethodsController < ApplicationController
@target = EcCourseTarget.find params[:ec_course_target_id]
end
def find_ec_course
@ec_course = EcCourse.find(params[:ec_course_id])
@year = @ec_course.ec_year
@ec_major_school = @year.ec_major_school
@template_major = User.current.admin? || @ec_major_school.school.ec_school_users.pluck(:user_id).include?(User.current.id) ||
@ec_major_school.ec_major_school_users.pluck(:user_id).include?(User.current.id)
@is_manager = @template_major || @ec_course.ec_course_users.pluck(:user_id).include?(User.current.id)
end
end

@ -2,6 +2,8 @@
class EcCourseSupportsController < ApplicationController
before_filter :find_year, :except => [:edit_require_vs_course, :destroy_require_vs_course]
skip_before_filter :verify_authenticity_token, :only => [:create, :edit_require_vs_course, :destroy_require_vs_course]
before_filter :require_login
before_filter :ec_auth, :except => [:edit_require_vs_course, :destroy_require_vs_course]
###############################################################################
# 毕业要求vs课程体系
@ -47,6 +49,8 @@ class EcCourseSupportsController < ApplicationController
course_support_data = []
max_support_count = 0
subitems_count = 0
major_school = @year.ec_major_school
is_manager = User.current.admin? || 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)
ec_graduation_requirements.each_with_index do |gr, i|
logger.info("#############index:#{i}#####_ec_gradiation_reqiorements: #{gr.id}")
subitems_count += gr.ec_graduation_subitems.count
@ -60,7 +64,12 @@ class EcCourseSupportsController < ApplicationController
course_data << { name: name, top_relation: cs.top_relation, weigths: cs.weigths}
end
gs.ec_course_supports.count > max_support_count && max_support_count = gs.ec_course_supports.count
course_support_data << {sequence_num: sequence_num, ec_graduation_subitem_id: gs.id, course_data: course_data, num_total: gs.ec_course_supports.count, weights_total: weigths_sum}
course_support_data << {sequence_num: sequence_num,
sequence_title: gs.content,
ec_graduation_subitem_id: gs.id,
course_data: course_data,
num_total: gs.ec_course_supports.count,
weights_total: weigths_sum}
end
end
render :json => {ec_year_id: @year.id,
@ -69,7 +78,8 @@ class EcCourseSupportsController < ApplicationController
subitems_url: "#{graduation_requirement_ec_major_school_ec_year_path(@year, :ec_major_school_id => @year.ec_major_school_id)}",
course_count: @year.ec_courses.count,
course_url: "#{ec_course_setting_ec_major_school_ec_year_path(@year, :ec_major_school_id => @year.ec_major_school_id)}",
max_support_count: max_support_count}
max_support_count: max_support_count,
is_manager: is_manager}
end
# 毕业要求vs课程体系 详情页面
@ -208,4 +218,9 @@ class EcCourseSupportsController < ApplicationController
def find_year
@year = EcYear.find(params[:ec_year_id])
end
# 职业认证的权限判断
def ec_auth
ec_public_auth @year.ec_major_school
end
end

@ -3,6 +3,8 @@ class EcCoursesController < ApplicationController
layout 'base_ec'
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 :require_login
before_filter :ec_auth, :except => [:sync_all_course_data]
skip_before_filter :verify_authenticity_token, :only => [:crud_targets, :crud_score_level, :sync_all_course_data, :search_courses,
:correlation_course, :delete_course]
@ -77,7 +79,8 @@ class EcCoursesController < ApplicationController
end
calculation_data << {first_level: first_level, first_leval_data: first_leval_data}
end
render :json => {calculation_data: calculation_data, calculation_value: @year.calculation_value, course_ids: course_ids.uniq}
render :json => {calculation_data: calculation_data, calculation_value: @year.calculation_value, course_ids: course_ids.uniq,
is_manager: @template_major}
end
# 课程目标配置
@ -100,6 +103,12 @@ class EcCoursesController < ApplicationController
end
end
def ec_course_support_setting_data
course_targets = @ec_course.ec_course_targets.includes(:ec_graduation_subitems)
json_data = target_list_data(course_targets)
render :json => json_data
end
# 课程目标配置的更新操作()
# /ec_courses/1/crud_targets
def crud_targets
@ -414,6 +423,8 @@ class EcCoursesController < ApplicationController
def score_level
respond_to do |format|
format.html{
Rails.logger.info("1111111111111111111template_major: #{@template_major}")
Rails.logger.info("1111111111111111111is_manager: #{@is_manager}")
render "/common/index", :layout => false
}
format.json{
@ -429,11 +440,27 @@ class EcCoursesController < ApplicationController
{score: 70, level: ""},
{score: 60, level: ""}]
end
render :json => {levels: ls}
render :json => {levels: ls, is_manager: @is_manager}
}
end
end
def score_level_data
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
levels = params[:levels]
render :json => {status: -1, message: "参数不能为空"} if levels.blank?
@ -574,6 +601,11 @@ class EcCoursesController < ApplicationController
#@is_manager = @template_major || @ec_course.ec_course_users.pluck(:user_id).include?(User.current.id)
end
# 职业认证的权限判断
def ec_auth
ec_public_auth @ec_major_school
end
def target_list_data course_targets
targets = []
course_targets.each do |ct|
@ -595,6 +627,10 @@ class EcCoursesController < ApplicationController
end
end
Rails.logger.info("111111111111111user_id: #{User.current.try(:id)}")
Rails.logger.info("template_major: #{@template_major}")
Rails.logger.info("is_manager: #{@is_manager}")
return {ec_year_id: @ec_course.ec_year_id, ec_course_id: @ec_course.id, course_targets: targets,
requirements: requirements, is_manager: @is_manager}
end
@ -630,7 +666,7 @@ class EcCoursesController < ApplicationController
# 遍历学生成绩统计数据
student_scores.each do |sc|
sub_ecss = EcCourseStudentScore.where(:ec_course_id => @ec_course.id, :ec_year_student_id => sc.ec_year_student_id).first
sub_score = base_score == 0 ? 0 : ((sc.try(:score).to_f/base_score) * percentage).round(3)
sub_score = base_score == 0 || sc.try(:score).nil? ? 0 : ((sc.try(:score).to_f/base_score) * percentage).round(3)
if sub_ecss
ess_target = sub_ecss.ec_student_score_targets.where(:ec_course_target_id => target.id,

@ -2,7 +2,10 @@
class EcMajorSchoolsController < ApplicationController
layout "base_ec"
before_filter :require_login
before_filter :find_major_school, :except => [:get_navigation_data]
before_filter :ec_auth, :except => [:get_navigation_data]
def show
@years = @major_school.ec_years
@ -125,7 +128,8 @@ class EcMajorSchoolsController < ApplicationController
evaluation_methods_url: evaluation_methods_url,
competition_calculation_info_url: competition_calculation_info_url,
score_level_setting_url: score_level_setting_url,
example_major: example_major
example_major: example_major,
allow_visit: User.current.admin? || (User.current.ec_school.present? && User.current.ec_school == major.school.id)
}
end
@ -181,4 +185,9 @@ class EcMajorSchoolsController < ApplicationController
# 管理员权限
@major_manager = User.current.admin? || @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)
end
# 职业认证的权限判断
def ec_auth
ec_public_auth @major_school
end
end

@ -3,6 +3,9 @@ class EcYearsController < ApplicationController
layout "base_ec"
before_filter :find_major_and_year, except: [:create]
before_filter :require_login
before_filter :ec_auth, except: [:create]
#before_filter :find_year, only: [:set_calculation_value]
skip_before_filter :verify_authenticity_token, :only => [:import_students, :set_calculation_value, :destroy_students]
require 'simple_xlsx_reader'
@ -54,37 +57,38 @@ class EcYearsController < ApplicationController
format.html {
render "/common/index", :layout => false
}
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
students = @year.ec_year_students
show_name = @year.ec_year_students.where(:name => nil).count == 0
end
end
page = params[:page] || 1
total_student = students.count
total_page = (total_student / 50.0).ceil
students = paginateHelper students, 50
def student_lists_data
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
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
students = @year.ec_year_students
show_name = @year.ec_year_students.where(:name => nil).count == 0
import_url = "/ec_major_schools/#{@ec_major_school.id}/academic_years/#{@year.id}/import_students"
page = params[:page] || 1
total_student = students.count
total_page = (total_student / 50.0).ceil
students = paginateHelper students, 50
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}
}
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"
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
@ -346,6 +350,11 @@ class EcYearsController < ApplicationController
@template_major = User.current.admin? || @ec_major_school.school.ec_school_users.pluck(:user_id).include?(User.current.id) || @ec_major_school.ec_major_school_users.pluck(:user_id).include?(User.current.id)
end
# 职业认证的权限判断
def ec_auth
ec_public_auth @ec_major_school
end
def find_year
@year = EcYear.find(params[:id])
end
@ -387,6 +396,14 @@ class EcYearsController < ApplicationController
new_egs.save!
# 记录新旧对应关系,为之后的中间表做记录
egs_record << [pre_egs.id, new_egs.id]
prev_ersvss = EcRequireSubVsStandard.where(:ec_graduation_subitem_id => pre_egs.id)
prev_ersvss.each do |prev_ersvs|
new_ersvss = EcRequireSubVsStandard.new
new_ersvss.attributes = prev_ersvs.attributes.dup.except("id", "ec_graduation_subitem_id")
new_ersvss.ec_graduation_subitem_id = new_egs.id
new_ersvss.save!
end
end
end
@ -397,12 +414,30 @@ class EcYearsController < ApplicationController
new_eto.attributes = pre_eto.attributes.dup.except("id", "ec_year_id")
new_eto.ec_year_id = ec_year.id
new_eto.save!
# 复制 "培养目标分项"
pre_eto.ec_training_subitems.try(:each) do |pre_ets|
new_ets = EcTrainingSubitem.new
new_ets.attributes = pre_ets.attributes.dup.except("id", "ec_training_objective_id")
new_ets.ec_training_objective_id = new_eto.id
new_ets.save!
# 复制 "毕业要去 vs 培养目标"
pre_ervsos = EcRequirementVsObjective.where(:ec_training_objective_id => pre_ets.id)
pre_ervsos.each do |ervso|
new_ervso = EcRequirementVsObjective.new
new_ervso.attributes = ervso.attributes.dup.except("id", "ec_training_objective_id", "ec_graduation_requirement_id")
new_ervso.ec_training_objective_id = new_ets.id
new_egr_id = -1
egr_record.each do |egr_id|
if egr_id[0] == ervso.ec_graduation_requirement_id
new_egr_id = egr_id[1]
end
end
raise("找不对应的毕业要求") if new_egr_id == -1
new_ervso.ec_graduation_requirement_id = new_egr_id
new_ervso.save!
end
end
end

@ -0,0 +1,273 @@
#encoding=utf-8
# 云启训练场EduCoder个人版 产品编码appId 9200108
# 产品名称 计费类型 套餐编码
# 云启训练场EduCoder个人版 固定包月 9200108001
# 固定包月 9200108002
# 固定包月 9200108003
# ---------------------------------------------------
# 产品名称 计费类型 套餐编码
# 云启训练场EduCoder院校版 包月+按license 9200109001
# 包月+按license 9200109002
# 云启训练场EduCoder院校版 产品编码appId 9200109
require 'net/http'
require 'digest'
class EcloudController < ApplicationController
skip_before_filter :verify_authenticity_token
# before_filter :check_sign, only: [:ps_new, :ps_update, :bs_new, :bs_update]
before_filter :save_para
before_filter :user_setup
# before_filter :require_login, only: [:authorize]
skip_before_filter :verify_authenticity_token, only: [:ps_new, :ps_update, :bs_new, :bs_update, :ecloud_login_callback]
def index
render file: 'public/react-oschina/build/index.html', :layout => false
end
def trustie_login
end
CLIENT_ID = '1022'
CLIENT_SECRET = '2112037a-6d7a-432b-9081-feb1153d8668'
ROOT_URl = 'http://localhost:3000'
SERVER_URL = "https://221.176.54.92:9081/restful/services/"
## 签名
def sign(timestamp)
Digest::MD5.hexdigest("client_id=#{CLIENT_ID}client_key=#{CLIENT_SECRET}timestamp=#{timestamp}").upcase
end
# 企业/个人业务开通
# applyno 申请单号,唯一
# ecordercode 唯一标志一个企业的订购关系
# params['opttype']操作类型。0开通1变更2试用转商用4再次开通
def bs_new
ActiveRecord::Base.transaction do
begin
ecloud_id = 0
if params['opttype'] == 0 # 开通企业/个人业务
ecloud = Ecloud.create!(eloud_params)
ecloud_id = ecloud.try(:id)
elsif params['opttype'] == 2 # 试用转商用 # 变更企业/个人业务
ecloud = Ecloud.where(custid: params['custid'], custcode: params['custcode']).first
ecloud.update_attributes!(eloud_params)
ecloud.ecloud_productparas.destroy
ecloud.ecloud_services.destroy
ecloud_id = ecloud.try(:id)
elsif params['opttype'] == 1 # 业务变更
ecloud = Ecloud.where(bossorderid: params['bossorderid']).first
ecloud.update_attributes!(eloud_params)
ecloud.ecloud_productparas.destroy
ecloud.ecloud_services.destroy
ecloud_id = ecloud.try(:id)
elsif params['opttype'] == 4 # 再次重复开通
REDO
ecloud = Ecloud.where(bossorderid: params['bossorderid']).first
end
# 业务列表
services = params['services']
if services.present?
services.each do |service|
es = EcloudService.create(opttype: service['opttype'], code: service['code'], begintime: service['begintime'],
endtime: service['endtime'], ecloud_id: ecloud_id)
if service['serviceparas'].present?
service['serviceparas'].each do |servicepara|
EcloudServieceServicepara.create!(ecloud_service_id: es.id, key: servicepara['key'], value: servicepara['value'])
end
end
end
end
# 应用开通参数
productparas = params['productparas']
if productparas.present?
productparas.each do |productpara|
EcloudProductpara.create!(key: productpara['key'], value: productpara['value'], ecloud_id: ecloud_id)
end
end
# 非试用情况下,为管理员单独创建一条账号,企业账号
unless params['trial']
EcloudUser.create!(ecloud_id: ecloud.try(:id), opttype: params['opttype'], userid: params['userid'],
username: params['username'], useralias: params['useralias'],
mobile: params['mobile'], email: params['email'])
end
render :json => {result: true, errmsg: ""}
rescue Exception => e
logger.error(e.message)
render :json => {code: 500, msg: "#{e.message}"}
raise ActiveRecord::Rollback
end
end
end
# 企业/个人业务变更、注销
def bs_update
ActiveRecord::Base.transaction do
begin
ecloud = Ecloud.where(custid: params['custid'], custcode: params['custcode']).first
ecloud.update_attributes!(applyno: params['applyno'], ecordercode: params['ecordercode'], opttype: params['opttype'],
custid: params['custid'], custcode: params['custcode'], productcode: params['productcode'],
operatime: params['operatime'], effecttime: params['effecttime'])
services = params['services'].first
ecloud.ecloud_service.update_attributes!(packagecode: services['packagecode'], bossorderid: services['bossorderid'])
render :json => {result: true, errmsg: ""}
rescue Exception => e
logger.error(e.message)
render :json => {code: 500, msg: "#{e.message}"}
raise ActiveRecord::Rollback
end
end
end
# 用户业务开通与变更接口
# 授权statu为1取消授权status为0
def ps_new
begin
user_params = params['users']
user_params.each do |user_param|
EcloudUser.create!(custid: params['custid'], opttype: user_param['opttype'], userid: user_param['userid'],
username: user_param['username'], useralias: user_param['useralias'],
mobile: user_param['mobile'], email: user_param['email'], begintime: user_param['begintime'].to_s,
endtime: user_param['endtime'].to_s, status: 1)
end
render :json => {success: true, errmsg: ""}
# end
rescue Exception => e
logger.error(e.message)
render :json => {code: 500, msg: "#{e.message}"}
end
end
# 用户业务状态变更
# 授权statu为1取消授权status为0
def ps_update
begin
user_params = params['users']
user_params.each do |user_param|
ecloud_user = EcloudUser.where(userid: user_param['userid'], status: 1).first
ecloud_user.update_attributes(opttype: user_param['opttype'], userid: user_param['userid'], status: 0)
end
render :json => {success: true, errmsg: ""}
# else
# render :json => {code: 404, msg: "企业ID不存在"}
# end
rescue Exception => e
logger.error(e.message)
render :json => {code: 500, msg: "#{e.message}"}
end
end
def ecloud_login_callback
#获取code
logger.info "oauth2 login_callback: #{params}"
raise "没有code" unless params[:code]
url = "#{SERVER_URL}/oauth2/authorization?grant_type=authorization_code" +
"&client_id=#{CLIENT_ID}&scope=&redirect_uri=&code=#{params[:code]}"
res = post(url)
logger.info "oauth2 authorization resp: #{res}"
body = decode(res)
#{"access_token":"21a80f20ff736b54aecd002b60210943","token_type":"bearer","expires_in":86400,"refresh_token":"be92e2c137a8c6dd22f0d8c4a622b3aeceb054087a95d293130f04ec60fd3e3f","scope":"user_info","created_at":1542684088}
raise '登录失败' unless body["access_token"]
#获取此用户信息
# res = get("https://gitee.com/api/v5/user?access_token=#{body["access_token"]}")
res = get("#{SERVER_URL}/user/info?access_token=#{body['access_token']}&userid=#{body['uid']}")
logger.info "oauth2 get user info: #{res}"
# 同步用户
# info = decode(res)
#
# user = User.find_by_oschina_user_id(info["id"])
# unless user
# user = User.create_with_oschina!(info)
# end
#
# @current_user = user
render :index
end
private
def get(url)
uri = URI(url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = url.start_with?('https')
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(uri.request_uri)
request['Content-Type'] = 'application/json'
request['Accept'] = 'application/json'
response = http.request(request)
response.body
end
def post(url)
uri = URI(url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = url.start_with?('https')
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(uri.request_uri)
request['Content-Type'] = 'application/json'
request['Accept'] = 'application/json'
response = http.request(request)
response.body
end
def decode(s)
begin
obj = ActiveSupport::JSON.decode(s)
rescue ActiveSupport::JSON.parse_error
logger.error("Attempted to decode invalid JSON: #{s}")
end
end
private
def eloud_params
return {applyno: params['applyno'], ecordercode: params['ecordercode'], opttype: params['opttype'],
trial: params['trial'], bossorderid: params['bossorderid'], custid: params['custid'], custtype: params['custtype'],
custcode: params['custcode'], registersource: params['registersource'], custname: params['custname'],
userid: params['userid'], username: params['username'], useralias: params['useralias'], mobile: params['mobile'],
email: params['email'], productcode: params['productcode'], begintime: params['begintime'],
endtime: params['endtime']}
end
def check_sign
sign = sign(params['timestamp'])
if sign != params['sign']
render :json => {code: 501, msg: "sign的值错误"}
return
end
end
def save_para
EcloudLog.create(url: request.url, para_value: params, applyno: params['applyno'], custid: params['custid'], custcode: params['custcode'])
end
end

@ -1,5 +1,7 @@
class EcsController < ApplicationController
before_filter :require_login
before_filter :find_school, :except => [:get_navigation_url]
before_filter :school_manager, :except => [:department, :get_navigation_url]
layout 'base_ec'
def department
@ -10,26 +12,30 @@ class EcsController < ApplicationController
@major_schools = @school.ec_major_schools.where(:template_major => false)
unless @is_school_manager
ec_major_school_ids = EcMajorSchoolUser.where(:user_id => User.current.id).pluck(:ec_major_school_id)
ec_course_major_ids = EcYear.where(:id => EcCourseUser.where(:user_id => User.current.id).pluck(:ec_year_id)).pluck(:ec_major_school_id)
ec_course_major_ids = EcYear.where(:id => EcCourse.where(:id => EcCourseUser.where(:user_id => User.current.id).pluck(:ec_course_id)).pluck(:ec_year_id)).pluck(:ec_major_school_id)
@major_schools = @major_schools.where(:id => (ec_major_school_ids + ec_course_major_ids).uniq)
end
@major_count = @major_schools.count
if params[:search].present?
major_ids = EcMajor.where("name like '%#{params[:search]}%' or code like '%#{params[:search]}%'").pluck(:id)
@major_schools = @major_schools.where(:ec_major_id => major_ids)
end
if @major_count == 0
render_403
else
if params[:search].present?
major_ids = EcMajor.where("name like '%#{params[:search]}%' or code like '%#{params[:search]}%'").pluck(:id)
@major_schools = @major_schools.where(:ec_major_id => major_ids)
end
@obj_count = @major_schools.count
@limit = 10
@is_remote = true
@obj_pages = Paginator.new @obj_count, @limit, params['page'] || 1
@offset ||= @obj_pages.offset
@major_schools = paginateHelper @major_schools, @limit
respond_to do |format|
format.js
format.html
@obj_count = @major_schools.count
@limit = 10
@is_remote = true
@obj_pages = Paginator.new @obj_count, @limit, params['page'] || 1
@offset ||= @obj_pages.offset
@major_schools = paginateHelper @major_schools, @limit
respond_to do |format|
format.js
format.html
end
end
end
@ -62,4 +68,10 @@ class EcsController < ApplicationController
def find_school
@school = School.find(params[:school_id])
end
def school_manager
unless User.current.admin? || @school.users.where(:id => User.current.id).count > 0
render_403
end
end
end

@ -219,10 +219,10 @@ class GamesController < ApplicationController
@had_passed_testsests_public_count = had_test.blank? ? 0 : had_test.select{|had_test| had_test.result == true && had_test.is_public == true}.count
@mirror_name = @myshixun.mirror_name
@final_score = ((@shixun.status <= 1) ? 0 : @game.final_score.to_i)
if @myshixun.shixun.status <= 1 || (@game.final_score != 0 && @game.answer_open?)
if @myshixun.shixun.status <= 1 || (@game.final_score != 0 && @game.answer_open > 0)
@gold = 0
else
if @game.answer_open? && @game.final_score ==0
if @game.answer_open > 0 && @game.final_score ==0
@gold = -@game_challenge.score.to_i
else
@gold = @game.final_score.to_i

@ -1796,7 +1796,7 @@ end
@school_id = params[:school_id]
if params[:school_id] && params[:school_id] != ''
@courses = Course.joins("join users u on courses.tea_id = u.id").joins("join user_extensions ue on u.id = ue.user_id").where("ue.school_id = #{params[:school_id]}")
@courses = @courses.joins("join user_extensions ue on courses.tea_id = ue.user_id").where("ue.school_id = #{params[:school_id]}")
end
if params[:homepage_show]
@ -1819,7 +1819,7 @@ end
user_id = User.where("concat(lastname, firstname) like '%#{@search}%'")
@courses = @courses.joins("join users u on courses.tea_id = u.id").where("concat(u.lastname, u.firstname) like '%#{@search}%'")
end
else
elsif "dep_name" == @keyword
school = School.where("name like '%#{@search}%'").map(&:id)
@courses = @courses.where(:school_id => school)
# @courses= @courses.where("name like '%#{@search}%'")

@ -510,7 +510,7 @@ class MyshixunsController < ApplicationController
challenge.path.split("").each do |path|
game_passed_code(game.id, path, myshixun.try(:gpid), 1)
end
if !game.answer_open && (challenge.shixun.try(:status) > 1) # 如果没有查看答案,则获得该关卡得分
if game.answer_open == 0 && (challenge.shixun.try(:status) > 1) # 如果没有查看答案,则获得该关卡得分
reward_grade(game.user, game.id, 'Game', challenge.score)
reward_experience(game.user, game.id, 'Game', challenge.score)
game.update_attributes!(:final_score => challenge.score)

@ -0,0 +1,167 @@
#encoding: utf-8
class OauthController < ApplicationController
require
include ApplicationHelper
before_filter :user_setup
before_filter :require_login, only: [:authorize]
skip_before_filter :verify_authenticity_token, only: [:token]
def index
render 'oauth/index', layout: false
end
# 客户端申请认证的URI包含以下参数
#
# response_type表示授权类型必选项此处的值固定为”code”
# client_id表示客户端的ID必选项
# redirect_uri表示重定向URI可选项
# scope表示申请的权限范围可选项
# state表示客户端的当前状态可以指定任意值最好是随机字符串认证服务器会原封不动地返回这个值可防止CSRF攻击
#
# 这个页显示授权页如果授权成功返回redirect_uri+code
#
#
# 服务器回应客户端的URI包含以下参数
#
# code表示授权码必选项。该码的有效期应该很短通常设为10分钟客户端只能使用该码一次 否则会被授权服务器拒绝。该码与客户端ID和重定向URI是一一对应关系。
# state如果客户端的请求中包含这个参数认证服务器的回应也必须一模一样包含这个参数。
def authorize
begin
#参数检查
raise "response_type只能为code" unless params["response_type"] == "code"
raise "client_id为必传项" unless params["client_id"].present?
raise "redirect_uri为必传项" unless params["redirect_uri"].present?
config = OauthConfig.where(client_id: params["client_id"], redirect_uri: params["redirect_uri"]).first
raise "client_id或redirect_uri不正确" unless config
@data = params
if params[:gen_code]
## 检查通过生成code
oauth = Oauth.create!(client_id: config.client_id,
client_secret: config.client_secret,
redirect_uri: config.redirect_uri,
user_id: User.current.id
)
code = oauth.gen_code
redirect_to params["redirect_uri"] + "?code=#{code}&state=#{params[:state]}"
else
render 'oauth/authorize', :layout => 'forge'
end
rescue => e
logger.error e
render :text => e.message
end
end
def test_callback
# 申请 token
#
client_id = "88d893c5a345313e7b8c6fcf23d3d024ee08d5e41ce120c3448b6eea77d8de30"
client_secret = "e9240cc5fc913741db5aea93f2986a8ea0631bb67f7c00e41e491b95d9619e64"
redirect_uri = "http://localhost:3000/oauth/cb"
url = "http://127.0.0.1:3000/oauth/token?grant_type=authorization_code&code=#{params['code']}&redirect_uri=#{redirect_uri}&client_id=#{client_id}&client_secret=#{client_secret}"
render text: url
end
# 客户端向认证服务器申请令牌的HTTP请求包含以下参数
#
# grant_type表示使用的授权模式必选项此处的值固定为”authorization_code”。
# code表示上一步获得的授权码必选项。
# redirect_uri表示重定向URI必选项且必须与A步骤中的该参数值保持一致。
# client_id表示客户端ID必选项。
# client_secret: 表示客户端密钥,必选项。
#
#
# 认证服务器核对了授权码和”重定向URI”确认无误后向客户端发送访问令牌access token和更新令牌refresh token
#
# 认证服务器发送的HTTP回复包含以下内容
#
# access_token表示访问令牌必选项。
# token_type表示令牌类型该值大小写不敏感必选项可以是bearer类型或mac类型。
# expires_in表示过期时间单位为秒。如果省略该参数必须其他方式设置过期时间。
# refresh_token表示更新令牌用来获取下一次的访问令牌可选项。
# scope表示权限范围如果与客户端申请的范围一致此项可省略。
def token
begin
res = {}
if params[:grant_type] == 'authorization_code'
raise "code必传" unless params["code"]
raise "client_id必传" unless params["client_id"]
raise "client_secret必传" unless params["client_secret"]
raise "code错误或已超时" unless Oauth.code_valid?(params["code"])
oauth = Oauth.auth_code(params["code"], params["client_id"], params["client_secret"])
raise "认证不通过" unless oauth
## 生成 token
#
oauth.gen_token
oauth.reload
res = {
access_token: oauth.access_token,
token_type: 'bearer',
expires_in: oauth.token_expires_in,
refresh_token: oauth.refresh_token
}
end
render json: res.to_json
rescue => e
logger.error e
render text: e.message
end
end
def get_userinfo
user = Oauth.auth(params["access_token"])
user_info = {}
if user
user_info = {
token: user.id,
login: user.login,
avatar_url: "https://openi.org.cn/images/" + url_to_avatar(user),
name: user.show_name,
email: user.mail,
allow: (user.login == "guange"||user.phone=='15607313899') ? 1 : 0
}
end
render json: user_info.to_json
end
private
def require_login
require "base64"
if !User.current.logged?
redirect_to '/login?back_url64=' + Base64.urlsafe_encode64(request.original_url)
end
end
include Trustie::Http
end

@ -4,7 +4,7 @@ class SubjectsController < ApplicationController
before_filter :require_login, :except => [:show]
before_filter :check_authentication, :except => [:show]
before_filter :find_subject, :except => [:index, :new, :create, :create_subject, :new_subject, :append_to_stage, :send_to_course]
before_filter :saas_auth, :only => [:index, :show]
include ApplicationHelper
include SubjectsHelper

@ -2968,7 +2968,7 @@ module ApplicationHelper
title << ("关于我们")
end
elsif params[:controller] == "courses" && params[:action] == "index"
title << ("课堂")
title << ("翻转课堂")
elsif params[:controller] == "competitions" && params[:action] == "index"
title << ("竞赛")
elsif @competition
@ -2976,11 +2976,11 @@ module ApplicationHelper
elsif @contest
title << (@contest.name.nil? ? "创新源于实践" : @contest.name)
elsif @shixun
title << (@shixun.name.nil? ? "精选实训" : @shixun.name)
title << (@shixun.name.nil? ? "开发社区" : @shixun.name)
elsif @my_shixun
title << ("我的实训")
elsif params[:controller] == "shixuns" && params[:action] == "index"
title << ("精选实训")
title << ("开发社区")
elsif @subject
title << (@subject.name.nil? ? "实训课程" : @subject.name)
elsif params[:controller] == "subjects" && params[:action] == "index"

@ -0,0 +1,2 @@
module EcloudHelper
end

@ -0,0 +1,2 @@
module OauthHelper
end

@ -0,0 +1,11 @@
#encoding=utf-8
class Ecloud < ActiveRecord::Base
attr_accessible :applyno, :begintime, :bossorderid, :custcode, :custid, :custname, :custtype, :ecordercode, :endtime,
:mobile, :opttype, :productcode, :registersource, :string, :trial, :useralias, :userid, :username, :email,
:effecttime, :operatime
has_many :ecloud_services, :dependent => :destroy # 业务列表
has_many :ecloud_productparas, :dependent => :destroy # 开通参数列表
has_one :ecloud_user
end

@ -0,0 +1,3 @@
class EcloudLog < ActiveRecord::Base
attr_accessible :para_value, :url, :applyno, :custid, :custcode
end

@ -0,0 +1,4 @@
class EcloudProductpara < ActiveRecord::Base
attr_accessible :key, :value, :ecloud_id
belongs_to :ecloud
end

@ -0,0 +1,5 @@
class EcloudService < ActiveRecord::Base
attr_accessible :begintime, :code, :endtime, :opttype, :ecloud_id, :packagecode, :bossorderid
belongs_to :ecloud
has_many :ecloud_serviece_serviceparas
end

@ -0,0 +1,4 @@
class EcloudServieceServicepara < ActiveRecord::Base
attr_accessible :key, :value, :ecloud_service_id
belongs_to :ecloud_service
end

@ -0,0 +1,3 @@
class EcloudUser < ActiveRecord::Base
attr_accessible :begintime, :email, :endtime, :mobile, :opttype, :paras, :useralias, :userid, :username, :custid, :status, :ecloud_id
end

@ -0,0 +1,3 @@
class EcloudUser < ActiveRecord::Base
attr_accessible :begintime, :email, :endtime, :mobile, :opttype, :paras, :useralias, :userid, :username, :custid
end

@ -64,7 +64,7 @@ class Myshixun < ActiveRecord::Base
time = 0
self.games.each do |game|
if game.status == 2
time += (game.end_time.to_i - game.open_time.to_i) > 0 ? (game.end_time.to_i - game.open_time.to_i) : 0
time += game.cost_time.to_i
end
end
time

@ -0,0 +1,53 @@
require 'base64'
class Oauth < ActiveRecord::Base
attr_accessible :client_id, :client_secret, :redirect_uri, :access_token,
:refresh_token, :token_created_at,:token_expires_in, :user_id
belongs_to :user
def gen_code
code = Base64.urlsafe_encode64 Digest::MD5.hexdigest "#{Time.now}-#{Random.new_seed}"
update_column(:code, code)
code
end
def gen_token
access_token = Digest::MD5.hexdigest "#{Time.now}-#{Random.new_seed}"
refresh_token = Digest::MD5.hexdigest "#{Random.new_seed}-#{Time.now}-#{Random.new_seed}"
self.update_attributes(access_token: access_token,
refresh_token: refresh_token,
token_created_at: Time.now.to_i,
token_expires_in: Time.now.to_i + 24*60*60,
)
end
def self.code_valid?(code)
# 1. 是否存在
oauth = Oauth.where(code: code).order("ID desc").first
return false unless oauth
# 2. 是否超过10分钟
return false if Time.now.to_i - oauth.created_at.to_i > 10*60
# 3. 是否有使用过
return false if oauth.access_token.present?
return true
end
def self.auth_code(code, client_id, client_secret)
Oauth.where(code: code, client_id: client_id, client_secret: client_secret).order('id desc').first
end
def self.auth(access_token)
oauth = self.find_by_access_token(access_token)
return nil unless oauth
oauth.user
end
end

@ -0,0 +1,3 @@
class OauthConfig < ActiveRecord::Base
attr_accessible :client_id, :client_secret, :redirect_uri, :scope
end

@ -245,6 +245,8 @@ class User < Principal
has_many :ec_major_schools, :through => :ec_major_school_users
has_many :ec_major_school_users, :dependent => :destroy
has_many :ec_course_users
#####
scope :logged, lambda { where("#{User.table_name}.status <> #{STATUS_ANONYMOUS}") }
@ -344,6 +346,21 @@ class User < Principal
end
end
}
# 工程认证的学校
def ec_school
school_id = self.ec_school_users.pluck(:school_id).first ||
self.ec_major_schools.pluck(:school_id).first ||
(self.ec_course_users.first && self.ec_course_users.first.try(:ec_course).try(:ec_year).try(:ec_major_school).try(:school_id))
end
# 工程认证的权限
def ec_school_auth school_id
# self.ec_school_users.where(:school_id => school_id).count > 0 ||
# self.ec_major_schools.where(:school_id => school_id).count > 0 ||
#
end
def challenge_tags
games = self.games.where(:id => self.experiences.map(&:container_id), :status => 2)
challenge_tags = ChallengeTag.where(:challenge_id => games.map(&:challenge_id)).where("name != ''")

@ -1,6 +1,7 @@
class EcloudService
def list
return {status: 0, message: "test"}
def list params
return {status: 0, message: "test", code: params[:code], params: params}
end
end

@ -43,7 +43,7 @@ class GamesService
# 高性能取上一关、下一关
prev_game = Game.prev_identifier(shixun.id, game.myshixun_id, game_challenge.position)
next_game = if current_user.is_certification_teacher || shixun_manager(shixun, current_user) || game.status == 2
next_game = if current_user.is_certification_teacher || shixun_manager(shixun, current_user) || game.status || shixun.task_pass
Game.next_game(shixun.id, game.myshixun_id, game_challenge.position).try(:identifier)
end
@ -233,7 +233,7 @@ class GamesService
is_teacher = (current_user.user_extensions.identity == 0)
is_certification_teacher = current_user.is_certification_teacher
# 这几种情况可以直接查看答案的:实训未发布;当前用户为实训管理员;已经查看过答案;平台认证的老师;
if (@shixun.status < 2 || shixun_manager(@shixun, current_user) || @game.answer_open || is_certification_teacher)
if (@shixun.status < 2 || shixun_manager(@shixun, current_user) || @game.answer_open == 1 || is_certification_teacher)
Rails.logger.info("answer#{params[:identifier]}#### user is #{current_user.id}, status is #{@shixun.status}, manager is #{shixun_manager(@shixun, current_user)}, open #{@game.answer_open}, cer #{is_certification_teacher}")
if challenge.st == 0
result = challenge.try(:answer)
@ -258,7 +258,7 @@ class GamesService
challenge_score = challenge.try(:score)
final_score = @game.final_score
if current_user.grade.to_i - challenge_score > 0
unless @game.answer_open # 如果这是第一次查看答案
if @game.answer_open == 0 # 如果这是第一次查看答案
if challenge.st == 0
final_score = final_score - challenge_score
# 积分消耗情况记录
@ -697,7 +697,7 @@ class GamesService
if had_passed && !game.had_passed?
game.update_attributes(:status => 2, :end_time => Time.now)
# TPM实训已发布并且没有查看答案
if shixun.is_published? && !game.answer_open
if shixun.is_published? && game.answer_open == 0
# 查看答案的时候处理final_scor和扣分记录
experience = score
reward_grade(myshixun.owner, game.id, 'Game', score)
@ -796,7 +796,7 @@ class GamesService
if game_status == 2 # 通关
if shixun.status > 1
score = game.final_score # 查看答案的时候有对最终获得金币进行处理
experience = game.answer_open ? 0 : game_challenge.score.to_i
experience = game.answer_open > 0 ? 0 : game_challenge.score.to_i
else
score = 0
experience = 0
@ -930,7 +930,8 @@ class GamesService
end
#end
myshixun_job = Base64.urlsafe_encode64("myshixun_#{myshixun.id}")
StudentWork.where(:myshixun_id => myshixun.id).update_all(:myshixun_id => nil, :work_status => 0)
StudentWork.where(:myshixun_id => myshixun.id).update_all(:myshixun_id => 0, :work_status => 0, :work_score => nil, :final_score => nil,
:cost_time => 0, :update_time => nil, :compelete_status => 0, :commit_time => nil)
# myshixun.destroy
myshixun.delete
# 主从复制出现脏读的情况

@ -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.3274c43b.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.9f01900e.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.ea3ca4b2.js"></script></body></html>

@ -26,7 +26,7 @@
<% end %>
</li>
<% end %>
<% else %>
<% elsif @template_major %>
<form id="form_data_for_requirements">
<div class="clearfix ml30 mr30 pt20 pb20 bor-top-greyE" id="requirementNew">
<p class="df mb20"><input type="hidden" name="year_id" value="<%= @year.id %>">

@ -49,13 +49,13 @@
<!--</span>-->
</span>
<span class="column-2 fr edu-txt-center">
<% if @major_manager && !@major_school.template_major %>
<% if @major_manager && !@major_school.template_major || User.current.admin? %>
<a href="javascript:void(0);" onclick="delete_confirm_box_3('<%= ec_major_school_ec_year_path(year, :ec_major_school_id => @major_school) %>','您确定要删除吗?')" class="mr15 color-grey-c">删除</a>
<% end %>
<%#= link_to '删除', ec_major_school_ec_year_path(year, :ec_major_school_id => @major_school), method: :delete, :class => "mr15 color-grey-c", data: { confirm: '您确定要删除吗' } %>
<% if @major_manager || @major_school.template_major %>
<a href="javascript:void(0)" data-tip-down="导出本学年所有数据" class="mr15 color-blue">导出</a>
<% end %>
<%# if @major_manager || @major_school.template_major %>
<!--<a href="javascript:void(0)" data-tip-down="导出本学年所有数据" class="mr15 color-blue">导出</a>-->
<%# end %>
<%= link_to @btn_text, training_objectives_ec_major_school_ec_year_path(year, :ec_major_school_id => @major_school) %>
</span>

@ -46,13 +46,16 @@
</label>
</span>
<span class="column-11 edu-txt-center">
<label class="color-red-dd">
<% if course.ec_course_targets.count == 0 %>
--
<% else %>
<%= course.complete_target_count == course.ec_course_targets.count ? "达成" : "未达成" %>
--
<% else %>
<% if course.complete_target_count == course.ec_course_targets.count %>
<label class="color-green">达成</label>
<% else %>
<label class="color-red-dd">未达成</label>
<% end %>
<%#= course.complete_target_count == course.ec_course_targets.count ? "达成" : "未达成" %>
<% end %>
</label>
</span>
<span class="column-10 fl edu-txt-left">
<% if course_manager || @template_major %>
@ -83,7 +86,7 @@
</span>
<% end %>
<span class="column-5 fr">
<% if course_manager || @template_major %>
<% if @template_major %>
<a href="javascript:void(0)" onclick="delete_confirm_box_2('<%= ec_course_path(course) %>','是否确定删除当前课程?');" class="color-grey-c mr15 DelCorrelationCourse">删除</a>
<% end %>
<% redirect_url = course_targets == 0 ? ec_course_support_setting_ec_course_path(course) : (

@ -13,7 +13,7 @@
</li>
<% end %>
</ul>
<% elsif @ec_training_objective.present? %>
<% elsif @ec_training_objective.present? && @template_major && @sub_training_objectives.count == 0 %>
<form id="edit_training_subitems">
<ul class="edu-back-white padding10-30" id="SubentryNewPanel">
<li class="df mb10">

@ -12,7 +12,7 @@
<a href="javascript:void(0)" class="defalutCancelbtn mr20 fr" onclick="CancelEditBtn();">取消</a>
</p>
</div>
<% else %>
<% elsif @template_major %>
<div class="clearfix" id="targetEdit">
<textarea class="winput-100-130 mb10" id="training_obejctive"></textarea>
<p class="clearfix">

@ -9,7 +9,7 @@
<li class="clearfix">
<span class="column-No">0</span>
<span class="column-2">000000</span>
<span class="column-3 task-hide"><a href="javascript:void(0)"><%= @template_major.name %>(示例)</a></span>
<span class="column-3 task-hide"><a href="<%= ec_major_school_path(@template_major) %>"><%= @template_major.name %>(示例)</a></span>
<span class="column-5">
<a href="<%= ec_major_school_path(@template_major) %>" class="color-blue" target="_blank"><%= User.current.admin? ? "配置" : "查看" %></a>
</span>
@ -19,7 +19,7 @@
<li class="clearfix" id="major_list_<%= major_school.id %>">
<span class="column-No major_index"><%= index + 1 %></span>
<span class="column-2"><%= major_school.code %></span>
<span class="column-3 task-hide"><a href="javascript:void(0)"><%= major_school.name %></a></span>
<span class="column-3 task-hide"><a href="<%= ec_major_school_path(major_school) %>"><%= major_school.name %></a></span>
<span class="column-4">
<% if major_manager %>
<a href="javascript:void(0)" data-major-id="<%= major_school.id %>" class="color-blue mr5 mt-3 fl addMajorManager"><i class="iconfont icon-tianjiafangda"></i></a>
@ -29,7 +29,7 @@
</p>
</span>
<span class="column-5">
<% if major_manager %>
<% if @is_school_manager %>
<a href="javascript:void(0)" class="mr15 color-grey-c" onclick="delete_confirm_box_2('<%= ec_major_school_path(major_school) %>','是否确认删除')">删除</a>
<% end %>
<a href="<%= ec_major_school_path(major_school) %>" class="color-blue"><%= major_manager ? "配置" : "查看" %></a>

@ -2,8 +2,11 @@
<%= link_to image_tag("/images/educoder/headNavLogo.png", alt:"高校智能化教学与实训平台", class:"logoimg"), home_path %>
<div class="head-nav pr">
<ul id="header-nav">
<li class="pr<%= params[:action] == "index" && params[:controller] == "shixuns" ? " active" : "" %>"><%= link_to "精选实训", shixuns_path %><img src="/images/educoder/hot-h.png" class="nav-img" /></li>
<li class="<%= params[:action] == "index" && params[:controller] == "subjects" ? " active" : "" %>"><%= link_to "实训课程", subjects_path %></li>
<li class="<%= params[:action] == "index" && params[:controller] == "courses" ? " active" : "" %>"><%= link_to "翻转课堂", courses_path %></li>
<!-- 精选实训 -->
<li class="pr<%= params[:action] == "index" && params[:controller] == "shixuns" ? " active" : "" %>"><%= link_to "开发社区", shixuns_path %><img src="/images/educoder/hot-h.png" class="nav-img" /></li>
<% careers = Career.published.order("created_at asc") %>
<% if careers.present? %>
<li class="fl edu-menu-panel headIcon careershover <%= params[:action] == "index" && params[:controller] == "careers" ? " active" : "" %>" style="cursor: auto;">
@ -15,12 +18,12 @@
</ul>
</li>
<% end %>
<li class="<%= params[:action] == "index" && params[:controller] == "courses" ? " active" : "" %>"><%= link_to "课堂", courses_path %></li>
<li class="<%= params[:action] == "index" && params[:controller] == "competitions" ? " active" : "" %>"><%= link_to "竞赛", competitions_path %></li>
<li class="<%= params[:action] == "index" && params[:controller] == "forums" ? " active" : "" %>"><%= link_to "问答", forums_path %></li>
<% ec_user = EcSchoolUser.where(:user_id => User.current.id).first %>
<% if ec_user %>
<li class="<%= params[:controller] == "ecs" ? " active" : "" %>" id="ec_banner"><%= link_to "认证", department_ecs_path(:school_id => ec_user.school_id) %></li>
<% if User.current.ec_school.present? %>
<li class="<%= params[:controller] == "ecs" ? " active" : "" %>" id="ec_banner">
<%= link_to "认证", department_ecs_path(:school_id => User.current.ec_school) %>
</li>
<% end %>
</ul>
<div class="posi-search" id="posi-search" style="display: none">

@ -3,11 +3,13 @@
<div class="head-nav pr">
<ul id="header-nav">
<li class="active" style="display: none"><%= link_to "首页", home_path %></li>
<li><%= link_to "实训课程", subjects_path %></li>
<li><%= link_to "翻转课堂", courses_path %></li>
<li class="pr">
<%= link_to "精选实训", shixuns_path %>
<%= link_to "开发社区", shixuns_path %>
<img src="/images/educoder/hot-h.png" class="nav-img" />
</li>
<li><%= link_to "实训课程", subjects_path %></li>
<% careers = Career.published.order("created_at asc") %>
<% if careers.present? %>
<li class="fl edu-menu-panel headIcon careershover" style="cursor: auto;">
@ -19,7 +21,6 @@
</ul>
</li>
<% end %>
<li><%= link_to "课堂", courses_path %></li>
<li><%= link_to "竞赛", competitions_path %></li>
<li><%= link_to "问答", forums_path %></li>
<!--<li><%#= link_to "活动竞赛", competitions_path %></li>-->

@ -12,7 +12,7 @@
option = {
grid: {
left: '3%',
right: '7%',
right: '9%',
bottom: '3%',
containLabel: true
},

@ -55,7 +55,7 @@
<tr>
<td>第<%= index + 1 %>关</td>
<td class="<%= game.status == 2 && game.end_time > @homework.end_time ? 'color-red' : '' %>"><%= game.status == 2 ? format_time(game.end_time) : '- -' %></td>
<td><%= game.status == 2 ? game_spend_time(game.end_time.to_i - game.open_time.to_i) : '- -' %></td>
<td><%= game.consumes_time %></td>
<td><%= game.status == 2 ? (game.final_score < 0 ? 0 : cha.score) : '- -' %></td>
</tr>
<% end %>

@ -51,23 +51,12 @@
</div>
</div>
</div>
<!--精选实训-->
<div class="clearfix pt20 educontent pr pb20">
<div class="edu-txt-center">
<p class="color-dark edu-txt-center font-24" style="line-height: 30px">精选实训</p>
<p class="color-grey-cd font-12">SELECTED TRAINING</p>
</div>
<a href="<%= shixuns_path %>" class="moreitem">更多<i class="fa fa-angle-right ml5"></i></a>
<div class="square-list clearfix">
<%= render :partial => "shixuns/shixun_item", :locals => {:shixuns => @shixuns} %>
</div>
</div>
<!--实训路径-->
<div class="clearfix pt20 educontent pr pb20 mb60">
<div class="edu-txt-center">
<p class="color-dark edu-txt-center font-24" style="line-height: 30px">实训课程</p>
<p class="color-grey-cd font-12">TRAINING PATH</p>
<p class="color-grey-cd font-12">TRAINING COURSE</p>
</div>
<a href="<%= subjects_path() %>" class="moreitem">更多<i class="fa fa-angle-right ml5"></i></a>
<div class="square-list clearfix">
@ -77,6 +66,20 @@
<!--<a href="https://www.educoder.net/paths/4" target="_blank"><img src="/images/educoder/guagngao.png" width="100%"/></a>-->
</div>
<!--精选实训 改为 开发社区-->
<div class="clearfix pt20 educontent pr pb20">
<div class="edu-txt-center">
<p class="color-dark edu-txt-center font-24" style="line-height: 30px">开发社区</p>
<p class="color-grey-cd font-12">DEVELOPMENT COMMUNITY</p>
</div>
<a href="<%= shixuns_path %>" class="moreitem">更多<i class="fa fa-angle-right ml5"></i></a>
<div class="square-list clearfix">
<%= render :partial => "shixuns/shixun_item", :locals => {:shixuns => @shixuns} %>
</div>
</div>
<!--导师排行榜-->
<div class="pt60 pb60 mb30 mentor-ranking">
<div class="educontent">

@ -25,7 +25,21 @@
# 所有的 act: :act 变成 :act => :act
# Example: :via => :get ====> :via => :get
RedmineApp::Application.routes.draw do
RedmineApp::Application.routes.draw do ## oauth相关
match 'oauth', to: 'oauth#index'
match 'oauth/authorize', to: 'oauth#authorize', :via => [:get, :post]
match 'oauth/token', to: 'oauth#token', :via => :post
match 'oauth/cb', to: 'oauth#test_callback', :via => :get
match 'oauth/userinfo', to: 'oauth#get_userinfo', :via => :get
get 'ecloud/ecloud_login', to: 'ecloud#ecloud_login_callback'
post 'ecloud/bs_new', to: 'ecloud#bs_new'
post 'ecloud/bs_update', to: 'ecloud#bs_update'
post 'ecloud/ps_new', to: 'ecloud#ps_new'
post 'ecloud/ps_update', to: 'ecloud#ps_update'
resources :ec_course_evaluations do
member do
match 'import_score', :via => [:post]
@ -54,6 +68,7 @@ RedmineApp::Application.routes.draw do
post 'add_manager'
delete 'delete_manager'
get "ec_course_support_setting"
get "ec_course_support_setting_data"
get "ec_course_reach_setting"
get "evaluation_methods"
match "search_courses", :via => [:get, :post]
@ -67,6 +82,7 @@ RedmineApp::Application.routes.draw do
post 'crud_targets'
post 'crud_score_level'
get 'score_level'
get 'score_level_data'
end
collection do
get 'get_calculation_data'
@ -129,6 +145,7 @@ RedmineApp::Application.routes.draw do
resources :ec_years, :path => "academic_years" do
member do
get 'student_lists'
get 'student_lists_data'
match 'import_students', :via => [:post]
get 'training_objectives'
get 'graduation_requirement'

@ -1,5 +1,5 @@
class AddForbidCopyToShixun < ActiveRecord::Migration
def change
add_column :shixuns, :forbid_copy, :boolean, :default => 0
# add_column :shixuns, :forbid_copy, :boolean, :default => 0
end
end

@ -0,0 +1,44 @@
class CreateOauths < ActiveRecord::Migration
def change
create_table :oauths do |t|
t.string :client_id
t.string :client_secret
t.string :code
t.string :redirect_uri
t.string :scope
t.string :access_token
t.string :refresh_token
t.integer :token_created_at
t.integer :token_expires_in #过期时间
t.timestamps
end
add_column :oauths, :user_id, :integer, default: 0
add_index :oauths, :user_id
create_table :oauth_configs do |t|
t.string :client_id
t.string :client_secret
t.string :redirect_uri
t.string :scope
t.timestamps
end
OauthConfig.create(
client_id: '88d893c5a345313e7b8c6fcf23d3d024ee08d5e41ce120c3448b6eea77d8de30',
client_secret: 'e9240cc5fc913741db5aea93f2986a8ea0631bb67f7c00e41e491b95d9619e64',
redirect_uri: 'http://localhost:3000/oschina/login_cb',
scope: ''
)
end
end

@ -0,0 +1,40 @@
class AddPassedScoreForUsers < ActiveRecord::Migration
def up
games = Game.where("final_score = 0 and status = 2 and answer_open = 0 and created_at > '2019-03-09 00:00:00'").includes(:challenge)
puts "game_count: #{games.count}"
games.find_each do |game|
puts "#{game.id}"
challenge = game.challenge
# 选择题和实践题的分数
score = challenge.choose_score
user = game.user
game.update_column(:final_score, score)
# 奖励金币和提供记录
grade = Grade.where(:user_id => user.id, :container_id => game.id, :container_type => "Game").first
if grade.nil?
Grade.create!(:user_id => user.id,
:container_id => game.id,
:container_type => "Game",
:score => score,
:created_at => game.end_time || Time.now,
:updated_at => game.end_time || Time.now)
user.update_column(:grade, (score + user.grade.to_i))
end
# 经验奖励
experience = Experience.where(:user_id => user.id, :container_id => game.id, :container_type => "Game").first
if experience.nil?
Experience.create!(:user_id => user.id,
:container_id => game.id,
:container_type => "Game",
:score => score,
:created_at => game.end_time || Time.now,
:updated_at => game.end_time || Time.now)
user.update_column(:experience, (score + user.experience.to_i))
end
end
end
def down
end
end

@ -0,0 +1,30 @@
class CreateEcloudusers < ActiveRecord::Migration
def change
create_table :ecloudusers do |t|
t.string :applyno
t.string :ecordercoder
t.string :string
t.integer :opttype
t.boolean :trial
t.string :bossorderid
t.integer :custid
t.string :custcod
t.string :string
t.integer :custtype
t.integer :registersource
t.string :custname
t.integer :userid
t.string :username
t.string :useralias
t.string :moblile
t.string :email
t.string :productcode
t.datetime :begintime
t.datetime :endtime
t.string :productparas
t.string :services
t.timestamps
end
end
end

@ -0,0 +1,18 @@
class CreateEcloudUser < ActiveRecord::Migration
def change
create_table :ecloud_users do |t|
t.integer :opttype
t.integer :userid
t.string :username
t.string :useralias
t.string :mobile
t.string :email
t.string :begintime
t.string :endtime
t.string :paras
t.integer :custid
t.timestamps
end
end
end

@ -0,0 +1,25 @@
class CreateEclouds < ActiveRecord::Migration
def change
create_table :eclouds do |t|
t.string :applyno
t.string :ecordercode
t.integer :opttype
t.boolean :trial
t.string :bossorderid
t.integer :custid
t.string :custcode
t.integer :registersource
t.integer :custtype
t.string :custname
t.integer :userid
t.string :username
t.string :useralias
t.string :mobile
t.string :productcode
t.string :begintime
t.string :endtime
t.timestamps
end
end
end

@ -0,0 +1,13 @@
class CreateEcloudServices < ActiveRecord::Migration
def change
create_table :ecloud_services do |t|
t.integer :opttype
t.string :code
t.string :begintime
t.string :endtime
t.integer :ecloud_id
t.timestamps
end
end
end

@ -0,0 +1,5 @@
class AddIndexToEcloud < ActiveRecord::Migration
def change
add_index :eclouds, [:ecordercode, :custcode], :unique => true, :name => 'ecorder_cust_code'
end
end

@ -0,0 +1,5 @@
class AddEmailToEcloud < ActiveRecord::Migration
def change
add_column :eclouds, :email, :string
end
end

@ -0,0 +1,6 @@
class AddPackagecodeToEcloudServices < ActiveRecord::Migration
def change
add_column :ecloud_services, :packagecode, :string
add_column :ecloud_services, :bossorderid, :string
end
end

@ -0,0 +1,6 @@
class AddOperatimeToEcloud < ActiveRecord::Migration
def change
add_column :eclouds, :operatime, :string
add_column :eclouds, :effecttime, :string
end
end

@ -0,0 +1,39 @@
class AddScoreForPassGames < ActiveRecord::Migration
def up
games = Game.where("final_score = 0 and status = 2 and answer_open = 0 and end_time > '2019-03-08 00:00:00'").includes(:challenge)
puts "game_count: #{games.count}"
games.find_each do |game|
puts "#{game.id}"
challenge = game.challenge
# 选择题和实践题的分数
score = challenge.choose_score
user = game.user
game.update_column(:final_score, score)
# 奖励金币和提供记录
grade = Grade.where(:user_id => user.id, :container_id => game.id, :container_type => "Game").first
if grade.nil?
Grade.create!(:user_id => user.id,
:container_id => game.id,
:container_type => "Game",
:score => score,
:created_at => game.end_time,
:updated_at => game.end_time)
user.update_column(:grade, (score + user.grade.to_i))
end
# 经验奖励
experience = Experience.where(:user_id => user.id, :container_id => game.id, :container_type => "Game").first
if experience.nil?
Experience.create!(:user_id => user.id,
:container_id => game.id,
:container_type => "Game",
:score => score,
:created_at => game.end_time,
:updated_at => game.end_time)
user.update_column(:experience, (score + user.experience.to_i))
end
end
end
def down
end
end

@ -0,0 +1,5 @@
class RemoveIndexFromEcloud < ActiveRecord::Migration
def change
remove_index :eclouds, :name => 'ecorder_cust_code'
end
end

@ -0,0 +1,5 @@
class AddEcloudIdToEcloudUser < ActiveRecord::Migration
def change
add_column :ecloud_users, :ecloud_id, :integer
end
end

@ -0,0 +1,5 @@
class AddStatusToEcloudUser < ActiveRecord::Migration
def change
add_column :ecloud_users, :status, :integer, :limit => 1
end
end

@ -0,0 +1,11 @@
class CreateEcloudProductpara < ActiveRecord::Migration
def change
create_table :ecloud_productparas do |t|
t.string :key
t.string :value
t.integer :ecloud_id
t.timestamps
end
end
end

@ -0,0 +1,11 @@
class CreateEcloudServieceServicepara < ActiveRecord::Migration
def change
create_table :ecloud_serviece_serviceparas do |t|
t.string :key
t.string :value
t.integer :ecloud_service_id
t.timestamps
end
end
end

@ -0,0 +1,13 @@
class CreateEcloudLogs < ActiveRecord::Migration
def change
create_table :ecloud_logs do |t|
t.string :url
t.string :applyno
t.integer :custid
t.string :custcode
t.string :para_value
t.timestamps
end
end
end

@ -0,0 +1,16 @@
class ChangeClo < ActiveRecord::Migration
def up
change_column :eclouds, :begintime, :bigint, :limit => 20
change_column :eclouds, :endtime, :bigint, :limit => 20
change_column :eclouds, :operatime, :bigint, :limit => 20
change_column :eclouds, :effecttime, :bigint, :limit => 20
change_column :ecloud_services, :endtime, :bigint, :limit => 20
change_column :ecloud_services, :begintime, :bigint, :limit => 20
change_column :ecloud_users, :begintime, :bigint, :limit => 20
change_column :ecloud_users, :endtime, :bigint, :limit => 20
change_column :ecloud_logs, :para_value, :longtext
end
def down
end
end

@ -0,0 +1,46 @@
#coding=utf-8
require 'net/http'
require 'uri'
module Trustie
module Http
def get(url)
uri = URI(url)
res = Net::HTTP.start(uri.host, uri.port, use_ssl: url.start_with?('https')) do |http|
req = Net::HTTP::Get.new(uri)
#req['Content-Type'] = 'application/json'
# The body needs to be a JSON string, use whatever you know to parse Hash to JSON
#req.body = {a: 1}.to_json
http.request(req)
end
res.body
end
def post(url, data=nil)
uri = URI(url)
res = Net::HTTP.start(uri.host, uri.port, use_ssl: url.start_with?('https')) do |http|
req = Net::HTTP::Post.new(uri)
#req['Content-Type'] = 'application/json'
# The body needs to be a JSON string, use whatever you know to parse Hash to JSON
req.body = data if data
http.request(req)
end
res.body
end
def decode(s)
begin
obj = ActiveSupport::JSON.decode(s)
rescue ActiveSupport::JSON.parse_error
logger.error("Attempted to decode invalid JSON: #{s}")
end
end
end
end

@ -1,30 +1,30 @@
{
"./static/js/0.d15cdb8c.chunk.js": "./static/js/0.d15cdb8c.chunk.js",
"./static/js/0.d15cdb8c.chunk.js.map": "./static/js/0.d15cdb8c.chunk.js.map",
"./static/js/1.b37de40f.chunk.js": "./static/js/1.b37de40f.chunk.js",
"./static/js/1.b37de40f.chunk.js.map": "./static/js/1.b37de40f.chunk.js.map",
"./static/js/10.0b59b6d9.chunk.js": "./static/js/10.0b59b6d9.chunk.js",
"./static/js/10.0b59b6d9.chunk.js.map": "./static/js/10.0b59b6d9.chunk.js.map",
"./static/js/0.6b9d3c60.chunk.js": "./static/js/0.6b9d3c60.chunk.js",
"./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.2464b0fd.chunk.js": "./static/js/10.2464b0fd.chunk.js",
"./static/js/10.2464b0fd.chunk.js.map": "./static/js/10.2464b0fd.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.33ef9274.chunk.js": "./static/js/12.33ef9274.chunk.js",
"./static/js/12.33ef9274.chunk.js.map": "./static/js/12.33ef9274.chunk.js.map",
"./static/js/13.84649bc7.chunk.js": "./static/js/13.84649bc7.chunk.js",
"./static/js/13.84649bc7.chunk.js.map": "./static/js/13.84649bc7.chunk.js.map",
"./static/js/14.57622e23.chunk.js": "./static/js/14.57622e23.chunk.js",
"./static/js/14.57622e23.chunk.js.map": "./static/js/14.57622e23.chunk.js.map",
"./static/js/15.cd2747c4.chunk.js": "./static/js/15.cd2747c4.chunk.js",
"./static/js/15.cd2747c4.chunk.js.map": "./static/js/15.cd2747c4.chunk.js.map",
"./static/js/12.ec0ef070.chunk.js": "./static/js/12.ec0ef070.chunk.js",
"./static/js/12.ec0ef070.chunk.js.map": "./static/js/12.ec0ef070.chunk.js.map",
"./static/js/13.8575d630.chunk.js": "./static/js/13.8575d630.chunk.js",
"./static/js/13.8575d630.chunk.js.map": "./static/js/13.8575d630.chunk.js.map",
"./static/js/14.29e80958.chunk.js": "./static/js/14.29e80958.chunk.js",
"./static/js/14.29e80958.chunk.js.map": "./static/js/14.29e80958.chunk.js.map",
"./static/js/15.0dcec662.chunk.js": "./static/js/15.0dcec662.chunk.js",
"./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.map": "./static/js/16.e8e3aa00.chunk.js.map",
"./static/js/17.db50ac9a.chunk.js": "./static/js/17.db50ac9a.chunk.js",
"./static/js/17.db50ac9a.chunk.js.map": "./static/js/17.db50ac9a.chunk.js.map",
"./static/js/18.e8b5b490.chunk.js": "./static/js/18.e8b5b490.chunk.js",
"./static/js/18.e8b5b490.chunk.js.map": "./static/js/18.e8b5b490.chunk.js.map",
"./static/js/17.d11660e2.chunk.js": "./static/js/17.d11660e2.chunk.js",
"./static/js/17.d11660e2.chunk.js.map": "./static/js/17.d11660e2.chunk.js.map",
"./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/19.5f9a9263.chunk.js": "./static/js/19.5f9a9263.chunk.js",
"./static/js/19.5f9a9263.chunk.js.map": "./static/js/19.5f9a9263.chunk.js.map",
"./static/js/2.48f59130.chunk.js": "./static/js/2.48f59130.chunk.js",
"./static/js/2.48f59130.chunk.js.map": "./static/js/2.48f59130.chunk.js.map",
"./static/js/2.eb0d1091.chunk.js": "./static/js/2.eb0d1091.chunk.js",
"./static/js/2.eb0d1091.chunk.js.map": "./static/js/2.eb0d1091.chunk.js.map",
"./static/js/20.6efcbe58.chunk.js": "./static/js/20.6efcbe58.chunk.js",
"./static/js/20.6efcbe58.chunk.js.map": "./static/js/20.6efcbe58.chunk.js.map",
"./static/js/21.6e5a22af.chunk.js": "./static/js/21.6e5a22af.chunk.js",
@ -37,38 +37,38 @@
"./static/js/24.e1553222.chunk.js.map": "./static/js/24.e1553222.chunk.js.map",
"./static/js/25.7f05ced8.chunk.js": "./static/js/25.7f05ced8.chunk.js",
"./static/js/25.7f05ced8.chunk.js.map": "./static/js/25.7f05ced8.chunk.js.map",
"./static/js/26.00916fb9.chunk.js": "./static/js/26.00916fb9.chunk.js",
"./static/js/26.00916fb9.chunk.js.map": "./static/js/26.00916fb9.chunk.js.map",
"./static/js/27.85a886e8.chunk.js": "./static/js/27.85a886e8.chunk.js",
"./static/js/27.85a886e8.chunk.js.map": "./static/js/27.85a886e8.chunk.js.map",
"./static/js/26.e3927d38.chunk.js": "./static/js/26.e3927d38.chunk.js",
"./static/js/26.e3927d38.chunk.js.map": "./static/js/26.e3927d38.chunk.js.map",
"./static/js/27.d2f21a4d.chunk.js": "./static/js/27.d2f21a4d.chunk.js",
"./static/js/27.d2f21a4d.chunk.js.map": "./static/js/27.d2f21a4d.chunk.js.map",
"./static/js/28.db5cbded.chunk.js": "./static/js/28.db5cbded.chunk.js",
"./static/js/28.db5cbded.chunk.js.map": "./static/js/28.db5cbded.chunk.js.map",
"./static/js/29.95e5a009.chunk.js": "./static/js/29.95e5a009.chunk.js",
"./static/js/29.95e5a009.chunk.js.map": "./static/js/29.95e5a009.chunk.js.map",
"./static/js/3.a357162e.chunk.js": "./static/js/3.a357162e.chunk.js",
"./static/js/3.a357162e.chunk.js.map": "./static/js/3.a357162e.chunk.js.map",
"./static/js/30.3482c43d.chunk.js": "./static/js/30.3482c43d.chunk.js",
"./static/js/30.3482c43d.chunk.js.map": "./static/js/30.3482c43d.chunk.js.map",
"./static/js/3.123eae7e.chunk.js": "./static/js/3.123eae7e.chunk.js",
"./static/js/3.123eae7e.chunk.js.map": "./static/js/3.123eae7e.chunk.js.map",
"./static/js/30.92e2f4a6.chunk.js": "./static/js/30.92e2f4a6.chunk.js",
"./static/js/30.92e2f4a6.chunk.js.map": "./static/js/30.92e2f4a6.chunk.js.map",
"./static/js/31.3edb9173.chunk.js": "./static/js/31.3edb9173.chunk.js",
"./static/js/31.3edb9173.chunk.js.map": "./static/js/31.3edb9173.chunk.js.map",
"./static/js/32.23fc5ec4.chunk.js": "./static/js/32.23fc5ec4.chunk.js",
"./static/js/32.23fc5ec4.chunk.js.map": "./static/js/32.23fc5ec4.chunk.js.map",
"./static/js/4.a72da972.chunk.js": "./static/js/4.a72da972.chunk.js",
"./static/js/4.a72da972.chunk.js.map": "./static/js/4.a72da972.chunk.js.map",
"./static/js/5.1853fe23.chunk.js": "./static/js/5.1853fe23.chunk.js",
"./static/js/5.1853fe23.chunk.js.map": "./static/js/5.1853fe23.chunk.js.map",
"./static/js/6.070d1eab.chunk.js": "./static/js/6.070d1eab.chunk.js",
"./static/js/6.070d1eab.chunk.js.map": "./static/js/6.070d1eab.chunk.js.map",
"./static/js/7.1ad7321f.chunk.js": "./static/js/7.1ad7321f.chunk.js",
"./static/js/7.1ad7321f.chunk.js.map": "./static/js/7.1ad7321f.chunk.js.map",
"./static/js/8.d5642b7b.chunk.js": "./static/js/8.d5642b7b.chunk.js",
"./static/js/8.d5642b7b.chunk.js.map": "./static/js/8.d5642b7b.chunk.js.map",
"./static/js/9.c6b81c3d.chunk.js": "./static/js/9.c6b81c3d.chunk.js",
"./static/js/9.c6b81c3d.chunk.js.map": "./static/js/9.c6b81c3d.chunk.js.map",
"main.css": "./static/css/main.3274c43b.css",
"main.css.map": "./static/css/main.3274c43b.css.map",
"main.js": "./static/js/main.9f01900e.js",
"main.js.map": "./static/js/main.9f01900e.js.map",
"./static/js/4.a563b706.chunk.js": "./static/js/4.a563b706.chunk.js",
"./static/js/4.a563b706.chunk.js.map": "./static/js/4.a563b706.chunk.js.map",
"./static/js/5.459a49ba.chunk.js": "./static/js/5.459a49ba.chunk.js",
"./static/js/5.459a49ba.chunk.js.map": "./static/js/5.459a49ba.chunk.js.map",
"./static/js/6.83516b55.chunk.js": "./static/js/6.83516b55.chunk.js",
"./static/js/6.83516b55.chunk.js.map": "./static/js/6.83516b55.chunk.js.map",
"./static/js/7.accad232.chunk.js": "./static/js/7.accad232.chunk.js",
"./static/js/7.accad232.chunk.js.map": "./static/js/7.accad232.chunk.js.map",
"./static/js/8.69fefc71.chunk.js": "./static/js/8.69fefc71.chunk.js",
"./static/js/8.69fefc71.chunk.js.map": "./static/js/8.69fefc71.chunk.js.map",
"./static/js/9.e77edf45.chunk.js": "./static/js/9.e77edf45.chunk.js",
"./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.ea3ca4b2.js",
"main.js.map": "./static/js/main.ea3ca4b2.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.3274c43b.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.9f01900e.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.ea3ca4b2.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

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

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

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save