|
|
|
@ -440,7 +440,7 @@ class SubjectsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
# 用户进展和获取的标签
|
|
|
|
|
def user_subject_progress challenge_ids
|
|
|
|
|
pass_games = Game.select(:id, :cost_time, :challenge_id).where(status: 2, user_id: current_user.id, challenge_id: challenge_ids) if current_user.logged?
|
|
|
|
|
pass_games = Challenge.left_joins(:games).where(challenges: {id: challenge_ids},games: {status: 2, user_id: current_user.id}) if current_user.logged?
|
|
|
|
|
@all_score = Challenge.where(id: challenge_ids).sum(:score)
|
|
|
|
|
|
|
|
|
|
# 如果没有通关的,没必要再继续统计了
|
|
|
|
|