dev_haigong
caishi 6 years ago
commit b43b3ea574

@ -436,7 +436,15 @@ class AccountController < ApplicationController
# 注册完/绑定邮箱 后完善资料
def user_info
@user = User.current
#是否是Oschina过来的
@is_ecoder_user = @user.ecoder_user_id.to_i>0
#是否没设置过密码
@is_set_password = @user.hashed_password.present?
if request.get?
# 如果是登录的请求进来,则需要判断登录名是否合法
if (@user.login =~ /(^(?=.*?[a-zA-Z]).*$)/).nil? || !(@user.login =~ /[@#\$%\^&\*\.]+/).nil?
@login_error = true
@ -454,6 +462,22 @@ class AccountController < ApplicationController
apply_user.update_all(:status => 2) unless apply_user.blank?
end
if @is_ecoder_user && !@is_set_password
@user.password = params[:new_password]
@user.password_confirmation = params[:new_password_confirmation]
if @user.password.size<8
@password_len_error = true
render :user_info and return
end
if @user.password != @user.password_confirmation
@password_match_error = true
render :user_info and return
end
end
@user.lastname = params[:lastname]
@user.firstname = ""
@user.show_realname = params[:hide_realname] ? 0 : 1
@ -525,6 +549,7 @@ class AccountController < ApplicationController
return
else
@user.login = lg
logger.info "save user: #{@user.errors}"
end
end
end

@ -1,4 +1,16 @@
#encoding=utf-8
# 云启训练场EduCoder个人版 产品编码appId 9200108
# 产品名称 计费类型 套餐编码
# 云启训练场EduCoder个人版 固定包月 9200108001
# 固定包月 9200108002
# 固定包月 9200108003
# ---------------------------------------------------
# 产品名称 计费类型 套餐编码
# 云启训练场EduCoder院校版 包月+按license 9200109001
# 包月+按license 9200109002
# 云启训练场EduCoder院校版 产品编码appId 9200109
require 'net/http'
require 'digest'
@ -6,6 +18,7 @@ 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]
@ -25,29 +38,96 @@ class EcloudController < ApplicationController
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再次开通
# 业务列表opttype: 0新增1注销2修改
# serviceparas: 但是由于企业版是按成员收费的所以serviceparas里面会传成员数个人版是包月计费的serviceparas不会传成员数
def bs_new
ActiveRecord::Base.transaction do
begin
ecloud = Ecloud.create!(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'],
if params['opttype'] == 0 # 开通企业/个人业务
ecloud = Ecloud.create!(eloud_params)
create_service(params['services'], ecloud.try(:id))
create_product_params(params['productparas'], ecloud.try(:id)) if params['productparas'].present?
# 为管理员添加一条记录
# 开通的时候都是用户的opttype也是0
EcloudUser.create!(custid: params['custid'], opttype: params['opttype'], userid: params['userid'],
username: params['username'], useralias: params['useralias'],
mobile: params['mobile'], email: params['email'], begintime: params['begintime'],
endtime: params['endtime'])
services = params['services'].first
EcloudService.create(opttype: services['opttype'], code: services['code'], begintime: services['begintime'],
endtime: services['endtime'], ecloud_id: ecloud.try(:id))
elsif params['opttype'] == 2 # 试用转商用 # 变更企业/个人业务
# 业务列表:注销业务(注销试用的套餐),另一个业务项的操作代码是:新增业务(开通商用的套餐)
# 需要通过产品服务编号和业务编码来区分哪个产品
ecloud = Ecloud.where(custid: params['custid'], custcode: params['custcode'], productcode: params['productcode'], trial: true).first
# 注销试用的套餐
## 需要注销的套餐; 试用转商用是不会有批量操作的所以可以使用first
des_service = params['services'].select{|s| s['opttype'] == 1}.first
esd = EcloudService.where(ecloud_id: ecloud.try(:id), code: des_service['code']).first
ecloud.update_attribute(:trial, params['trial'])
esd.update_attributes!(opttype: des_service['opttype'], begintime: des_service['begintime'], endtime: des_service['endtime'])
# 试用转商用是不会有批量操作的
# 新增业务
add_service = params['services'].select{|s| s['opttype'] == 0}
create_service(add_service, ecloud.try(:id))
#
elsif params['opttype'] == 1 # 业务变更
ecloud = Ecloud.where(custid: params['custid'], custcode: params['custcode'], productcode: params['productcode']).first
# 套餐变更
# 新增业务
add_service = params['services'].select{|s| s['opttype'] == 0}
create_service(add_service, ecloud.try(:id)) if add_service.present?
# 如果有注销业务,注销业务
des_services = params['services'].select{|s| s['opttype'] == 1}
if des_services.present?
des_services.each do |ds|
esd = EcloudService.where(ecloud_id: ecloud.try(:id), code: ds['code']).first
esd.update_attributes!(opttype: ds['opttype'], begintime: ds['begintime'], endtime: ds['endtime'])
end
end
# 变更业务
edt_services = params['services'].select{|s| s['opttype'] == 2}
if edt_services.present?
edt_services.each do |es|
ese = EcloudService.where(ecloud_id: ecloud.try(:id), code: es['code']).first
ese.update_attributes!(opttype: es['opttype'], begintime: es['begintime'], endtime: es['endtime'])
create_serviceparas es['serviceparas'].first, ese.id
end
end
# 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 # 再次重复开通
ecloud = Ecloud.where(custid: params['custid'], custcode: params['custcode'], productcode: params['productcode']).first
create_service(params['services'], ecloud.try(:id))
create_product_params(params['productparas'], ecloud.try(:id)) if params['productparas'].present?
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
@ -58,18 +138,32 @@ class EcloudController < ApplicationController
end
end
# 企业更新
# 企业/个人业务变更、注销
# 处理业务平台退订、暂停(欠费暂停,信控暂停等)、暂停后恢复应用业务
# 这个接口是不会新增业务的
# 试用退订的时候bossorderid传空字符
def bs_update
ActiveRecord::Base.transaction do
begin
ecloud = Ecloud.where(applyno: params['applyno']).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'])
case params['opttype']
when 0 # 退订
opttype = 6
when 1 # 暂停
opttype = 7
when 2 # 恢复
opttype = 8
end
if params['bossorderid'].present?
ecloud = Ecloud.where(bossorderid: params['bossorderid']).first
ecloud.update_attribute(:opttype, opttype)
else
# 试用退订
params['services'].each do |service|
ecloud_id = EcloudService.where(code: service['packagecode']).first.try(:ecloud_id)
Ecloud.find(ecloud_id).update_attribute(:opttype, opttype)
end
end
render :json => {result: true, errmsg: ""}
rescue Exception => e
logger.error(e.message)
render :json => {code: 500, msg: "#{e.message}"}
@ -79,37 +173,56 @@ class EcloudController < ApplicationController
end
# 用户业务开通与变更接口
# 授权statu为1取消授权status为0
# user['opttype']: 操作类型0开通1变更3: 取消授权4暂停5恢复
def ps_new
ActiveRecord::Base.transaction do
begin
user_param = params['users'].first
# ecloud_user = EcloudUser.where(:custid => params['custid'], :userid => user_param['userid']).first
# if ecloud_user.present?
# render :json => {code: 500, msg: "你已开通过该业务"}
# else
user_params = params['users']
user_params.each do |user_param|
if user_param['opttype'] == 0 # 开通
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)
elsif user_param['opttype'] == 1 # 变更
ecloud_user = EcloudUser.where(custid: params['custid'], userid: user_param['userid']).first
ecloud_user.update_attributes!(opttype: user_param['opttype'], 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)
end
end
render :json => {success: true, errmsg: ""}
# end
rescue Exception => e
logger.error(e.message)
render :json => {code: 500, msg: "#{e.message}"}
raise ActiveRecord::Rollback
end
end
end
# 用户业务状态变更
# user['opttype']: 操作类型0开通1变更3: 取消授权4暂停5恢复
def ps_update
begin
ecloud = Ecloud.where(applyno: params['applyno']).first
user_param = params['users'].first
ecloud_user = EcloudUser.where(ecloud_id: ecloud.id).first
user_params = params['users']
user_params.each do |user_param|
case user_param['opttype']
when 0 # 取消授权
opttype = 3
when 1 # 暂停
opttype = 4
when 2 # 恢复
opttype = 5
end
ecloud_user = EcloudUser.where(custid: params['custid'], userid: user_param['userid']).first
ecloud_user.update_attributes!(opttype: opttype, operatime: params['operatime'], effecttime: params['effecttime'])
end
ecloud_user.update_attributes(opttype: user_param['opttype'], userid: user_param['userid'])
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}"}
@ -117,6 +230,8 @@ class EcloudController < ApplicationController
end
def ecloud_login_callback
unless params["test"] == 'true'
#获取code
logger.info "oauth2 login_callback: #{params}"
@ -127,57 +242,71 @@ class EcloudController < ApplicationController
res = post(url)
logger.info "oauth2 authorization resp: #{res}"
# {"access_token":"ae673b2d-88b4-46cc-aa74-0b031f24b76f","expires":6,"refresh_token":"7380cc67-a59c-4c21-9000-70e12a58d175","username":"15111030087@QW_er","uid":2147}
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}"
# {"userid":2147,"custid":2104,"custcode":"E0002018042810010054","custtype":2,"status":2,"username":"15111030087@QW_er","useralias":"15111030087","isadmin":true,"entprise":"04**004","departments":"","departmentnames":"","mobile":"15365386520","email":"15111030087@139.com"}
else
res = '{"userid":2147,"custid":2104,"custcode":"E0002018042810010054","custtype":2,"status":2,"username":"15111030087@QW_er","useralias":"15111030087","isadmin":true,"entprise":"04**004","departments":"","departmentnames":"","mobile":"15365386520","email":"15111030087@139.com"}'
end
# 同步用户
# info = decode(res)
#
# user = User.find_by_oschina_user_id(info["id"])
# unless user
# user = User.create_with_oschina!(info)
# end
#
# @current_user = user
info = decode(res)
user = User.find_by_ecoder_user_id(info["userid"])
unless user
#新建用户
user = User.create_with_ecoder!(info)
end
self.logged_user = user
user = UserExtensions.where(:user_id => User.current.id).first
if user.gender.nil? || user.school_id.nil? || User.current.lastname.nil?
redirect_to my_account_path
elsif user.identity == 3 && user.school_id.nil?
redirect_to my_account_path
else
redirect_to User.current
end
render :index
end
private
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
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)
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 = {a: 1}.to_json
http.request(req)
end
res.body
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)
@ -189,6 +318,38 @@ class EcloudController < ApplicationController
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 create_service services, ecloud_id
services.each do |service|
ese = EcloudService.create!(opttype: service['opttype'], code: service['code'], begintime: service['begintime'],
endtime: service['endtime'], ecloud_id: ecloud_id)
if service['serviceparas'].present?
create_serviceparas(service['serviceparas'].first, ese.id)
end
end
end
def create_serviceparas params_serviceparas, ese_id
if params_serviceparas.present?
EcloudServieceServicepara.create(key: params_serviceparas['key'], value: params_serviceparas['value'], ecloud_service_id: ese_id)
end
end
def create_product_params params, ecloud_id
params.each do |p|
EcloudProductpara.create(key: p['key'], value: p['value'], ecloud_id: ecloud_id)
end
end
def check_sign
sign = sign(params['timestamp'])
if sign != params['sign']
@ -197,4 +358,9 @@ class EcloudController < ApplicationController
end
end
def save_para
EcloudLog.create(url: request.url, para_value: params, applyno: params['applyno'], custid: params['custid'],
custcode: params['custcode'], userid: params['userid'], username: params['username'])
end
end

@ -671,6 +671,7 @@ class HomeworkCommonController < ApplicationController
def destroy
if @homework.destroy
StudentWork.where(:homework_common_id => @homework.id).destroy_all
#更新CourseHomeworkStatistics中每个学生的未交作品数、已交作品数、迟交作品数
# hw_count = @course.homework_commons.includes(:homework_detail_manual).where("homework_detail_manuals.comment_status > 0").count
# homework_ids = @course.homework_commons.empty? ? "(-1)" : "(" + @course.homework_commons.map{|hw| hw.id}.join(",") + ")"
@ -1347,7 +1348,7 @@ class HomeworkCommonController < ApplicationController
def find_homework
@homework = HomeworkCommon.find params[:id]
@homework_detail_manual = @homework.homework_detail_manual
@homework_detail_programing = @homework.homework_detail_programing
# @homework_detail_programing = @homework.homework_detail_programing
@homework_detail_group = @homework.homework_detail_group
@course = @homework.course
rescue

@ -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}%'")

@ -141,6 +141,10 @@ class MyController < ApplicationController
# Edit user's account
def account
@user = params[:user_id].nil? ? User.current : User.find(params[:user_id])
ue = @user.user_extensions
if @user.lastname.blank? || ue.try(:identity).nil? || (ue.try(:identity) == 1 && ue.try(:student_id).blank?) || (ue.try(:identity) != 1 && ue.try(:technical_title).blank?) || ue.try(:gender).blank? || ue.try(:school_id).blank?
redirect_to user_info_path
@ -152,7 +156,8 @@ class MyController < ApplicationController
applied_message = AppliedMessage.where(:id => params[:applied_message_id]).first
applied_message.update_attribute(:viewed, true)
end
# @user = User.current
# 认证
@trail_authentication = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization").order("created_at desc").first
if @trail_authentication && (@trail_authentication.status == 1 || @trail_authentication.status == 2) && !@trail_authentication.noticed

