between years fix
This commit is contained in:
parent
90c6d60ecd
commit
157b9d8b5e
53 changed files with 46 additions and 3772 deletions
|
|
@ -29,7 +29,6 @@ class UsersController extends Controller
|
|||
public function main() {
|
||||
$a=new TimeLogger("UsersController::main()");
|
||||
Log::info($a->getStartMessage());
|
||||
//error_log($a->getStartMessage());
|
||||
|
||||
$currentSeason=Season::getCurrent();
|
||||
$roundname="";
|
||||
|
|
@ -131,31 +130,51 @@ class UsersController extends Controller
|
|||
|
||||
|
||||
Log::info($a->getStartMessage());
|
||||
$missingTipps = User::getMissingTippsAndJokers($users);
|
||||
$missingTipps = User::getMissingTippsAndJokers($activeUsers);
|
||||
|
||||
Log::info("Missing tipps id overview:");
|
||||
foreach($missingTipps["MISSING_TIPP"] as $uid => $val) {
|
||||
Log::info($uid);
|
||||
}
|
||||
|
||||
$c=new TimeLogger("UsersController::index-missingTipp Loop");
|
||||
Log::info($c->getStartMessage());
|
||||
|
||||
|
||||
foreach($users as $user_id => $user) {
|
||||
if (array_key_exists($user_id, $missingTipps["MISSING_TIPP"])) {
|
||||
$users[$user_id]->missingTippText = "Tipps fehlen";
|
||||
$users[$user_id]->tippStyling = "red";
|
||||
} else {
|
||||
$users[$user_id]->missingTippText = "Runde getippt";
|
||||
$users[$user_id]->tippStyling = "green";
|
||||
}
|
||||
|
||||
|
||||
if (array_key_exists($user_id, $missingTipps["MISSING_JOKER"])) {
|
||||
$users[$user_id]->missingJokerText = "Joker fehlt";
|
||||
$users[$user_id]->jokerStyling = "red";
|
||||
} else {
|
||||
$users[$user_id]->missingJokerText = "Joker gesetzt";
|
||||
$users[$user_id]->jokerStyling = "green";
|
||||
}
|
||||
$actIds=array();
|
||||
foreach ($activeUsers as $aUser) {
|
||||
Log::info("Active user: ".$aUser->id." ".$aUser->name);
|
||||
$actIds[$aUser->id]=$aUser->id;
|
||||
}
|
||||
|
||||
foreach($users as $index => $user) {
|
||||
Log::info("Filling in data for user_id ".$user->id);
|
||||
if (!array_key_exists($user->id, $actIds)) {
|
||||
Log::info("Inactive id: " . $user->id);
|
||||
$users[$index]->missingTippText = "inaktiv";
|
||||
$users[$index]->tippStyling = "grey";
|
||||
$users[$index]->missingJokerText = "inaktiv";
|
||||
$users[$index]->jokerStyling = "grey";
|
||||
|
||||
} else {
|
||||
|
||||
if (array_key_exists($user->id, $missingTipps["MISSING_TIPP"])) {
|
||||
$users[$index]->missingTippText = "Tipps fehlen";
|
||||
$users[$index]->tippStyling = "red";
|
||||
} else {
|
||||
$users[$index]->missingTippText = "Runde getippt";
|
||||
$users[$index]->tippStyling = "green";
|
||||
}
|
||||
|
||||
|
||||
if (array_key_exists($user->id, $missingTipps["MISSING_JOKER"])) {
|
||||
$users[$index]->missingJokerText = "Joker fehlt";
|
||||
$users[$index]->jokerStyling = "red";
|
||||
} else {
|
||||
$users[$index]->missingJokerText = "Joker gesetzt";
|
||||
$users[$index]->jokerStyling = "green";
|
||||
}
|
||||
}
|
||||
}
|
||||
Log::info($c->getEndMessage());
|
||||
|
||||
$round = Round::getFirstTippableRound();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue