|
|
@ -1194,6 +1194,13 @@ class CoursesController < ApplicationController
|
|
|
|
@exercises = @course.exercises.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")
|
|
|
|
@exercises = @course.exercises.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")
|
|
|
|
@tasks = @course.graduation_tasks.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")
|
|
|
|
@tasks = @course.graduation_tasks.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@homeworks.where(:homework_type => 4).each do |homework|
|
|
|
|
|
|
|
|
items = homework.student_works.where("work_status != 0")
|
|
|
|
|
|
|
|
if items.count == 0 && homework.publish_time < Time.now && !@course.is_end
|
|
|
|
|
|
|
|
update_shixun_work_status homework
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
respond_to do |format|
|
|
|
|
format.xls {
|
|
|
|
format.xls {
|
|
|
|
send_data(member_to_xls(@homeworks, @exercises, @tasks, @course,@all_members,@course.course_groups), :type => "text/excel;charset=utf-8; header=present",
|
|
|
|
send_data(member_to_xls(@homeworks, @exercises, @tasks, @course,@all_members,@course.course_groups), :type => "text/excel;charset=utf-8; header=present",
|
|
|
|