@ -2592,6 +2592,7 @@ class UsersController < ApplicationController
def user_info
end
# 连续签到六天则每天累加10个金币

@ -33,6 +33,28 @@ module ApplicationHelper
extend Forwardable
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter
# 课堂相关controller
def course_controller
["courses", "homework_common", "student_work", "exercise", "poll", "boards", "messages", "graduation_topics", "graduation_tasks",
"graduation_works", "files"]
end
# 实训课程相关controller
def subjects_controller
["subjects", "stages"]
end
# 实训路径相关controller
def shixuns_controller
["shixuns", "challenges", "myshixuns", "games"]
end
# 工程认证相关controller
def ecs_controller
["ecs", "ec_courses", "ec_course_evaluations", "ec_course_supports", "ec_course_targets", "ec_graduation_requirements",
"ec_major_schools", "ec_majors", "ec_years"]
end
def exercise_bank_json_data exercises
exercises.map do |exercise|
exercise_path = exercise_bank_path(exercise)
@ -6793,7 +6815,9 @@ def update_myshixun_work_score myshixun
end
work.update_time = Time.now
work.final_score = final_score
# 为迁移的数据做特殊处理, 若分数小于当前通关分数则不更新
work.final_score = final_score if work.final_score.nil? || final_score > work.final_score
score = work.final_score + work.eff_score - work.late_penalty
work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) unless work.ultimate_score
#logger.info("#############work_score: #{score}")

@ -15,6 +15,8 @@ module SubjectsHelper
'<span class="fr color-grey-9">已发布</span>'
when 3
'<span class="fr color-grey-9">已关闭</span>'
else
""
end
else
if shixun_status != 2
@ -23,6 +25,8 @@ module SubjectsHelper
'<span class="fr color-grey-c">暂未公开</span>'
when 3
'<span class="fr color-grey-9">已关闭</span>'
else
""
end
else
""

@ -1,7 +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
has_one :ecloud_service
end

@ -0,0 +1,3 @@
class EcloudLog < ActiveRecord::Base
end

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

@ -1,3 +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

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

@ -0,0 +1,3 @@
class EcloudUserPara < ActiveRecord::Base
belongs_to :ecloud_user
end

