TimeLogger moved, League ranking also for not completed but started rounds
This commit is contained in:
parent
78a4a04cdf
commit
90c6d60ecd
26 changed files with 692 additions and 376 deletions
|
|
@ -13,6 +13,8 @@ use App\Leagues\LeagueMember;
|
|||
use DB;
|
||||
use Log;
|
||||
|
||||
use App\MyClasses;
|
||||
|
||||
class League extends Model
|
||||
{
|
||||
|
||||
|
|
@ -159,9 +161,12 @@ class League extends Model
|
|||
$memberScores[$memberId] = $tpl;
|
||||
}
|
||||
|
||||
|
||||
$lastLockedRoundId=Round::getLastLockedRoundId();
|
||||
Log::info("LASTLOCKKEDROUNDID=".$lastLockedRoundId);
|
||||
$matches=Match::getMatchResults($league->id,-1);
|
||||
foreach ($matches as $match) {
|
||||
if (Round::isCompleted($match->round_id)) {
|
||||
if (Round::isCompleted($match->round_id) || $match->round_id==$lastLockedRoundId ) {
|
||||
$memberScores[$match->user1_id][1] += $match->user1_league_score;
|
||||
error_log("+++ ".$match->user1_id." +".$match->user1_league_score);
|
||||
$memberScores[$match->user1_id][2] += $match->user1_rankscore; // goals
|
||||
|
|
@ -215,6 +220,9 @@ class League extends Model
|
|||
// Nur für Auf und Abstiegsberechnung.
|
||||
// Schreibt den zukünftigen Rank auf Index4
|
||||
public static function getTotalRankingOverall($seasonId=-1) {
|
||||
$a=new MyClasses\TimeLogger("League::getTotalRankingOverall (seasonId=".$seasonId.")");
|
||||
Log::info($a->getStartMessage());
|
||||
|
||||
$userNames = User::getNames();
|
||||
|
||||
$totalRanking=array();
|
||||
|
|
@ -386,7 +394,10 @@ class League extends Model
|
|||
|
||||
|
||||
|
||||
|
||||
Log::info($a->getEndMessage());
|
||||
//error_log($a->getEndMessage());
|
||||
|
||||
|
||||
return $totalRanking;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue