From afcdbedd398b5bcebeaea03a2f1ad2158900339c Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 22 Sep 2019 17:50:50 +0800 Subject: [PATCH 01/10] =?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 37101ef30d1e64da78dafbce13796cc02b9eabda Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 23 Sep 2019 14:23:45 +0800 Subject: [PATCH 02/10] =?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 03/10] =?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 04/10] =?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 # 作业能否立即发布 From d67ab552ca33c3db6a0e4c239ed68dbce5318b50 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Mon, 23 Sep 2019 15:00:52 +0800 Subject: [PATCH 05/10] image tag --- app/views/users/homepage_info.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/homepage_info.json.jbuilder b/app/views/users/homepage_info.json.jbuilder index 112bd215c..4f8f3c446 100644 --- a/app/views/users/homepage_info.json.jbuilder +++ b/app/views/users/homepage_info.json.jbuilder @@ -1,6 +1,6 @@ json.id @user.id json.name @user.full_name -json.avatar_url url_to_avatar(@user) +json.avatar_url image_tag(url_to_avatar(@user)) json.is_logged_user @user.logged_user? json.experience @user.experience json.grade @user.grade From e59789c8430bd052c80aebb6bd5e686bdd5fdc42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 23 Sep 2019 15:01:36 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/paths/PathDetail/DetailTop.css | 2 +- .../src/modules/paths/PathDetail/DetailTop.js | 49 +++++++++++++++---- .../src/modules/user/usersInfo/InfosBanner.js | 4 +- .../src/modules/user/usersInfo/usersInfo.css | 1 + 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.css b/public/react/src/modules/paths/PathDetail/DetailTop.css index 40363f056..975da0f09 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.css +++ b/public/react/src/modules/paths/PathDetail/DetailTop.css @@ -17,7 +17,7 @@ box-sizing: border-box; } .userNavs{ - line-height: 96px; + line-height: 75px; background: #fff; height:96px; background:rgba(255,255,255,1); diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js index c6c2f1a75..f9da464d3 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.js +++ b/public/react/src/modules/paths/PathDetail/DetailTop.js @@ -5,10 +5,12 @@ import SendPanel from "./sendPanel.js"; import { getImageUrl } from 'educoder'; import axios from 'axios'; import Modals from '../../modals/Modals'; +import AccountProfile from"../../user/AccountProfile"; import OpenCourse from './OpenCourse'; -import Jointheclass from '../../modals/Jointheclass' +import Jointheclass from '../../modals/Jointheclass'; import './DetailTop.css'; + const Search = Input.Search; const RadioGroup = Radio.Group; class DetailTop extends Component{ @@ -262,6 +264,18 @@ class DetailTop extends Component{ } putappointment=()=>{ + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + + if(this.props.current_user&&this.props.current_user.profile_completed===false){ + this.setState({ + AccountProfiletype:true + }) + return + } + this.setState({ Modalstype:true, Modalstopval:"是否确认立即预约?", @@ -321,9 +335,15 @@ class DetailTop extends Component{ this.cardsModalcancel() }) } + + hideAccountProfile=()=>{ + this.setState({ + AccountProfiletype:false + }) + } render(){ let{detailInfoList}=this.props; - let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype}=this.state; + let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype,AccountProfiletype}=this.state; const radioStyle = { display: 'block', height: '30px', @@ -353,6 +373,12 @@ class DetailTop extends Component{ return(
+ {AccountProfiletype===true?this.hideAccountProfile()} + {...this.props} + {...this.state} + />:""} + - {this.props.courses===undefined||isadminallow_statistics===true?"":
+ {this.props.courses===undefined||isadminallow_statistics===true?"":
- {this.props.courses===undefined||this.props.courses.length===0?"":
  • + {this.props.courses===undefined||this.props.courses.length===0?"":
  • {this.state.courseslist.map((item,key)=>{ if(item.course_identity<4){ @@ -651,7 +677,10 @@ class DetailTop extends Component{ .mt26{ margin-top:26px; } - + .mt10block{ + margin-top: 10px; + display: inline-block; + } ` } @@ -671,8 +700,8 @@ class DetailTop extends Component{ 预约报名成功:""} {/*{item.course_status.status===0?
    即将开课
    :""}*/} - {item.course_status.status===1?
    {item.course_status.time}
    :""} - {item.course_status.status===2&&item.course_identity<6?
    已结束
    :""} + {item.course_status.status===1?
    {item.course_status.time}
    :""} + {item.course_status.status===2&&item.course_identity<6?
    已结束
    :""} {/*
    已结束
    */} {item.course_status.status===0? item.course_identity<5? @@ -690,7 +719,7 @@ class DetailTop extends Component{ {item.course_status.status===2? item.course_identity<6? 进入课堂 - :
    已结束
    :""} + :
    已结束
    :""}
  • )})} @@ -712,8 +741,8 @@ class DetailTop extends Component{ :""} {applypath===true&&this.props.courses.length===0?this.state.MenuItemskey===this.props.courses.length||coursestypes===true? - 当前预约报名人数:{getappointmenttype===true?this.props.detailInfoList&&this.props.detailInfoList.participant_count+1:this.props.detailInfoList&&this.props.detailInfoList.participant_count} - 当预约报名人数达到 {this.props.detailInfoList&&this.props.detailInfoList.student_count} 人时即将开课 + 当前预约报名人数:{getappointmenttype===true?this.props.detailInfoList&&this.props.detailInfoList.participant_count+1:this.props.detailInfoList&&this.props.detailInfoList.participant_count} + 当预约报名人数达到 {this.props.detailInfoList&&this.props.detailInfoList.student_count} 人时即将开课 {this.props.detailInfoList&&this.props.detailInfoList.has_participate===false? getappointmenttype===true?预约报名成功:this.putappointment()}>期待开课并预约报名: 预约报名成功} diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js index 5e79a9b2b..a5a39d3fc 100644 --- a/public/react/src/modules/user/usersInfo/InfosBanner.js +++ b/public/react/src/modules/user/usersInfo/InfosBanner.js @@ -50,10 +50,10 @@ class InfosBanner extends Component{

    - + - +

    diff --git a/public/react/src/modules/user/usersInfo/usersInfo.css b/public/react/src/modules/user/usersInfo/usersInfo.css index 69b4bcd00..6d8857acc 100644 --- a/public/react/src/modules/user/usersInfo/usersInfo.css +++ b/public/react/src/modules/user/usersInfo/usersInfo.css @@ -168,6 +168,7 @@ } .user-colorgrey-B8{color:#B8B8B8} .user-colorgrey-green{color:#7ED321} +.user-colorgrey-blue{color:#98EBFF} .user_yellow_btn { color: #fff!important; background-color: #FF8E02; From 7cd64eb6fbb3223dce3eb8a4e8c82f33ccd14a1d 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 15:04:08 +0800 Subject: [PATCH 07/10] =?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/Trainingjobsetting.js | 70 ++++++++++++++++--- 1 file changed, 60 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 0046afb19..2b06936cf 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1699,16 +1699,66 @@ class Trainingjobsetting extends Component { if(this.state.allowreplenishment === false){ whethertopays=false; } - this.setState({ - flagPageEditsbox:true, - flagPageEdit: true, - whethertopay:whethertopays, - flagPageEditstwo:releasetime, - flagPageEditsthrees:deadline, - flagPageEditsfor:endtime, - completionefficiencyscore:true, - unifiedsetting:this.state.unifiedsetting, - }) + if(this.state.jobsettingsdata!==undefined){ + + } + + try { + if(this.state.jobsettingsdata&& this.state.jobsettingsdata.data.homework_status[0]==="未发布"){ + this.setState({ + flagPageEditsbox:true, + flagPageEdit: true, + whethertopay:whethertopays, + flagPageEditstwo:releasetime, + flagPageEditsthrees:deadline, + flagPageEditsfor:endtime, + completionefficiencyscore:true, + work_efficiencys:true, + unifiedsetting:this.state.unifiedsetting, + latedeductiontwo:20, + }); + }else { + this.setState({ + flagPageEditsbox:true, + flagPageEdit: true, + whethertopay:whethertopays, + flagPageEditstwo:releasetime, + flagPageEditsthrees:deadline, + flagPageEditsfor:endtime, + + unifiedsetting:this.state.unifiedsetting, + }); + if(this.state.work_efficiencys===true){ + this.setState({ + completionefficiencyscore:true, + }) + }else{ + this.setState({ + completionefficiencyscore:false, + }) + } + } + }catch (e) { + this.setState({ + flagPageEditsbox:true, + flagPageEdit: true, + whethertopay:whethertopays, + flagPageEditstwo:releasetime, + flagPageEditsthrees:deadline, + flagPageEditsfor:endtime, + unifiedsetting:this.state.unifiedsetting, + }); + if(this.state.work_efficiencys===true){ + this.setState({ + completionefficiencyscore:true, + }) + }else{ + this.setState({ + completionefficiencyscore:false, + }) + } + } + if(this.state.proportion === "自定义分值"){ this.setState({ boolUnitetwoname:"自定义分值", From 12aaacd1a113075db269a51cd3a0f71038e0abb3 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Mon, 23 Sep 2019 15:12:00 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=9B=BE=E7=89=87=E7=BC=93=E5=AD=98?= =?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/views/users/homepage_info.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/homepage_info.json.jbuilder b/app/views/users/homepage_info.json.jbuilder index 4f8f3c446..78e0e1d7b 100644 --- a/app/views/users/homepage_info.json.jbuilder +++ b/app/views/users/homepage_info.json.jbuilder @@ -1,6 +1,6 @@ json.id @user.id json.name @user.full_name -json.avatar_url image_tag(url_to_avatar(@user)) +json.avatar_url image_tag("/" + url_to_avatar(@user)) json.is_logged_user @user.logged_user? json.experience @user.experience json.grade @user.grade From 4e4650616426285b42457060013f5993323c3f6c Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 23 Sep 2019 15:13:41 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E5=B7=B2=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E7=9A=84=E6=98=BE=E7=A4=BA=E6=9C=AA=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/poll.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/poll.rb b/app/models/poll.rb index 7f0d2fd94..9cb860f61 100644 --- a/app/models/poll.rb +++ b/app/models/poll.rb @@ -104,7 +104,7 @@ class Poll < ApplicationRecord status = 4 else if user.present? && user.student_of_course?(course) - ex_time = get_poll_times(user_id,false) + ex_time = get_poll_times(user.id,false) pb_time = ex_time[:publish_time] ed_time = ex_time[:end_time] if pb_time.present? && ed_time.present? && pb_time <= Time.now && ed_time > Time.now From 3411c80099d387839c37f2bad1591c37d3d211f5 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 15:15:03 +0800 Subject: [PATCH 10/10] =?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 | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index c600e01ff..93ed7ff7d 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -3231,7 +3231,7 @@ class Listofworksstudentone extends Component {
    {course_is_end===true?"": - {teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true? + {teacherdata&&teacherdata.update_score===true&&computeTimetype===true? (this.props.isNotMember()===false?
    查看最新成绩
    :""): @@ -3555,9 +3555,13 @@ class Listofworksstudentone extends Component { { course_is_end===true?"":teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"": {computeTimetype===true? (this.props.isNotMember()===false? -
    - 查看最新成绩 -
    + ( + teacherdata&&teacherdata.update_score===true? +
    + 查看最新成绩 +
    + :"" + ) :"") : (teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": @@ -3783,9 +3787,15 @@ class Listofworksstudentone extends Component { 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} { course_is_end===true?"":teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"": {computeTimetype===true? - (this.props.isNotMember()===false?
    - 查看最新成绩 -
    :""): + + (this.props.isNotMember()===false? + ( + teacherdata&&teacherdata.update_score===true? +
    + 查看最新成绩 +
    :"" + ) + :""): teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": (this.props.isNotMember()===false?
    查看最新成绩