@ -15,7 +15,7 @@ class HomeworkCommon < ActiveRecord::Base
belongs_to :homework_bank
has_many :homework_group_settings, :dependent => :destroy
has_one :homework_detail_manual, :dependent => :destroy
has_one :homework_detail_programing, :dependent => :destroy
# has_one :homework_detail_programing, :dependent => :destroy
has_one :homework_detail_group, :dependent => :destroy
has_one :homework_commons_shixuns, :dependent => :destroy
has_many :homework_challenge_settings, :dependent => :destroy
@ -24,21 +24,21 @@ class HomeworkCommon < ActiveRecord::Base
has_many :homework_review_results, :dependent => :destroy # 学生的查重情况
belongs_to :course_homework_category
has_many :student_work_projects, :dependent => :destroy
has_many :homework_tests, :dependent => :destroy
has_many :homework_samples, :dependent => :destroy
has_many :student_works, :dependent => :destroy, :conditions => "student_works.is_test=0 and student_works.is_delete != 1"
has_many :student_work_projects
# has_many :homework_tests, :dependent => :destroy
# has_many :homework_samples, :dependent => :destroy
has_many :student_works, :conditions => "student_works.is_test=0 and student_works.is_delete != 1"
has_many :student_works_evaluation_distributions, :through => :student_works #一个作业的分配的匿评列表
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
has_many :apply_homeworks, :dependent => :destroy
has_many :apply_homeworks
has_many :praise_tread, as: :praise_tread_object, dependent: :destroy
has_one :praise_tread_cache, as: :object, dependent: :destroy
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy #用户活动
# has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy #用户活动
has_and_belongs_to_many :shixuns
# 课程动态
has_many :course_acts, :class_name => 'CourseActivity',:as =>:course_act ,:dependent => :destroy
# 课程消息
has_many :course_messages, :class_name =>'CourseMessage', :as => :course_message, :dependent => :destroy
# has_many :course_messages, :class_name =>'CourseMessage', :as => :course_message, :dependent => :destroy
has_many :tidings, as: :container, dependent: :destroy
acts_as_attachable
acts_as_event :title => Proc.new {|o| "#{l(:label_course_homework)} ##{o.id}: #{o.name}" },
@ -48,7 +48,7 @@ class HomeworkCommon < ActiveRecord::Base
# after_create :act_as_activity
after_update :update_activity
after_save :act_as_course_activity
after_destroy :delete_kindeditor_assets
# after_destroy :delete_kindeditor_assets
before_destroy :update_homework_bank_quotes
#删除时更新题库中的引用数
@ -188,9 +188,9 @@ class HomeworkCommon < ActiveRecord::Base
# end
end
def is_program_homework?
self.homework_type == 2 && self.homework_detail_programing
end
# def is_program_homework?
# self.homework_type == 2 && self.homework_detail_programing
# end
def is_group_homework?
self.homework_type == 3 && self.homework_detail_group
@ -225,6 +225,6 @@ class HomeworkCommon < ActiveRecord::Base
end
end
delegate :language_name, :language, :to => :homework_detail_programing
# delegate :language_name, :language, :to => :homework_detail_programing
end

@ -13,9 +13,9 @@ class StudentWork < ActiveRecord::Base
has_many :student_works_scores, :dependent => :destroy
has_many :challenge_work_scores, :dependent => :destroy
belongs_to :project
has_many :student_work_tests, order: 'id desc'
# has_many :student_work_tests, order: 'id desc'
# course's message
has_many :course_messages, :class_name =>'CourseMessage', :as => :course_message, :dependent => :destroy
# has_many :course_messages, :class_name =>'CourseMessage', :as => :course_message, :dependent => :destroy
has_many :attachments, :dependent => :destroy
has_many :tidings, as: :container, dependent: :destroy
belongs_to :myshixun
@ -24,7 +24,7 @@ class StudentWork < ActiveRecord::Base
scope :all_commit, lambda{where("work_status != 0")}
before_destroy :delete_praise
before_save :set_program_score, :set_src
before_save :set_program_score
after_save :update_avg_sum_score
# after_create :act_as_message
@ -34,25 +34,26 @@ class StudentWork < ActiveRecord::Base
PraiseTread.where("praise_tread_object_id = #{self.id} AND praise_tread_object_type = 'StudentWork'").destroy_all
end
def last_test
student_work_tests.order('id desc').first
end
# def last_test
# student_work_tests.order('id desc').first
# end
private
def set_program_score
if self.homework_common.is_program_homework? #编程作业,学生提交作品后计算系统得分
#根据最后一次测试计算得分
unless last_test
self.system_score = 0
else
self.system_score = last_test.test_score self.homework_common.homework_tests.size
end
end
# if self.homework_common.is_program_homework? #编程作业,学生提交作品后计算系统得分
# #根据最后一次测试计算得分
# unless last_test
# self.system_score = 0
# else
# self.system_score = last_test.test_score self.homework_common.homework_tests.size
# end
# end
set_final_score self.homework_common,self
end
def set_src
self.description = last_test.src if last_test
end
# def set_src
# self.description = last_test.src if last_test
# end
#成绩计算
def set_final_score homework,student_work
@ -217,8 +218,8 @@ class StudentWork < ActiveRecord::Base
# status == 0 : delay
def act_as_message
if self.work_status != 0 && self.created_at > self.homework_common.end_time
self.course_messages << CourseMessage.new(:user_id => self.user_id, :course_id => self.homework_common.course_id, :viewed => false, :status => false)
end
# if self.work_status != 0 && self.created_at > self.homework_common.end_time
# self.course_messages << CourseMessage.new(:user_id => self.user_id, :course_id => self.homework_common.course_id, :viewed => false, :status => false)
# end
end
end

@ -1692,6 +1692,36 @@ class User < Principal
end
end
def self.create_with_ecoder!(info)
user = User.new
user.admin = false
user.login = "ecoder_" + info["mobile"]
user.phone = info["mobile"]
unless User.find_by_mail(info["email"])
user.mail = info["email"]
end
user.nickname = info["username"]
user.activate
user.last_login_on = Time.now
user.ecoder_user_id = info["userid"]
user.save!(:validate => false)
UserStatus.create!(:user_id => user.id, :changsets_count => 0, :watchers_count => 0)
ue = user.user_extensions ||= UserExtensions.new
ue.user_id = user.id
ue.save!
user
end
end
class AnonymousUser < User

