Merge branches 'courseware' and 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into courseware

schedule_job
杨树明 5 years ago
commit 2d46b23daa

@ -992,7 +992,7 @@ class ExercisesController < ApplicationController
else
@ex_end_time = @exercise.get_exercise_end_time(current_user.id)
commit_exercise_user @exercise, exercise_user if @ex_end_time < Time.now
commit_exercise_user @exercise, exercise_user if @ex_end_time.present? && @ex_end_time < Time.now
end
# @ex_end_time = @exercise.get_exercise_end_time(current_user.id)
# if ex_answer_time > 0

@ -968,18 +968,19 @@ module ExercisesHelper
subjective_score = exercise_user.subjective_score < 0.0 ? 0.0 : exercise_user.subjective_score
total_score = objective_score + subjective_score
if commit_time.nil?
if exercise.time > 0
start_time = Time.at(exercise_user.start_at + exercise.time * 60)
end_time = start_time > exercise_end_time ? exercise_end_time : start_time
commit_method = start_time > exercise_end_time ? 3 : 2
else
commit_method = 3
end_time = exercise_end_time
end
if exercise.time > 0
start_time = Time.at(exercise_user.start_at + exercise.time * 60)
end_time = start_time > exercise_end_time ? exercise_end_time : start_time
commit_method = start_time > exercise_end_time ? 3 : 2
else
commit_method = 3
end_time = exercise_end_time
end
unless commit_time.nil?
commit_method = 1
end
commit_time = commit_time.present? && end_time > commit_time ? commit_time : end_time
commit_option = {

Loading…
Cancel
Save