|
|
@ -272,7 +272,7 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
def update_student_score
|
|
|
|
def update_student_score
|
|
|
|
work = @homework.student_works.find_by(user_id: current_user.id)
|
|
|
|
work = @homework.student_works.find_by(user_id: current_user.id)
|
|
|
|
myshixun = Myshixun.find_by(shixun_id: params[:shixun_id], user_id: current_user.id)
|
|
|
|
myshixun = Myshixun.find_by(shixun_id: params[:shixun_id], user_id: current_user.id)
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
begin
|
|
|
|
begin
|
|
|
|
if work && myshixun && (work.update_time.nil? || work.update_time < myshixun.updated_at)
|
|
|
|
if work && myshixun && (work.update_time.nil? || work.update_time < myshixun.updated_at)
|
|
|
|
challenge_settings = @homework.homework_challenge_settings
|
|
|
|
challenge_settings = @homework.homework_challenge_settings
|
|
|
|