From 3c6360e5572383df381a332b670b52f966d55865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 12 Aug 2019 18:07:55 +0800 Subject: [PATCH 1/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/modules/courses/new/CoursesNew.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index dc96c211f..86789b8a2 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -554,9 +554,9 @@ class CoursesNew extends Component { {getFieldDecorator("period", { rules:[{ - required:true, + required:false, pattern: new RegExp(/^[0-9]\d*$/, "g"), - message: '不能小于0' + message: '' }], getValueFromEvent: (event) => { return event.target.value.replace(/\D/g,'') @@ -573,9 +573,9 @@ class CoursesNew extends Component { {getFieldDecorator("credit", { rules:[{ - required:true, + required:false, pattern: new RegExp(/^[0-9]\d*$/, "g"), - message: '不能小于0' + message: '' }], getValueFromEvent: (event) => { return event.target.value.replace(/\D/g,'') From 6ba5259708d710d3c71c8cd0b5f0a41b8c7fddc7 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 12 Aug 2019 18:12:48 +0800 Subject: [PATCH 2/4] index --- .../react/src/modules/courses/exercise/new/NullDisplay.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/exercise/new/NullDisplay.js b/public/react/src/modules/courses/exercise/new/NullDisplay.js index 079b1194f..b9bd893f9 100644 --- a/public/react/src/modules/courses/exercise/new/NullDisplay.js +++ b/public/react/src/modules/courses/exercise/new/NullDisplay.js @@ -103,14 +103,14 @@ class NullDisplay extends Component{ */}
{ - standard_answer.map((answers, index) => { - return
- 答案(填空{index+1}): + standard_answer.map((answers, _index) => { + return
+ 答案(填空{_index+1}):
{ answers.answer_text.map((item, itemIndex) => { return })} {/* {item} */} From b12b10f3a88804d3c9675c2d125f5daf0e7179fb Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Mon, 12 Aug 2019 18:26:16 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8C=BA=E5=88=86=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 359661d4b..db6ae7b57 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -354,7 +354,7 @@ class ApplicationController < ActionController::Base logger.info("--uri_exec: .....res is #{res}") JSON.parse(res) rescue Exception => e - uid_logger("--uri_exec: exception #{e.message}") + uid_logger_error("--uri_exec: exception #{e.message}") raise Educoder::TipException.new("实训平台繁忙(繁忙等级:84)") end end From 2b211412b383477ca527e7147ea42fa74f155deb Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 12 Aug 2019 18:44:55 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BC=98=E5=8C=96Model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/challenge.rb | 1 - app/models/shixun.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/challenge.rb b/app/models/challenge.rb index 8e4d2ae42..adb54fae9 100644 --- a/app/models/challenge.rb +++ b/app/models/challenge.rb @@ -1,7 +1,6 @@ class Challenge < ApplicationRecord # difficulty: 关卡难度: 1.简单 2.中等 3.困难 # show_type: 效果展示:-1.无效果 1.图片 2.apk/exe 3.txt 4.html 5.mp3 6.mp4 - default_scope { order("challenges.position asc") } belongs_to :shixun, :touch => true, counter_cache: true belongs_to :user diff --git a/app/models/shixun.rb b/app/models/shixun.rb index 1839edf93..81b444c0a 100644 --- a/app/models/shixun.rb +++ b/app/models/shixun.rb @@ -5,7 +5,7 @@ class Shixun < ApplicationRecord # hide_code: 隐藏代码窗口 # code_hidden: 隐藏代码目录 # task_pass: 跳关 - has_many :challenges, dependent: :destroy + has_many :challenges, -> {order("challenges.position asc")}, dependent: :destroy has_many :challenge_tags, through: :challenges has_many :myshixuns, :dependent => :destroy has_many :shixun_members, dependent: :destroy