教师修改用户角色的BUG

This commit is contained in:
yuanke 2016-09-01 14:17:14 +08:00
parent 6809af469b
commit 05e72dcc7b
1 changed files with 5 additions and 2 deletions

View File

@ -579,13 +579,16 @@ module Mobile
end
#7教辅 9教师 10学生
if c.tea_id == params[:user_id] || roles_id.length <= 0 || rolesids.include?(10)
if c.tea_id == params[:user_id] || roles_id.length <= 0
present :status, -1
present :message,"修改失败"
else
elsif rolesids.include?(3) || rolesids.include?(7) || rolesids.include?(9)
cs = CoursesService.new
status = cs.modify_user_course_role params,roles_id
present :status, status
else
present :status, -1
present :message,"修改失败"
end
end