merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
p31729568 6 years ago
commit 6eb7fc4db1

@ -1294,7 +1294,7 @@ class ExercisesController < ApplicationController
def export_exercise
@request_url = request.base_url
@exercise_questions = @exercise.exercise_questions.includes(:exercise_choices).order("question_number ASC")
filename_ = "#{@exercise.user.real_name}_#{@course.name}__#{Time.now.strftime('%Y%m%d_%H%M%S')}.pdf"
filename_ = "#{@exercise.user.real_name}_#{@course.name}_#{Time.now.strftime('%Y%m%d_%H%M%S')}.pdf"
stylesheets = "#{Rails.root}/app/templates/exercise_export/exercise_export.css"
render pdf: 'exercise_export/blank_exercise', filename: filename_, stylesheets: stylesheets
end

@ -130,7 +130,7 @@ module ExercisesHelper
# end
user_ids.each do |user_id|
answer_choice_array = ExerciseChoice.where(id:effictive_users.map{|e| e.exercise_choice_id if a.user_id == user_id}).pluck(:choice_position).uniq
answer_choice_array = ExerciseChoice.where(id:effictive_users.map{|e| e.exercise_choice_id if e.user_id == user_id}).pluck(:choice_position).uniq
if answer_choice_array.sort == standard_answer
right_users_count += 1
end

Loading…
Cancel
Save