From e32ab34e490853232371fe086c8cfd6fb637bc23 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sun, 9 Feb 2020 20:23:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=AF=BE=E5=A0=82?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E7=9A=84=E5=88=86=E7=8F=AD=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/admins/import_course_member_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/admins/import_course_member_service.rb b/app/services/admins/import_course_member_service.rb index 9b9393e78..ea8c03645 100644 --- a/app/services/admins/import_course_member_service.rb +++ b/app/services/admins/import_course_member_service.rb @@ -39,7 +39,7 @@ class Admins::ImportCourseMemberService < ApplicationService if member.present? && member.role == 'STUDENT' && course_group && member.course_group_id != course_group&.id member.update!(course_group_id: course_group&.id) elsif member.blank? - course.course_members.create!(user_id: user.id, role: data.role.to_i, course_group_id: course_group&.id) + course.course_members.create!(user_id: user.id, role: data.role.to_i, course_group_id: course_group&.id.to_i) extra = case data.role.to_i when 2 then 9 From 382a51285c847081c4dcecbdd1b80db778d77017 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sun, 9 Feb 2020 20:34:19 +0800 Subject: [PATCH 2/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 --- config/locales/zh-CN.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 9d4d326cd..6900f6c51 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -170,7 +170,7 @@ zh-CN: name: '名称' tag_discipline: name: '名称' - live: + live_link: description: '说明' url: '链接' From e4cf6f9e46672c39141b24eb12be3f7b13bc70db Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sun, 9 Feb 2020 20:35:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=AF=BE=E5=A0=82?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E7=9A=84=E5=88=86=E7=8F=AD=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/admins/import_course_member_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/admins/import_course_member_service.rb b/app/services/admins/import_course_member_service.rb index ea8c03645..3ea559766 100644 --- a/app/services/admins/import_course_member_service.rb +++ b/app/services/admins/import_course_member_service.rb @@ -36,8 +36,8 @@ class Admins::ImportCourseMemberService < ApplicationService member = course.course_members.find_by(user_id: user.id, role: data.role.to_i) # 如果已是课堂成员且是学生身份and不在指定的分班则移动到该分班 - if member.present? && member.role == 'STUDENT' && course_group && member.course_group_id != course_group&.id - member.update!(course_group_id: course_group&.id) + if member.present? && member.role == 'STUDENT' && course_group && member.course_group_id != course_group&.id.to_i + member.update!(course_group_id: course_group&.id.to_i) elsif member.blank? course.course_members.create!(user_id: user.id, role: data.role.to_i, course_group_id: course_group&.id.to_i) extra =