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:
@@ -21,6 +21,15 @@
|
||||
<label class="block text-sm font-medium text-slate-700 mb-1">Beschreibung (optional)</label>
|
||||
<textarea name="description" rows="2" class="w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-violet-500 outline-none">{{ old('description') }}</textarea>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-slate-700 mb-1">Zielklasse <span class="text-slate-400 font-normal">(leer = für alle Kinder)</span></label>
|
||||
<select name="grade" class="w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-violet-500 outline-none">
|
||||
<option value="">Alle Klassen</option>
|
||||
@for($g=1;$g<=10;$g++)
|
||||
<option value="{{ $g }}" {{ old('grade','')==$g?'selected':'' }}>Klasse {{ $g }}</option>
|
||||
@endfor
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="w-full bg-violet-600 hover:bg-violet-700 text-white py-2 rounded-lg font-medium text-sm">Erstellen & Fragen hinzufügen →</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user