Show green short, correction of player matchups, randomization of new player league assignments

This commit is contained in:
Torsten 2018-01-15 08:58:52 +01:00
parent 08ffdf5609
commit 4f6116fc5b
5 changed files with 88 additions and 22 deletions

View file

@ -254,8 +254,8 @@ class Tipp extends Model
$currentSeason = Season::where('id', '=', $seasonId)->first();
};
if (Round::getLastCompleteRoundId($seasonId)==-1) {
error_log("Tipp::getRoundTipps returns null, because there is no completeRoundId");
if (Round::getLastLockedRoundId($seasonId)==-1) {
error_log("Tipp::getRoundTipps returns null, because there is no LastLockedRoundId");
return null;
}
@ -281,8 +281,9 @@ class Tipp extends Model
// Write sql result to roundtipps (score per round & user)
if ($max_round_id == -1) {
$max_round_id = Round::getLastCompleteRoundId($currentSeason->id);
$max_round_id = Round::getLastLockedRoundId($currentSeason->id);
}
foreach ($result as $entry) {
$round_id = $entry->round_id;
if ($max_round_id > -1 && $round_id > $max_round_id) break;