From 21227f0ae51251505160c1cc5b27e7d021cc1341 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 3 Aug 2019 13:18:23 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=AE=9E=E8=AE=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7e9fd652b..7fedb4c5d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -62,15 +62,18 @@ module ApplicationHelper # shixun开启挑战对应的行为名及url def task_operation_url current_myshixun, shixun - url = "/shixuns/#{shixun.identifier}/shixun_exec" - name = - if current_myshixun.blank? - shixun.status == 0 ? "模拟实战" : "开启挑战" - elsif current_myshixun.status == 1 - "查看实战" + if current_myshixun.blank? + name = shixun.status == 0 ? "模拟实战" : "开启挑战" + url = "/shixuns/#{shixun.identifier}/shixun_exec" + else + identifier = current_myshixun.current_task(current_myshixun.games) + if current_myshixun.status == 1 + name = "查看实战" else - "继续挑战" + name = "继续挑战" end + url = identifier + end [name, url] end From 9b61716f1b2397bd32fa2dd20aaf4a694b404300 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 3 Aug 2019 13:29:22 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7fedb4c5d..099d45406 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -66,7 +66,7 @@ module ApplicationHelper name = shixun.status == 0 ? "模拟实战" : "开启挑战" url = "/shixuns/#{shixun.identifier}/shixun_exec" else - identifier = current_myshixun.current_task(current_myshixun.games) + identifier = current_myshixun.current_task(current_myshixun.games).try(:identifier) if current_myshixun.status == 1 name = "查看实战" else From c88e0b19f25ea9873b3fe4c4742a022b802853f9 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 3 Aug 2019 13:54:34 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=BF=90=E8=90=A5=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=9D=83=E9=99=90=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/decorators/course_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/decorators/course_decorator.rb b/app/decorators/course_decorator.rb index 9c76b058a..9c3340bbf 100644 --- a/app/decorators/course_decorator.rb +++ b/app/decorators/course_decorator.rb @@ -1,5 +1,5 @@ module CourseDecorator def can_visited? - is_public == 1 || User.current.admin? || User.current.member_of_course?(self) + is_public == 1 || User.current.admin_or_business? || User.current.member_of_course?(self) end end \ No newline at end of file From 337827d4a0eb8175f3956958f7ecee952d37a218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 3 Aug 2019 14:55:33 +0800 Subject: [PATCH 4/5] Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun # Conflicts: # public/react/src/modules/courses/exercise/Testpapersettinghomepage.js --- public/react/src/modules/message/js/MessagSub.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 8f27b16d0..ef0d35dd1 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -127,6 +127,7 @@ class MessagSub extends Component{ // 账号管理页-认证信息 return window.open("/account/certification") } + return ; case "CancelUserAuthentication" : // 账号管理页-认证信息 return window.open("/account/certification") @@ -142,6 +143,7 @@ class MessagSub extends Component{ // 账号管理页/account/profile return window.open("/account/profile") } + return ; case "ApplyAddSchools" : if(item.tiding_type==="Apply"){ // 单位审批 @@ -151,6 +153,7 @@ class MessagSub extends Component{ // 账号管理页 return window.open("/account/profile") } + return ; case "ApplyAction" : switch (item.parent_container_type) { case "ApplyShixun" : @@ -181,6 +184,7 @@ class MessagSub extends Component{ return window.open("/account/profile") } } + return ; case 'JoinCourse' : // 课堂详情页 :id = return window.open(`/courses/${item.belong_container_id}/teachers`) @@ -256,7 +260,10 @@ class MessagSub extends Component{ } case "Memo" : // 交流问答页 :id = parent_container_id - return window.open(`/forums/${item.parent_container_id}`) + return window.open(`/forums/${item.parent_container_id}`); + case "Message" : + // 交流问答页 :id = parent_container_id + return window.open(`/forums/`); case "Watcher" : // 用户个人中心页 :id = item.trigger_user.login return window.open(`/users/${item.trigger_user.login}/courses`) @@ -446,6 +453,9 @@ class MessagSub extends Component{ return window.open(`/moop_cases/${item.container_id}`) } case "ProjectPackage" : + if(item.tiding_type==="Destroyed"){ + return ; + } if(item.tiding_type==="Destroyed_end"){ return ; }else { @@ -529,6 +539,9 @@ class MessagSub extends Component{ if(item.tiding_type==="Destroyed_end"){ boolps=false; } + if(item.tiding_type==="Destroyed"){ + boolps=false; + } } if(item.container_type==="Course"){ if(item.tiding_type==="Delete"){ From f18ac3d17d457dffd4a1ea8aed500126d903072a Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 3 Aug 2019 15:03:33 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/memos_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 9d7beb6c1..4720210e3 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -191,7 +191,7 @@ class MemosController < ApplicationController tip_exception("话题名称不能为空") if params[:subject].blank? tip_exception("话题内容不能为空") if params[:content].blank? tip_exception("话题类型不能为空") if params[:forum_id].blank? - tip_exception("技术标签不能为空") if params[:tags].blank? + tip_exception("技术标签不能为空") if params[:forum_id].to_i == 5 && params[:tags].blank? end end