From 04a75c5beb6eb44afed9ba5933c83a7203d45294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 10:35:22 +0800 Subject: [PATCH 01/17] =?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/paths/PathDetail/DetailTop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js index 0777718b8..1c49ea79b 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.js +++ b/public/react/src/modules/paths/PathDetail/DetailTop.js @@ -451,7 +451,7 @@ class DetailTop extends Component{ onVisibleChange={this.onVisibleChanges} > - 第{this.state.MenuItemskey}次开课 + 第 {this.state.MenuItemskey} 次开课 @@ -509,7 +509,7 @@ class DetailTop extends Component{ 报名人数:
- {item.student_count}人 + {item.student_count} 人
From c3d43d0ab4d47fd2eb7d68219187ce5a9b5f38ae Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Sat, 24 Aug 2019 14:03:42 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/exercise/ExerciseNew.js | 21 ++++++++++++++++--- .../courses/exercise/new/JudgeEditor.js | 12 ++--------- .../courses/exercise/new/NullEditor.js | 12 ++--------- .../courses/exercise/new/SingleEditor.js | 12 ++--------- 4 files changed, 24 insertions(+), 33 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseNew.js b/public/react/src/modules/courses/exercise/ExerciseNew.js index 9e5fff36b..cbde30a5e 100644 --- a/public/react/src/modules/courses/exercise/ExerciseNew.js +++ b/public/react/src/modules/courses/exercise/ExerciseNew.js @@ -49,6 +49,20 @@ class ExerciceNew extends Component{ } } + // 已发布试卷编辑保存的确认弹框 + changeScore = (question_id,answerArray) =>{ + this.props.confirm({ + content:'修改了标准答案', + subContent:"是否重新计算学生答题的成绩?", + onOk:()=>{ + this.sureChangeScore(question_id,answerArray) + }, + onCancel:()=>{ + this.addSuccess(); + } + }) + } + // 已发布试卷修改答案确认修改分数 sureChangeScore = (question_id,answerArray) =>{ let url=`/exercise_questions/${question_id}/update_scores.json` @@ -398,6 +412,7 @@ class ExerciceNew extends Component{ addSuccess: this.addSuccess, addQuestion: this.addQuestion, onEditorCancel: this.onEditorCancel, + changeScore:this.changeScore, editQestion: this.editQestion, onSortDown: this.onSortDown, onSortUp: this.onSortUp, @@ -523,7 +538,7 @@ class ExerciceNew extends Component{ { exercise_questions.map((item, index) => { if (item.question_type == 0 || item.question_type == 1) { if (item.isNew) { - return + return } else { return + return } else { return } } else if (item.question_type == 3) { if (item.isNew) { - return + return } else { return } diff --git a/public/react/src/modules/courses/exercise/new/JudgeEditor.js b/public/react/src/modules/courses/exercise/new/JudgeEditor.js index 16ccad54a..41bc5bac4 100644 --- a/public/react/src/modules/courses/exercise/new/JudgeEditor.js +++ b/public/react/src/modules/courses/exercise/new/JudgeEditor.js @@ -97,16 +97,8 @@ class SingleEditor extends Component{ if (response.data.status == 0) { this.props.addSuccess() }else if(response.data.status == 3){ - this.props.confirm({ - content:'修改了标准答案', - subContent:"是否重新计算学生答题的成绩?", - onOk:()=>{ - this.props.sureChangeScore(question_id,answerArray) - }, - onCancel:()=>{ - this.props.addSuccess(); - } - }) + // 已发布试卷编辑保存 + this.props.changeScore(question_id,answerArray); } }) .catch(function (error) { diff --git a/public/react/src/modules/courses/exercise/new/NullEditor.js b/public/react/src/modules/courses/exercise/new/NullEditor.js index f3c736196..85a8aa336 100644 --- a/public/react/src/modules/courses/exercise/new/NullEditor.js +++ b/public/react/src/modules/courses/exercise/new/NullEditor.js @@ -137,16 +137,8 @@ class NullEditor extends Component{ if (response.data.status == 0) { this.props.addSuccess() }else if(response.data.status == 3){ - this.props.confirm({ - content:'修改了标准答案', - subContent:"是否重新计算学生答题的成绩?", - onOk:()=>{ - this.props.sureChangeScore(question_id,answerArray) - }, - onCancel:()=>{ - this.props.addSuccess(); - } - }) + // 已发布试卷编辑保存 + this.props.changeScore(question_id,answerArray); } }) .catch(function (error) { diff --git a/public/react/src/modules/courses/exercise/new/SingleEditor.js b/public/react/src/modules/courses/exercise/new/SingleEditor.js index 8053f4f21..50e594a59 100644 --- a/public/react/src/modules/courses/exercise/new/SingleEditor.js +++ b/public/react/src/modules/courses/exercise/new/SingleEditor.js @@ -135,16 +135,8 @@ class SingleEditor extends Component{ if (response.data.status == 0) { this.props.addSuccess() }else if(response.data.status == 3){ - this.props.confirm({ - content:'修改了标准答案', - subContent:"是否重新计算学生答题的成绩?", - onOk:()=>{ - this.props.sureChangeScore(question_id,answerArray) - }, - onCancel:()=>{ - this.props.addSuccess(); - } - }) + // 已发布试卷编辑保存 + this.props.changeScore(question_id,answerArray); } }) .catch(function (error) { From 6f06094fc1542bfd5802f96d574ff8df14ed5b3b Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 24 Aug 2019 14:11:05 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E5=AE=9E=E8=B7=B5=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E5=AE=9E=E8=AE=AD=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190824032658_migrate_subject_shixun_count.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20190824032658_migrate_subject_shixun_count.rb diff --git a/db/migrate/20190824032658_migrate_subject_shixun_count.rb b/db/migrate/20190824032658_migrate_subject_shixun_count.rb new file mode 100644 index 000000000..bef29346e --- /dev/null +++ b/db/migrate/20190824032658_migrate_subject_shixun_count.rb @@ -0,0 +1,9 @@ +class MigrateSubjectShixunCount < ActiveRecord::Migration[5.2] + def change + Subject.reset_column_information + Subject.all.each do |subject| + Subject.reset_counters subject.id, :stage_shixuns + Subject.reset_counters subject.id, :shixuns + end + end +end From f752fa42011f842757d4d2fa2978c4eff1bc1589 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Sat, 24 Aug 2019 14:13:27 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=88=86=E7=8F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/members/modal/CreateGroupByImportModal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js b/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js index fe2a88dce..08592cfe5 100644 --- a/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js +++ b/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js @@ -118,6 +118,7 @@ class CreateGroupByImportModal extends Component{ const props = { name: 'file', multiple: true, + fileList:fileList, action: getUploadActionUrl(), onRemove: this.onAttachmentRemove, onChange: this.handleChange From ac12acf735713c3bb155a1e80d5d91a69842f1b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 14:14:23 +0800 Subject: [PATCH 05/17] =?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/public/css/edu-all.css | 7 ++++--- public/stylesheets/educoder/edu-all.css | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index c8a4aeaf6..52991cd2d 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -118,12 +118,13 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px} bottom: 90px;} .tag-green .tag-name{display: block;width: auto; /*background-image: url("/images/educoder/tag1.png");*/ - background: #000000; + background: rgba(000,000,000,0.56); border: 1px solid #fff; border-radius: 3px; font-size: 12px; - opacity: 0.56; - background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left;} + /*opacity: 0.56;*/ + background-size: 100% 100%; + padding: 0px 8px;color: #fff;float: left;} .tag-orange{position: absolute;right: 0px;top:12px;} .tag-orange .tag-name{display: block;width: auto;background-color:#FF6800; background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left; diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 823af3c5d..2b4449333 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -120,12 +120,13 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px} bottom: 90px;} .tag-green .tag-name{display: block;width: auto; /*background-image: url("/images/educoder/tag1.png");*/ - background: #000000; + background: rgba(000,000,000,0.56); border: 1px solid #fff; border-radius: 3px; font-size: 12px; - opacity: 0.56; - background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left;} + /*opacity: 0.56;*/ + background-size: 100% 100%; + padding: 0px 8px;color: #fff;float: left;} .tag-orange{position: absolute;right: 0px;top:12px;} .tag-orange .tag-name{display: block;width: auto;background-color:#FF6800; background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left; From e84663bb8d331255684377fe5ff42cd4a7ed93dc Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Sat, 24 Aug 2019 14:16:56 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=88=86=E7=8F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/members/modal/CreateGroupByImportModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js b/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js index 08592cfe5..d90a5fe0d 100644 --- a/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js +++ b/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js @@ -112,7 +112,7 @@ class CreateGroupByImportModal extends Component{ render(){ const { candidates, checkBoxValues, loading, hasMore, name, school_name, school_names - , graduationGroup, graduation_groups, courseGroup, course_groups } = this.state + , graduationGroup, graduation_groups, courseGroup, course_groups , fileList } = this.state const { moduleName } = this.props const props = { From be9b8e61c1ecc96f934b59f97d367271d9c74002 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 24 Aug 2019 14:21:15 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E5=AE=9E=E8=B7=B5=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/subject.rb | 5 +++++ app/views/subjects/show.json.jbuilder | 1 + 2 files changed, 6 insertions(+) diff --git a/app/models/subject.rb b/app/models/subject.rb index 96d060353..7b671cfb1 100644 --- a/app/models/subject.rb +++ b/app/models/subject.rb @@ -39,6 +39,11 @@ class Subject < ApplicationRecord courses.pluck(:end_date).max end + # 是否有已开课的课堂 + def has_course_start? + courses.where("start_date <= '#{Date.today}' and end_date >= '#{Date.today}'").count > 0 + end + # 挑战过路径的成员数(金课统计去重后的报名人数) def member_count excellent && CourseMember.where(role: 4, course_id: courses.pluck(:id)).pluck(:user_id).uniq.length > shixuns.pluck(:myshixuns_count).sum ? diff --git a/app/views/subjects/show.json.jbuilder b/app/views/subjects/show.json.jbuilder index 53e76a96f..997e0c3d6 100644 --- a/app/views/subjects/show.json.jbuilder +++ b/app/views/subjects/show.json.jbuilder @@ -14,6 +14,7 @@ json.allow_add_member @is_manager json.is_creator @is_creator if @subject.excellent + json.has_start @subject.has_course_start? json.courses @courses do |course| json.course_id course.id json.first_category_url module_url(course.none_hidden_course_modules.first, course) From c4ff084532119b3dafc6c6738e9bb45da5b9d4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 14:25:23 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E5=AD=97=E6=95=B0=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/paths/PathNew.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/paths/PathNew.js b/public/react/src/modules/paths/PathNew.js index 6178ae82e..3b2618c65 100644 --- a/public/react/src/modules/paths/PathNew.js +++ b/public/react/src/modules/paths/PathNew.js @@ -186,10 +186,10 @@ class PathNew extends Component{ }) const Des_editMD = create_editorMD("shixun_introduction","100%","490px" - ,"请在此输入实践课程的简介,最大限制5000个字符","/api/attachments.json", response.data.description,""); + ,"请在此输入实践课程的简介,最大限制8000个字符","/api/attachments.json", response.data.description,""); this.Des_editMD=Des_editMD; const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px" - ,"请在此输入实践课程的学习须知,最大限制500个字符","/api/attachments.json",response.data.learning_notes,""); + ,"请在此输入实践课程的学习须知,最大限制2000个字符","/api/attachments.json",response.data.learning_notes,""); this.Point_editMD=Point_editMD; } }).catch((error)=>{ @@ -198,9 +198,9 @@ class PathNew extends Component{ } else { this.isEditPage = false - const Des_editMD = create_editorMD("shixun_introduction","100%","490px","请在此输入实践课程的简介,最大限制5000个字符","/api/attachments.json","",""); + const Des_editMD = create_editorMD("shixun_introduction","100%","490px","请在此输入实践课程的简介,最大限制8000个字符","/api/attachments.json","",""); this.Des_editMD=Des_editMD; - const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px","请在此输入实践课程的学习须知,最大限制500个字符","/api/attachments.json","",""); + const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px","请在此输入实践课程的学习须知,最大限制2000个字符","/api/attachments.json","",""); this.Point_editMD=Point_editMD; } From 9dd9e5385cbcff4d4b9e7d2b251291ce0f50baab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 14:35:48 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E5=AD=97=E6=95=B0=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/paths/PathNew.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/paths/PathNew.js b/public/react/src/modules/paths/PathNew.js index 3b2618c65..95e343b13 100644 --- a/public/react/src/modules/paths/PathNew.js +++ b/public/react/src/modules/paths/PathNew.js @@ -108,7 +108,7 @@ class PathNew extends Component{ return; } if (des.length > 8000) { - this.props.showSnackbar("实践课程的简介最大限制5000个字符"); + this.props.showSnackbar("实践课程的简介最大限制8000个字符"); window.location.href="#part_Des"; return; } @@ -119,7 +119,7 @@ class PathNew extends Component{ return; } if(point.length > 2000){ - this.props.showSnackbar("实践课程的学习须知最大限制500个字符"); + this.props.showSnackbar("实践课程的学习须知最大限制2000个字符"); window.location.href="#part_point"; return; } From 5e604ce8b1e9ddd4eae8c3f42c5f73a5ce6b3a81 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 24 Aug 2019 14:52:32 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E5=AD=A6=E5=8F=B7=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index c8707d72e..e29fa8d7d 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -707,12 +707,12 @@ class CoursesController < ApplicationController if order == 1 # REDO:Extension - @students = @students.includes(user: :user_extension).order("user_extensions.student_id, course_members.id") + @students = @students.includes(user: :user_extension).order("user_extensions.student_id, users.login") elsif order == 2 - @students = @students.includes(:course_group).order("course_groups.position, course_members.id") + @students = @students.includes(:course_group).order("course_groups.position, users.login") else # REDO:Extension - @students = @students.includes(user: :user_extension).order("user_extensions.student_id, course_members.id") + @students = @students.includes(user: :user_extension).order("user_extensions.student_id, users.login") end if course_group_id.present? From 0107a9b6fed2db36d6fb2ed96c29b4e71fc48a0c Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 24 Aug 2019 15:02:51 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/course_end.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/course_end.rake b/lib/tasks/course_end.rake index d8e87eacf..841c30b27 100644 --- a/lib/tasks/course_end.rake +++ b/lib/tasks/course_end.rake @@ -2,7 +2,7 @@ namespace :course do desc "course end" task :end => :environment do - courses = Course.where("end_date <= '#{Date.today}' and is_end = 0") + courses = Course.where("end_date < '#{Date.today}' and is_end = 0") courses.each do |course| course.update_attribute(:is_end, 1) end From ed78052620f28dd714343e52e89e5cb2dd862659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 15:13:41 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BD=93=E6=9C=9F=E5=BC=80=E8=AF=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/paths/PathDetail/DetailTop.js | 53 ++++++++++--------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js index 1c49ea79b..4506f8700 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.js +++ b/public/react/src/modules/paths/PathDetail/DetailTop.js @@ -30,38 +30,41 @@ class DetailTop extends Component{ } } componentDidMount(){ - let courseslist=[] - + this.getdatalist(); + } + getdatalist=()=>{ + let courseslist=[]; + let keys=1; if(this.props.courses!=undefined&&this.props.courses.length!=0){ - this.props.courses.map((item,key)=>{ - if(this.props.pathtopskey===key+1){ - return( - courseslist.push(item) - ) - } - }) + if(this.props.detailInfoList.has_start===true){ + this.props.courses.map((item,key)=>{ + if(item.course_status.status===1){ + keys=key+1 + return( + courseslist.push(item) + ) + } + }) + + }else{ + this.props.courses.map((item,key)=>{ + if(this.props.pathtopskey===key+1){ + keys=key+1 + return( + courseslist.push(item) + ) + } + }) + } } this.setState({ - courseslist:courseslist + courseslist:courseslist, + MenuItemskey:keys, }) } - componentDidUpdate=(prevProps)=> { if(prevProps.courses!=this.props.courses){ - let courseslist=[] - - if(this.props.courses!=undefined&&this.props.courses.length!=0){ - this.props.courses.map((item,key)=>{ - if(this.props.pathtopskey===key+1){ - return( - courseslist.push(item) - ) - } - }) - } - this.setState({ - courseslist:courseslist - }) + this.getdatalist(); } } From 1c9c7dd1209563399b741752c2d5b57f4c93bfe0 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Sat, 24 Aug 2019 15:19:36 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=88=86=E7=8F=AD-=E6=9C=AA=E4=B8=8A=E4=BC=A0=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../members/modal/CreateGroupByImportModal.js | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js b/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js index d90a5fe0d..54c0df912 100644 --- a/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js +++ b/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js @@ -13,15 +13,12 @@ class CreateGroupByImportModal extends Component{ constructor(props){ super(props); this.state={ + errorTip:undefined } } - fetchMemberList = (arg_page) => { - } - componentDidMount() { - - - } + onSendOk = () => { + const courseId = this.props.match.params.coursesId let url = `/courses/${courseId}/create_group_by_importing_file.json` @@ -112,7 +109,7 @@ class CreateGroupByImportModal extends Component{ render(){ const { candidates, checkBoxValues, loading, hasMore, name, school_name, school_names - , graduationGroup, graduation_groups, courseGroup, course_groups , fileList } = this.state + , graduationGroup, graduation_groups, courseGroup, course_groups , fileList , errorTip } = this.state const { moduleName } = this.props const props = { @@ -132,17 +129,6 @@ class CreateGroupByImportModal extends Component{ onOk={this.onOk} className="createGroupByImport" > - - -
- - - -

@@ -152,6 +138,9 @@ class CreateGroupByImportModal extends Component{ 单个文件最大150MB

+

+ {errorTip} +

) } From d21085c92098a502bb8a3692badccf3dad6f34dc Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 24 Aug 2019 15:54:55 +0800 Subject: [PATCH 14/17] =?UTF-8?q?=E6=AF=95=E8=AE=BE=E6=88=AA=E6=AD=A2?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/graduation_tasks_controller.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/controllers/graduation_tasks_controller.rb b/app/controllers/graduation_tasks_controller.rb index 4cae4e08b..727bdb77e 100644 --- a/app/controllers/graduation_tasks_controller.rb +++ b/app/controllers/graduation_tasks_controller.rb @@ -322,6 +322,8 @@ class GraduationTasksController < ApplicationController def publish_task tip_exception("缺少截止时间参数") if params[:end_time].blank? tip_exception("截止时间必须晚于当前时间") if params[:end_time] <= strf_time(Time.now) + tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if + @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day ActiveRecord::Base.transaction do begin @@ -397,8 +399,8 @@ class GraduationTasksController < ApplicationController tip_exception("发布时间不能早于当前时间") if params[:publish_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") tip_exception("截止时间不能早于当前时间") if params[:end_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") tip_exception("截止时间不能早于发布时间") if params[:publish_time] > params[:end_time] - tip_exception("截止时间不能早于课堂结束时间") if @course.end_date.present? && - params[:end_time] > @course.end_date.end_of_day + tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if + @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day @task.publish_time = params[:publish_time] @task.end_time = params[:end_time] @@ -410,7 +412,8 @@ class GraduationTasksController < ApplicationController elsif @task.status < 2 tip_exception("截止时间不能为空") if params[:end_time].blank? tip_exception("截止时间不能早于当前时间") if params[:end_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") - tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day + tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if + @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day @task.end_time = params[:end_time] end @@ -421,8 +424,8 @@ class GraduationTasksController < ApplicationController if params[:allow_late].to_i == 1 tip_exception("补交结束时间不能为空") if params[:late_time].blank? tip_exception("补交结束时间不能早于截止时间") if params[:late_time] <= @task.end_time - tip_exception("补交结束时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if @course.end_date.present? && params[:late_time] > - @course.end_date.end_of_day + tip_exception("补交结束时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if + @course.end_date.present? && params[:late_time] > @course.end_date.end_of_day tip_exception("迟交扣分应为正整数") if params[:late_penalty] && params[:late_penalty].to_i < 0 @task.allow_late = true From 021b71985732cd60b09d610d1bfd015c1515c874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 16:00:18 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BD=93=E6=9C=9F=E5=BC=80=E8=AF=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/public/css/edu-all.css | 5 +++++ public/stylesheets/educoder/edu-all.css | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 52991cd2d..107f6694f 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -3448,4 +3448,9 @@ a.singlepublishtwo{ .square-main p{ margin-bottom: 0 !important; +} + +.ant-notification{ + width: auto !important; + max-width: 600px !important; } \ No newline at end of file diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 2b4449333..55cb03926 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -3756,4 +3756,8 @@ a.singlepublishtwo{ .has-error .ant-input:focus{ border-color: #ff4d4f !important; +} +.ant-notification{ + width: auto !important; + max-width: 600px !important; } \ No newline at end of file From 98f8443f9b1836373919e929ee047948b82584e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 16:05:15 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/public/css/edu-all.css | 8 ++++---- public/stylesheets/educoder/edu-all.css | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 107f6694f..6d180e342 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -3450,7 +3450,7 @@ a.singlepublishtwo{ margin-bottom: 0 !important; } -.ant-notification{ - width: auto !important; - max-width: 600px !important; -} \ No newline at end of file +/*.ant-notification{*/ + /*width: auto !important;*/ + /*max-width: 600px !important;*/ +/*}*/ \ No newline at end of file diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 55cb03926..c4718c076 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -3757,7 +3757,7 @@ a.singlepublishtwo{ .has-error .ant-input:focus{ border-color: #ff4d4f !important; } -.ant-notification{ - width: auto !important; - max-width: 600px !important; -} \ No newline at end of file +/*.ant-notification{*/ + /*width: auto !important;*/ + /*max-width: 600px !important;*/ +/*}*/ \ No newline at end of file From 28e94d1dc9942395acfb0f34dc93f7c1e0f078a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 16:32:23 +0800 Subject: [PATCH 17/17] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMIndexHOC.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index a98e80739..21bd63b2b 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -35,14 +35,14 @@ if (!window['indexHOCLoaded']) { // $('head').append($('') // .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`)); $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?6`)); + .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?8`)); $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?6`)); + .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?8`)); // index.html有加载 $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?6`)); + .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?8`)); // $('head').append($('')