From cfbc63c0c77345a8024875c9fd3607f259902c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 30 Aug 2019 15:52:23 +0800 Subject: [PATCH 1/6] =?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/poll/PollNew.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 171a27c5e..0f1e810ab 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -2152,7 +2152,7 @@ class PollNew extends Component { arr[i].question.max_choices = length; }else{ arr[i].question.min_choices = parseInt(value); - arr[i].question.max_choices = length; + arr[i].question.max_choices = max; } }catch (e) { arr[i].question.min_choices = 2; From 44db7fbc4be00c4c15d77b5a6975f79237f17863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 30 Aug 2019 15:59:29 +0800 Subject: [PATCH 2/6] =?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/Index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 9f278e807..1b1c523c0 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -462,27 +462,25 @@ class CoursesIndex extends Component{ return ( {/*毕设任务题库详情*/} - () } > {/*毕设内容题库详情*/} - () } > - {/*GroupjobbankPage*/} {/*分组作业题库详情*/} - () } > - {/*Generaljobbankdetails*/} {/* 普通作业题库详情*/} - () } From 5ca5f67d56a85aa40925fb35b83619415039ef1e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 30 Aug 2019 16:04:38 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=95=88=E6=9E=9C?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/subjects_controller.rb | 2 +- app/views/games/picture_display.json.jbuilder | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index d97b7172c..77e1eee7d 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -440,7 +440,7 @@ class SubjectsController < ApplicationController # 用户进展和获取的标签 def user_subject_progress challenge_ids - pass_games = Game.select(:id, :cost_time, :challenge_id).where(status: 2, user_id: current_user.id, challenge_id: challenge_ids) if current_user.logged? + pass_games = Challenge.left_joins(:games).where(challenges: {id: challenge_ids},games: {status: 2, user_id: current_user.id}) if current_user.logged? @all_score = Challenge.where(id: challenge_ids).sum(:score) # 如果没有通关的,没必要再继续统计了 diff --git a/app/views/games/picture_display.json.jbuilder b/app/views/games/picture_display.json.jbuilder index eb2309f9b..7fdc2cfc1 100644 --- a/app/views/games/picture_display.json.jbuilder +++ b/app/views/games/picture_display.json.jbuilder @@ -19,7 +19,7 @@ if @type == "image" end elsif @type == "html" - json.iframe_src File.read("#{@user_path}/#{@user_picture[0]}")&.html_safe + json.iframe_src File.read("#{@user_path}/#{@user_picture[0]}")&.html_safe if @user_picture[0].present? elsif @type == "txt" json.contents @contents.to_s elsif @type =="qrcode" From dfa86d26640e2d7204a3e1e332b6d826e475ff31 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 30 Aug 2019 16:10:02 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/subjects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index 77e1eee7d..d97b7172c 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -440,7 +440,7 @@ class SubjectsController < ApplicationController # 用户进展和获取的标签 def user_subject_progress challenge_ids - pass_games = Challenge.left_joins(:games).where(challenges: {id: challenge_ids},games: {status: 2, user_id: current_user.id}) if current_user.logged? + pass_games = Game.select(:id, :cost_time, :challenge_id).where(status: 2, user_id: current_user.id, challenge_id: challenge_ids) if current_user.logged? @all_score = Challenge.where(id: challenge_ids).sum(:score) # 如果没有通关的,没必要再继续统计了 From a19771cb4cf1b8191e16e0de9349010c1371a809 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 30 Aug 2019 16:10:36 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/context/EvaluateSuccessEffectDisplay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/context/EvaluateSuccessEffectDisplay.js b/public/react/src/context/EvaluateSuccessEffectDisplay.js index ec34db31f..98e61520b 100644 --- a/public/react/src/context/EvaluateSuccessEffectDisplay.js +++ b/public/react/src/context/EvaluateSuccessEffectDisplay.js @@ -21,7 +21,7 @@ class EvaluateSuccessEffectDisplay extends Component { componentDidMount() { if (this.props.type == 'html') { const iframe = document.getElementById('_displayIframe') - if (iframe && iframe.contentWindow) { + if (iframe && iframe.contentWindow && this.props.iframe_src) { iframe.contentWindow.open() iframe.contentWindow.document.write(this.props.iframe_src); iframe.contentWindow.document.close(); From 4b6da7f1f6f1c90a46cbbce24366f14d22e7f75d Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 30 Aug 2019 16:27:59 +0800 Subject: [PATCH 6/6] repo path --- app/controllers/concerns/git_common.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/concerns/git_common.rb b/app/controllers/concerns/git_common.rb index 93f5fecd7..4bc566a05 100644 --- a/app/controllers/concerns/git_common.rb +++ b/app/controllers/concerns/git_common.rb @@ -47,6 +47,7 @@ module GitCommon def add_file @path, message, content = params[:path].strip, params[:message], params[:content] author_name, author_email = current_user.real_name, current_user.git_mail + Logger.info("...repo_path is #{@repo_path}") @content = GitService.update_file(repo_path: @repo_path, file_path: @path, message: message,