Add grade/Klasse system: assign class levels to users, questions, and quizzes
- users.grade: set per child in admin (Klasse 1–10) - quizzes.grade, questions.grade: optional target class (null = all) - Children only see content matching their grade or without grade set - Admin views show grade badge in user list, quiz list, questions list - Quiz create/edit and user create/edit have Klasse dropdown
This commit is contained in:
@@ -36,7 +36,9 @@
|
||||
@forelse($quizzes as $quiz)
|
||||
<tr class="hover:bg-slate-50">
|
||||
<td class="px-4 py-3 text-slate-600">{{ $quiz->subject->icon }} {{ $quiz->subject->name }}</td>
|
||||
<td class="px-4 py-3 font-medium text-slate-800">{{ $quiz->title }}</td>
|
||||
<td class="px-4 py-3 font-medium text-slate-800">{{ $quiz->title }}
|
||||
@if($quiz->grade)<span class="ml-2 text-xs bg-indigo-100 text-indigo-700 px-2 py-0.5 rounded-full">Kl.{{ $quiz->grade }}</span>@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="{{ $quiz->questions_count < 10 ? 'text-amber-600' : 'text-green-600' }} font-medium">
|
||||
{{ $quiz->questions_count }}/10
|
||||
|
||||
Reference in New Issue
Block a user