Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

video_transcode
杨树林 5 years ago
commit e6dcd4717d

@ -36,8 +36,8 @@ class ExaminationBanksController < ApplicationController
end end
current_user.item_baskets.destroy_all current_user.item_baskets.destroy_all
render_ok({exam_id: exam.id})
end end
render_ok
rescue ApplicationService::Error => ex rescue ApplicationService::Error => ex
render_error(ex.message) render_error(ex.message)
end end

@ -128,7 +128,7 @@ class HomeworkCommonsController < ApplicationController
if @homework.publish_time.blank? || (@homework.publish_time > Time.now) if @homework.publish_time.blank? || (@homework.publish_time > Time.now)
@student_works = [] @student_works = []
if (params[:format] == "xlsx") || (params[:format] == "zip") if (params[:format] == "xlsx") || (params[:format] == "zip")
normal_status(-1,"作业未发布") normal_status(-1, "作业未发布")
end end
else else
if @user_course_identity == Course::STUDENT if @user_course_identity == Course::STUDENT
@ -182,7 +182,7 @@ class HomeworkCommonsController < ApplicationController
# 作品状态 0 未提交, 1 按时提交, 2 延迟提交 # 作品状态 0 未提交, 1 按时提交, 2 延迟提交
if params[:work_status].present? if params[:work_status].present?
params_work_status = params[:work_status] params_work_status = params[:work_status]
work_status = params_work_status.map{|status| status.to_i} work_status = params_work_status.map {|status| status.to_i}
if @homework.homework_type == "practice" if @homework.homework_type == "practice"
@student_works = @student_works.where(compelete_status: work_status) @student_works = @student_works.where(compelete_status: work_status)
else else
@ -241,17 +241,17 @@ class HomeworkCommonsController < ApplicationController
if @user_course_identity >= Course::STUDENT if @user_course_identity >= Course::STUDENT
tip_exception(403, "无权限操作") tip_exception(403, "无权限操作")
elsif @work_excel.blank? || @work_excel.size == 0 elsif @work_excel.blank? || @work_excel.size == 0
normal_status(-1,"暂无用户提交!") normal_status(-1, "暂无用户提交!")
elsif params[:export].present? && params[:export] elsif params[:export].present? && params[:export]
normal_status(0,"正在下载中") normal_status(0, "正在下载中")
else else
respond_to do |format| respond_to do |format|
format.xlsx{ format.xlsx {
set_export_cookies set_export_cookies
student_work_to_xlsx(@work_excel,@homework) student_work_to_xlsx(@work_excel, @homework)
exercise_export_name = "#{current_user.real_name}_#{@course.name}_#{@homework.name}_#{Time.now.strftime('%Y%m%d_%H%M%S')}" exercise_export_name = "#{current_user.real_name}_#{@course.name}_#{@homework.name}_#{Time.now.strftime('%Y%m%d_%H%M%S')}"
render xlsx: "#{exercise_export_name.strip}",template: "homework_commons/works_list.xlsx.axlsx",locals: render xlsx: "#{exercise_export_name.strip}", template: "homework_commons/works_list.xlsx.axlsx", locals:
{table_columns: @work_head_cells,task_users: @work_cells_column} {table_columns: @work_head_cells, task_users: @work_cells_column}
} }
end end
end end
@ -268,10 +268,10 @@ class HomeworkCommonsController < ApplicationController
if status == 0 if status == 0
if params[:export].present? && params[:export] if params[:export].present? && params[:export]
normal_status(0,"正在下载中") normal_status(0, "正在下载中")
else else
respond_to do |format| respond_to do |format|
format.zip{ format.zip {
set_export_cookies set_export_cookies
zipfile = zip_homework_common @homework, zip_works zipfile = zip_homework_common @homework, zip_works
file = decode64(zipfile[0][:base64file]) file = decode64(zipfile[0][:base64file])
@ -289,21 +289,14 @@ class HomeworkCommonsController < ApplicationController
def update_score def update_score
tip_exception("作业还未发布,暂不能计算成绩") if @homework.publish_time.nil? || @homework.publish_time > Time.now tip_exception("作业还未发布,暂不能计算成绩") if @homework.publish_time.nil? || @homework.publish_time > Time.now
begin
@homework.update_homework_work_score @homework.update_homework_work_score
normal_status("更新成功") normal_status("更新成功")
rescue Exception => e
uid_logger(e.message)
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end end
def update_student_score def update_student_score
work = @homework.student_works.find_by(user_id: current_user.id) work = @homework.student_works.find_by(user_id: current_user.id)
myshixun = Myshixun.find_by(shixun_id: params[:shixun_id], user_id: current_user.id) myshixun = Myshixun.find_by(shixun_id: params[:shixun_id], user_id: current_user.id)
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin
if work && myshixun if work && myshixun
challenge_settings = @homework.homework_challenge_settings challenge_settings = @homework.homework_challenge_settings
games = myshixun.games.where(challenge_id: challenge_settings.pluck(:challenge_id)) games = myshixun.games.where(challenge_id: challenge_settings.pluck(:challenge_id))
@ -312,11 +305,6 @@ class HomeworkCommonsController < ApplicationController
else else
normal_status("还未开启挑战,暂不能更新成绩") normal_status("还未开启挑战,暂不能更新成绩")
end end
rescue Exception => e
uid_logger(e.message)
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end end
end end
@ -382,7 +370,6 @@ class HomeworkCommonsController < ApplicationController
end end
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin
@homework = HomeworkCommon.new(homework_params) @homework = HomeworkCommon.new(homework_params)
@homework.reference_answer = params[:reference_answer].to_s.strip @homework.reference_answer = params[:reference_answer].to_s.strip
@homework.homework_type = @homework_type @homework.homework_type = @homework_type
@ -413,11 +400,6 @@ class HomeworkCommonsController < ApplicationController
else else
tip_exception("创建失败") tip_exception("创建失败")
end end
rescue Exception => e
uid_logger(e.message)
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end end
end end
@ -432,7 +414,6 @@ class HomeworkCommonsController < ApplicationController
end end
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin
@homework.update_attributes!(homework_params) @homework.update_attributes!(homework_params)
@homework.reference_answer = params[:reference_answer].to_s.strip @homework.reference_answer = params[:reference_answer].to_s.strip
@ -451,11 +432,7 @@ class HomeworkCommonsController < ApplicationController
Attachment.associate_container(params[:reference_attachment_ids], @homework.id, @homework.class, 2) if params[:reference_attachment_ids] Attachment.associate_container(params[:reference_attachment_ids], @homework.id, @homework.class, 2) if params[:reference_attachment_ids]
normal_status(0, "更新成功") normal_status(0, "更新成功")
rescue Exception => e
uid_logger(e.message)
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end end
end end
@ -467,7 +444,6 @@ class HomeworkCommonsController < ApplicationController
end end
def update_settings def update_settings
begin
# 课堂结束后不能再更新 # 课堂结束后不能再更新
unless @course.is_end unless @course.is_end
@ -515,7 +491,7 @@ class HomeworkCommonsController < ApplicationController
# tip_exception("challenge_id参数的长度与challenge_score参数的长度不匹配") if # tip_exception("challenge_id参数的长度与challenge_score参数的长度不匹配") if
# params[:challenge_settings][:challenge_score].length != params[:challenge_settings][:challenge_id].length # params[:challenge_settings][:challenge_score].length != params[:challenge_settings][:challenge_id].length
sum_challenge_score = params[:challenge_settings].pluck(:challenge_score).reject(&:blank?)&.map{|score| score.to_f}.sum sum_challenge_score = params[:challenge_settings].pluck(:challenge_score).reject(&:blank?)&.map {|score| score.to_f}.sum
total_score = params[:work_efficiency] ? (params[:eff_score].to_f + sum_challenge_score) : sum_challenge_score total_score = params[:work_efficiency] ? (params[:eff_score].to_f + sum_challenge_score) : sum_challenge_score
tip_exception("分值之和必须等于总分值:#{params[:total_score]}") if params[:total_score].to_f.round(2) != total_score.to_f.round(2) tip_exception("分值之和必须等于总分值:#{params[:total_score]}") if params[:total_score].to_f.round(2) != total_score.to_f.round(2)
@ -760,11 +736,6 @@ class HomeworkCommonsController < ApplicationController
# uid_logger(ex.message) # uid_logger(ex.message)
# render_error(ex.message) # render_error(ex.message)
# raise ActiveRecord::Rollback # raise ActiveRecord::Rollback
rescue Exception => e
uid_logger(e.backtrace)
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end end
# 选用实训 # 选用实训
@ -830,7 +801,7 @@ class HomeworkCommonsController < ApplicationController
## 分页参数 ## 分页参数
page = params[:page] || 1 page = params[:page] || 1
limit = params[:limit] || 15 limit = params[:limit] || 15
offset = (page.to_i-1) * limit offset = (page.to_i - 1) * limit
# 最热排序 # 最热排序
if reorder == "myshixun_count" if reorder == "myshixun_count"
@ -935,16 +906,14 @@ class HomeworkCommonsController < ApplicationController
if params[:detail].blank? if params[:detail].blank?
tip_exception("缺少截止时间参数") if params[:end_time].blank? tip_exception("缺少截止时间参数") if params[:end_time].blank?
tip_exception("截止时间不能早于当前时间") if params[:end_time] <= strf_time(Time.now) tip_exception("截止时间不能早于当前时间") if params[:end_time] <= strf_time(Time.now)
tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if @course.end_date.present? && params[:end_time] > strf_time(@course.end_date.end_of_day)
@course.end_date.present? && params[:end_time] > strf_time(@course.end_date.end_of_day)
else else
tip_exception("缺少分班截止时间参数") if params[:group_end_times].blank? tip_exception("缺少分班截止时间参数") if params[:group_end_times].blank?
group_end_times = params[:group_end_times].reject(&:blank?)&.map{|time| time.to_time} group_end_times = params[:group_end_times].reject(&:blank?)&.map {|time| time.to_time}
tip_exception("截止时间和分班参数的个数不一致") if group_end_times.length != group_ids.length tip_exception("截止时间和分班参数的个数不一致") if group_end_times.length != group_ids.length
group_end_times.each do |time| group_end_times.each do |time|
tip_exception("分班截止时间不能早于当前时间") if time <= Time.now tip_exception("分班截止时间不能早于当前时间") if time <= Time.now
tip_exception("分班截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if tip_exception("分班截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if @course.end_date.present? && time > @course.end_date.end_of_day
@course.end_date.present? && time > @course.end_date.end_of_day
end end
end end
@ -955,7 +924,6 @@ class HomeworkCommonsController < ApplicationController
publish_groups = charge_group_ids & group_ids if group_ids publish_groups = charge_group_ids & group_ids if group_ids
# ActiveRecord::Base.transaction do # ActiveRecord::Base.transaction do
begin
homeworks.each do |homework| homeworks.each do |homework|
# 作业未发布时 # 作业未发布时
if homework.homework_detail_manual.try(:comment_status) == 0 if homework.homework_detail_manual.try(:comment_status) == 0
@ -1030,7 +998,7 @@ class HomeworkCommonsController < ApplicationController
end end
# 补交结束时间 # 补交结束时间
homework.late_time = Time.at(homework.end_time.to_i + 30*24*3600) if homework.allow_late && homework.late_time.nil? homework.late_time = Time.at(homework.end_time.to_i + 30 * 24 * 3600) if homework.allow_late && homework.late_time.nil?
homework.save! homework.save!
@ -1038,11 +1006,7 @@ class HomeworkCommonsController < ApplicationController
# HomeworkPublishUpdateWorkStatusJob.perform_later(tiding_group_ids, homework.id) # HomeworkPublishUpdateWorkStatusJob.perform_later(tiding_group_ids, homework.id)
end end
normal_status(0, "发布成功") normal_status(0, "发布成功")
rescue Exception => e
uid_logger(e.message)
tip_exception("发布失败")
raise ActiveRecord::Rollback
end
# end # end
end end
@ -1074,7 +1038,6 @@ class HomeworkCommonsController < ApplicationController
group_ids = params[:group_ids]&.reject(&:blank?)&.map(&:to_i) group_ids = params[:group_ids]&.reject(&:blank?)&.map(&:to_i)
end_groups = charge_group_ids & group_ids if group_ids end_groups = charge_group_ids & group_ids if group_ids
begin
homeworks.each do |homework| homeworks.each do |homework|
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
homework_detail_manual = homework.homework_detail_manual homework_detail_manual = homework.homework_detail_manual
@ -1119,11 +1082,6 @@ class HomeworkCommonsController < ApplicationController
HomeworkEndUpdateScoreJob.perform_later(homework.id) if !homework.allow_late && homework.end_time <= time HomeworkEndUpdateScoreJob.perform_later(homework.id) if !homework.allow_late && homework.end_time <= time
end end
normal_status(0, "更新成功") normal_status(0, "更新成功")
rescue Exception => e
uid_logger(e.message)
tip_exception("操作失败")
raise ActiveRecord::Rollback
end
end end
def set_public def set_public
@ -1156,7 +1114,6 @@ class HomeworkCommonsController < ApplicationController
# 删除多个作业 # 删除多个作业
def multi_destroy def multi_destroy
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin
homeworks = @course.homework_commons.where(id: params[:homework_ids]) homeworks = @course.homework_commons.where(id: params[:homework_ids])
homeworks.destroy_all homeworks.destroy_all
@ -1164,11 +1121,6 @@ class HomeworkCommonsController < ApplicationController
StudentWork.where(homework_common_id: homeworks.pluck(:id)).destroy_all StudentWork.where(homework_common_id: homeworks.pluck(:id)).destroy_all
normal_status(0, "删除成功") normal_status(0, "删除成功")
rescue Exception => e
uid_logger(e.message)
tip_exception("删除失败")
raise ActiveRecord::Rollback
end
end end
end end
@ -1178,7 +1130,6 @@ class HomeworkCommonsController < ApplicationController
homeworks.each do |homework| homeworks.each do |homework|
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin
homework_bank = current_user.homework_banks.find_by(homework_common_id: homework.id) homework_bank = current_user.homework_banks.find_by(homework_common_id: homework.id)
if homework_bank.present? if homework_bank.present?
# 如果作业加入过题库则更新参数 # 如果作业加入过题库则更新参数
@ -1208,11 +1159,6 @@ class HomeworkCommonsController < ApplicationController
homework.update_attributes!(homework_bank_id: new_homework_bank.id) homework.update_attributes!(homework_bank_id: new_homework_bank.id)
end end
rescue Exception => e
uid_logger(e.message)
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end end
end end
normal_status(0, "加入成功") normal_status(0, "加入成功")
@ -1229,7 +1175,7 @@ class HomeworkCommonsController < ApplicationController
# 班级作品查重 # 班级作品查重
def homework_code_repeat def homework_code_repeat
tip_exception(-1,"分班id不能为空!") if params[:group_ids].nil? tip_exception(-1, "分班id不能为空!") if params[:group_ids].nil?
shixun = @homework.shixuns.take shixun = @homework.shixuns.take
# 通过代码文件来判断语言 # 通过代码文件来判断语言
language = shixun.challenges.practice_type.pluck(:path).first language = shixun.challenges.practice_type.pluck(:path).first
@ -1270,13 +1216,13 @@ class HomeworkCommonsController < ApplicationController
normal_status("代码查重成功") normal_status("代码查重成功")
else else
if result.status == 1 if result.status == 1
tip_exception(-4,"代码查重异常,请稍后重试") tip_exception(-4, "代码查重异常,请稍后重试")
else else
tip_exception(-3,"正在查重,请在几分钟后刷新页面查看结果") tip_exception(-3, "正在查重,请在几分钟后刷新页面查看结果")
end end
end end
else else
tip_exception(-2,"平台目前支持java、python语言的查重<br/>其他语言正在规划中,敬请期待") tip_exception(-2, "平台目前支持java、python语言的查重<br/>其他语言正在规划中,敬请期待")
end end
end end
@ -1374,8 +1320,8 @@ class HomeworkCommonsController < ApplicationController
# 代码部分 # 代码部分
code_list = [] code_list = []
challenge.path.split("").each do |path| challenge.path.split("").each do |path|
if code_info.select{|info| path == info.origin_path}.size > 0 if code_info.select {|info| path == info.origin_path}.size > 0
info = code_info.select{|info| path == info.origin_path}[0] info = code_info.select {|info| path == info.origin_path}[0]
code_list << {path: path, origin_content: info.origin_content, target_content: info.target_content} code_list << {path: path, origin_content: info.origin_content, target_content: info.target_content}
end end
end end
@ -1461,7 +1407,7 @@ class HomeworkCommonsController < ApplicationController
user_rate = 0 user_rate = 0
# 计算每个关卡的相似度 # 计算每个关卡的相似度
challenges.each do |challenge| challenges.each do |challenge|
game_codes = results.user_lists.select{|user_list| user_list.user_id == user && game_codes = results.user_lists.select {|user_list| user_list.user_id == user &&
challenge.path.split("").include?(user_list.origin_path)} challenge.path.split("").include?(user_list.origin_path)}
# 先判断用户该关卡是否查重了 取多个待补充文件的平均值 # 先判断用户该关卡是否查重了 取多个待补充文件的平均值
if game_codes.count > 0 if game_codes.count > 0

@ -0,0 +1,274 @@
commit 8e0cf3730ba50f5fb95773d7ed3bfeab51cff640 (HEAD -> forge)
Author: dingyongkang <837816638@qq.com>
Date: Tue Feb 25 17:14:50 2020 +0800
合并请求模块
commit b0d10c14dd86c0db5bfa37da24587687e7570b60
Merge: ba41688b4 8a3afcbf0
Author: dingyongkang <837816638@qq.com>
Date: Wed Feb 19 20:02:46 2020 +0800
工单模块
commit ba41688b4b6116d677585a826e53ee0a7c3c3f7d
Author: dingyongkang <837816638@qq.com>
Date: Wed Feb 19 19:33:48 2020 +0800
工单部分
commit 8a3afcbf00835d67725ea9464b9abac16eb2a89c
Merge: 57415df2a 30ef541d4
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Wed Feb 19 19:12:18 2020 +0800
Merge branch 'forge' of https://bdgit.educoder.net/Hjqreturn/educoder into forge
commit 57415df2aa48aebc0b29a3d4725a06dcdb63d742
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Wed Feb 19 19:11:50 2020 +0800
issue的问题修复及pull_request的问题修复
commit 30ef541d40a1c7063a20423e3b95c73da8e9bf8c
Merge: 21ce82e9c ded428147
Author: caicai8 <1149225589@qq.com>
Date: Wed Feb 19 17:38:45 2020 +0800
Merge branch 'forge' of https://bdgit.educoder.net/Hjqreturn/educoder into forge
commit 21ce82e9c15724fc3b10c02ab3d0b5ed6670e86e
Author: caicai8 <1149225589@qq.com>
Date: Wed Feb 19 17:38:41 2020 +0800
动态列表
commit ded4281470613992a416be8b383e863136e2cd81
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Wed Feb 19 17:30:53 2020 +0800
修改csv的乱码问题
commit a5a5add7d662377ebd0a8b3796b761f043232f4a
Merge: d4132a802 b435933a5
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Wed Feb 19 15:12:01 2020 +0800
Merge branch 'forge' of https://bdgit.educoder.net/Hjqreturn/educoder into forge
commit d4132a802e5afa2d5f79d4540827348b8395edb1
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Wed Feb 19 15:10:56 2020 +0800
分支切换添加loading
commit b435933a54709da3ab4e167d1657348cea359de1
Author: caicai8 <1149225589@qq.com>
Date: Wed Feb 19 15:04:46 2020 +0800
动态-分页
commit b10091130e3bea8ff989ccd018505d19eb4dec29
Merge: 92fea708c 0d060af2f
Author: caicai8 <1149225589@qq.com>
Date: Wed Feb 19 11:59:48 2020 +0800
Merge branch 'forge' of https://bdgit.educoder.net/Hjqreturn/educoder into forge
commit 92fea708c48a27cd2fddb7ebb096dddc248129ca
Author: caicai8 <1149225589@qq.com>
Date: Wed Feb 19 11:59:45 2020 +0800
文件
commit a93837a062dacec33a277d50f504de9bf037f687
Author: caicai8 <1149225589@qq.com>
Date: Wed Feb 19 11:59:35 2020 +0800
动态
commit 0d060af2f926dc92482a76346abfc94d09cd32d1
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Tue Feb 18 18:43:56 2020 +0800
前端bug修复和后端问题
commit 42e8a78477525c32d98d2299c3826f0dc4f6e38f
Merge: 64d920039 d9e89e6fb
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Tue Feb 18 16:16:49 2020 +0800
Merge branch 'forge' of https://bdgit.educoder.net/Hjqreturn/educoder into forge
commit 64d920039a51196fff20b813938969e3c326e1c6
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Tue Feb 18 16:16:24 2020 +0800
一些bug修改
commit d9e89e6fb7934d9e215dc1e7c7d1f61093154b9a
Author: caicai8 <1149225589@qq.com>
Date: Tue Feb 18 16:12:18 2020 +0800
branch
commit 43e9c90439890056c94a2265296bda2626aef447
Author: caicai8 <1149225589@qq.com>
Date: Tue Feb 18 14:56:09 2020 +0800
从分支页面跳转到分支提交页面
commit 2e42ad82cafa3c3a96813e517253d825dddf8e27
Merge: 9a2dd0456 d3a9af7bb
Author: caicai8 <1149225589@qq.com>
Date: Tue Feb 18 13:34:48 2020 +0800
Merge branch 'forge' of https://bdgit.educoder.net/Hjqreturn/educoder into forge
commit 9a2dd0456eb2e25490d697ad539ac0ccf7a047cf
Author: caicai8 <1149225589@qq.com>
Date: Tue Feb 18 13:34:43 2020 +0800
package
commit d3a9af7bb3b4e0600f5bb7a26a349fe87eb49bc5
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Tue Feb 18 10:54:38 2020 +0800
前端样式修改
commit 5feb1f6e53b325822d305bbfcd4a6c644d9039dd
Author: caicai8 <1149225589@qq.com>
Date: Mon Feb 17 16:38:53 2020 +0800
clone_url
commit 2eefb0ed381211ec250470202e686c2465807c7d
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Fri Feb 14 19:03:58 2020 +0800
前端部分修改
commit 9990e3b5c50aa0c9a2c1e9f7442fa85208fa6211
Merge: 0f97b2edd 6a41049e1
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Fri Feb 14 14:46:52 2020 +0800
Merge branch 'forge' of https://bdgit.educoder.net/Hjqreturn/educoder into forge
commit 0f97b2eddae2551be9c155adf318d800f5dd8e58
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Fri Feb 14 14:46:17 2020 +0800
前端样式修复
commit 6a41049e1de36eda58d728e7eba2285db2ac68fa
Author: Jasder <2053003901@@qq.com>
Date: Thu Feb 13 22:48:40 2020 +0800
ADD some count
commit 36860fe5c2995331e87d6437c48cacd9155f3a16
Merge: 1f2a0c0e6 00cb5c061
Author: Jasder <2053003901@@qq.com>
Date: Thu Feb 13 22:44:17 2020 +0800
Merge branch 'forge' of http://bdgit.educoder.net/Hjqreturn/educoder into forge
commit 00cb5c0610f63eae6d4139a9cf1c536f5e048833
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Thu Feb 13 18:53:01 2020 +0800
修改entry的错误
commit 1f2a0c0e61ad320d6c54de0721c46c02677c43b6
Merge: a72b4f682 5a8fcf994
Author: Jasder <2053003901@@qq.com>
Date: Thu Feb 13 18:51:14 2020 +0800
fic bug
commit 5a8fcf994fcce0829e620cb5dd507de93606ee33
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Thu Feb 13 18:09:10 2020 +0800
修改
commit a72b4f68276babbf6c65ea877266af4251ba3410
Merge: 9a2ff48de 36ccf249b
Author: Jasder <2053003901@@qq.com>
Date: Thu Feb 13 18:01:51 2020 +0800
FIC merge bug
commit 9a2ff48de8c3a3f9f9958489bbe235b1f72319f7
Author: Jasder <2053003901@@qq.com>
Date: Thu Feb 13 17:59:20 2020 +0800
FIX 404 page bug
commit 36ccf249bf68542b4b9324d89c478789db12887b
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Thu Feb 13 17:53:16 2020 +0800
注释current_laboratory
commit adc7da1a3c541ed263daf8793bdb9af1e736900c
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Thu Feb 13 17:47:49 2020 +0800
修改appconfig.js
commit 6e6649aa096921a994bed0119eafc288d5ac5a29
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Thu Feb 13 17:40:39 2020 +0800
注释get_user_info里的current_laboratory
commit a447a0d10229275ad6c51903762c2175b2afb743
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Thu Feb 13 17:23:57 2020 +0800
change current_laboratory is nill error
commit 567d20caea58782d1e99058cb76fb1e1307f7b09
Merge: d66c0c2f3 0408f89cb
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Thu Feb 13 17:15:29 2020 +0800
Merge branch 'forge' of https://bdgit.educoder.net/Hjqreturn/educoder into forge
commit d66c0c2f31b717ed3fed6bcff74318a682768635
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Thu Feb 13 17:14:59 2020 +0800
修改settings/show.json
commit 0408f89cb37041a92deea969619873849198d99c
Merge: ef807c8ec 8933a1a91
Author: Jasder <2053003901@@qq.com>
Date: Thu Feb 13 17:12:02 2020 +0800
Merge branch 'forge' of http://bdgit.educoder.net/Hjqreturn/educoder into forge
commit ef807c8ecfc5fd5f1129d6ab4d2f1a6c16333dbd
Author: Jasder <2053003901@@qq.com>
Date: Thu Feb 13 17:10:23 2020 +0800
ADD 工单pull_requests 数据统计
commit 8933a1a916baa4805ac45c1970542d25a447f703
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Thu Feb 13 16:45:27 2020 +0800
build
commit 05266a3c3ff2e03573337965c4580d7cc771e4fb
Author: sylor_huang@126.com <sylor_huang@126.com>
Date: Thu Feb 13 16:33:23 2020 +0800
issue标签和里程碑
commit e2550b9d741835e1e59eed25a17e004d62dd0919
Author: dingyongkang <837816638@qq.com>
Date: T

@ -98,12 +98,12 @@ class Boards extends Component{
this.fetchBoards() this.fetchBoards()
this.fetchAll() this.fetchAll()
on('updateNavSuccess', this.updateNavSuccess) // on('updateNavSuccess', this.updateNavSuccess)
} }
componentWillUnmount() { // componentWillUnmount() {
off('updateNavSuccess', this.updateNavSuccess) // off('updateNavSuccess', this.updateNavSuccess)
} // }
updateNavSuccess = () => { updateNavSuccess = () => {
this.fetchBoards() this.fetchBoards()
if (this.props.match.params.boardId == this.state.boardid) { if (this.props.match.params.boardId == this.state.boardid) {
@ -112,7 +112,7 @@ class Boards extends Component{
} }
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
if ( prevProps.match.params.boardId != this.props.match.params.boardId ) { if ( prevProps.match.params.boardId !== this.props.match.params.boardId ) {
this.setState({ this.setState({
isSpin:true isSpin:true
}) })

@ -194,13 +194,11 @@ class Addcourses extends Component{
} }
submittojoinclass=()=>{ submittojoinclass=()=>{
debugger;
let{Addcoursestype}=this.state; let{Addcoursestype}=this.state;
this.setState({ this.setState({
isSpin:true isSpin:true
}) })
let {invite_code,professor,assistant_professor,student}=this.state; let {invite_code,professor,assistant_professor,student}=this.state;
invite_code="MBTAP";
if(invite_code===undefined||invite_code===""){ if(invite_code===undefined||invite_code===""){
this.setState({ this.setState({
invite_codetype:true, invite_codetype:true,

@ -23,7 +23,7 @@ const App = (props) => {
total, total,
staticList, staticList,
changeParams, changeParams,
initTotal initTotal,
} = props; } = props;
// const [datas, setDatas] = useState([]); // const [datas, setDatas] = useState([]);
// const [sortedInfo, setSortedInfo] = useState({}); // const [sortedInfo, setSortedInfo] = useState({});
@ -213,6 +213,7 @@ const App = (props) => {
} }
]; ];
useEffect(() => { useEffect(() => {
changeParams({ changeParams({
page: 1 page: 1
@ -224,6 +225,7 @@ const App = (props) => {
pathId && staticList(pathId); pathId && staticList(pathId);
} }
// const { // const {
// study_count, // study_count,
// course_study_count, // course_study_count,
@ -334,8 +336,9 @@ const mapStateToProps = (state) => {
return { return {
subject_info, subject_info,
other_info, other_info,
total total,
} }
}; };
const mapDispatchToProps = (dispatch) => ({ const mapDispatchToProps = (dispatch) => ({

@ -65,7 +65,6 @@ class RepositoryAddFileupload_files extends Component {
fileList = fileList.map(file => { fileList = fileList.map(file => {
if (file.response) { if (file.response) {
if (file.response.status===0) { if (file.response.status===0) {
} }
} }
return file; return file;
@ -76,12 +75,13 @@ class RepositoryAddFileupload_files extends Component {
}; };
onAttachmentRemove=(info)=>{ onAttachmentRemove=(info)=>{
console.log(info);
if(info.response){ if(info.response){
let shixunId = this.props.match.params.shixunId; let shixunId = this.props.match.params.shixunId;
let {message,filspath}=this.state; let {message,filspath}=this.state;
if(message===""||message===undefined){ if(message===""||message===undefined){
this.props.showNotification('删除文件请先填写提交信息'); this.props.showNotification('删除文件请先填写提交信息');
return return;
} }
let matchpath =this.props.match.path; let matchpath =this.props.match.path;

@ -12,14 +12,15 @@ import { fetchStaticList } from "../../services/staticService";
export const staticList = (id) => { export const staticList = (id) => {
return (dispatch, getState) => { return (dispatch, getState) => {
const { params, total_count, other_info } = getState().staticReducer; const { params, total_count, other_info } = getState().staticReducer;
// console.log('统计数据=====>>>>>', params);
if (total_count !== 0 && total_count === other_info.length) return; // if (total_count !== 0 && total_count === other_info.length) return;
fetchStaticList(id, params).then(res => { fetchStaticList(id, params).then(res => {
// console.log('统计数据=====>>>>>', res); // console.log('统计数据=====>>>>>', res);
const {data} = res; const {data} = res;
if (data.status === 0) { if (data.status === 0) {
dispatch({ dispatch({
type: types.GET_STATIC_INFO, type: types.GET_STATIC_INFO,
other_info:data.data.other_info,
payload: data.data payload: data.data
}); });
} }

@ -38,12 +38,14 @@ const initalState = {
const staticReducer = (state = initalState, action) => { const staticReducer = (state = initalState, action) => {
const { payload = {}, type } = action; const { payload = {}, type } = action;
const {subject_info, other_info = [], total = {}, total_count} = payload; const {subject_info, other_info = [], total = {}, total_count} = payload;
switch (type) { switch (type) {
case types.GET_STATIC_INFO: case types.GET_STATIC_INFO:
return { return {
...state, ...state,
subject_info, subject_info,
other_info: state.other_info.concat(other_info), other_info,
// other_info: state.other_info.concat(other_info),
total, total,
total_count, total_count,
params: Object.assign({}, state.params, { page: state.params.page + 1 }) params: Object.assign({}, state.params, { page: state.params.page + 1 })

Loading…
Cancel
Save