Initial commit

This commit is contained in:
jeremy bayse
2026-03-20 08:25:58 +01:00
commit a55a33ae2a
143 changed files with 19599 additions and 0 deletions

17
fix_max_scores.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();
use App\Models\Attempt;
$attempts = Attempt::whereNull('max_score')->get();
foreach ($attempts as $attempt) {
if ($attempt->quiz) {
$max = $attempt->quiz->questions->sum('points');
$attempt->update(['max_score' => $max]);
echo "Updated attempt {$attempt->id} with max_score {$max}\n";
}
}