@ -88,15 +88,28 @@ class GamesService
# tpm_script_modified = (shixun.reset_time > myshixun.reset_time ? true : false) # 新结构脚本是实时传送的,所以不会影响
# 区分评测过未评测过,未评测过按需求取数据
sql =
if max_query_index > 0
qurey_test_sets = TestSet.find_by_sql("SELECT o.actual_output, o.out_put, o.result, o.test_set_position, o.query_index,t.is_public,t.input, t.output, g.id as game_id, c.id as challenge_id FROM outputs o,games g ,challenges c,test_sets t where
g.id=#{game.id} and o.query_index=#{max_query_index} and g.id = o.game_id and c.id= g.challenge_id and t.challenge_id = c.id and t.position =o.test_set_position order by o.query_index
")
"SELECT
b.actual_output, b.out_put, b.result, a.is_public, a.input, a.output
FROM
(SELECT position, input, output, challenge_id, is_public FROM test_sets where challenge_id=6000) a
LEFT JOIN
(SELECT
result, test_set_position, g.challenge_id, o.actual_output, o.out_put
FROM
outputs o left join games g on g.id=o.game_id
WHERE
game_id=#{game.id} and query_index = #{max_query_index}
) b
ON
b.challenge_id = a.challenge_id and b.test_set_position = a.position"
else
qurey_test_sets = TestSet.find_by_sql("SELECT t.is_public,t.input, t.output,t.position FROM games g ,challenges c,test_sets t where
g.id=#{game.id} and c.id= g.challenge_id and t.challenge_id = c.id
")
"SELECT t.is_public, t.input, t.output, t.position
FROM games g ,challenges c,test_sets t
WHERE g.id=#{game.id} and c.id= g.challenge_id and t.challenge_id = c.id"
end
qurey_test_sets = TestSet.find_by_sql(sql)
# 测试集统计及处理
unless qurey_test_sets.blank?

@ -39,6 +39,20 @@
</li>
<% end %>
<% if @is_ecoder_user && !@is_set_password %>
<li class="clearfix">
<label class="second-label fl"><span class="color-orange">* </span>密码:</label>
<input name="new_password" type="password" class="winput-240-40 fl" placeholder="请输入密码">
<p class="notice color-orange fl"><span id="new_password_hint" class="none"><i class="fa fa-exclamation-circle mt7 mr5 fl"></i>密码最小长度为8位</span></p>
</li>
<li class="clearfix">
<label class="second-label fl"><span class="color-orange">* </span>重复密码:</label>
<input name="new_password_confirmation" type="password" class="winput-240-40 fl" placeholder="请输入密码">
<p class="notice color-orange fl"><span id="new_password_confirmation_hint" class="none"><i class="fa fa-exclamation-circle mt7 mr5 fl"></i>两次密码不匹配</span></p>
</li>
<% end %>
<li class="<%= @user.show_realname ? 'none' : '' %> clearfix" id="nickname_li">
<label class="second-label fl"><span class="color-orange">* </span>昵称:</label>
<input type="text" id="nickname" name="nickname" maxlength="20" value="<%= @user.nickname %>" class="winput-240-40 fl" placeholder="填写昵称">

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

@ -2,10 +2,10 @@
<%= link_to image_tag("/images/educoder/headNavLogo.png", alt:"高校智能化教学与实训平台", class:"logoimg"), home_path %>
<div class="head-nav pr">
<ul id="header-nav">
<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="<%= subjects_controller.include?(params[:controller]) ? " active" : "" %>"><%= link_to "实训课程", subjects_path %></li>
<li class="<%= course_controller.include?(params[:controller]) ? " 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>
<li class="pr<%= shixuns_controller.include?(params[:controller]) ? " 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? %>
@ -18,10 +18,10 @@
</ul>
</li>
<% end %>
<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>
<li class="<%= params[:controller] == "competitions" ? " active" : "" %>"><%= link_to "竞赛", competitions_path %></li>
<li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "问答", forums_path %></li>
<% if User.current.ec_school.present? %>
<li class="<%= params[:controller] == "ecs" ? " active" : "" %>" id="ec_banner">
<li class="<%= ecs_controller.include?(params[:controller]) ? " active" : "" %>" id="ec_banner">
<%= link_to "认证", department_ecs_path(:school_id => User.current.ec_school) %>
</li>
<% end %>

@ -91,22 +91,19 @@
document.getElementById('nHeader').style.left=sl+'px';
}
$(function () {
<% if params[:action] == "index" %>
var $header = $("#header-nav").children("li");
<% case params[:controller] %>
<% when "welcome" %>
<% if params[:controller] == "welcome" %>
$("#header-nav").children("li").eq(0).addClass("active");
<% when "shixuns" %>
<% elsif subjects_controller.include?(params[:controller]) %>
$("#header-nav").children("li").eq(1).addClass("active");
<% when "subjects" %>
<% elsif course_controller.include?(params[:controller]) %>
$("#header-nav").children("li").eq(2).addClass("active");
<% when "courses" %>
$header.length == 7 ? $header.eq(4).addClass("active") : $header.eq(3).addClass("active");
<% when "competitions" %>
<% elsif shixuns_controller.include?(params[:controller]) %>
$header.length == 7 ? $header.eq(2).addClass("active") : $header.eq(3).addClass("active");
<% elsif params[:controller] == "competitions" %>
$header.length == 7 ? $header.eq(5).addClass("active") : $header.eq(4).addClass("active");
<% when "forums" %>
<% elsif params[:controller] == "forums" %>
$header.length == 7 ? $header.eq(6).addClass("active") : $header.eq(5).addClass("active");
<% end %>
<% end %>
})
</script>

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

@ -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,6 @@
class AddEcoderUserIdToUsers < ActiveRecord::Migration
def change
add_column :users, :ecoder_user_id, :integer, default: 0
add_index :users, :ecoder_user_id
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,8 @@
class AddIndexToHomework < ActiveRecord::Migration
def change
add_index :homework_detail_manuals, :homework_common_id
add_index :homework_commons_shixuns, :homework_common_id
add_index :student_works_evaluation_distributions, :student_work_id
add_index :tidings, :container_id
end
end

@ -0,0 +1,5 @@
class AddProductcodeToUcloudService < ActiveRecord::Migration
def change
add_column :ecloud_services, :productcode, :string
end
end

@ -0,0 +1,6 @@
class AddUseridToEcloudLog < ActiveRecord::Migration
def change
add_column :ecloud_logs, :userid, :integer
add_column :ecloud_logs, :username, :string
end
end

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

@ -0,0 +1,6 @@
class AddOperatimeToEcloudUsers < ActiveRecord::Migration
def change
add_column :ecloud_users, :operatime, :bigint
add_column :ecloud_users, :effecttime, :bigint
end
end

@ -0,0 +1,75 @@
class CreateShixunStudentWorks < ActiveRecord::Migration
def up
ActiveRecord::Base.transaction do
begin
works = StudentWork.where("myshixun_id != 0 and myshixun_id not in (select id from myshixuns) and (work_score is null or work_score = 0)")
works.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)
shixun_works = StudentWork.where("myshixun_id != 0 and myshixun_id not in (select id from myshixuns) and work_score > 0")
shixun_works.each do |work|
shixun = work.homework_common.try(:homework_commons_shixuns).try(:shixun)
user = work.user
if shixun.present? && user.present?
# 创建新的myshixun和games
# fork版本库如果用户没有同步则先同步用户
g = Gitlab.client
if user.gid.nil?
s = Trustie::Gitlab::Sync.new
s.sync_user(user)
end
gshixun = g.fork(shixun.gpid, user.gid)
shixun_tomcat = Redmine::Configuration['shixun_tomcat']
code = down_generate_identifier("myshixun")
# 一般通过默认分支是否存在来判断一个项目是否fork成功
if gshixun.try(:id).present?
commit_id = g.commits(shixun.gpid).first.try(:id)
# educoder 加入到myshixun中
myshixun_admin_gid = User.where(:login => "educoder").first.try(:gid)
g.add_team_member(gshixun.id, myshixun_admin_gid, 40) # 40代表角色master
myshixun = Myshixun.create!(:shixun_id => shixun.id, :user_id => user.id, :identifier => code,
:modify_time => shixun.modify_time, :reset_time => shixun.reset_time,
:onclick_time => Time.now, :gpid => gshixun.id,
:git_url => gshixun.try(:path_with_namespace), :commit_id => commit_id)
rep_url = Base64.urlsafe_encode64(gitlab_url shixun) # 注意educoder为默认给实训创建版本库的用户如果换成别的用户名字要相应的修改
uri = "#{shixun_tomcat}/bridge/game/openGameInstance"
params = {tpiID: "#{myshixun.id}", tpmGitURL:rep_url, tpiRepoName: gshixun.try(:name)}
logger.info("openGameInstance params is #{params}")
res = uri_exec uri, params
if (res && res['code'].to_i != 0)
raise("实训云平台繁忙繁忙等级83")
end
# 其它创建关卡等操作
challenges = shixun.challenges
# 之所以增加user_id是为了方便统计查询性能
challenges.each_with_index do |challenge, index|
status = (index == 0 ? 0 : 3)
code = down_generate_identifier("game")
Game.create!(:challenge_id => challenge.id, :myshixun_id => myshixun.id, :status => status, :user_id => myshixun.user_id,
:open_time => Time.now, :identifier => code, :modify_time => challenge.modify_time)
end
work_score = work.final_score
work.homework_common.homework_challenge_settings.each do |setting|
if work_score > 1
games = myshixun.games.where(:challenge_id => setting.challenge_id).first
games.update_attributes(:status => 2, :end_time => Time.now, :final_score => setting.challenge.score)
work_score -= setting.score
end
end
work.update_column("myshixun_id", myshixun.id)
end
end
end
rescue Exception => e
puts ("###failed to exec shixun: current task id is #{e}")
g.delete_project(gshixun.id) if gshixun.try(:id).present?
raise ActiveRecord::Rollback
end
end
end
def down
end
end

