diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index 6a4175706..c8b67448e 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -734,7 +734,7 @@ module Mobile out = {status: status} message = case status when 0; "退出班级成功" - when 1; "您不在课程中" + when 1; "您不是该班级成员" when 2; "您还未登录" when 3; "管理员不能退出班级" else; "未知错误,请稍后再试" diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index c5084f228..f23b59dcb 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -79,7 +79,8 @@ class CoursesService else c = Course.find(course) end - if current_user.nil? || !(current_user.admin? || c.is_public == 1 || (c.is_public == 0 && current_user.member_of_course?(c))) + # if current_user.nil? || !(current_user.admin? || c.is_public == 1 || (c.is_public == 0 && current_user.member_of_course?(c))) + if current_user.nil? raise '403' end #@canShowCode = isCourseTeacher(User.current.id,course) && params[:role] != '1' @@ -458,8 +459,8 @@ class CoursesService joined = StudentsForCourse.where('student_id = ? and course_id = ?', user.id, params[:object_id]) joined.each do |join| join.delete - @state = 0 end + @state = 0 @state end diff --git a/public/assets/wechat/class.html b/public/assets/wechat/class.html index 8208c3883..706cf5206 100644 --- a/public/assets/wechat/class.html +++ b/public/assets/wechat/class.html @@ -217,7 +217,7 @@
更多
-
+
发布通知 发起讨论
@@ -259,7 +259,7 @@
-
+
退出班级
diff --git a/public/assets/wechat/project.html b/public/assets/wechat/project.html index 8dfba3619..89cbb1418 100644 --- a/public/assets/wechat/project.html +++ b/public/assets/wechat/project.html @@ -98,7 +98,7 @@
更多
-
+
发布新帖
@@ -138,7 +138,7 @@
-
+
退出项目
diff --git a/public/javascripts/wechat/controllers/class_publishissue.js b/public/javascripts/wechat/controllers/class_publishissue.js index 1cd7f1285..09b995bea 100644 --- a/public/javascripts/wechat/controllers/class_publishissue.js +++ b/public/javascripts/wechat/controllers/class_publishissue.js @@ -55,7 +55,7 @@ app.controller('ClassPublishIssueController', ['$scope', '$http', 'auth', 'confi ).then(function(response){ if(response.data.status == 0) { - vm.alertService.showMessage('提示', '您已成功发布问题',function(){ + vm.alertService.showMessage('提示', '发布成功',function(){ rms.save('course_activities_page',0); rms.save("course_activities",[]); rms.save("course_has_more",false); diff --git a/public/javascripts/wechat/controllers/class_publishnotice.js b/public/javascripts/wechat/controllers/class_publishnotice.js index a0b9ab676..b900305c1 100644 --- a/public/javascripts/wechat/controllers/class_publishnotice.js +++ b/public/javascripts/wechat/controllers/class_publishnotice.js @@ -55,7 +55,7 @@ app.controller('ClassPublishNoticeController', ['$scope', '$http', 'auth', 'conf ).then(function(response){ if(response.data.status == 0) { - vm.alertService.showMessage('提示', '您已成功发布通知',function(){ + vm.alertService.showMessage('提示', '发布成功',function(){ rms.save('course_activities_page',0); rms.save("course_activities",[]); rms.save("course_has_more",false); diff --git a/public/javascripts/wechat/controllers/project_publishnote.js b/public/javascripts/wechat/controllers/project_publishnote.js index 231faaea6..f39b32827 100644 --- a/public/javascripts/wechat/controllers/project_publishnote.js +++ b/public/javascripts/wechat/controllers/project_publishnote.js @@ -56,7 +56,7 @@ app.controller('ProjectPublishNoteController', ['$scope', '$http', 'auth', 'conf ).then(function(response){ if(response.data.status == 0) { - vm.alertService.showMessage('提示', '您已成功发布帖子',function(){ + vm.alertService.showMessage('提示', '发布成功',function(){ rms.save('project_activities_page',0); rms.save("project_activities",[]); rms.save("project_has_more",false);