Führe Übungen als Fassungen mit Varianten, Verwendung und Mitgliederausgabe ein
CI Feature / test (push) Successful in 3m32s

Neuer kind 'exercise', Varianten je Fassung, Verwendung (erforderlich/ergänzend) und Variantenauswahl am einbindenden
Mitglied; der Stand schreibt nur gewählte Varianten fest. Änderungsnachweis über structure_hash. Formatierte Anleitung
im Mitgliederbereich und PDF (Fußzeile, Metadaten, Ausgabenachweis, keine gespeicherten Kopien); Sperre trifft nur das
Medium.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-23 16:52:01 +01:00
1 parent ef56befc0e
commit d1f97a351a
26 files changed
+1628 -15

No files matched your search

+17
View File
@@ -14,8 +14,20 @@ class CompositionMember extends Model
'placement_note',
'content_element_version_id',
'nested_composition_version_id',
'variant_id',
'requirement',
'variant_selection',
];
public const REQUIRED = 'erforderlich';
public const SUPPLEMENTARY = 'ergaenzend';
protected function casts(): array
{
return ['variant_selection' => 'array'];
}
protected static function booted(): void
{
static::creating(function (CompositionMember $member): void {
@@ -41,6 +53,11 @@ public function contentElementVersion(): BelongsTo
return $this->belongsTo(ContentElementVersion::class);
}
public function variant(): BelongsTo
{
return $this->belongsTo(CompositionVersionVariant::class, 'variant_id');
}
public function nestedCompositionVersion(): BelongsTo
{
return $this->belongsTo(CompositionVersion::class, 'nested_composition_version_id');