From afcdbedd398b5bcebeaea03a2f1ad2158900339c Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 22 Sep 2019 17:50:50 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=87=8D=E8=AF=95?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 4a087ae7a..d72c534a0 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -477,6 +477,10 @@ class GamesController < ApplicationController tip_exception("代码获取异常,请检查实训模板的评测设置是否正确") else # 报错继续retry + if params[:retry].to_i == 1 + # 如果报错了,并且retry 为1的时候,则fork一个新的仓库 + project_fork(@myshixun, @shixun.repo_path, current_user.login) + end tip_exception(-3, "#{e.message}") end end From 438eceed42f8580c24bb86ff422b406b8398cb90 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, 23 Sep 2019 10:27:19 +0800 Subject: [PATCH 02/11] =?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/tpm/NewHeader.js | 2 +- public/react/src/modules/user/usersInfo/InfosBanner.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 064a482c9..992c77fac 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -865,7 +865,7 @@ submittojoinclass=(value)=>{
  • 我的实训项目
  • 我的实践课程
  • 我的开发项目
  • -
  • 我的众包
  • + {/*
  • 我的众包
  • */}
  • 客户管理
  • diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js index 5e79a9b2b..23037f360 100644 --- a/public/react/src/modules/user/usersInfo/InfosBanner.js +++ b/public/react/src/modules/user/usersInfo/InfosBanner.js @@ -111,11 +111,11 @@ class InfosBanner extends Component{ onClick={() => this.setState({moduleName: 'projects'})} to={`/users/${username}/projects`}>开发项目 -
  • - this.setState({moduleName: 'package'})} - to={`/users/${username}/package`}>众包 -
  • + {/*
  • */} + {/* this.setState({moduleName: 'package'})}*/} + {/* to={`/users/${username}/package`}>众包*/} + {/*
  • */} {((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin) &&
  • Date: Mon, 23 Sep 2019 11:06:14 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E5=87=BA=E7=8E=B0=E9=87=8D=E8=AF=95?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=98=BE=E7=A4=BA=E5=A4=B4=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/MainContent.js | 6 +----- public/react/src/modules/page/MainContentContainer.js | 3 ++- public/react/src/modules/page/main/CodeRepositoryView.js | 6 +++++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js index 596da84af..a1b7566d0 100644 --- a/public/react/src/modules/page/MainContent.js +++ b/public/react/src/modules/page/MainContent.js @@ -144,11 +144,7 @@ class MainContent extends Component { {/* readRepoTimeout 如果读取代码超时,显示重新加载按钮,重新拉取代码 */} { st === 0 - ? - readRepoTimeout === true ?
    - 代码加载失败, this.props.fetchRepositoryCode(this.props, null, null, true, true)}>重试 -
    : + ?
    9) { this.setState({ - readRepoTimeout: true + readRepoTimeout: true, + codeLoading: false }) readingRepoTimes = 0; showSnackbar(`网络异常,请稍后重试。`); diff --git a/public/react/src/modules/page/main/CodeRepositoryView.js b/public/react/src/modules/page/main/CodeRepositoryView.js index ee2017ab3..758550d89 100644 --- a/public/react/src/modules/page/main/CodeRepositoryView.js +++ b/public/react/src/modules/page/main/CodeRepositoryView.js @@ -510,6 +510,10 @@ class CodeRepositoryView extends Component {
    + {this.props.readRepoTimeout === true ? :
    {/* 没必要显示这个,注释掉了 */} {/* { !isEditablePath && @@ -526,7 +530,7 @@ class CodeRepositoryView extends Component { {/* cm monaco 切换 */} {/* */} -
    +
    }
    {/* { tabIndex === STABLE_SSH_TAB_ID && this.state.sshData && } */} From bbe5c4856413d6f4d278ba5968ce439708a3f19e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 23 Sep 2019 11:14:42 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E9=87=8D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/page/main/CodeRepositoryView.js | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/page/main/CodeRepositoryView.js b/public/react/src/modules/page/main/CodeRepositoryView.js index 758550d89..74a170406 100644 --- a/public/react/src/modules/page/main/CodeRepositoryView.js +++ b/public/react/src/modules/page/main/CodeRepositoryView.js @@ -510,10 +510,7 @@ class CodeRepositoryView extends Component {
    - {this.props.readRepoTimeout === true ?
    - 代码加载失败, this.props.fetchRepositoryCode(this.props, null, null, true, true)}>重试 -
    : +
    {/* 没必要显示这个,注释掉了 */} {/* { !isEditablePath && @@ -523,14 +520,21 @@ class CodeRepositoryView extends Component {
    } */} -
    - {/**/} - {/* cm monaco 切换 */} - {/* */} - -
    } + {this.props.readRepoTimeout === true ?
    + 代码加载失败, this.props.fetchRepositoryCode(this.props, null, null, true, true)}>重试 +
    : + +
    + {/**/} + {/* cm monaco 切换 */} + {/* */} + +
    + } +
    {/* { tabIndex === STABLE_SSH_TAB_ID && this.state.sshData && } */} From 663443b57771cd1c619ea8c3c4206bb841fab18e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 23 Sep 2019 11:22:10 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/main/CodeRepositoryView.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/page/main/CodeRepositoryView.js b/public/react/src/modules/page/main/CodeRepositoryView.js index 74a170406..bae058dcd 100644 --- a/public/react/src/modules/page/main/CodeRepositoryView.js +++ b/public/react/src/modules/page/main/CodeRepositoryView.js @@ -474,7 +474,9 @@ class CodeRepositoryView extends Component { - { challenge.pathIndex !== -1 && game.status === 2 && tabIndex === 0 && + { challenge.pathIndex !== -1 && game.status === 2 && tabIndex === 0 && + this.props.readRepoTimeout !== true && + @@ -482,7 +484,7 @@ class CodeRepositoryView extends Component { } { - challenge.pathIndex !== -1 && tabIndex === 0 && + challenge.pathIndex !== -1 && tabIndex === 0 && this.props.readRepoTimeout !== true && @@ -491,7 +493,7 @@ class CodeRepositoryView extends Component { } { - tabIndex === 0 && + tabIndex === 0 && this.props.readRepoTimeout !== true && showSettingDrawer(true)}> From 000a503a7e507553683dc9695eaeaa796c0dd666 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, 23 Sep 2019 11:27:49 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/gradinforms/Bullsubdirectory.js | 2 +- .../react/src/modules/courses/gradinforms/myysleduinforms.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js index 496423f73..db4f89bfc 100644 --- a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js +++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js @@ -233,7 +233,7 @@ class Bullsubdirectory extends Component{ { whethertoeditysl === false?
    -
    +
    {myname} diff --git a/public/react/src/modules/courses/gradinforms/myysleduinforms.css b/public/react/src/modules/courses/gradinforms/myysleduinforms.css index 8376c63c8..a05dc9a63 100644 --- a/public/react/src/modules/courses/gradinforms/myysleduinforms.css +++ b/public/react/src/modules/courses/gradinforms/myysleduinforms.css @@ -70,6 +70,10 @@ .fudonyingxiangysl{ width: 100%; } +.fudonyingxiangysls{ + display: flex; + flex-direction:column; +} .yslbianji{ padding-top: 31px; From ed607d743726dfd620c5a77cd34b89683db63ec6 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, 23 Sep 2019 13:55:33 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/Listofworksstudentone.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index a5423b6e9..c2af8b331 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -3491,12 +3491,12 @@ class Listofworksstudentone extends Component { } { - homework_status.length===0? + homework_status&&homework_status.length&&homework_status.length===0?
    : - homework_status.length>0 && homework_status[0]==="未发布"? + homework_status&&homework_status.length>0 && homework_status&&homework_status[0]==="未发布"?
    @@ -3651,12 +3651,12 @@ class Listofworksstudentone extends Component { } { - homework_status.length===0? + homework_status&&homework_status.length===0?
    : - homework_status.length>0 && homework_status[0]==="未发布"? + homework_status&&homework_status.length>0 && homework_status&&homework_status[0]==="未发布"?
    From 587c0c3130174a51933c1d10b91e341b7e7b345a 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, 23 Sep 2019 14:09:21 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index c2af8b331..c600e01ff 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -3059,20 +3059,20 @@ class Listofworksstudentone extends Component { // console.log(this.props.isAdmin()); let course_is_end = this.props.current_user&&this.props.current_user.course_is_end; - try { - if(this.props.isAdmin() === false){ - if(teacherdata&&teacherdata.student_works){ - if(teacherdata&&teacherdata.student_works.length>0){ - console.log("这是双层页面。。。。"); - - } - } - - } - }catch (e) { - console.log("Listofworksstudentone123"); - console.log(e); - } + // try { + // if(this.props.isAdmin() === false){ + // if(teacherdata&&teacherdata.student_works){ + // if(teacherdata&&teacherdata.student_works.length>0){ + // console.log("这是双层页面。。。。"); + // + // } + // } + // + // } + // }catch (e) { + // console.log("Listofworksstudentone123"); + // console.log(e); + // } return ( @@ -3151,12 +3151,12 @@ class Listofworksstudentone extends Component { typs={this.state.typs} /> { - homework_status.length===0? + homework_status&&homework_status.length===0?
    : - homework_status.length>0 && homework_status[0]==="未发布"? + homework_status&&homework_status.length>0 && homework_status[0]==="未发布"?
    From 37101ef30d1e64da78dafbce13796cc02b9eabda Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 23 Sep 2019 14:23:45 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/NewWorkForm.js | 4 ++-- .../courses/graduation/topics/GraduateTopicPostWorksNew.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/NewWorkForm.js b/public/react/src/modules/courses/busyWork/NewWorkForm.js index 27413ba04..bc74576d3 100644 --- a/public/react/src/modules/courses/busyWork/NewWorkForm.js +++ b/public/react/src/modules/courses/busyWork/NewWorkForm.js @@ -479,7 +479,7 @@ class NewWorkForm extends Component{ - +

    @@ -488,7 +488,7 @@ class NewWorkForm extends Component{ >基于项目实施 - +

    )} diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicPostWorksNew.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicPostWorksNew.js index b53e4528b..38e68ad32 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicPostWorksNew.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicPostWorksNew.js @@ -382,7 +382,7 @@ class GraduateTopicPostWorksNew extends Component{ )} - (项目管理员角色的成员都可以提交作品,提交作品时需要关联同组成员,组内成员作品共享) + (学生提交作品时需要关联同组成员,组内成员作品共享) 基于项目实施 )} - (勾选后各小组必须在educoder平台创建项目,教师可随时观察平台对各小组最小进展的实时统计) + (选中,则必须在本平台创建项目,项目管理员可以提交作品;不选中,无需在平台创建项目,任意小组成员均可以提交作品)
    From 34aba1eb2f37e2099a1779518d54800db4f9ca28 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 23 Sep 2019 14:32:20 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E6=88=90=E7=BB=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/homework_common.rb | 5 +++++ app/views/homework_commons/works_list.json.jbuilder | 1 + 2 files changed, 6 insertions(+) diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index 4c8f94a42..5fc7318e2 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -134,6 +134,11 @@ class HomeworkCommon < ApplicationRecord self.homework_type == 'practice' && self.publish_time.present? && self.publish_time < Time.now && self.homework_group_reviews.count == 0 end + # 作业查看最新成绩 + def update_score identity + identity < Course::NORMAL && publish_time.present? && publish_time < Time.now + end + # 作业能否立即发布 def publish_immediately user homework_detail_manual.try(:comment_status) == 0 || homework_group_settings.where(course_group_id: course.charge_group_ids(user)). diff --git a/app/views/homework_commons/works_list.json.jbuilder b/app/views/homework_commons/works_list.json.jbuilder index 08c269670..e567ea79a 100644 --- a/app/views/homework_commons/works_list.json.jbuilder +++ b/app/views/homework_commons/works_list.json.jbuilder @@ -4,6 +4,7 @@ json.partial! "homework_btn_check", locals: {identity: @user_course_identity, ho json.partial! "student_btn_check", locals: {identity: @user_course_identity, homework: @homework, work: @work} +json.update_score @homework.update_score(@user_course_identity) if @homework.homework_type == "practice" json.work_count @work_count json.all_member_count @all_member_count json.course_group_count @course.course_groups_count From fe2ff1a3d3102756c551114b7b1ea7f74ad245a4 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 23 Sep 2019 14:47:11 +0800 Subject: [PATCH 11/11] =?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/models/homework_common.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index 5fc7318e2..40de5a87c 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -136,7 +136,7 @@ class HomeworkCommon < ApplicationRecord # 作业查看最新成绩 def update_score identity - identity < Course::NORMAL && publish_time.present? && publish_time < Time.now + identity < Course::NORMAL && publish_time.present? && publish_time < Time.now && !course.is_end end # 作业能否立即发布