commit
						cd5e6617cd
					
				| @ -0,0 +1,11 @@ | ||||
| json.courses @courses do |course| | ||||
|   json.(course, :id, :name, :is_end, :evaluating_count) | ||||
|   json.teachers course.teacher_users.map(&:real_name).join('、') | ||||
|   json.student_count @student_count.fetch(course.id, 0) | ||||
|   json.shixun_work_count @shixun_work_count.fetch(course.id, 0) | ||||
|   json.attachment_count @attachment_count.fetch(course.id, 0) | ||||
|   json.message_count @message_count.fetch(course.id, 0) | ||||
|   json.other_work_count @exercise_count.fetch(course.id, 0) + @poll_count.fetch(course.id, 0) + @other_work_count.fetch(course.id, 0) | ||||
|   json.activity_time @active_time[course.id]&.strftime('%Y-%m-%d %H:%M') | ||||
| end | ||||
| json.course_count @course_count | ||||
| @ -0,0 +1,10 @@ | ||||
| json.teachers @students do |student| | ||||
|   json.login student.login | ||||
|   json.name student.real_name | ||||
|   json.student_id student.student_id | ||||
|   json.shixun_count @shixun_count.fetch(student.id, 0) | ||||
|   json.study_shixun_count @study_shixun_count.fetch(student.id, 0) | ||||
|   json.grade student.grade | ||||
|   json.experience student.experience | ||||
| end | ||||
| json.student_count @student_count | ||||
| @ -0,0 +1,11 @@ | ||||
| json.teachers @teachers do |teacher| | ||||
|   json.login teacher['login'] | ||||
|   json.name teacher['real_name'] | ||||
|   json.course_count teacher['course_count'] | ||||
|   json.shixun_work_count teacher['shixun_work_count'] | ||||
|   json.un_shixun_work_count teacher['un_shixun_work_count'] | ||||
|   json.student_count teacher['student_count'] | ||||
|   json.complete_rate teacher['complete_rate'] | ||||
|   json.publish_shixun_count teacher['publish_shixun_count'] | ||||
| end | ||||
| json.teacher_count @teacher_count | ||||
					Loading…
					
					
				
		Reference in new issue