|
|
|
@ -2,6 +2,7 @@ class CoursesService
|
|
|
|
|
include ApplicationHelper
|
|
|
|
|
include CoursesHelper
|
|
|
|
|
include HomeworkAttachHelper
|
|
|
|
|
include ApiHelper
|
|
|
|
|
#TODO:尚未整合权限系统
|
|
|
|
|
#参数school_id为0或不传时返回所有课程,否则返回对应学校的课程
|
|
|
|
|
#参数per_page_count分页功能,每页显示的课程数
|
|
|
|
@ -326,6 +327,11 @@ class CoursesService
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def course_dynamic params,current_user
|
|
|
|
|
count = get_course_anonymous_evaluation current_user,params[:id]
|
|
|
|
|
count
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
def show_homework_info course,bid,current_user,is_course_teacher
|
|
|
|
|
author = bid.author.lastname + bid.author.firstname
|
|
|
|
@ -361,4 +367,6 @@ class CoursesService
|
|
|
|
|
:description => description, :homework_state => state,:open_anonymous_evaluation => open_anonymous_evaluation}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end
|