|
|
|
@ -976,12 +976,12 @@ class CoursesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
@c_homeworks = @course.homework_commons.homework_published.order("homework_commons.publish_time asc, homework_commons.created_at asc")
|
|
|
|
|
@c_exercises = @course.exercises.is_exercise_published.order("exercises.publish_time asc, exercises.created_at asc")
|
|
|
|
|
@c_polls = @course.polls.publish_or_not.order("polls.publish_time asc, polls.created_at asc")
|
|
|
|
|
# @c_polls = @course.polls.publish_or_not.order("polls.publish_time asc, polls.created_at asc")
|
|
|
|
|
@c_tasks = @course.graduation_tasks.task_published.order("graduation_tasks.publish_time asc, graduation_tasks.created_at asc")
|
|
|
|
|
if @user_course_identity > Course::ASSISTANT_PROFESSOR
|
|
|
|
|
tip_exception(403,"无权限操作")
|
|
|
|
|
else
|
|
|
|
|
member_to_xlsx(@course, @all_members, @c_homeworks, @c_exercises, @c_tasks, @c_polls)
|
|
|
|
|
member_to_xlsx(@course, @all_members, @c_homeworks, @c_exercises, @c_tasks)
|
|
|
|
|
filename = current_user.real_name + "_" + @course.name + "_全部成绩" + Time.now.strftime('%Y%m%d_%H%M%S')
|
|
|
|
|
render xlsx: "#{format_sheet_name filename.strip.first(30)}",template: "courses/export_member_scores_excel.xlsx.axlsx",
|
|
|
|
|
locals: {course_info:@course_info, activity_level:@user_activity_level,
|
|
|
|
|