TimeLogger moved, League ranking also for not completed but started rounds

This commit is contained in:
Torsten 2018-08-17 17:16:01 +02:00
parent 78a4a04cdf
commit 90c6d60ecd
26 changed files with 692 additions and 376 deletions

View file

@ -258,14 +258,18 @@ class Match extends Model
$roundtipps = $roundtipps["roundtipps"];
$matches = Match::getLeagueMatches($leagueId, $maxRoundId);
if ($maxRoundId==-1) { $maxRoundId = Round::getLastRoundId($season->id); }
if ($maxRoundId==-1) {
//$maxRoundId = Round::getLastRoundId($season->id);
$maxRoundId = Round::getLastLockedRoundId($season->id);
Log::info("LASTLOCKEDROUND_ID=".$maxRoundId);
}
foreach($matches as $key => $match) {
$user1_key = $match->round_id."_".$match->user1_id;
$user2_key = $match->round_id."_".$match->user2_id;
if (Round::isCompleted($match->round_id)) {
if (array_key_exists($user1_key,$roundtipps ) && array_key_exists($user2_key,$roundtipps) ) {
$user1_score = $roundtipps[$user1_key]["rankscore"];
$user2_score = $roundtipps[$user2_key]["rankscore"];