From 2911459aa88763948667f25de91995b7b9aebbd5 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 27 Sep 2019 16:23:19 +0800 Subject: [PATCH 1/4] git log --- app/controllers/gits_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/gits_controller.rb b/app/controllers/gits_controller.rb index b52e75353..aa7ccd8cd 100644 --- a/app/controllers/gits_controller.rb +++ b/app/controllers/gits_controller.rb @@ -8,7 +8,10 @@ class GitsController < ApplicationController # 供 git-workhorse反向调用认证 def auth # HTTP_AUTHORIZATION: "Basic 这里base64编码的的密码(user:passwd)" + decodes = %W(2 3 4 5 6 7 8 9 a b c f e f g h i j k l m n o p q r s t u v w x y z) + rand_code = decodes.sample(10).join logger.info("11111112222223333 HTTP_AUTHORIZATION: #{request.env["HTTP_AUTHORIZATION"]}") + logger.info("1111111 git auth start: code is #{rand_code}, time is #{Time.now}") # logger.info("#########-----request_env: #{request.env}") # {"service"=>"git-receive-pack", "controller"=>"gits", "action"=>"auth", # "url"=>"forge01/cermyt39.git/info/refs"} @@ -68,6 +71,7 @@ class GitsController < ApplicationController authenticate_or_request_with_http_basic do |username, password| result + logger.info("1111111 git auth end: code is #{rand_code}, time is #{Time.now}") end end From 4e1e83f8fe394ffcb5fef3b2ee1b223e31e5c726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Sep 2019 18:13:51 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 4 ++-- .../tasks/GraduationTasksSubmitedit.js | 18 ++++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index bc7fa8070..42fa73857 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -84,9 +84,9 @@ export function initAxiosInterceptors(props) { } config.url = `${proxy}${url}`; if (config.url.indexOf('?') == -1) { - config.url = `${config.url}?debug=${debugType}`; + config.url = `${config.url}?debug=${'student'}`; } else { - config.url = `${config.url}&debug=${debugType}`; + config.url = `${config.url}&debug=${'student'}`; } } else { // 加api前缀 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 21d340200..02e7177fa 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -334,24 +334,22 @@ class GraduationTasksSubmitedit extends Component{ } - delecttask_status=(id,student_id)=>{ - let newid=id===undefined||id===null?student_id:id; + delecttask_status=(id)=>{ + let{selectmemberslist,task_status}=this.state; let newlist=task_status; let selects=selectmemberslist; for(var i=0; i 0 ?
this.delecttask_status(item.user_id,item.student_id)}> + onClick={() => this.delecttask_status(item.user_id)}>
: ""}
From 31fc3b373dbbd422e17ee2c234fb37ade837d1b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 27 Sep 2019 18:14:01 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 42fa73857..bc7fa8070 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -84,9 +84,9 @@ export function initAxiosInterceptors(props) { } config.url = `${proxy}${url}`; if (config.url.indexOf('?') == -1) { - config.url = `${config.url}?debug=${'student'}`; + config.url = `${config.url}?debug=${debugType}`; } else { - config.url = `${config.url}&debug=${'student'}`; + config.url = `${config.url}&debug=${debugType}`; } } else { // 加api前缀 From 2cd042f0947e442bdd0dd2224c1f409efb64ce58 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 28 Sep 2019 09:29:23 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=96=87=E4=BB=B6=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...27091948_change_user_p02389416_exercise.rb | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/db/migrate/20190927091948_change_user_p02389416_exercise.rb b/db/migrate/20190927091948_change_user_p02389416_exercise.rb index bea1e28b7..c4026f75b 100644 --- a/db/migrate/20190927091948_change_user_p02389416_exercise.rb +++ b/db/migrate/20190927091948_change_user_p02389416_exercise.rb @@ -6,15 +6,26 @@ class ChangeUserP02389416Exercise < ActiveRecord::Migration[5.2] # 分数分别为:2分,2分,5分,2分,2分,2分,2分,2分 合计19分 question_ids = [37411,37414,37417,37418,37419,37423,37424,37429] choice_ids = [117788,117797,117806,117809,117811,117816,117818,117828] + question_scores = [2,2,5,2,2,2,2,2] question_ids.each_with_index do |q, index| - ExerciseAnswer.create(user_id: 45442, exercise_question_id: q, exercise_choice_id: choice_ids[index]) + ex_exercise_user = ExerciseAnswer.where(user_id: 45442, exercise_question_id: q, exercise_choice_id: choice_ids[index]) + if ex_exercise_user.exists? + ex_exercise_user.first.update_attribute(:score,question_scores[index]) + else + ExerciseAnswer.create(user_id: 45442, exercise_question_id: q, exercise_choice_id: choice_ids[index], score: question_scores[index]) + end end ex_user = ExerciseUser.where(user_id: 45442, exercise_id: 2561)&.first if ex_user.present? - obj_score = ex_user.objective_score.to_i + 19 - total_score = ex_user.score.to_i + 19 + if ex_user.score > 65 || ex_user.objective_score > 65 + ex_user.update_attributes(score: 65, objective_score: 65) + else + obj_score = ex_user.objective_score.to_i + 19 + total_score = ex_user.score.to_i + 19 + + ex_user.update_attributes(score: total_score, objective_score: obj_score) + end - ex_user.update_attributes(score: total_score, objective_score: obj_score) end puts "====> end_to_create user exercise_answer"