From 23f99d307f8b77c06dab195b4bf30ab8476eb966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 2 Jan 2020 12:02:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=BB=93=E6=9D=9F=E5=89=8D=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E5=85=B3=E5=8D=A1?= 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 fee00d4eb..879508ea1 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -363,7 +363,7 @@ class Listofworksstudentone extends Component { ), }, { - title: '截止前完成关卡', + title: '结束前完成关卡', dataIndex: 'completion', key: 'completion', align: "center", @@ -757,7 +757,7 @@ class Listofworksstudentone extends Component { ), }, { - title: '截止前完成关卡', + title: '结束前完成关卡', dataIndex: 'completion', key: 'completion', align: "center", @@ -1110,7 +1110,7 @@ class Listofworksstudentone extends Component { ), }, { - title: '截止前完成关卡', + title: '结束前完成关卡', dataIndex: 'completion', key: 'completion', align: 'center', @@ -1473,7 +1473,7 @@ class Listofworksstudentone extends Component { ), }, { - title: '截止前完成关卡', + title: '结束前完成关卡', dataIndex: 'completion', key: 'completion', align: 'center', From cb7d6e40ec3443b587813eaf94a0915ebd1859bf Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 2 Jan 2020 13:46:11 +0800 Subject: [PATCH 2/3] 1 --- app/controllers/graduation_topics_controller.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/controllers/graduation_topics_controller.rb b/app/controllers/graduation_topics_controller.rb index de707d7c7..203f18b35 100644 --- a/app/controllers/graduation_topics_controller.rb +++ b/app/controllers/graduation_topics_controller.rb @@ -170,11 +170,12 @@ class GraduationTopicsController < ApplicationController teacher_group = @course.teacher_course_groups.where(:user_id => @graduation_topic.tea_id, :id => params[:group_id]).first unless teacher_group.present? member = @course.course_members.where(:user_id => @graduation_topic.tea_id).first - tip_exception("分班名称不能为空") if params[:course_group_name].blank? - course_group = CourseGroup.find_or_create_by!(:name => params[:course_group_name], :course_id => @course.id) - teacher_group = TeacherCourseGroup.find_or_create_by!(:course_id => @course.id, :course_member_id => member.try(:id), - :user_id => @graduation_topic.tea_id, - :course_group_id => course_group.try(:id)) + if params[:course_group_name].present? + course_group = CourseGroup.find_or_create_by!(:name => params[:course_group_name], :course_id => @course.id) + teacher_group = TeacherCourseGroup.find_or_create_by!(:course_id => @course.id, :course_member_id => member.try(:id), + :user_id => @graduation_topic.tea_id, + :course_group_id => course_group.try(:id)) + end end student_member = @course.course_members.where(:user_id => student_graduation_topic.user_id).first student_member.update_attributes(:course_group_id => teacher_group.course_group_id) if student_member.present? From 24ced552978499121f9339f6d2573ab486a9b427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 2 Jan 2020 13:58:10 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../topics/GraduateTopicDetailTable.js | 17 ++++++++--------- .../shixunchild/Challenges/Challengesjupyter.js | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js index eae3fb43d..b0c65009d 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js @@ -79,16 +79,15 @@ class GraduateTopicDetailTable extends Component{ }) } sureAgreeTopic=(count)=>{ - if(count > 0){ - let{tableData}=this.props; - let{operationId,classesId}=this.state - let courseId=this.props.match.params.course_id; + let{tableData}=this.props; + let{operationId,classesId}=this.state + let courseId=this.props.match.params.course_id; + + if(classesId!=undefined){ let name=tableData.group_list.filter(item=>item.group_id==classesId)[0].group_name; this.agreeChoose(courseId,operationId,classesId,name); }else{ - this.setState({ - un_choose_notice:"请先添加分班" - }) + this.agreeChoose(courseId,operationId,classesId); } } @@ -205,7 +204,7 @@ class GraduateTopicDetailTable extends Component{ >

确认同意学生的选题,将学生加入我的分班

-
+ { tableData.group_list && tableData.group_list.length===0?"":
选择:

{un_choose_notice}

-
+
}
取消 this.sureAgreeTopic(tableData.group_list.length)}>确定 diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 221f90764..de906ad43 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -278,7 +278,7 @@ class Challengesjupyter extends Component { this.setState({ showtime:false }) - }, 500) + }, 800) }else{ this.setState({ @@ -292,7 +292,7 @@ class Challengesjupyter extends Component { }) this.props.showNotification('实训保存失败!'); }) - }, 500) + }, 800) }