导出活跃度的修改

dev_aliyun_beta
SylorHuang 6 years ago
parent 53f8aeabe7
commit cef123226c

@ -1085,11 +1085,15 @@ class CoursesController < ApplicationController
# 导出课堂信息
def export_couser_info
set_export_cookies
course_info_to_xlsx @course
filename_ = "#{current_user.real_name}_#{@course.name}_课堂信息_#{Time.now.strftime('%Y%m%d_%H%M%S')}"
render xlsx: "#{format_sheet_name filename_.strip}",template: "courses/export_course_info.xlsx.axlsx",
locals: {course_info: @course_info}
if params[:export].present? && params[:export]
normal_status(0,"正在下载中")
else
set_export_cookies
course_info_to_xlsx @course
filename_ = "#{current_user.real_name}_#{@course.name}_课堂信息_#{Time.now.strftime('%Y%m%d_%H%M%S')}"
render xlsx: "#{format_sheet_name filename_.strip}",template: "courses/export_course_info.xlsx.axlsx",
locals: {course_info: @course_info}
end
end
# 导出活跃度

@ -280,11 +280,12 @@ class ExerciseQuestionsController < ApplicationController
if null_choice_text_count >= ex_answer_pre_count
new_add_choice = null_choice_text_count_array - ex_answer_pre_count_array
ex_answer_pre_count_array.each do |n|
standard_option = {
:exercise_question_id => @exercise_question.id,
:exercise_choice_id => null_choice_id,
:answer_text => null_choice_text[n-1]
@hash_symbol_null_ = {
:exercise_question_id => @exercise_question.id,
:exercise_choice_id => null_choice_id,
:answer_text => null_choice_text[n - 1]
}
standard_option = @hash_symbol_null_
ex_answer_pre[n-1].update(standard_option)
end
if new_add_choice.count > 0 #表示有新增的

Loading…
Cancel
Save