Start of Test Class, fixing ranking visibiliy of open rounds issue
This commit is contained in:
parent
7545760aa2
commit
29e493e22d
11 changed files with 11891 additions and 43 deletions
|
|
@ -109,6 +109,7 @@ class Quota extends Model
|
|||
return $arr;
|
||||
}
|
||||
|
||||
|
||||
public static function setQuotas($quotas,$season_id) {
|
||||
foreach ($quotas as $key => $quota) {
|
||||
setQuota($key, $quota, $season_id);
|
||||
|
|
@ -116,21 +117,19 @@ class Quota extends Model
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static function createDefaultQuota($season_id)
|
||||
{
|
||||
Log::info('Creating default quotas');
|
||||
DB::table('quotas')->where('season_id', '=', $season_id)->delete();
|
||||
|
||||
|
||||
|
||||
$roundCount=Season::getCurrent()->rounds;
|
||||
Log::info("Creating new Quota");
|
||||
|
||||
$quota = new Quota;
|
||||
$quota->season_id = $season_id;
|
||||
$quota->name = "Runden";
|
||||
$quota->prc = 36;
|
||||
$quota->prc = $roundCount;
|
||||
$quota->save();
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue