|
|
|
@ -326,8 +326,8 @@ class CoursesService
|
|
|
|
|
define_error [
|
|
|
|
|
0, '加入成功',
|
|
|
|
|
1, '密码错误',
|
|
|
|
|
2, '课程已过期 请联系课程管理员重启课程。',
|
|
|
|
|
3, '您已经加入了课程',
|
|
|
|
|
2, '班级已过期 请联系班级管理员重启班级。',
|
|
|
|
|
3, '您已经加入了班级',
|
|
|
|
|
4, '您的邀请码不正确',
|
|
|
|
|
5, '您还未登录',
|
|
|
|
|
6, '申请成功,请等待审核完毕',
|
|
|
|
@ -522,7 +522,7 @@ class CoursesService
|
|
|
|
|
def course_attachments params
|
|
|
|
|
result = []
|
|
|
|
|
course = Course.find(params[:course_id])
|
|
|
|
|
attachments = course.attachments.order("created_on ")
|
|
|
|
|
attachments = course.attachments.where("is_publish = 1").order("created_on desc")
|
|
|
|
|
if !params[:name].nil? && params[:name] != ""
|
|
|
|
|
attachments.each do |atta|
|
|
|
|
|
result << atta if atta.filename.include?(params[:name])
|
|
|
|
|