@ -152,7 +152,7 @@ function changeDepValue(value, data) {
// 基本资料页面提交表单时,判断身份与单位是否合法
function my_account_form_submit() {
if ($("#nickname").val().trim() == '') {
if ($("#nickname").val().trim() === "") {
$("#nickname").focus();
$("#nickname_hint").show();
e.stopImmediatePropagation();
@ -161,6 +161,8 @@ function my_account_form_submit() {
$("#nickname_hint").hide();
}
//姓名不能为空
if ($("#lastname").val().trim() == '') {
$("#lastname").focus();

@ -1483,7 +1483,6 @@ function my_account_form_submit() {
if ($("input[name='lastname']").val().trim() == '') {
$("#lastname").focus();
$("#lastname_hint").show();
e.stopImmediatePropagation();
return;
} else {
$("#lastname_hint").hide();
@ -1516,16 +1515,31 @@ function my_account_form_submit() {
if ($("#nickname").val().trim() == '') {
$("#nickname").focus();
$("#nickname_hint").show();
e.stopImmediatePropagation();
return;
} else {
$("#nickname_hint").hide();
}
}
if($("input[name='new_password']").val().length<8){
$("#new_password").focus();
$("#new_password_hint").show();
return;
} else {
$("#new_password_hint").hide();
}
if($("input[name='new_password']").val() !== $("input[name='new_password_confirmation']").val() ){
$("#new_password_confirmation").focus();
$("#new_password_confirmation_hint").show();
return;
} else {
$("#new_password_confirmation_hint").hide();
}
if ($("#userIdentity").val() == -1) {
$("#identity_hint").show();
e.stopImmediatePropagation(); // 阻止事件冒泡
return;
} else{
$("#identity_hint").hide();
@ -1533,7 +1547,6 @@ function my_account_form_submit() {
if ($("#userIdentity").val() == 0 && $("#teacher").val() == "0") {
$("#te_technical_hint").show();
e.stopImmediatePropagation();
return;
} else{
$("#te_technical_hint").hide();
@ -1541,7 +1554,6 @@ function my_account_form_submit() {
if ($("#userIdentity").val() == 2 && $("#profession").val() == "0") {
$("#pro_technical_hint").show();
e.stopImmediatePropagation();
return;
} else{
$("#pro_technical_hint").hide();
@ -1554,7 +1566,6 @@ function my_account_form_submit() {
} else{
$("#student_id_hint").html('<i class="fa fa-minus-circle mt7 mr5 fl"></i>学号只能由数字和字母组成</span>').show();
}
e.stopImmediatePropagation();
return;
} else{
$("#student_id_hint").hide();

@ -1,88 +1,88 @@
{
"./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.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.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.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",
"./static/js/21.6e5a22af.chunk.js.map": "./static/js/21.6e5a22af.chunk.js.map",
"./static/js/22.7c073e45.chunk.js": "./static/js/22.7c073e45.chunk.js",
"./static/js/22.7c073e45.chunk.js.map": "./static/js/22.7c073e45.chunk.js.map",
"./static/js/23.0abe5b59.chunk.js": "./static/js/23.0abe5b59.chunk.js",
"./static/js/23.0abe5b59.chunk.js.map": "./static/js/23.0abe5b59.chunk.js.map",
"./static/js/24.e1553222.chunk.js": "./static/js/24.e1553222.chunk.js",
"./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.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.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.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",
"static/media/courses.jpg": "static/media/courses.7b27495b.jpg",
"static/media/group.png": "static/media/group.2f91e9cd.png",
"static/media/introduceback.jpg": "static/media/introduceback.3d75d3db.jpg",
"static/media/logo.svg": "static/media/logo.5d5d9eef.svg",
"static/media/match_ad.jpg": "static/media/match_ad.4e957369.jpg",
"static/media/message.svg": "static/media/message.c4f86b97.svg",
"static/media/messagegrey.svg": "static/media/messagegrey.31dd74f4.svg",
"static/media/nodata.png": "static/media/nodata.cde5b659.png",
"static/media/passall.png": "static/media/passall.46817e26.png",
"static/media/passpart.png": "static/media/passpart.4aaf3e6b.png",
"static/media/rc-tree.png": "static/media/rc-tree.776c7fe6.png",
"static/media/search.svg": "static/media/search.0e1dcc19.svg",
"static/media/vedio.png": "static/media/vedio.6a98b4f1.png"
"./static/js/0.f26528b1.chunk.js": "./static/js/0.f26528b1.chunk.js",
"./static/js/0.f26528b1.chunk.js.map": "./static/js/0.f26528b1.chunk.js.map",
"./static/js/1.cc33d6fc.chunk.js": "./static/js/1.cc33d6fc.chunk.js",
"./static/js/1.cc33d6fc.chunk.js.map": "./static/js/1.cc33d6fc.chunk.js.map",
"./static/js/10.943803f2.chunk.js": "./static/js/10.943803f2.chunk.js",
"./static/js/10.943803f2.chunk.js.map": "./static/js/10.943803f2.chunk.js.map",
"./static/js/11.c1a78f08.chunk.js": "./static/js/11.c1a78f08.chunk.js",
"./static/js/11.c1a78f08.chunk.js.map": "./static/js/11.c1a78f08.chunk.js.map",
"./static/js/12.fd69873b.chunk.js": "./static/js/12.fd69873b.chunk.js",
"./static/js/12.fd69873b.chunk.js.map": "./static/js/12.fd69873b.chunk.js.map",
"./static/js/13.d7c70bf4.chunk.js": "./static/js/13.d7c70bf4.chunk.js",
"./static/js/13.d7c70bf4.chunk.js.map": "./static/js/13.d7c70bf4.chunk.js.map",
"./static/js/14.af9b2fb8.chunk.js": "./static/js/14.af9b2fb8.chunk.js",
"./static/js/14.af9b2fb8.chunk.js.map": "./static/js/14.af9b2fb8.chunk.js.map",
"./static/js/15.05fc7db4.chunk.js": "./static/js/15.05fc7db4.chunk.js",
"./static/js/15.05fc7db4.chunk.js.map": "./static/js/15.05fc7db4.chunk.js.map",
"./static/js/16.efbbac6a.chunk.js": "./static/js/16.efbbac6a.chunk.js",
"./static/js/16.efbbac6a.chunk.js.map": "./static/js/16.efbbac6a.chunk.js.map",
"./static/js/17.17bd092d.chunk.js": "./static/js/17.17bd092d.chunk.js",
"./static/js/17.17bd092d.chunk.js.map": "./static/js/17.17bd092d.chunk.js.map",
"./static/js/18.24d189e1.chunk.js": "./static/js/18.24d189e1.chunk.js",
"./static/js/18.24d189e1.chunk.js.map": "./static/js/18.24d189e1.chunk.js.map",
"./static/js/19.cadd2a48.chunk.js": "./static/js/19.cadd2a48.chunk.js",
"./static/js/19.cadd2a48.chunk.js.map": "./static/js/19.cadd2a48.chunk.js.map",
"./static/js/2.9a1bdcfa.chunk.js": "./static/js/2.9a1bdcfa.chunk.js",
"./static/js/2.9a1bdcfa.chunk.js.map": "./static/js/2.9a1bdcfa.chunk.js.map",
"./static/js/20.5086cbe2.chunk.js": "./static/js/20.5086cbe2.chunk.js",
"./static/js/20.5086cbe2.chunk.js.map": "./static/js/20.5086cbe2.chunk.js.map",
"./static/js/21.d3d939d5.chunk.js": "./static/js/21.d3d939d5.chunk.js",
"./static/js/21.d3d939d5.chunk.js.map": "./static/js/21.d3d939d5.chunk.js.map",
"./static/js/22.234575f5.chunk.js": "./static/js/22.234575f5.chunk.js",
"./static/js/22.234575f5.chunk.js.map": "./static/js/22.234575f5.chunk.js.map",
"./static/js/23.67ab77f0.chunk.js": "./static/js/23.67ab77f0.chunk.js",
"./static/js/23.67ab77f0.chunk.js.map": "./static/js/23.67ab77f0.chunk.js.map",
"./static/js/24.27d7be07.chunk.js": "./static/js/24.27d7be07.chunk.js",
"./static/js/24.27d7be07.chunk.js.map": "./static/js/24.27d7be07.chunk.js.map",
"./static/js/25.c8a915ae.chunk.js": "./static/js/25.c8a915ae.chunk.js",
"./static/js/25.c8a915ae.chunk.js.map": "./static/js/25.c8a915ae.chunk.js.map",
"./static/js/26.488c5233.chunk.js": "./static/js/26.488c5233.chunk.js",
"./static/js/26.488c5233.chunk.js.map": "./static/js/26.488c5233.chunk.js.map",
"./static/js/27.ba45f1d3.chunk.js": "./static/js/27.ba45f1d3.chunk.js",
"./static/js/27.ba45f1d3.chunk.js.map": "./static/js/27.ba45f1d3.chunk.js.map",
"./static/js/28.8071de5d.chunk.js": "./static/js/28.8071de5d.chunk.js",
"./static/js/28.8071de5d.chunk.js.map": "./static/js/28.8071de5d.chunk.js.map",
"./static/js/29.67275bf0.chunk.js": "./static/js/29.67275bf0.chunk.js",
"./static/js/29.67275bf0.chunk.js.map": "./static/js/29.67275bf0.chunk.js.map",
"./static/js/3.935bae8c.chunk.js": "./static/js/3.935bae8c.chunk.js",
"./static/js/3.935bae8c.chunk.js.map": "./static/js/3.935bae8c.chunk.js.map",
"./static/js/30.4964944f.chunk.js": "./static/js/30.4964944f.chunk.js",
"./static/js/30.4964944f.chunk.js.map": "./static/js/30.4964944f.chunk.js.map",
"./static/js/31.5a1072f1.chunk.js": "./static/js/31.5a1072f1.chunk.js",
"./static/js/31.5a1072f1.chunk.js.map": "./static/js/31.5a1072f1.chunk.js.map",
"./static/js/32.2ff1fc95.chunk.js": "./static/js/32.2ff1fc95.chunk.js",
"./static/js/32.2ff1fc95.chunk.js.map": "./static/js/32.2ff1fc95.chunk.js.map",
"./static/js/4.017bf48d.chunk.js": "./static/js/4.017bf48d.chunk.js",
"./static/js/4.017bf48d.chunk.js.map": "./static/js/4.017bf48d.chunk.js.map",
"./static/js/5.27b42764.chunk.js": "./static/js/5.27b42764.chunk.js",
"./static/js/5.27b42764.chunk.js.map": "./static/js/5.27b42764.chunk.js.map",
"./static/js/6.1d80a66b.chunk.js": "./static/js/6.1d80a66b.chunk.js",
"./static/js/6.1d80a66b.chunk.js.map": "./static/js/6.1d80a66b.chunk.js.map",
"./static/js/7.03d1beb1.chunk.js": "./static/js/7.03d1beb1.chunk.js",
"./static/js/7.03d1beb1.chunk.js.map": "./static/js/7.03d1beb1.chunk.js.map",
"./static/js/8.ea688812.chunk.js": "./static/js/8.ea688812.chunk.js",
"./static/js/8.ea688812.chunk.js.map": "./static/js/8.ea688812.chunk.js.map",
"./static/js/9.2971266e.chunk.js": "./static/js/9.2971266e.chunk.js",
"./static/js/9.2971266e.chunk.js.map": "./static/js/9.2971266e.chunk.js.map",
"main.css": "./static/css/main.80b6ec5e.css",
"main.css.map": "./static/css/main.80b6ec5e.css.map",
"main.js": "./static/js/main.b4ee5e8a.js",
"main.js.map": "./static/js/main.b4ee5e8a.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",
"static\\media\\courses.jpg": "static/media/courses.7b27495b.jpg",
"static\\media\\group.png": "static/media/group.2f91e9cd.png",
"static\\media\\introduceback.jpg": "static/media/introduceback.3d75d3db.jpg",
"static\\media\\logo.svg": "static/media/logo.ee7cd8ed.svg",
"static\\media\\match_ad.jpg": "static/media/match_ad.4e957369.jpg",
"static\\media\\message.svg": "static/media/message.a7af2a8f.svg",
"static\\media\\messagegrey.svg": "static/media/messagegrey.8c1dff55.svg",
"static\\media\\nodata.png": "static/media/nodata.cde5b659.png",
"static\\media\\passall.png": "static/media/passall.46817e26.png",
"static\\media\\passpart.png": "static/media/passpart.4aaf3e6b.png",
"static\\media\\rc-tree.png": "static/media/rc-tree.776c7fe6.png",
"static\\media\\search.svg": "static/media/search.0e1dcc19.svg",
"static\\media\\vedio.png": "static/media/vedio.6a98b4f1.png"
}

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

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

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