From e771aee99fb8d740a39622fe085da10c176b200b Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 19:03:41 +0800 Subject: [PATCH 01/32] =?UTF-8?q?=E5=8F=91=E9=80=81=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E5=90=8E=E7=9A=84url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/subjects/send_to_course.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/subjects/send_to_course.json.jbuilder b/app/views/subjects/send_to_course.json.jbuilder index 23da82281..defe309a2 100644 --- a/app/views/subjects/send_to_course.json.jbuilder +++ b/app/views/subjects/send_to_course.json.jbuilder @@ -1,3 +1,3 @@ json.status 1 json.message "发送成功" -json.url "/homework_commons?course=#{@course.id}&homework_type=4" \ No newline at end of file +json.url module_url(@course.none_hidden_course_modules.first, @course) \ No newline at end of file From 8decd0d450a7d140e0de37fd8b0dcd88a9859ceb Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 19:23:43 +0800 Subject: [PATCH 02/32] =?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/student_works_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/student_works_controller.rb b/app/controllers/student_works_controller.rb index d12913852..f9f4717a6 100644 --- a/app/controllers/student_works_controller.rb +++ b/app/controllers/student_works_controller.rb @@ -206,7 +206,7 @@ class StudentWorksController < ApplicationController @current_user = current_user @work_members = @homework.homework_type != "group" ? [] : @homework.student_works.where.not(user_id: @work.user_id). where(group_id: @work.group_id).includes(:user) - @attachments = @work.attachments.where.not(attachtype: 7) + @attachments = @work.attachments.where("attachtype != 7 or attachtype is null") end # 判断项目是否已有其他作品关联上了 From bb28f494f8ef3fceede78e141640f237861df211 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 19:24:30 +0800 Subject: [PATCH 03/32] =?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/courses_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 38472c0d3..9a651cf6e 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -12,9 +12,9 @@ class CoursesController < ApplicationController end before_action :require_login, except: [:index, :show, :students, :teachers, :board_list, :mine, :all_course_groups, - :left_banner, :top_banner, :apply_to_join_course] - before_action :check_auth, except: [:index, :show, :students, :teachers, :board_list, :mine, :all_course_groups, :left_banner, :top_banner] + before_action :check_auth, except: [:index, :show, :students, :teachers, :board_list, :mine, :all_course_groups, + :left_banner, :top_banner, :apply_to_join_course] before_action :set_course, :user_course_identity, only: [:show, :update, :destroy, :settings, :set_invite_code_halt, :set_public_or_private, :search_teacher_candidate, :teachers, :apply_teachers, :top_banner, :left_banner, :add_teacher_popup, :add_teacher, From 65463d855eb18545d4ab305fd008356aeb324368 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 19:38:51 +0800 Subject: [PATCH 04/32] =?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/courses_controller.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 9a651cf6e..4a7358ffe 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -884,11 +884,11 @@ class CoursesController < ApplicationController end # 验证是否存在同学号的学生 - u_extension = current_user.user_extension - if params[:student].present? && u_extension.student? - same_student_id_users = UserExtension.where.not(user_id: current_user.id).where(student_id: u_extension.student_id, identity: %i[student], school_id: u_extension.school_id).pluck(:user_id) - tip_exception("该课堂已存在同学号的学生,暂时无法加入,请联系老师") if course.students.exists?(user_id: same_student_id_users) - end + # u_extension = current_user.user_extension + # if params[:student].present? && u_extension.student? + # same_student_id_users = UserExtension.where.not(user_id: current_user.id).where(student_id: u_extension.student_id, identity: %i[student], school_id: u_extension.school_id).pluck(:user_id) + # tip_exception("该课堂已存在同学号的学生,暂时无法加入,请联系老师") if course.students.exists?(user_id: same_student_id_users) + # end # 创建学生身份 if params[:student].present? @@ -906,6 +906,7 @@ class CoursesController < ApplicationController CourseAddStudentCreateWorksJob.perform_later(course.id, [current_user.id]) StudentJoinCourseNotifyJob.perform_later(current_user.id, course.id) + logger_error("#####################{course.id}") end end From 2b8f5ccc8a6aa5d34b89be86edddc73a3d04ff9a Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 19:41:58 +0800 Subject: [PATCH 05/32] =?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/courses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 4a7358ffe..542c33652 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -906,7 +906,7 @@ class CoursesController < ApplicationController CourseAddStudentCreateWorksJob.perform_later(course.id, [current_user.id]) StudentJoinCourseNotifyJob.perform_later(current_user.id, course.id) - logger_error("#####################{course.id}") + logger.info("#####################{course.id}") end end From f38702e584de51685d98fee06ee5cc699e5392c2 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 19:48:46 +0800 Subject: [PATCH 06/32] =?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/helpers/export_helper.rb | 2 +- app/models/attachment.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/export_helper.rb b/app/helpers/export_helper.rb index 742deb85b..9771f6e1d 100644 --- a/app/helpers/export_helper.rb +++ b/app/helpers/export_helper.rb @@ -454,7 +454,7 @@ module ExportHelper #单个文件的话,不需要压缩,只改名 if homeworks_attach_path.size == 1 out_file = find_or_pack(object, work.user_id, digests.sort){ - des_path = "#{OUTPUT_FOLDER}/#{make_zip_name(work, filename.first)}_#{File.basename(homeworks_attach_path.first)}" + des_path = "#{OUTPUT_FOLDER}/#{make_zip_name(work, filename.first)}_#{work.id}}" FileUtils.cp homeworks_attach_path.first, des_path des_path } diff --git a/app/models/attachment.rb b/app/models/attachment.rb index bdd749108..1dbc86123 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -25,7 +25,7 @@ class Attachment < ApplicationRecord validates_length_of :description, maximum: 100 def diskfile - File.join(File.join(Rails.root, "files"), disk_directory.to_s, disk_filename.to_s) + File.join(File.join(Rails.root, "files"), disk_directory.to_s, filename.to_s) end def title From 8d8a0414e5f0e5797a73f46027a4eed7628b4ec8 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 20:11:30 +0800 Subject: [PATCH 07/32] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 2efe1df09..53a6d1ae1 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -14,7 +14,7 @@ class AttachmentsController < ApplicationController update_downloads(@file) redirect_to @file.cloud_url and return end - send_file absolute_path(local_path(@file)), type: @file.content_type.presence || 'application/octet-stream' + send_file(absolute_path(local_path(@file)), filename: @file.filename, type: @file.content_type.presence || 'application/octet-stream') update_downloads(@file) end From 70ad9152707cfe4f2ead9f0badc117f199aefff6 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 20:18:47 +0800 Subject: [PATCH 08/32] tiaoz --- app/helpers/export_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/export_helper.rb b/app/helpers/export_helper.rb index 9771f6e1d..742deb85b 100644 --- a/app/helpers/export_helper.rb +++ b/app/helpers/export_helper.rb @@ -454,7 +454,7 @@ module ExportHelper #单个文件的话,不需要压缩,只改名 if homeworks_attach_path.size == 1 out_file = find_or_pack(object, work.user_id, digests.sort){ - des_path = "#{OUTPUT_FOLDER}/#{make_zip_name(work, filename.first)}_#{work.id}}" + des_path = "#{OUTPUT_FOLDER}/#{make_zip_name(work, filename.first)}_#{File.basename(homeworks_attach_path.first)}" FileUtils.cp homeworks_attach_path.first, des_path des_path } From e65b5692f75c163a93d78eeea3e1a4d6b9f90150 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 20:32:10 +0800 Subject: [PATCH 09/32] =?UTF-8?q?D=E9=99=84=E4=BB=B6=E7=9A=84=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 53a6d1ae1..014262aea 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -100,7 +100,7 @@ class AttachmentsController < ApplicationController def current_month_folder date = Time.now - "#{date.year}/#{date.day.to_s.rjust(2, '0')}" + "#{date.year}/#{date.month.to_s.rjust(2, '0')}" end def file_ext(file_name) From 8a5da06e8e8ff19149fd20b98e015480d40ecdd7 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 20:35:50 +0800 Subject: [PATCH 10/32] tiaoz --- app/models/attachment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 1dbc86123..bdd749108 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -25,7 +25,7 @@ class Attachment < ApplicationRecord validates_length_of :description, maximum: 100 def diskfile - File.join(File.join(Rails.root, "files"), disk_directory.to_s, filename.to_s) + File.join(File.join(Rails.root, "files"), disk_directory.to_s, disk_filename.to_s) end def title From ffc36c5cf2c8e64fd204e04c54189a5d6cc55b60 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 23 Jul 2019 09:16:56 +0800 Subject: [PATCH 11/32] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/subjects_controller.rb | 4 ++-- app/helpers/subjects_helper.rb | 4 ++-- app/views/subjects/show.json.jbuilder | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index b372eb2c0..064061058 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -82,8 +82,8 @@ class SubjectsController < ApplicationController @is_creator = current_user.creator_of_subject?(@subject) # 合作团队 @members = @subject.subject_members.includes(:user) - shixun_ids = @subject.shixuns.published.pluck(:id) - challenge_ids = Challenge.where(shixun_id: shixun_ids).pluck(:id) + @shixuns = @subject.shixuns.published.pluck(:id) + challenge_ids = Challenge.where(shixun_id: @shixuns).pluck(:id) # 实训路径中的所有实训标签 @tags = ChallengeTag.where(challenge_id: challenge_ids).pluck(:name).uniq # 用户获取的实训标签 diff --git a/app/helpers/subjects_helper.rb b/app/helpers/subjects_helper.rb index f0ecd1174..c464c7a7e 100644 --- a/app/helpers/subjects_helper.rb +++ b/app/helpers/subjects_helper.rb @@ -1,10 +1,10 @@ module SubjectsHelper # 实训路径的发布状态 - def publish_status subject, is_manager, user + def publish_status subject, is_manager, user, shixuns status = -1 if is_manager - status = 0 if subject.status == 0 && subject.shixuns_count > 0 + status = 0 if subject.status == 0 && shixuns.count > 0 status = 1 if subject.status == 1 status = 2 if subject.status == 2 && user.admin? end diff --git a/app/views/subjects/show.json.jbuilder b/app/views/subjects/show.json.jbuilder index 14eb1942f..cafb08942 100644 --- a/app/views/subjects/show.json.jbuilder +++ b/app/views/subjects/show.json.jbuilder @@ -6,7 +6,7 @@ json.subject_score @subject.all_score json.member_count @subject.member_count json.allow_delete @is_creator && (@subject.status != 2 || @user.admin?) -json.publish_status publish_status(@subject, @is_creator, @user) +json.publish_status publish_status(@subject, @is_creator, @user, @shixuns) json.allow_statistics @user.manager_of_subject?(@subject) json.allow_send @user.logged? json.allow_visit @user.manager_of_subject?(@subject) || @user.admin? || @subject.status > 1 From 314dda5a358bf9573b20f56819928c3fe816a3bc Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 23 Jul 2019 09:22:30 +0800 Subject: [PATCH 12/32] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9F=A5=E9=87=8D?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_commons/group_list.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/homework_commons/group_list.json.jbuilder b/app/views/homework_commons/group_list.json.jbuilder index b5fead17e..d7e2427fd 100644 --- a/app/views/homework_commons/group_list.json.jbuilder +++ b/app/views/homework_commons/group_list.json.jbuilder @@ -7,7 +7,7 @@ json.group_list do end end # 未分班展示情况放在最后 -if @course_groups.count != (@page -1)*@limit.to_i && @course_groups.count < @limit.to_i +if @course_groups.count != (@page - 1)*@limit.to_i && @course_groups.count < @limit.to_i ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids) if ungroup_work_count > 0 json.ungroup_list do From d63881d85bbd1e67e51c7d1ab25565f5295f71a4 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 23 Jul 2019 09:27:32 +0800 Subject: [PATCH 13/32] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9F=A5=E9=87=8D?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_commons/group_list.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/homework_commons/group_list.json.jbuilder b/app/views/homework_commons/group_list.json.jbuilder index d7e2427fd..aa951bf7d 100644 --- a/app/views/homework_commons/group_list.json.jbuilder +++ b/app/views/homework_commons/group_list.json.jbuilder @@ -7,7 +7,7 @@ json.group_list do end end # 未分班展示情况放在最后 -if @course_groups.count != (@page - 1)*@limit.to_i && @course_groups.count < @limit.to_i +if @course_groups.count != (@page.to_i - 1)*@limit.to_i && @course_groups.count < @limit.to_i ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids) if ungroup_work_count > 0 json.ungroup_list do From 62c9ba34c1fd959453b7894633d4b50c36e90806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 23 Jul 2019 10:06:07 +0800 Subject: [PATCH 14/32] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssettinglist.js | 10 ++++----- public/react/src/modules/login/LoginDialog.js | 21 +++++++++++-------- public/react/src/modules/tpm/NewHeader.js | 8 +++---- .../tpm/shixunchild/Challenges/Challenges.js | 7 +++---- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 99c190063..291095008 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1203,14 +1203,14 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.length!=0?
没有数据可以显示,,!
+没有数据可以显示!
没有数据可以显示.!
+没有数据可以显示!
没有数据可以显示..!
+没有数据可以显示!
没有数据可以显示!
+@@ -258,7 +271,9 @@ class ShixunWorkModal extends Component{
{
- group_list===undefined?"":
+ group_list===undefined||JSON.stringify(group_list)==="[]"?
+ ""
+ :
group_list&&group_list.length===0?"":group_list.map((item,key)=>{
return(
From 62d0ecdab807e8b3eb52d30dfd1656b4e9002ec5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 23 Jul 2019 10:58:28 +0800
Subject: [PATCH 26/32] .
---
public/react/src/modules/tpm/shixuns/css/TPMBanner.css | 2 ++
1 file changed, 2 insertions(+)
diff --git a/public/react/src/modules/tpm/shixuns/css/TPMBanner.css b/public/react/src/modules/tpm/shixuns/css/TPMBanner.css
index c894eaace..0492f20c3 100644
--- a/public/react/src/modules/tpm/shixuns/css/TPMBanner.css
+++ b/public/react/src/modules/tpm/shixuns/css/TPMBanner.css
@@ -86,6 +86,8 @@ a:active{text-decoration:none;}
}
#commentsStar{
margin-top: -7px;
+ width: 90px;
+ margin-bottom: 11px;
}
.startbtnModal .ant-modal-content{
background: transparent;
From 6bc633b3b668e06dcff9ca4a24d5a80bef7772db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 23 Jul 2019 10:58:55 +0800
Subject: [PATCH 27/32] =?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/courses/Index.js | 2 +-
public/react/src/modules/courses/coursesHome/CoursesHome.js | 6 +++---
.../src/modules/courses/coursesHome/CoursesHomeCard.js | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js
index 27424821f..017a36765 100644
--- a/public/react/src/modules/courses/Index.js
+++ b/public/react/src/modules/courses/Index.js
@@ -18,7 +18,7 @@ const ListPageIndex = Loadable({
//课堂首页
const CoursesHome = Loadable({
- loader: () => import('./coursesHome/coursesHome'),
+ loader: () => import('./coursesHome/CoursesHome'),
loading:Loading,
})
diff --git a/public/react/src/modules/courses/coursesHome/CoursesHome.js b/public/react/src/modules/courses/coursesHome/CoursesHome.js
index 994e14eb9..3f4b4ad12 100644
--- a/public/react/src/modules/courses/coursesHome/CoursesHome.js
+++ b/public/react/src/modules/courses/coursesHome/CoursesHome.js
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
-import CoursesHomeCard from "./coursesHomeCard.js"
+import CoursesHomeCard from "./CoursesHomeCard.js"
import axios from 'axios';
import {Input,Tooltip} from 'antd';
import UpgradeModals from '../../modals/UpgradeModals';
@@ -10,7 +10,7 @@ import '@icedesign/base/lib/pagination/style.js';
const Search = Input.Search;
-class coursesHome extends Component{
+class CoursesHome extends Component{
constructor(props) {
super(props)
this.state = {
@@ -160,7 +160,7 @@ class coursesHome extends Component{
)
}
}
-export default coursesHome;
+export default CoursesHome;
// {/* */}
\ No newline at end of file
diff --git a/public/react/src/modules/courses/coursesHome/CoursesHomeCard.js b/public/react/src/modules/courses/coursesHome/CoursesHomeCard.js
index 2f65c622f..cd671cbe4 100644
--- a/public/react/src/modules/courses/coursesHome/CoursesHomeCard.js
+++ b/public/react/src/modules/courses/coursesHome/CoursesHomeCard.js
@@ -4,7 +4,7 @@ import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import {Tooltip,Spin,Alert} from 'antd';
import ShowSpin from '../../../common/ShowSpin';
-class coursesHomeCard extends Component{
+class CoursesHomeCard extends Component{
constructor(props) {
super(props)
}
@@ -134,5 +134,5 @@ class coursesHomeCard extends Component{
)
}
}
-export default coursesHomeCard;
+export default CoursesHomeCard;
From 200520c908a8dc353b5dacd859dffb046be83142 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Tue, 23 Jul 2019 11:03:23 +0800
Subject: [PATCH 28/32] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/subjects_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb
index 4e4d494ce..064061058 100644
--- a/app/controllers/subjects_controller.rb
+++ b/app/controllers/subjects_controller.rb
@@ -161,7 +161,7 @@ class SubjectsController < ApplicationController
end
@shixuns = @shixuns.reorder("created_at desc")
- @shixuns_count = @shixuns.count
+ @shixuns_count = @shixuns.size
## 分页参数
page = params[:page] || 1
From 0026dfe6160c9b24b30c9e0c29785bab8fde7261 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 23 Jul 2019 11:04:57 +0800
Subject: [PATCH 29/32] =?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 | 1 +
public/react/src/modules/tpm/TPMBanner.js | 2 +-
public/react/src/modules/tpm/newshixuns/Newshixuns.js | 4 +---
public/react/src/modules/tpm/shixuns/css/TPMBanner.css | 2 +-
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 5f7f485f8..c1ad97276 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -738,6 +738,7 @@ submittojoinclass=(value)=>{
-
diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js
index 23b228800..5efadc1d1 100644
--- a/public/react/src/modules/tpm/TPMBanner.js
+++ b/public/react/src/modules/tpm/TPMBanner.js
@@ -597,7 +597,7 @@ class TPMBanner extends Component {
- 学员评分
+ 学员评分
diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
index 184b6313a..956e652c8 100644
--- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js
+++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
@@ -236,9 +236,7 @@ class Newshixuns extends Component {
let newshixunUrl = `/shixuns/new.json`;
axios.get(newshixunUrl).then((response) => {
if (response.status === 200) {
- if (response.data.status === 403 || response.data.status === 401 || response.data.status === 500) {
-
- } else {
+ if (response.data.message===undefined) {
this.setState({
newshixunlist: response.data
});
diff --git a/public/react/src/modules/tpm/shixuns/css/TPMBanner.css b/public/react/src/modules/tpm/shixuns/css/TPMBanner.css
index 0492f20c3..b3233f641 100644
--- a/public/react/src/modules/tpm/shixuns/css/TPMBanner.css
+++ b/public/react/src/modules/tpm/shixuns/css/TPMBanner.css
@@ -87,7 +87,7 @@ a:active{text-decoration:none;}
#commentsStar{
margin-top: -7px;
width: 90px;
- margin-bottom: 11px;
+
}
.startbtnModal .ant-modal-content{
background: transparent;
From 85bbe35785121a4aecd7f770648128775308fd1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 23 Jul 2019 11:29:27 +0800
Subject: [PATCH 30/32] =?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/coursesPublic/Addcourses.js | 2 +-
.../src/modules/paths/PathDetail/DetailCardsEditAndAdd.js | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/public/react/src/modules/courses/coursesPublic/Addcourses.js b/public/react/src/modules/courses/coursesPublic/Addcourses.js
index 749e4870c..99b7db945 100644
--- a/public/react/src/modules/courses/coursesPublic/Addcourses.js
+++ b/public/react/src/modules/courses/coursesPublic/Addcourses.js
@@ -314,7 +314,7 @@ class Addcourses extends Component{
diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
index 6e2ca0883..bfaaaacc7 100644
--- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
+++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
@@ -140,17 +140,20 @@ class DetailCardsEditAndAdd extends Component{
//打开选择实训弹框初始化tag标签和列表
changeTag=(id,search)=>{
this.setState({
- hometypepvisible:true
+ hometypepvisible:true,
+ ChooseShixunListshixun_list:[],
+ page:1
})
let pathId=this.props.pathid;
let {page}=this.state;
- let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+page
+ let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+1
if(search!="" && search!=undefined){
url+="&search="+search;
}
if(id!=0){
url+="&type="+id;
}
+
axios.get(url).then((result)=>{
if(result.status===200){
this.setState({
From 838d4c67e8732f5e3a0eddb993200695583541c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 23 Jul 2019 11:31:55 +0800
Subject: [PATCH 31/32] =?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/coursesPublic/Addcourses.js | 2 +-
public/react/src/modules/tpm/NewHeader.js | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/public/react/src/modules/courses/coursesPublic/Addcourses.js b/public/react/src/modules/courses/coursesPublic/Addcourses.js
index 99b7db945..b140508d4 100644
--- a/public/react/src/modules/courses/coursesPublic/Addcourses.js
+++ b/public/react/src/modules/courses/coursesPublic/Addcourses.js
@@ -314,7 +314,7 @@ class Addcourses extends Component{
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index c1ad97276..8e48e8b0d 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -737,14 +737,14 @@ submittojoinclass=(value)=>{
-
-
+ placeholder="请输入5位项目邀请码或6位分班邀请码" value={tojoinclasstitle} onInput={this.inputjoinclassvalue}/>
-
From 1de8282c8da7b823a496b5326ae30a8001d92456 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 23 Jul 2019 11:43:03 +0800
Subject: [PATCH 32/32] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../paths/PathDetail/DetailCardsEditAndAdd.js | 85 ++++++++++---------
1 file changed, 47 insertions(+), 38 deletions(-)
diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
index bfaaaacc7..e47fe5a0f 100644
--- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
+++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
@@ -59,7 +59,8 @@ class DetailCardsEditAndAdd extends Component{
AddShixunBox = () =>{
this.setState({
selectShixun:true,
- patheditarry:[]
+ patheditarry:[],
+ page:1
})
this.changeTag(0,"");
}
@@ -68,6 +69,7 @@ class DetailCardsEditAndAdd extends Component{
cloasShixunBox =()=>{
this.setState({
selectShixun:false,
+ page:1,
patheditarry:[]
})
}
@@ -103,7 +105,8 @@ class DetailCardsEditAndAdd extends Component{
shixuns_listedit:newshixuns_listedit,
shixuns_listeditlist:list,
patheditarry:[],
- selectShixun:false
+ selectShixun:false,
+ page:1,
})
}).catch((error) => {
console.log(error)
@@ -141,8 +144,6 @@ class DetailCardsEditAndAdd extends Component{
changeTag=(id,search)=>{
this.setState({
hometypepvisible:true,
- ChooseShixunListshixun_list:[],
- page:1
})
let pathId=this.props.pathid;
let {page}=this.state;
@@ -156,6 +157,11 @@ class DetailCardsEditAndAdd extends Component{
axios.get(url).then((result)=>{
if(result.status===200){
+ this.setState({
+ ChooseShixunListshixun_list:[],
+ page:1
+ })
+
this.setState({
ChooseShixunList:result.data,
hometypepvisible:false,
@@ -290,43 +296,46 @@ class DetailCardsEditAndAdd extends Component{
contentViewScrolladd=(e)=>{
-
+ let {page}=this.state;
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部");
- this.setState({
- hometypepvisible:true
- })
- let pathId=this.props.pathid;
- let {search,page,type,ChooseShixunListshixun_list}=this.state;
- let newpage=page+1;
- let newChooseShixunListshixun_list=ChooseShixunListshixun_list;
- let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage
- if(search!="" && search!=undefined){
- url+="&search="+search;
- }
- if(type!=0){
- url+="&type="+type;
- }
- axios.get(url).then((result)=>{
- if(result.status===200){
- let list =result.data.shixun_list;
-
- for(var i=0; i
{
- console.log(error);
- })
+ if(page!=1){
+ this.setState({
+ hometypepvisible:true
+ })
+ let pathId=this.props.pathid;
+ let {search,page,type,ChooseShixunListshixun_list}=this.state;
+ let newpage=page+1;
+ let newChooseShixunListshixun_list=ChooseShixunListshixun_list;
+ let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage
+ if(search!="" && search!=undefined){
+ url+="&search="+search;
+ }
+ if(type!=0){
+ url+="&type="+type;
+ }
+ axios.get(url).then((result)=>{
+ if(result.status===200){
+ let list =result.data.shixun_list;
+
+ for(var i=0; i{
+ console.log(error);
+ })
+ }
+
}
}
请输入5位课堂邀请码或6位分班邀请码
+ style={{marginLeft: '90px',display:code_notice===true?'block':"none"}}>请输入5位项目邀请码或6位分班邀请码