Compare commits

..
Author SHA1 Message Date
LarsandClaude Sonnet 5.5 1d1f0ebb1f Binde das Favicon ein und lege Favicon und Kleingrafiken des Brand-Kits ab
CI Feature / test (push) Successful in 3m50s
Die Datei public/favicon.ico war leer; im head fehlte jeder Icon-Verweis.
- Favicon (ICO, SVG, Apple-Touch-Icon) in public/, gemeinsame Komponente
  x-site.favicon in Website-, Mitglieder- und Vorschau-Layouts
- Verwaltung: Icon per Render-Hook zur Anfragezeit statt ->favicon(asset()),
  weil asset() beim Start den falschen Host liefert
- FaviconTest (Dateien, Verweise, Adresse hinter dem Proxy)
- Brand-Kit: 15_Lara-Felix-Favicon und 16_Lara-Felix-Kleingrafiken (freigegeben)
- KIT_ERGAENZUNG_v2.1_kleingrafiken.md: Prüfung und Umsetzungsvorschlag

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 11:27:56 +01:00
154 changed files with 394 additions and 4388 deletions

No files matched your search

-4
View File
@@ -70,7 +70,3 @@ PAYMENT_DRIVER=test
MEDIA_PUBLIC_PATH=
MEDIA_DERIVED_PATH=
MEDIA_ORIGINALS_PATH=
# Übernahme von Übungen aus Shinkan (Test: erst nach Freigabe der Anbindung eintragen; Werte nie ins Repository)
SHINKAN_DISTRIBUTION_URL=
SHINKAN_DISTRIBUTION_KEY=
-6
View File
@@ -57,8 +57,6 @@ public function publishRelease(
'content_element_version_id' => $row['version_id'],
'role' => $row['role'] !== '' ? $row['role'] : $row['path'],
'path' => $row['path'],
'requirement' => $row['requirement'] ?? null,
'variant_key' => $row['variant'] ?? null,
]);
}
@@ -143,10 +141,6 @@ private function checkedRows(ContentElementVersion|CompositionVersion $root): ar
{
$root->refresh();
if (app(ForeignCompositions::class)->reaches($root)) {
throw new DomainRuleException('Der Aufbau enthält einen Bestandteil, den dieser Programmstand nicht kennt. Er wird hier nicht veröffentlicht, damit nichts fehlt oder zu viel ausgegeben wird.');
}
if ($root->status !== ContentVersionStatus::Bereit) {
throw new DomainRuleException('Ein Artikel-Stand kann nur eine bereitgestellte Fassung festschreiben.');
}
@@ -13,7 +13,6 @@ class CompatibilityAttestation extends Model
protected $fillable = [
'composition_version_id',
'resolved_hash',
'structure_hash',
'confirmed_by',
'confirmed_at',
'note',
-5
View File
@@ -36,11 +36,6 @@ protected function casts(): array
];
}
protected static function booted(): void
{
static::addGlobalScope(new SupportedKindScope);
}
public function editorialContentKind(): BelongsTo
{
return $this->belongsTo(EditorialContentKind::class);
+3 -19
View File
@@ -7,24 +7,13 @@ enum CompositionKind: string
case Kombination = 'kombination';
case Uebung = 'uebung';
case Kurs = 'kurs';
/** Seit der Übungsverwaltung: die fachliche Übung. Der ältere Wert `uebung` bezeichnet in der Verwaltung das Modul. */
case Exercise = 'exercise';
/**
* @return list<string>
*/
public static function values(): array
{
return array_map(fn (self $case): string => $case->value, self::cases());
}
public function label(): string
{
return match ($this) {
self::Kombination => 'Fachliche Kombination',
self::Uebung => 'Modul',
self::Uebung => 'Übung',
self::Kurs => 'Kurs',
self::Exercise => 'Übung',
};
}
@@ -32,9 +21,8 @@ public function plural(): string
{
return match ($this) {
self::Kombination => 'Fachliche Kombinationen',
self::Uebung => 'Module',
self::Uebung => 'Übungen',
self::Kurs => 'Kurse',
self::Exercise => 'Übungen',
};
}
@@ -42,9 +30,8 @@ public function createLabel(): string
{
return match ($this) {
self::Kombination => 'Kombination anlegen',
self::Uebung => 'Modul anlegen',
self::Uebung => 'Übung anlegen',
self::Kurs => 'Kurs anlegen',
self::Exercise => 'Übung anlegen',
};
}
@@ -54,7 +41,6 @@ public function explanation(): string
self::Kombination => 'Didaktische oder thematische Zusammenstellung, zum Beispiel ein Materialsatz. Sie wird in Übungen und Kursen wiederverwendet und ist selbst kein Kurs.',
self::Uebung => 'Eine konkrete Lernsituation, zum Beispiel aus Film und Merkblatt. Dieselben Medien können in mehreren Übungen stecken.',
self::Kurs => 'Ein Ablauf für den Kursbetrieb aus Übungen, Kombinationen und Medien. Ein Kurs ist keine Übung.',
self::Exercise => 'Eine Übung mit Lernziel, Vorbereitung, Durchführung und Varianten, mit Texten und Medien in fester Abfolge. Sie wird in Module und Programme aufgenommen.',
};
}
@@ -64,7 +50,6 @@ public function deskLabel(): string
self::Kombination => 'Fachliche Kombination',
self::Uebung => 'Modul',
self::Kurs => 'Programm',
self::Exercise => 'Übung',
};
}
@@ -74,7 +59,6 @@ public function deskExplanation(): string
self::Kombination => $this->explanation(),
self::Uebung => 'Ein Modul mit Lernziel, Zeit, Material und geordneten Bestandteilen. Dieselben Medien können in mehreren Modulen stecken.',
self::Kurs => 'Ein Programm aus Modulen und weiteren Inhalten.',
self::Exercise => $this->explanation(),
};
}
-18
View File
@@ -14,21 +14,8 @@ class CompositionMember extends Model
'placement_note',
'content_element_version_id',
'nested_composition_version_id',
'variant_id',
'requirement',
'variant_selection',
'origin',
];
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 {
@@ -54,11 +41,6 @@ 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');
+2 -20
View File
@@ -54,7 +54,6 @@ public function publish(
?string $note,
array $didactic,
bool $consent,
array $variants = [],
): CompositionVersion {
$review = $this->review($host, $members);
@@ -68,8 +67,8 @@ public function publish(
$this->publishedDrafts = [];
return DB::transaction(function () use ($host, $members, $actor, $note, $didactic, $variants): CompositionVersion {
return $this->materialize($host, $members, $didactic, $actor, $note, [], $variants);
return DB::transaction(function () use ($host, $members, $actor, $note, $didactic): CompositionVersion {
return $this->materialize($host, $members, $didactic, $actor, $note, []);
});
}
@@ -221,12 +220,6 @@ private function inspectReleasedComposition(
): void {
$version = CompositionVersion::query()->with('composition', 'members')->find($id);
if ($version instanceof CompositionVersion && $version->composition === null && app(ForeignCompositions::class)->isForeignVersion($version->id)) {
$blocked[] = $this->block('Bestandteil', 'Dieser Bestandteil stammt aus einer neueren Programmversion und kann hier nicht freigegeben werden.', $depth, null);
return;
}
if (! $version instanceof CompositionVersion || $version->composition === null) {
$blocked[] = $this->block('Modul', 'Ein Bestandteil ist nicht mehr vorhanden.', $depth, null);
@@ -331,7 +324,6 @@ private function materialize(
?User $actor,
?string $note,
array $stack,
array $variants = [],
): CompositionVersion {
if (isset($this->publishedDrafts[$composition->id])) {
return $this->publishedDrafts[$composition->id];
@@ -349,10 +341,6 @@ private function materialize(
'role' => trim((string) ($member['role'] ?? '')),
'note' => trim((string) ($member['note'] ?? '')),
'target' => $this->resolveTarget((string) ($member['target'] ?? ''), $actor, $stack),
'variant' => isset($member['variant']) && $member['variant'] !== '' ? (string) $member['variant'] : null,
'requirement' => $member['requirement'] ?? 'erforderlich',
'selection' => is_array($member['selection'] ?? null) && $member['selection'] !== [] ? array_values($member['selection']) : null,
'origin' => $member['origin'] ?? 'lokal',
];
}
@@ -364,11 +352,8 @@ private function materialize(
[
'learning_goal' => $didactic['learning_goal'] ?? null,
'duration_minutes' => $didactic['duration_minutes'] ?? null,
'duration_max' => $didactic['duration_max'] ?? null,
'material_note' => $didactic['material_note'] ?? null,
'prerequisites' => $didactic['prerequisites'] ?? null,
],
$variants,
);
$this->publishedDrafts[$composition->id] = $version;
@@ -429,14 +414,11 @@ private function resolveTarget(string $target, ?User $actor, array $stack): Cont
[
'learning_goal' => $draft['learning_goal'] ?? null,
'duration_minutes' => $draft['duration_minutes'] ?? null,
'duration_max' => $draft['duration_max'] ?? null,
'material_note' => $draft['material_note'] ?? null,
'prerequisites' => $draft['prerequisites'] ?? null,
],
$actor,
is_string($draft['revision_note'] ?? null) ? $draft['revision_note'] : null,
$stack,
is_array($draft['variants'] ?? null) ? $draft['variants'] : [],
);
app(EditorialWorkingDraft::class)->clear($composition);
@@ -60,11 +60,6 @@ private function members(CompositionVersion $version, array $stack = []): array
$nested->loadMissing('composition.editorialContentKind', 'composition');
$composition = $nested->composition;
// Bestandteil einer Art, die dieser Programmstand nicht kennt: nicht anzeigen (Rückfallschutz).
if ($composition === null) {
continue;
}
$nodes[] = new StructureNode(
role: $member->role,
position: $member->position,
@@ -17,10 +17,6 @@ class CompositionVersion extends Model
'learning_goal',
'duration_minutes',
'material_note',
'duration_max',
'prerequisites',
'structure_hash',
'source_snapshot_id',
];
protected function casts(): array
@@ -64,11 +60,6 @@ public function members(): HasMany
return $this->hasMany(CompositionMember::class)->orderBy('position');
}
public function variants(): HasMany
{
return $this->hasMany(CompositionVersionVariant::class)->orderBy('position');
}
public function attestations(): HasMany
{
return $this->hasMany(CompatibilityAttestation::class);
@@ -1,36 +0,0 @@
<?php
namespace App\Domain\Catalog;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Durchführungsvariante einer Übungsfassung. Der Schlüssel ist je Fassung eindeutig und bleibt über Fassungen hinweg
* gleich, damit eine Auswahl im Modul oder Programm und der Abgleich mit einer Quelle dieselbe Variante meinen.
* Wie die Mitglieder ist sie nur im Entwurf der Fassung schreibbar.
*/
class CompositionVersionVariant extends Model
{
protected $fillable = ['composition_version_id', 'key', 'position', 'name', 'description', 'origin'];
protected static function booted(): void
{
static::creating(function (CompositionVersionVariant $variant): void {
$status = CompositionVersion::query()->whereKey($variant->composition_version_id)->value('status');
if (StatusValue::of($status) === ContentVersionStatus::Bereit->value) {
throw new DomainRuleException('Eine bestätigte Kompositionsfassung nimmt keine weiteren Varianten auf.');
}
});
static::updating(function (): void {
throw new DomainRuleException('Varianten einer Komposition werden nicht verändert, sondern durch eine neue Fassung ersetzt.');
});
}
public function compositionVersion(): BelongsTo
{
return $this->belongsTo(CompositionVersion::class);
}
}
-1
View File
@@ -31,7 +31,6 @@ class ContentElement extends Model
'preview_path',
'editorial_content_kind_id',
'archived_at',
'source_ref',
];
protected function casts(): array
+4 -32
View File
@@ -5,14 +5,9 @@
class ContentResolver
{
/**
* Löst eine Wurzel zu den enthaltenen Medienfassungen auf. Eine Übung wird nur mit ihren gemeinsamen Mitgliedern und
* den ausgewählten Varianten aufgelöst: Das Mitglied, das die Übungsfassung einbindet, trägt die Auswahl
* (`variant_selection`, Liste von Variantenschlüsseln; leer gelassen bedeutet alle Varianten).
*
* @param list<string>|null $selection Variantenschlüssel, die für diese Fassung gelten; null = alle
* @return list<array{version_id: int, role: string, path: string, requirement: string, variant: string|null}>
* @return list<array{version_id: int, role: string, path: string}>
*/
public function expand(ContentElementVersion|CompositionVersion $node, string $path = '', array $stack = [], ?array $selection = null): array
public function expand(ContentElementVersion|CompositionVersion $node, string $path = '', array $stack = []): array
{
if ($node instanceof ContentElementVersion) {
$node->loadMissing('element');
@@ -21,8 +16,6 @@ public function expand(ContentElementVersion|CompositionVersion $node, string $p
'version_id' => $node->id,
'role' => $path,
'path' => $path !== '' ? $path : $node->element->working_title,
'requirement' => CompositionMember::REQUIRED,
'variant' => null,
]];
}
@@ -33,13 +26,7 @@ public function expand(ContentElementVersion|CompositionVersion $node, string $p
$stack[] = $node->composition_id;
$rows = [];
foreach ($node->members()->with('variant')->orderBy('position')->get() as $member) {
$variantKey = $member->variant?->key;
if ($variantKey !== null && $selection !== null && ! in_array($variantKey, $selection, true)) {
continue;
}
foreach ($node->members()->orderBy('position')->get() as $member) {
$segment = $path === '' ? $member->role : $path.' / '.$member->role;
if ($member->content_element_version_id !== null) {
@@ -47,8 +34,6 @@ public function expand(ContentElementVersion|CompositionVersion $node, string $p
'version_id' => $member->content_element_version_id,
'role' => $member->role,
'path' => $segment,
'requirement' => $member->requirement ?: CompositionMember::REQUIRED,
'variant' => $variantKey,
];
continue;
@@ -60,20 +45,7 @@ public function expand(ContentElementVersion|CompositionVersion $node, string $p
throw new DomainRuleException('Ein Kompositionsmitglied braucht genau ein Ziel.');
}
// Bestandteil einer Art, die dieser Programmstand nicht kennt: nicht auflösen (Rückfallschutz).
// Veröffentlichen verweigern die aufrufenden Stellen über ForeignCompositions.
$nested->loadMissing('composition');
if ($nested->composition === null) {
continue;
}
$rows = array_merge($rows, $this->expand(
$nested,
$segment,
$stack,
is_array($member->variant_selection) ? array_values(array_map('strval', $member->variant_selection)) : null,
));
$rows = array_merge($rows, $this->expand($nested, $segment, $stack));
}
return $rows;
+2 -135
View File
@@ -225,9 +225,7 @@ public function releaseElementVersion(ContentElementVersion $version): ContentEl
}
/**
* @param list<array{role: string, target: ContentElementVersion|CompositionVersion, note?: string|null, variant?: string|null, requirement?: string|null, selection?: list<string>|null}> $members
* @param array{learning_goal?: mixed, duration_minutes?: mixed, duration_max?: mixed, material_note?: mixed, prerequisites?: mixed} $didactic
* @param list<array{key: string, name: string, description?: string|null, origin?: string}> $variants Durchführungsvarianten einer Übung
* @param list<array{role: string, target: ContentElementVersion|CompositionVersion}> $members
*/
public function publishComposition(
Composition $composition,
@@ -235,21 +233,18 @@ public function publishComposition(
?User $confirmedBy = null,
?string $note = null,
array $didactic = [],
array $variants = [],
): CompositionVersion {
if ($members === []) {
throw new DomainRuleException('Eine Komposition braucht mindestens ein Mitglied.');
}
$variants = $this->checkedVariants($variants);
$this->assertAcyclic($composition->id, $members);
foreach ($members as $member) {
$this->assertReadyMember($member['target']);
$this->assertMemberPlacement($member, $variants);
}
return DB::transaction(function () use ($composition, $members, $confirmedBy, $note, $didactic, $variants): CompositionVersion {
return DB::transaction(function () use ($composition, $members, $confirmedBy, $note, $didactic): CompositionVersion {
$number = ((int) $composition->versions()->max('number')) + 1;
$version = $composition->versions()->create([
'number' => $number,
@@ -258,52 +253,28 @@ public function publishComposition(
'resolved_hash' => 'pending',
'learning_goal' => $this->optionalText($didactic['learning_goal'] ?? null),
'duration_minutes' => isset($didactic['duration_minutes']) ? (int) $didactic['duration_minutes'] : null,
'duration_max' => isset($didactic['duration_max']) ? (int) $didactic['duration_max'] : null,
'material_note' => $this->optionalText($didactic['material_note'] ?? null),
'prerequisites' => $this->optionalText($didactic['prerequisites'] ?? null),
'source_snapshot_id' => isset($didactic['source_snapshot_id']) ? (int) $didactic['source_snapshot_id'] : null,
]);
$variantIds = [];
foreach ($variants as $index => $variant) {
$variantIds[$variant['key']] = $version->variants()->create([
'key' => $variant['key'],
'position' => $index + 1,
'name' => $variant['name'],
'description' => $variant['description'],
'origin' => $variant['origin'],
])->id;
}
foreach (array_values($members) as $index => $member) {
$target = $member['target'];
$selection = $target instanceof CompositionVersion ? ($member['selection'] ?? null) : null;
$version->members()->create([
'position' => $index + 1,
'role' => $this->required($member['role'], 'Die Rolle eines Mitglieds fehlt.'),
'placement_note' => $this->optionalText($member['note'] ?? null),
'content_element_version_id' => $target instanceof ContentElementVersion ? $target->id : null,
'nested_composition_version_id' => $target instanceof CompositionVersion ? $target->id : null,
'variant_id' => isset($member['variant']) ? $variantIds[$member['variant']] : null,
'requirement' => $member['requirement'] ?? CompositionMember::REQUIRED,
'variant_selection' => $selection === null ? null : array_values($selection),
'origin' => ($member['origin'] ?? 'lokal') === 'quelle' ? 'quelle' : 'lokal',
]);
}
$version->load('members.variant', 'variants');
$resolvedHash = $this->resolver->resolvedHash($version);
$structureHash = $this->structureHash($version);
$version->attestations()->create([
'resolved_hash' => $resolvedHash,
'structure_hash' => $structureHash,
'confirmed_by' => $confirmedBy?->id,
'confirmed_at' => now(),
'note' => $note,
]);
$version->resolved_hash = $resolvedHash;
$version->structure_hash = $structureHash;
$version->status = ContentVersionStatus::Bereit;
$version->save();
@@ -311,103 +282,6 @@ public function publishComposition(
});
}
/**
* Änderungsnachweis einer Fassung: Felder, Varianten und die Verwendung jedes Mitglieds. Anders als der
* `resolved_hash` (nur die Menge der enthaltenen Medienfassungen) ändert er sich auch dann, wenn Variante,
* Verwendung, Reihenfolge oder Variantenauswahl wechseln und die Medien gleich bleiben.
*/
public function structureHash(CompositionVersion $version): string
{
$version->loadMissing('members.variant', 'variants');
return hash('sha256', json_encode([
'fields' => [
$version->learning_goal,
$version->duration_minutes,
$version->duration_max,
$version->material_note,
$version->prerequisites,
],
'variants' => $version->variants->map(fn (CompositionVersionVariant $variant): array => [
$variant->key, $variant->position, $variant->name, $variant->description, $variant->origin,
])->all(),
'members' => $version->members->map(fn (CompositionMember $member): array => [
$member->position,
$member->role,
$member->placement_note,
$member->content_element_version_id,
$member->nested_composition_version_id,
$member->variant?->key,
$member->requirement,
$member->variant_selection,
$member->origin,
])->all(),
], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE));
}
/**
* @param list<array{key?: string, name?: string, description?: string|null}> $variants
* @return list<array{key: string, name: string, description: string|null}>
*/
private function checkedVariants(array $variants): array
{
$checked = [];
$keys = [];
foreach (array_values($variants) as $variant) {
$key = trim((string) ($variant['key'] ?? ''));
if ($key === '' || in_array($key, $keys, true)) {
throw new DomainRuleException('Jede Variante braucht einen eigenen Schlüssel.');
}
$keys[] = $key;
$checked[] = [
'key' => $key,
'name' => $this->required((string) ($variant['name'] ?? ''), 'Jede Variante braucht einen Namen.'),
'description' => $this->optionalText($variant['description'] ?? null),
'origin' => ($variant['origin'] ?? 'lokal') === 'quelle' ? 'quelle' : 'lokal',
];
}
return $checked;
}
/**
* @param array{target: ContentElementVersion|CompositionVersion, variant?: string|null, requirement?: string|null, selection?: list<string>|null} $member
* @param list<array{key: string, name: string, description: string|null}> $variants
*/
private function assertMemberPlacement(array $member, array $variants): void
{
$variant = $member['variant'] ?? null;
if ($variant !== null && ! in_array($variant, array_column($variants, 'key'), true)) {
throw new DomainRuleException('Ein Mitglied verweist auf eine Variante, die es in dieser Fassung nicht gibt.');
}
$requirement = $member['requirement'] ?? CompositionMember::REQUIRED;
if (! in_array($requirement, [CompositionMember::REQUIRED, CompositionMember::SUPPLEMENTARY], true)) {
throw new DomainRuleException('Die Verwendung eines Mitglieds ist erforderlich oder ergänzend.');
}
$selection = $member['selection'] ?? null;
if ($selection === null) {
return;
}
if (! $member['target'] instanceof CompositionVersion) {
throw new DomainRuleException('Eine Variantenauswahl gibt es nur an einer eingebundenen Übungsfassung.');
}
$offered = $member['target']->variants()->pluck('key')->all();
if ($selection === [] || array_diff($selection, $offered) !== []) {
throw new DomainRuleException('Die Variantenauswahl nennt eine Variante, die die eingebundene Fassung nicht anbietet, oder keine.');
}
}
public function createComposition(string $designation, CompositionKind $kind = CompositionKind::Uebung): Composition
{
return Composition::query()->create([
@@ -471,10 +345,6 @@ private function assertAcyclic(int $compositionId, array $members, array $stack
private function assertReadyMember(ContentElementVersion|CompositionVersion $target): void
{
if (app(ForeignCompositions::class)->reaches($target)) {
throw new DomainRuleException('Dieser Bestandteil stammt aus einer neueren Programmversion und wird hier nicht in eine Fassung aufgenommen.');
}
if ($target->status !== ContentVersionStatus::Bereit) {
throw new DomainRuleException('Eine Komposition darf nur bereitgestellte Fassungen enthalten.');
}
@@ -495,9 +365,6 @@ private function membersHash(array $members): string
'note' => $this->optionalText($member['note'] ?? null),
'element_version_id' => $target instanceof ContentElementVersion ? $target->id : null,
'composition_version_id' => $target instanceof CompositionVersion ? $target->id : null,
'variant' => $member['variant'] ?? null,
'requirement' => $member['requirement'] ?? CompositionMember::REQUIRED,
'selection' => $member['selection'] ?? null,
];
}
+1 -2
View File
@@ -17,7 +17,6 @@ class EditorialContentKind extends Model
public const CONTEXTS = [
'medium' => 'Medium',
'modul' => 'Modul',
'uebung' => 'Übung',
'programm' => 'Programm',
'lizenzartikel' => 'Lizenzartikel',
];
@@ -27,7 +26,7 @@ class EditorialContentKind extends Model
* Modulen (programm, modul), Vertraulichkeit von Traineranleitungen (traineranleitung). Ihre Bezeichnung bleibt
* pflegbar; deaktivieren, Kontexte ändern und löschen sind gesperrt.
*/
public const SYSTEM_SLUGS = ['programm', 'modul', 'uebung', 'traineranleitung'];
public const SYSTEM_SLUGS = ['programm', 'modul', 'traineranleitung'];
protected $fillable = [
'slug',
@@ -46,7 +46,6 @@ public static function compositionContext(?CompositionKind $kind): ?string
return match ($kind) {
CompositionKind::Kurs => 'programm',
CompositionKind::Uebung => 'modul',
CompositionKind::Exercise => 'uebung',
default => null,
};
}
@@ -138,7 +137,6 @@ private function usedKindIds(string $context): array
'lizenzartikel' => DB::table('license_articles'),
'programm' => DB::table('compositions')->where('kind', CompositionKind::Kurs->value),
'modul' => DB::table('compositions')->where('kind', CompositionKind::Uebung->value),
'uebung' => DB::table('compositions')->where('kind', CompositionKind::Exercise->value),
default => null,
};
-183
View File
@@ -1,183 +0,0 @@
<?php
namespace App\Domain\Catalog;
use App\Domain\Entitlement\DecideAccess;
use App\Domain\Entitlement\Grant;
use App\Domain\Entitlement\GrantStatus;
use App\Http\LibraryCatalog;
use App\Models\User;
/**
* Die Anleitung einer Übung, wie ein Stand sie festschreibt: die im Stand gebundene Übungsfassung, die angebotenen
* Varianten und je Abschnitt oder Medium die Entscheidung der zentralen Rechteprüfung (`DecideAccess`). Ansicht und
* PDF lesen dieses Ergebnis und zeigen damit dieselbe Fassung.
*
* Eine Sperre oder fehlende Berechtigung betrifft nur den betroffenen Abschnitt oder das Medium. Anleitung und übrige
* Inhalte bleiben im selben Stand erreichbar. Fehlt in einer Variante ein erforderlicher Bestandteil, gilt die Variante
* als derzeit nicht vollständig durchführbar; ein ergänzender Bestandteil entfällt mit einem Hinweis.
*/
class ExerciseGuide
{
public function __construct(private readonly DecideAccess $access) {}
/**
* Darf dieses Konto den Stand überhaupt sehen? Aktive, nutzbare Berechtigung auf den Artikel und ein auslieferbarer
* Stand. Über die einzelnen Inhalte entscheidet danach `DecideAccess`.
*/
public function mayOpen(User $user, LicenseArticle $article, ArticleRelease $release): bool
{
if ($release->license_article_id !== $article->id
|| ! in_array($release->status, [ReleaseStatus::Veroeffentlicht, ReleaseStatus::AbgeloestVerfuegbar], true)) {
return false;
}
return Grant::query()
->where('license_article_id', $article->id)
->where('status', GrantStatus::Aktiv)
->usableBy($user)
->exists();
}
/**
* Die Übungsfassung an einer Stelle des Stands. Der Pfad nennt die Positionen der Mitglieder von der Wurzel des
* Stands abwärts („2“ oder „1-3“). So ist auch dieselbe Übung an zwei Stellen eines Produkts unterscheidbar.
*
* @return array{version: CompositionVersion, selection: list<string>|null}|null
*/
public function locate(ArticleRelease $release, string $path): ?array
{
if (preg_match('/^\d+(-\d+)*$/', $path) !== 1) {
return null;
}
$version = $release->rootCompositionVersion;
$selection = null;
foreach (array_map('intval', explode('-', $path)) as $position) {
if ($version === null) {
return null;
}
$member = $version->members()->where('position', $position)->first();
if ($member === null || $member->nested_composition_version_id === null) {
return null;
}
$selection = is_array($member->variant_selection) ? array_values(array_map('strval', $member->variant_selection)) : null;
$version = $member->nestedCompositionVersion;
}
$version?->loadMissing('composition');
if ($version === null || $version->composition === null || $version->composition->kind !== CompositionKind::Exercise) {
return null;
}
return ['version' => $version, 'selection' => $selection];
}
/**
* Pfad zur ersten Stelle, an der die Wurzel die Übungsfassung einbindet.
*/
public function pathTo(CompositionVersion $root, int $versionId, array $stack = []): ?string
{
if (in_array($root->id, $stack, true)) {
return null;
}
foreach ($root->members()->orderBy('position')->get() as $member) {
if ($member->nested_composition_version_id === null) {
continue;
}
if ($member->nested_composition_version_id === $versionId) {
return (string) $member->position;
}
$below = $this->pathTo($member->nestedCompositionVersion, $versionId, [...$stack, $root->id]);
if ($below !== null) {
return $member->position.'-'.$below;
}
}
return null;
}
/**
* @param list<string>|null $selection angebotene Variantenschlüssel; null = alle
* @return array<string, mixed>
*/
public function build(User $user, LicenseArticle $article, ArticleRelease $release, CompositionVersion $exercise, ?array $selection, ?string $variantKey = null): array
{
$exercise->loadMissing(['composition', 'variants', 'members.variant', 'members.contentElementVersion.element']);
$library = app(LibraryCatalog::class);
$offered = $exercise->variants->filter(fn (CompositionVersionVariant $variant): bool => $selection === null || in_array($variant->key, $selection, true))->values();
$chosen = $offered->firstWhere('key', $variantKey) ?? $offered->first();
$entries = [];
foreach ($exercise->members as $member) {
$version = $member->contentElementVersion;
if ($version === null) {
continue;
}
$key = $member->variant?->key;
$class = (string) $version->element->output_class;
$action = in_array($class, ['film', 'audio'], true) ? 'streamen' : 'ansehen';
$decision = ($this->access)($user, $article, $release, $version, $action);
$download = $action === 'ansehen' ? ($this->access)($user, $article, $release, $version, 'laden') : null;
$entries[] = [
'variant' => $key,
'role' => $member->role,
'note' => $member->placement_note,
'title' => $library->text($version->element)['title'] ?: $version->element->working_title,
'class' => $class,
'requirement' => $member->requirement ?: CompositionMember::REQUIRED,
'action' => $action,
'version' => $version,
'allowed' => $decision->allowed,
'may_download' => $download?->allowed ?? false,
'grant' => $decision->grant,
'download_grant' => $download?->grant,
'state' => $decision->allowed ? 'ok' : ($version->status === ContentVersionStatus::Gesperrt ? 'gesperrt' : 'nicht_lizenziert'),
'blocks' => $decision->allowed && $class === 'text' ? GuideText::blocks($version->body) : null,
];
}
$variants = $offered->map(function (CompositionVersionVariant $variant) use ($entries): array {
$missing = array_values(array_filter($entries, fn (array $entry): bool => ($entry['variant'] === null || $entry['variant'] === $variant->key)
&& $entry['requirement'] === CompositionMember::REQUIRED
&& ! $entry['allowed']));
return [
'key' => $variant->key,
'name' => $variant->name,
'description' => $variant->description,
'complete' => $missing === [],
'missing' => array_map(fn (array $entry): string => $entry['title'], $missing),
];
})->all();
$shown = array_values(array_filter($entries, fn (array $entry): bool => $entry['variant'] === null || $entry['variant'] === $chosen?->key));
return [
'exercise' => $exercise,
'title' => $library->text($exercise->composition)['title'],
'summary' => $library->text($exercise->composition)['summary'],
'learning_goal' => $exercise->learning_goal,
'duration_minutes' => $exercise->duration_minutes,
'duration_max' => $exercise->duration_max,
'prerequisites' => $exercise->prerequisites,
'material_note' => $exercise->material_note,
'variants' => $variants,
'chosen' => $chosen?->key,
'entries' => $shown,
'entry_total' => count($entries),
];
}
}
-15
View File
@@ -1,15 +0,0 @@
<?php
namespace App\Domain\Catalog;
use Illuminate\Database\Eloquent\Model;
class ExerciseImportRun extends Model
{
protected $fillable = ['source_system', 'status', 'cursor', 'added', 'updated', 'removed', 'error', 'started_at', 'finished_at'];
protected function casts(): array
{
return ['started_at' => 'datetime', 'finished_at' => 'datetime'];
}
}
-207
View File
@@ -1,207 +0,0 @@
<?php
namespace App\Domain\Catalog;
use App\Domain\Commerce\Receipt\PdfDocument;
use Transliterator;
/**
* Druckbare Ausgabe einer Übung (DIN A4, mehrere Seiten) aus demselben Ergebnis wie die Ansicht ({@see ExerciseGuide}).
* Kennzeichnung: Fußzeile mit Lizenznehmer und Lizenzkopie auf jeder Seite (K2) und die Kennung in den Metadaten (K1).
* Das Dokument wird bei jedem Abruf neu erzeugt und nie abgelegt, damit eine spätere Sperre keine ältere Kopie
* ausliefern kann.
*/
class ExercisePdf
{
private const LEFT = 56.0;
private const RIGHT = 539.0;
private const TOP = 790.0;
private const BOTTOM = 72.0;
private PdfDocument $pdf;
private float $y = self::TOP;
private int $page = 0;
private string $footer = '';
/**
* Welche Abschnitte gehören ins PDF? Erforderliche Textabschnitte der Auswahl müssen für `laden` zulässig sein, sonst
* ist das PDF nicht erlaubt (null). Ergänzende ohne Berechtigung entfallen. Videos und Dokumente erscheinen nur als
* Hinweis.
*
* @param array<string, mixed> $guide Ergebnis von {@see ExerciseGuide::build}
* @return list<array<string, mixed>>|null
*/
public function sections(array $guide): ?array
{
$included = [];
foreach ($guide['entries'] as $entry) {
if ($entry['class'] === 'text') {
if ($entry['may_download'] && $entry['allowed']) {
$included[] = $entry;
} elseif ($entry['requirement'] === CompositionMember::REQUIRED) {
return null;
}
continue;
}
if ($entry['allowed']) {
$included[] = $entry;
}
}
return array_filter($included, fn (array $entry): bool => $entry['class'] === 'text') === [] ? null : $included;
}
/**
* @param array<string, mixed> $guide
* @param list<array<string, mixed>> $sections
*/
public function render(array $guide, array $sections, string $licensee, string $copyId, string $variantName, string $guideUrl): string
{
$this->pdf = new PdfDocument;
$this->page = 0;
$this->footer = self::printable('Lizenziert für '.$licensee.' · Lizenzkopie '.$copyId);
$this->newPage();
$this->write(self::printable((string) $guide['title']), 18, true, 8);
if ($variantName !== '') {
$this->write(self::printable('Variante: '.$variantName), 11, true, 6);
}
$facts = array_filter([
filled($guide['learning_goal']) ? 'Lernziel: '.$guide['learning_goal'] : null,
$guide['duration_minutes'] !== null ? 'Dauer: '.$guide['duration_minutes'].($guide['duration_max'] !== null ? ' bis '.$guide['duration_max'] : '').' Minuten' : null,
filled($guide['prerequisites']) ? 'Voraussetzungen: '.$guide['prerequisites'] : null,
filled($guide['material_note']) ? 'Ausstattung: '.$guide['material_note'] : null,
]);
foreach ($facts as $fact) {
$this->write(self::printable($fact), 10.5, false, 4);
}
$this->y -= 6;
foreach ($sections as $section) {
$this->section($section, $guideUrl);
}
$this->closePage();
$ascii = Transliterator::create('Any-Latin; Latin-ASCII');
return $this->pdf->output($ascii?->transliterate((string) $guide['title']) ?: 'Uebung', 'Lizenzkopie '.$copyId);
}
/**
* Zeichen außerhalb von Windows-1252 werden, wo möglich, lesbar ersetzt (Pfeil, Ungleichheitszeichen, andere
* lateinische Buchstaben); sonst bleibt „?“.
*/
public static function printable(string $text): string
{
$text = strtr($text, ['→' => '->', '←' => '<-', '≥' => '>=', '≤' => '<=', '✓' => '+', '✗' => 'x', '≠' => '!=', '≈' => '~']);
$latin = Transliterator::create('Any-Latin; Latin-ASCII');
$out = '';
foreach (mb_str_split($text) as $char) {
$encoded = mb_convert_encoding($char, 'Windows-1252', 'UTF-8');
$out .= $encoded === '?' && $char !== '?' ? ($latin?->transliterate($char) ?: '?') : $char;
}
return $out;
}
/**
* @param array<string, mixed> $section
*/
private function section(array $section, string $guideUrl): void
{
$title = self::printable((string) $section['title']);
if ($section['class'] !== 'text') {
$label = in_array($section['class'], ['film', 'audio'], true)
? 'Film: '.$title.' - online abrufbar im Mitgliederbereich (geschützte Wiedergabe): '.$guideUrl
: 'Material: '.$title.' - im Mitgliederbereich abrufbar: '.$guideUrl;
$this->write(self::printable($label), 10, false, 6);
return;
}
$this->write($title, 12.5, true, 5);
foreach ($section['blocks'] ?? [] as $block) {
match ($block['type']) {
'heading' => $this->write(self::printable($block['text']), 11, true, 4),
'paragraph' => $this->write(self::printable($block['text']), 10.5, false, 5),
'bullets' => $this->items($block['items'], fn (int $n): string => '•'),
'numbered' => $this->items($block['items'], fn (int $n): string => $n.'.'),
};
}
$this->y -= 4;
}
/**
* @param list<string> $items
*/
private function items(array $items, callable $marker): void
{
foreach ($items as $index => $item) {
$lines = PdfDocument::wrap(self::printable($item), self::RIGHT - self::LEFT - 18, 10.5);
foreach ($lines as $line => $text) {
$this->room(14);
if ($line === 0) {
$this->pdf->text(self::LEFT + 4, $this->y, $marker($index + 1), 10.5);
}
$this->pdf->text(self::LEFT + 18, $this->y, $text, 10.5);
$this->y -= 14;
}
}
$this->y -= 3;
}
private function write(string $text, float $size, bool $bold, float $after): void
{
foreach (PdfDocument::wrap($text, self::RIGHT - self::LEFT, $size, $bold) as $line) {
$this->room($size + 4);
$this->pdf->text(self::LEFT, $this->y, $line, $size, $bold);
$this->y -= $size + 4;
}
$this->y -= $after;
}
private function room(float $needed): void
{
if ($this->y - $needed < self::BOTTOM) {
$this->closePage();
$this->newPage();
}
}
private function newPage(): void
{
$this->pdf->addPage();
$this->page++;
$this->y = self::TOP;
}
private function closePage(): void
{
$this->pdf->line(self::LEFT, 54, self::RIGHT, 54, 0.4);
$this->pdf->text(self::LEFT, 40, $this->footer, 8);
$this->pdf->textRight(self::RIGHT, 40, 'Seite '.$this->page, 8);
}
}
-40
View File
@@ -1,40 +0,0 @@
<?php
namespace App\Domain\Catalog;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* Eine Übung der Quelle, gebunden an ihre stabile Kennung. `availability` hält nur fest, ob die Quelle sie noch
* bereitstellt. Das ist kein Rechtsvorgang: Eine rechtliche Sperre ist der lokale `block`.
*/
class ExerciseSource extends Model
{
public const PROVIDED = 'bereitgestellt';
public const WITHDRAWN = 'nicht_mehr_bereitgestellt';
protected $fillable = ['source_system', 'source_id', 'composition_id', 'title', 'availability', 'last_hash', 'last_seen_at'];
protected function casts(): array
{
return ['last_seen_at' => 'datetime'];
}
public function composition(): BelongsTo
{
return $this->belongsTo(Composition::class);
}
public function snapshots(): HasMany
{
return $this->hasMany(ExerciseSourceSnapshot::class)->orderBy('id');
}
public function latestSnapshot(): ?ExerciseSourceSnapshot
{
return $this->snapshots()->reorder()->orderByDesc('id')->first();
}
}
@@ -1,30 +0,0 @@
<?php
namespace App\Domain\Catalog;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Ein abgerufener Inhaltsstand einer Quellübung (Prüfsumme der Quelle und ihre Nutzlast). Er ist unveränderlich;
* nur die Übernahme trägt die daraus entstandene lokale Fassung ein.
*/
class ExerciseSourceSnapshot extends Model
{
protected $fillable = ['exercise_source_id', 'content_hash', 'payload', 'adopted_version_id', 'fetched_at'];
protected function casts(): array
{
return ['payload' => 'array', 'fetched_at' => 'datetime'];
}
public function source(): BelongsTo
{
return $this->belongsTo(ExerciseSource::class, 'exercise_source_id');
}
public function adoptedVersion(): BelongsTo
{
return $this->belongsTo(CompositionVersion::class, 'adopted_version_id');
}
}
-106
View File
@@ -1,106 +0,0 @@
<?php
namespace App\Domain\Catalog;
/**
* Verwendungsnachweis: Wo wird eine Übungsfassung tatsächlich verwendet, und was trifft eine Sperre? Der Nachweis steigt
* über die Verschachtelung bis zu den Wurzeln der Artikel-Stände auf und erfasst damit auch ältere, abgelöste und
* gesperrte Stände. Er liest nur und ändert keinen Stand.
*/
class ExerciseUsage
{
/**
* Je Fassung der Komposition: die einbindenden Fassungen (mit Rolle, Position und Variantenauswahl) und die
* Artikel-Stände, deren Wurzel die Fassung selbst oder eine einbindende Fassung ist.
*
* @return list<array{version: CompositionVersion, hosts: list<array<string, mixed>>, releases: list<array<string, mixed>>}>
*/
public function forComposition(Composition $composition): array
{
$guide = app(ExerciseGuide::class);
$result = [];
foreach ($composition->versions()->orderBy('number')->get() as $version) {
$hosts = [];
$roots = [$version->id => $version];
$queue = [$version->id];
$seen = [$version->id];
while ($queue !== []) {
$current = array_shift($queue);
foreach (CompositionMember::query()->where('nested_composition_version_id', $current)->with('compositionVersion.composition')->orderBy('id')->get() as $member) {
$host = $member->compositionVersion;
if ($host === null || $host->composition === null) {
continue;
}
$hosts[] = [
'composition' => $host->composition,
'version' => $host,
'role' => $member->role,
'position' => $member->position,
'selection' => $member->variant_selection,
'direct' => $current === $version->id,
];
if (! in_array($host->id, $seen, true)) {
$seen[] = $host->id;
$roots[$host->id] = $host;
$queue[] = $host->id;
}
}
}
$releases = [];
foreach (ArticleRelease::query()->whereIn('root_composition_version_id', array_keys($roots))->with('article')->orderBy('license_article_id')->orderBy('number')->get() as $release) {
$root = $roots[$release->root_composition_version_id];
$releases[] = [
'article' => $release->article,
'release' => $release,
'status' => $release->status,
'path' => $root->id === $version->id ? null : $guide->pathTo($root, $version->id),
'root' => $root,
];
}
$result[] = ['version' => $version, 'hosts' => $hosts, 'releases' => $releases];
}
return $result;
}
/**
* Folgen einer Sperre dieser Medienfassung je Artikel-Stand. Die Festschreibung bleibt unverändert; gesperrt wird
* nur die Ausgabe des Mediums.
*
* @return list<array{article: LicenseArticle, release: ArticleRelease, status: ReleaseStatus, variant: string|null, requirement: string|null, path: string, effect: string}>
*/
public function blockImpact(ContentElementVersion $version): array
{
$impact = [];
foreach (ReleaseContent::query()->where('content_element_version_id', $version->id)->with('release.article')->orderBy('id')->get() as $content) {
$release = $content->release;
$required = ($content->requirement ?? CompositionMember::REQUIRED) === CompositionMember::REQUIRED;
$effect = match (true) {
! $required => 'Nur dieses ergänzende Medium entfällt. Die Übung bleibt vollständig durchführbar.',
$content->variant_key !== null => 'Die Variante „'.$content->variant_key.'“ ist nicht mehr vollständig durchführbar. Andere Varianten bleiben nutzbar.',
default => 'Ein erforderlicher Bestandteil entfällt. Die Anleitung bleibt lesbar.',
};
$impact[] = [
'article' => $release->article,
'release' => $release,
'status' => $release->status,
'variant' => $content->variant_key,
'requirement' => $content->requirement,
'path' => $content->path,
'effect' => $effect,
];
}
return $impact;
}
}
@@ -1,93 +0,0 @@
<?php
namespace App\Domain\Catalog;
use Illuminate\Support\Facades\DB;
/**
* Erkennt Kompositionen, deren Art dieser Programmstand nicht kennt (siehe {@see SupportedKindScope}), und Aufbauten, die
* solche Bestandteile enthalten. Gelesen wird am Modell vorbei, weil der Bereichsfilter diese Zeilen ausblendet.
*
* Wozu: Eine ältere Programmversion darf eine Fassung mit unbekanntem Bestandteil weder neu veröffentlichen noch
* überarbeiten. Sie würde den Bestandteil auslassen oder ohne seine Variantenwahl auflösen und damit Inhalt verlieren
* oder zu viel ausgeben.
*/
class ForeignCompositions
{
public function isForeignVersion(int $compositionVersionId): bool
{
return DB::table('composition_versions as v')
->join('compositions as c', 'c.id', '=', 'v.composition_id')
->where('v.id', $compositionVersionId)
->whereNotIn('c.kind', CompositionKind::values())
->exists();
}
/**
* @param string $target „composition:ID“ (Fassung) oder „composition-draft:ID“ (Komposition)
*/
public function isForeignTarget(string $target): bool
{
if (preg_match('/^composition:(\d+)$/', $target, $match) === 1) {
return $this->isForeignVersion((int) $match[1]);
}
if (preg_match('/^composition-draft:(\d+)$/', $target, $match) === 1) {
return DB::table('compositions')
->where('id', (int) $match[1])
->whereNotIn('kind', CompositionKind::values())
->exists();
}
return false;
}
/**
* Ist die Fassung selbst unbekannt oder erreicht sie, auch verschachtelt, einen unbekannten Bestandteil?
*/
public function reaches(ContentElementVersion|CompositionVersion $node): bool
{
return $node instanceof CompositionVersion && $this->reachesVersion($node->id, []);
}
/**
* Enthält irgendeine Fassung dieser Komposition einen unbekannten Bestandteil?
*/
public function compositionHasForeignMembers(int $compositionId): bool
{
return DB::table('composition_members as m')
->join('composition_versions as host', 'host.id', '=', 'm.composition_version_id')
->join('composition_versions as nested', 'nested.id', '=', 'm.nested_composition_version_id')
->join('compositions as c', 'c.id', '=', 'nested.composition_id')
->where('host.composition_id', $compositionId)
->whereNotIn('c.kind', CompositionKind::values())
->exists();
}
/**
* @param list<int> $seen
*/
private function reachesVersion(int $versionId, array $seen): bool
{
if (in_array($versionId, $seen, true)) {
return false;
}
if ($this->isForeignVersion($versionId)) {
return true;
}
$seen[] = $versionId;
foreach (DB::table('composition_members')
->where('composition_version_id', $versionId)
->whereNotNull('nested_composition_version_id')
->pluck('nested_composition_version_id') as $nestedId) {
if ($this->reachesVersion((int) $nestedId, $seen)) {
return true;
}
}
return false;
}
}
-85
View File
@@ -1,85 +0,0 @@
<?php
namespace App\Domain\Catalog;
/**
* Anleitungstext als Klartext mit wenigen Konventionen: Absätze an Leerzeilen, Listen mit „- “ oder „• “ und
* nummerierte Listen mit „1. “, Zwischenüberschriften mit „## “. Ansicht und PDF lesen dieselben Blöcke und zeigen damit
* dieselbe Fassung. Es gibt kein freies HTML.
*/
final class GuideText
{
/**
* @return list<array{type: 'paragraph'|'bullets'|'numbered'|'heading', text?: string, items?: list<string>}>
*/
public static function blocks(?string $body): array
{
$blocks = [];
$paragraph = [];
$list = null;
$flushParagraph = function () use (&$blocks, &$paragraph): void {
if ($paragraph !== []) {
$blocks[] = ['type' => 'paragraph', 'text' => implode(' ', $paragraph)];
$paragraph = [];
}
};
$flushList = function () use (&$blocks, &$list): void {
if ($list !== null) {
$blocks[] = ['type' => $list['type'], 'items' => $list['items']];
$list = null;
}
};
foreach (preg_split('/\R/u', trim((string) $body)) ?: [] as $line) {
$line = rtrim($line);
if (trim($line) === '') {
$flushParagraph();
$flushList();
continue;
}
if (preg_match('/^##\s+(.+)$/u', $line, $match) === 1) {
$flushParagraph();
$flushList();
$blocks[] = ['type' => 'heading', 'text' => trim($match[1])];
continue;
}
if (preg_match('/^\s*(?:[-•*])\s+(.+)$/u', $line, $match) === 1) {
$flushParagraph();
if ($list === null || $list['type'] !== 'bullets') {
$flushList();
$list = ['type' => 'bullets', 'items' => []];
}
$list['items'][] = trim($match[1]);
continue;
}
if (preg_match('/^\s*\d+[.)]\s+(.+)$/u', $line, $match) === 1) {
$flushParagraph();
if ($list === null || $list['type'] !== 'numbered') {
$flushList();
$list = ['type' => 'numbered', 'items' => []];
}
$list['items'][] = trim($match[1]);
continue;
}
$flushList();
$paragraph[] = trim($line);
}
$flushParagraph();
$flushList();
return $blocks;
}
}
-21
View File
@@ -6,27 +6,6 @@ class OfferCoverage
{
public function __construct(private readonly ContentResolver $resolver) {}
/**
* Bestandteile der Fassung, deren Medienfassung gesperrt ist. Ein Angebot soll nicht aktiviert werden, solange sein
* Umfang gesperrte Bestandteile enthält; die Prüfung nennt sie vorab.
*
* @return list<string>
*/
public function blockedLeaves(CompositionVersion $version): array
{
$rows = $this->resolver->expand($version);
$blocked = ContentElementVersion::query()
->whereIn('id', array_column($rows, 'version_id'))
->where('status', ContentVersionStatus::Gesperrt->value)
->pluck('id')
->all();
return array_values(array_map(
fn (array $row): string => $row['path'],
array_filter($rows, fn (array $row): bool => in_array($row['version_id'], $blocked, true)),
));
}
/**
* @param list<LicenseArticle> $articles
* @return list<string>
-10
View File
@@ -277,10 +277,6 @@ private function assertCoverage(array $lines, array $attributes): void
}
$version = CompositionVersion::query()->findOrFail($versionId);
if (app(ForeignCompositions::class)->reaches($version)) {
throw new DomainRuleException('Der Aufbau enthält einen Bestandteil, den dieser Programmstand nicht kennt. Das Angebot wird hier nicht aktiviert.');
}
$articles = [];
foreach ($lines as $line) {
@@ -289,12 +285,6 @@ private function assertCoverage(array $lines, array $attributes): void
}
}
$blocked = app(OfferCoverage::class)->blockedLeaves($version);
if ($blocked !== []) {
throw new DomainRuleException('Das Angebot enthält gesperrte Bestandteile: '.implode(', ', $blocked));
}
$missing = app(OfferCoverage::class)->missingLeaves($version, $articles);
if ($missing !== []) {
-2
View File
@@ -13,8 +13,6 @@ class ReleaseContent extends Model
'content_element_version_id',
'role',
'path',
'requirement',
'variant_key',
];
protected static function booted(): void
-346
View File
@@ -1,346 +0,0 @@
<?php
namespace App\Domain\Catalog;
use App\Models\User;
use Illuminate\Http\Client\RequestException;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Throwable;
/**
* Übernahme von Übungen aus dem Shinkan-Katalog (`GET /api/distribution/v1/catalog` und Detailroute) in denselben
* Übungsbestand wie die lokalen Übungen.
*
* Grundsätze:
* - Die Quellübung ist an ihre stabile Kennung gebunden. Jeder Inhaltsstand (Prüfsumme der Quelle) wird genau einmal
* festgehalten; ein wiederholter Abruf erzeugt nichts Neues.
* - Eine lokale Fassung entsteht nur durch die bewusste Übernahme ({@see adopt}) und ist danach unveränderlich. Lokale
* Ergänzungen (Herkunft „lokal“) bleiben bei einer neuen Quellfassung erhalten.
* - Das Ausblenden an der Quelle setzt nur die Verfügbarkeit. Lokale Fassungen und Verwendungen bleiben unberührt; eine
* rechtliche Sperre ist der lokale `block`.
* - Medien des Katalogs sind Metadaten ohne Datei. Sie begründen weder eine Ausgabe noch eine Nutzungsberechtigung und
* stehen nie in einem Artikel-Stand.
* - Ein fehlgeschlagener Abruf verändert den gespeicherten Stand nicht und rückt den Cursor nicht vor.
*/
class ShinkanImport
{
/** Abschnitte der Quelle in Lesereihenfolge: Feld => [Bezeichnung, Rolle]. */
private const SECTIONS = [
'preparation' => 'Vorbereitung',
'execution' => 'Durchführung',
'trainer_notes' => 'Trainerhinweise',
];
public function configured(): bool
{
return filled(config('services.shinkan.url')) && filled(config('services.shinkan.key'));
}
public function fetch(): ExerciseImportRun
{
$run = ExerciseImportRun::query()->create(['status' => 'laeuft', 'started_at' => now()]);
if (! $this->configured()) {
return $this->finish($run, 'fehler', error: 'Die Anbindung ist nicht eingerichtet. Adresse und Schlüssel fehlen in der Umgebung.');
}
$previous = ExerciseImportRun::query()->where('status', 'ok')->orderByDesc('id')->value('cursor');
$counts = ['added' => 0, 'updated' => 0, 'removed' => 0];
try {
try {
$catalog = $this->get('/catalog', $previous === null ? [] : ['cursor' => $previous]);
} catch (RequestException $exception) {
// Ein ungültiger Cursor heißt nur: ganz neu abgleichen.
if ($previous === null || $exception->response->status() !== 400) {
throw $exception;
}
$catalog = $this->get('/catalog');
}
foreach ((array) ($catalog['changes'] ?? []) as $change) {
$id = (string) ($change['source_id'] ?? '');
$kind = (string) ($change['change'] ?? '');
if ($id === '') {
continue;
}
if ($kind === 'removed') {
ExerciseSource::query()->where('source_system', 'shinkan')->where('source_id', $id)
->update(['availability' => ExerciseSource::WITHDRAWN]);
$counts['removed']++;
continue;
}
$document = $this->get('/catalog/'.$id);
$this->record($document);
$counts[$kind === 'added' ? 'added' : 'updated']++;
}
foreach ((array) ($catalog['exercises'] ?? []) as $listed) {
ExerciseSource::query()->where('source_system', 'shinkan')->where('source_id', (string) ($listed['source_id'] ?? ''))
->update(['availability' => ExerciseSource::PROVIDED, 'last_seen_at' => now()]);
}
} catch (Throwable $exception) {
return $this->finish($run, 'fehler', $counts, 'Der Abruf ist fehlgeschlagen: '.$this->plain($exception).' Der gespeicherte Stand blieb unverändert.');
}
return $this->finish($run, 'ok', $counts, null, (string) ($catalog['next_cursor'] ?? $previous));
}
/**
* Hält einen abgerufenen Inhaltsstand fest. Derselbe Stand (Quelle und Prüfsumme) wird nie doppelt gespeichert.
*
* @param array<string, mixed> $document Detail der Quelle mit `source_id`, `content_hash` und den Feldern
*/
public function record(array $document): ExerciseSourceSnapshot
{
$id = (string) ($document['source_id'] ?? '');
$hash = (string) ($document['content_hash'] ?? '');
if ($id === '' || $hash === '') {
throw new DomainRuleException('Der Abruf liefert keine Quellkennung oder Prüfsumme.');
}
return DB::transaction(function () use ($id, $hash, $document): ExerciseSourceSnapshot {
$source = ExerciseSource::query()->firstOrCreate(
['source_system' => 'shinkan', 'source_id' => $id],
['title' => (string) ($document['title'] ?? '')],
);
$source->update([
'title' => (string) ($document['title'] ?? $source->title),
'availability' => ExerciseSource::PROVIDED,
'last_hash' => $hash,
'last_seen_at' => now(),
]);
return $source->snapshots()->firstOrCreate(
['content_hash' => $hash],
['payload' => $document, 'fetched_at' => now()],
);
});
}
/**
* Zustand einer Quellübung für die Redaktion.
*/
public function state(ExerciseSource $source): string
{
$latest = $source->latestSnapshot();
return match (true) {
$source->availability === ExerciseSource::WITHDRAWN => 'nicht_mehr_bereitgestellt',
$latest === null => 'neu',
$latest->adopted_version_id !== null => 'uebernommen',
$source->composition_id !== null => 'geaendert',
default => 'neu',
};
}
/**
* Die bewusste Übernahme: aus dem Inhaltsstand wird eine neue, unveränderliche lokale Fassung. Wiederholt man sie,
* entsteht keine zweite Fassung. Lokale Ergänzungen der bisherigen Fassung werden übernommen.
*/
public function adopt(ExerciseSourceSnapshot $snapshot, ?User $actor = null): CompositionVersion
{
$snapshot->refresh();
if ($snapshot->adopted_version_id !== null) {
return $snapshot->adoptedVersion;
}
return DB::transaction(function () use ($snapshot, $actor): CompositionVersion {
$source = $snapshot->source;
$document = $snapshot->payload;
$content = app(ContentService::class);
$title = trim((string) ($document['title'] ?? '')) ?: 'Übung aus Shinkan';
$composition = $source->composition ?? $this->createComposition($title, (string) ($document['summary'] ?? ''));
$previous = $composition->versions()->orderByDesc('number')->with('members.variant', 'variants')->first();
$variants = [];
$members = [];
foreach (self::SECTIONS as $field => $label) {
$text = trim((string) ($document[$field] ?? ''));
if ($text !== '') {
$members[] = [
'role' => $label,
'target' => $this->section($source, $field, $title.' · '.$label, $text),
'origin' => 'quelle',
];
}
}
foreach ((array) ($document['variants'] ?? []) as $variant) {
$key = (string) ($variant['id'] ?? '');
if ($key === '') {
continue;
}
$variants[] = [
'key' => $key,
'name' => (string) ($variant['name'] ?? '') ?: 'Variante',
'description' => (string) ($variant['description'] ?? ''),
'origin' => 'quelle',
];
$changes = trim((string) ($variant['execution_changes'] ?? ''));
if ($changes !== '') {
$members[] = [
'role' => 'Abweichung der Durchführung',
'target' => $this->section($source, 'variant:'.$key, $title.' · '.($variant['name'] ?? 'Variante').' · Abweichung', $changes),
'variant' => $key,
'origin' => 'quelle',
];
}
}
[$localMembers, $localVariants] = $this->localAdditions($previous, array_column($variants, 'key'));
$version = $content->publishComposition(
$composition,
[...$members, ...$localMembers],
$actor,
'Übernahme aus Shinkan',
[
'learning_goal' => $document['goal'] ?? null,
'duration_minutes' => $document['duration_min'] ?? null,
'duration_max' => $document['duration_max'] ?? null,
'material_note' => $document['equipment'] ?? null,
'source_snapshot_id' => $snapshot->id,
],
[...$variants, ...$localVariants],
);
$snapshot->update(['adopted_version_id' => $version->id]);
$source->update(['composition_id' => $composition->id]);
return $version;
});
}
/**
* Was die Redaktion lokal ergänzt hat, bleibt bei einer neuen Quellfassung erhalten. Eine lokale Zuordnung zu einer
* Quellvariante, die es nicht mehr gibt, wandert in den gemeinsamen Teil, damit nichts verloren geht.
*
* @param list<string> $sourceVariantKeys
* @return array{0: list<array<string, mixed>>, 1: list<array<string, mixed>>}
*/
private function localAdditions(?CompositionVersion $previous, array $sourceVariantKeys): array
{
if ($previous === null) {
return [[], []];
}
$localVariants = $previous->variants->where('origin', 'lokal')->map(fn (CompositionVersionVariant $variant): array => [
'key' => $variant->key, 'name' => $variant->name, 'description' => $variant->description, 'origin' => 'lokal',
])->values()->all();
$known = [...$sourceVariantKeys, ...array_column($localVariants, 'key')];
$members = [];
foreach ($previous->members->where('origin', 'lokal') as $member) {
$variant = $member->variant?->key;
$members[] = [
'role' => $member->role,
'note' => $member->placement_note,
'target' => $member->content_element_version_id !== null ? $member->contentElementVersion : $member->nestedCompositionVersion,
'variant' => $variant !== null && in_array($variant, $known, true) ? $variant : null,
'requirement' => $member->requirement,
'selection' => $member->variant_selection,
'origin' => 'lokal',
];
}
return [$members, $localVariants];
}
/**
* Die Textfassung eines Abschnitts der Quelle. Unveränderter Text bleibt dieselbe Fassung.
*/
private function section(ExerciseSource $source, string $field, string $title, string $text): ContentElementVersion
{
$content = app(ContentService::class);
$ref = 'shinkan:'.$source->source_id.':'.$field;
$element = ContentElement::query()->where('source_ref', $ref)->first();
if ($element === null) {
$element = $content->createElement('text', 'text', $title);
$element->source_ref = $ref;
$element->save();
}
$latest = $element->versions()->where('status', ContentVersionStatus::Bereit)->orderByDesc('number')->first();
return $latest !== null && trim((string) $latest->body) === $text
? $latest
: $content->publishElementVersion($element, $text, [], 'Übernahme aus Shinkan');
}
private function createComposition(string $title, string $summary): Composition
{
$composition = app(ContentService::class)->createComposition($title, CompositionKind::Exercise);
$composition->editorial_content_kind_id = EditorialContentKind::query()->where('slug', 'uebung')->value('id');
if ($summary !== '') {
$composition->summary = $summary;
}
$composition->save();
return $composition;
}
/**
* @param array<string, mixed> $query
* @return array<string, mixed>
*/
private function get(string $path, array $query = []): array
{
$response = Http::withToken((string) config('services.shinkan.key'))
->acceptJson()
->timeout(20)
->get(rtrim((string) config('services.shinkan.url'), '/').'/api/distribution/v1'.$path, $query)
->throw();
$json = $response->json();
if (! is_array($json)) {
throw new DomainRuleException('Die Antwort der Quelle ist kein gültiges JSON.');
}
return $json;
}
/**
* @param array{added?: int, updated?: int, removed?: int} $counts
*/
private function finish(ExerciseImportRun $run, string $status, array $counts = [], ?string $error = null, ?string $cursor = null): ExerciseImportRun
{
$run->update([
'status' => $status,
'cursor' => $cursor,
'added' => $counts['added'] ?? 0,
'updated' => $counts['updated'] ?? 0,
'removed' => $counts['removed'] ?? 0,
'error' => $error,
'finished_at' => now(),
]);
return $run;
}
/** Fehlertext ohne Adresse und Schlüssel. */
private function plain(Throwable $exception): string
{
if ($exception instanceof RequestException) {
return 'Die Quelle antwortete mit Status '.$exception->response->status().'.';
}
return $exception instanceof DomainRuleException ? $exception->getMessage() : 'Die Quelle ist nicht erreichbar.';
}
}
-21
View File
@@ -1,21 +0,0 @@
<?php
namespace App\Domain\Catalog;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
/**
* Rückfallschutz: Dieser Code kennt nur die Kompositionsarten aus {@see CompositionKind}. Eine Komposition mit einem
* Wert, den erst eine neuere Programmversion einführt, gilt hier als nicht vorhanden. Sie wird weder geladen (der
* Enum-Zugriff würde sonst abstürzen) noch angezeigt, bearbeitet oder veröffentlicht. Eine neuere Programmversion
* kennt den Wert und sieht die Zeile wieder.
*/
class SupportedKindScope implements Scope
{
public function apply(Builder $builder, Model $model): void
{
$builder->whereIn($model->qualifyColumn('kind'), CompositionKind::values());
}
}
+2 -3
View File
@@ -107,7 +107,7 @@ public static function width(string $text, float $size = 10, bool $bold = false)
/**
* @param string $title Nur ASCII (Dokumenttitel)
*/
public function output(string $title, ?string $keywords = null): string
public function output(string $title): string
{
$pages = $this->pages === [] ? [''] : $this->pages;
$objects = [];
@@ -125,8 +125,7 @@ public function output(string $title, ?string $keywords = null): string
$objects[2] = '<< /Type /Pages /Kids ['.implode(' ', $kids).'] /Count '.count($pages).' >>';
$objects[3] = '<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>';
$objects[4] = '<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >>';
$ascii = fn (string $value): string => (string) preg_replace('/[^\x20-\x7E]/', '?', str_replace(['\\', '(', ')'], ['', '', ''], $value));
$objects[5] = '<< /Title ('.$ascii($title).')'.($keywords === null ? '' : ' /Keywords ('.$ascii($keywords).')').' /Producer (Lara und Felix) >>';
$objects[5] = '<< /Title ('.preg_replace('/[^\x20-\x7E]/', '?', str_replace(['\\', '(', ')'], ['', '', ''], $title)).') /Producer (Lara und Felix) >>';
ksort($objects);
$pdf = "%PDF-1.4\n%\xE2\xE3\xCF\xD3\n";
-1
View File
@@ -16,7 +16,6 @@ class MediaDelivery extends Model
'copy_id',
'checksum',
'marking',
'composition_version_id',
'delivered_at',
];
+1 -9
View File
@@ -19,8 +19,6 @@ public function write(
string $format,
?string $checksum,
string $marking,
?string $copyId = null,
?int $compositionVersionId = null,
): MediaDelivery {
return MediaDelivery::query()->create([
'grant_id' => $grant->id,
@@ -29,16 +27,10 @@ public function write(
'content_element_version_id' => $version->id,
'action' => $action,
'format' => $format,
'copy_id' => $copyId ?? self::newCopyId(),
'composition_version_id' => $compositionVersionId,
'copy_id' => 'LK-'.strtoupper(bin2hex(random_bytes(6))),
'checksum' => $checksum,
'marking' => $marking,
'delivered_at' => now(),
]);
}
public static function newCopyId(): string
{
return 'LK-'.strtoupper(bin2hex(random_bytes(6)));
}
}
-120
View File
@@ -1,120 +0,0 @@
<?php
namespace App\Filament\Pages;
use App\Domain\Catalog\DomainRuleException;
use App\Domain\Catalog\ExerciseImportRun;
use App\Domain\Catalog\ExerciseSource;
use App\Domain\Catalog\ExerciseSourceSnapshot;
use App\Domain\Catalog\ShinkanImport;
use App\Filament\Resources\ContentElements\ContentElementResource;
use App\Filament\Resources\Practices\PracticeResource;
use App\Models\User;
use Filament\Facades\Filament;
use Filament\Pages\Page;
use Filament\Support\Enums\Width;
use Illuminate\Contracts\Support\Htmlable;
/**
* Übernahme aus Shinkan: Welche Übungen stellt die Quelle bereit, was ist neu oder geändert, was ist übernommen und was
* stellt die Quelle nicht mehr bereit? Abrufen verändert nur den Quellenstand; erst „Übernehmen“ legt eine lokale
* Fassung an, und erst eine Produktveröffentlichung setzt sie ein.
*/
class Uebernahme extends Page
{
protected static string|\UnitEnum|null $navigationGroup = 'Inhalte';
protected static ?string $navigationLabel = 'Übernahme (Shinkan)';
protected static ?int $navigationSort = 6;
protected static ?string $slug = 'uebernahme';
protected static ?string $title = 'Übernahme aus Shinkan';
protected string $view = 'filament.pages.uebernahme';
public string $feedback = '';
public bool $feedbackError = false;
public static function canAccess(): bool
{
return ContentElementResource::editor();
}
public function getHeading(): string|Htmlable|null
{
return null;
}
public function getMaxContentWidth(): Width|string|null
{
return Width::Full;
}
public function fetch(): void
{
abort_unless(static::canAccess(), 403);
$run = app(ShinkanImport::class)->fetch();
$this->feedbackError = $run->status !== 'ok';
$this->feedback = $run->status === 'ok'
? 'Abruf abgeschlossen: '.$run->added.' neu, '.$run->updated.' geändert, '.$run->removed.' nicht mehr bereitgestellt. Es wurde noch keine lokale Fassung angelegt.'
: (string) $run->error;
}
public function adopt(int $snapshotId): void
{
abort_unless(static::canAccess(), 403);
try {
$user = Filament::auth()->user();
$version = app(ShinkanImport::class)->adopt(ExerciseSourceSnapshot::query()->findOrFail($snapshotId), $user instanceof User ? $user : null);
$this->feedbackError = false;
$this->feedback = 'Fassung '.$version->number.' ist lokal angelegt und unveränderlich. Produkte verwenden sie erst, wenn du sie dort bewusst einsetzt und das Produkt veröffentlichst.';
} catch (DomainRuleException $exception) {
$this->feedbackError = true;
$this->feedback = $exception->getMessage();
}
}
/**
* @return array<string, mixed>
*/
public function daten(): array
{
$import = app(ShinkanImport::class);
$labels = [
'neu' => ['Neu bei der Quelle', 'offen'],
'geaendert' => ['Neue Quellfassung zur Übernahme', 'offen'],
'uebernommen' => ['Übernommen', 'gut'],
'nicht_mehr_bereitgestellt' => ['An der Quelle nicht mehr bereitgestellt', 'leise'],
];
$rows = [];
foreach (ExerciseSource::query()->with('composition')->orderBy('title')->get() as $source) {
$state = $import->state($source);
$latest = $source->latestSnapshot();
$payload = $latest?->payload ?? [];
$rows[] = [
'titel' => $source->title ?: $source->source_id,
'zustand' => $labels[$state][0],
'ton' => $labels[$state][1],
'snapshot' => $latest !== null && $latest->adopted_version_id === null ? $latest->id : null,
'lokal' => $source->composition === null ? null : PracticeResource::getUrl('edit', ['record' => $source->composition]),
'varianten' => count($payload['variants'] ?? []),
'quellmedien' => array_map(fn (array $media): string => ($media['title'] ?? '').' ('.($media['media_type'] ?? '').')', (array) ($payload['media'] ?? [])),
'hinweis' => $state === 'nicht_mehr_bereitgestellt'
? 'Lokale Fassungen und Verwendungen bleiben unverändert. Eine rechtliche Sperre ist ein eigener Vorgang am Medium.'
: null,
];
}
return [
'zeilen' => $rows,
'eingerichtet' => app(ShinkanImport::class)->configured(),
'letzterLauf' => ExerciseImportRun::query()->orderByDesc('id')->first(),
];
}
}
@@ -15,7 +15,6 @@
use App\Domain\Catalog\DomainRuleException;
use App\Domain\Catalog\EditorialVocabulary;
use App\Domain\Catalog\EditorialWorkingDraft;
use App\Domain\Catalog\ForeignCompositions;
use App\Domain\Catalog\IdentityDimension;
use App\Domain\Catalog\IdentityDimensionValue;
use App\Domain\Catalog\IdentityProfile;
@@ -40,7 +39,6 @@
use Filament\Support\Exceptions\Halt;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use Livewire\Features\SupportFileUploads\TemporaryUploadedFile;
use Livewire\WithFileUploads;
@@ -70,15 +68,6 @@ abstract class EditComposition extends EditRecord
public string $materialNote = '';
/** @var list<array{key: string, name: string, description: string}> Durchführungsvarianten einer Übung */
public array $variants = [];
public string $durationMax = '';
public string $prerequisites = '';
public string $newVariantName = '';
public string $revisionNote = '';
public string $search = '';
@@ -500,173 +489,8 @@ public function cancelText(): void
$this->newTextBody = '';
}
public function isExercise(): bool
{
return $this->hostKind() === CompositionKind::Exercise;
}
public function addVariant(): void
{
$name = trim($this->newVariantName);
if ($name === '') {
$this->feedback = 'Eine Variante braucht einen Namen.';
return;
}
$base = Str::slug($name) ?: 'variante';
$key = $base;
$n = 2;
while (in_array($key, array_column($this->variants, 'key'), true)) {
$key = $base.'-'.$n++;
}
$this->variants[] = ['key' => $key, 'name' => $name, 'description' => '', 'origin' => 'lokal'];
$this->newVariantName = '';
$this->feedback = 'Variante „'.$name.'“ ist angelegt. Ordne ihr Bestandteile zu. Gespeichert wird mit „Entwurf speichern“.';
}
public function removeVariant(string $key): void
{
foreach ($this->members as $member) {
if (($member['variant'] ?? null) === $key) {
$this->feedback = 'Diese Variante hat noch Bestandteile. Ordne sie zuerst einer anderen Variante oder dem gemeinsamen Teil zu.';
return;
}
}
$this->variants = array_values(array_filter($this->variants, fn (array $variant): bool => $variant['key'] !== $key));
$this->feedback = 'Die Variante ist aus diesem Entwurf genommen. Eine freigegebene Fassung bleibt unverändert.';
}
public function setMemberVariant(int $index, string $key): void
{
if (! isset($this->members[$index])) {
return;
}
$this->members[$index]['variant'] = $key === '' ? null : $key;
}
public function setMemberRequirement(int $index, string $requirement): void
{
if (! isset($this->members[$index]) || ! in_array($requirement, ['erforderlich', 'ergaenzend'], true)) {
return;
}
$this->members[$index]['requirement'] = $requirement;
}
/**
* Angebotene Varianten der eingebundenen Übungsfassung. Ohne Auswahl werden alle angeboten.
*/
public function toggleVariantSelection(int $index, string $key): void
{
if (! isset($this->members[$index])) {
return;
}
$all = array_column($this->offeredVariants((string) ($this->members[$index]['target'] ?? '')), 'key');
$current = $this->members[$index]['selection'] ?? null;
$current = is_array($current) ? $current : $all;
$current = in_array($key, $current, true) ? array_values(array_diff($current, [$key])) : [...$current, $key];
if ($current === []) {
$this->feedback = 'Mindestens eine Variante muss angeboten werden.';
return;
}
$this->members[$index]['selection'] = count($current) === count($all) ? null : array_values($current);
}
/**
* @return list<array{key: string, name: string}>
*/
public function offeredVariants(string $target): array
{
if (preg_match('/^composition:(\d+)$/', $target, $match) !== 1) {
return [];
}
return CompositionVersion::query()->find((int) $match[1])?->variants
->map(fn ($variant): array => ['key' => $variant->key, 'name' => $variant->name])
->all() ?? [];
}
/**
* @param array<string, mixed> $member
* @return array{variant: string|null, requirement: string, selection: list<string>|null, origin: string}
*/
private function memberExtras(array $member): array
{
$selection = $member['selection'] ?? null;
return [
'variant' => isset($member['variant']) && $member['variant'] !== '' ? (string) $member['variant'] : null,
'requirement' => ($member['requirement'] ?? 'erforderlich') === 'ergaenzend' ? 'ergaenzend' : 'erforderlich',
'selection' => is_array($selection) && $selection !== [] ? array_values(array_map('strval', $selection)) : null,
'origin' => ($member['origin'] ?? 'lokal') === 'quelle' ? 'quelle' : 'lokal',
];
}
/**
* @return list<array{key: string, name: string, description: string}>
*/
private function normalizeVariants(mixed $variants): array
{
$result = [];
foreach (is_array($variants) ? $variants : [] as $variant) {
if (is_array($variant) && trim((string) ($variant['key'] ?? '')) !== '') {
$result[] = [
'key' => trim((string) $variant['key']),
'name' => trim((string) ($variant['name'] ?? '')),
'description' => trim((string) ($variant['description'] ?? '')),
'origin' => ($variant['origin'] ?? 'lokal') === 'quelle' ? 'quelle' : 'lokal',
];
}
}
return $result;
}
/**
* Rückfallschutz: Enthält dieser Aufbau (in einer Fassung oder im Entwurf) einen Bestandteil, den dieser Programmstand
* nicht kennt, bleibt er schreibgeschützt. Der Editor könnte den Bestandteil sonst nicht laden und würde ihn beim
* Speichern oder Freigeben still weglassen.
*/
public function schreibschutz(): ?string
{
$foreign = app(ForeignCompositions::class);
$reason = 'Dieser Aufbau enthält einen Bestandteil aus einer neueren Programmversion. Er kann hier nur angesehen werden, damit nichts verloren geht.';
if ($foreign->compositionHasForeignMembers((int) $this->getRecord()->getKey())) {
return $reason;
}
$draft = app(EditorialWorkingDraft::class)->read($this->getRecord());
foreach (is_array($draft['members'] ?? null) ? $draft['members'] : [] as $member) {
if (is_array($member) && $foreign->isForeignTarget((string) ($member['target'] ?? ''))) {
return $reason;
}
}
return null;
}
public function saveDraft(): void
{
if (($reason = $this->schreibschutz()) !== null) {
$this->feedback = $reason;
return;
}
$this->commitRoleDraft();
$minutes = $this->minutes($this->durationMinutes);
@@ -684,13 +508,6 @@ public function saveDraft(): void
public function armRelease(): void
{
if (($reason = $this->schreibschutz()) !== null) {
$this->releaseArmed = false;
$this->feedback = $reason;
return;
}
$this->commitRoleDraft();
if ($this->members === []) {
@@ -768,12 +585,6 @@ protected function selectFirstPart(): void
public function discardDraft(): void
{
if (($reason = $this->schreibschutz()) !== null) {
$this->feedback = $reason;
return;
}
/** @var Composition $record */
$record = $this->getRecord();
app(EditorialWorkingDraft::class)->clear($record);
@@ -1113,7 +924,7 @@ private function includePart(string $target, bool $allowDraft): bool
return false;
}
foreach ($this->isExercise() ? [] : $this->members as $index => $member) {
foreach ($this->members as $index => $member) {
if (($member['target'] ?? '') === $target) {
$this->selected = $index;
$this->panel = 'bestandteil';
@@ -1133,7 +944,6 @@ private function includePart(string $target, bool $allowDraft): bool
$row['role'] = app(EditorialCatalog::class)->defaultRole((string) $row['kind']);
$row['note'] = '';
$row = [...$row, ...$this->memberExtras([])];
$this->members[] = $row;
$this->members = array_values($this->members);
$this->selected = array_key_last($this->members);
@@ -1224,7 +1034,6 @@ public function useVersion(int $index, string $target): void
$this->commitRoleDraft();
$row['role'] = $this->members[$index]['role'] ?? $row['kind'];
$row['note'] = $this->members[$index]['note'] ?? '';
$row = [...$row, ...$this->memberExtras($this->members[$index])];
$this->members[$index] = $row;
$this->syncRoleDraft();
$this->feedback = $row['version_label'].' ist für diese Stelle ausgewählt. Der Entwurf speichert das. Eine freigegebene Fassung bleibt unverändert.';
@@ -1712,12 +1521,6 @@ public function presentationChips(): array
public function publishRevision(): bool
{
if (($reason = $this->schreibschutz()) !== null) {
$this->feedback = $reason;
return false;
}
$this->commitRoleDraft();
if ($this->members === []) {
@@ -1757,12 +1560,9 @@ public function publishRevision(): bool
[
'learning_goal' => $this->blank($this->learningGoal),
'duration_minutes' => $minutes,
'duration_max' => $this->blank($this->durationMax),
'material_note' => $this->blank($this->materialNote),
'prerequisites' => $this->blank($this->prerequisites),
],
$this->releaseConsent,
$this->normalizeVariants($this->variants),
);
} catch (DomainRuleException $exception) {
$this->feedback = $exception->getMessage();
@@ -1879,8 +1679,7 @@ protected function loadAufbau(): void
$this->imageCaptionText = $this->captionFor($composition->thumbnail_source);
$this->catalogScope = match ($this->hostKind()) {
CompositionKind::Kurs => 'module',
CompositionKind::Uebung => 'uebungen',
CompositionKind::Exercise => 'medien',
CompositionKind::Uebung => 'medien',
default => 'alles',
};
@@ -1894,9 +1693,6 @@ protected function loadAufbau(): void
if ($version === null) {
$this->members = [];
$this->variants = [];
$this->durationMax = '';
$this->prerequisites = '';
$this->learningGoal = '';
$this->durationMinutes = '';
$this->materialNote = '';
@@ -1930,14 +1726,10 @@ protected function applyDraft(array $draft): void
$row['role'] = (string) ($member['role'] ?? $row['kind']);
$row['note'] = trim((string) ($member['note'] ?? ''));
$row = [...$row, ...$this->memberExtras($member)];
$rows[] = $row;
}
$this->members = $rows;
$this->variants = $this->normalizeVariants($draft['variants'] ?? []);
$this->durationMax = ($draft['duration_max'] ?? null) === null ? '' : (string) $draft['duration_max'];
$this->prerequisites = (string) ($draft['prerequisites'] ?? '');
$this->learningGoal = (string) ($draft['learning_goal'] ?? '');
$this->durationMinutes = ($draft['duration_minutes'] ?? null) === null ? '' : (string) $draft['duration_minutes'];
$this->materialNote = (string) ($draft['material_note'] ?? '');
@@ -1955,11 +1747,6 @@ protected function applyDraft(array $draft): void
protected function applyVersion(CompositionVersion $version): void
{
$this->members = app(EditorialCatalog::class)->rows($version, (int) $this->getRecord()->getKey());
$this->variants = $this->normalizeVariants($version->variants->map(fn ($variant): array => [
'key' => $variant->key, 'name' => $variant->name, 'description' => (string) $variant->description,
])->all());
$this->durationMax = $version->duration_max === null ? '' : (string) $version->duration_max;
$this->prerequisites = (string) ($version->prerequisites ?? '');
$this->learningGoal = (string) ($version->learning_goal ?? '');
$this->durationMinutes = $version->duration_minutes === null ? '' : (string) $version->duration_minutes;
$this->materialNote = (string) ($version->material_note ?? '');
@@ -2046,21 +1833,18 @@ protected function needsRevision(): bool
protected function sameMembers(CompositionVersion $version): bool
{
$version->loadMissing('members.variant');
$version->loadMissing('members');
$current = $version->members->map(function ($member): string {
$target = $member->content_element_version_id
? 'element:'.$member->content_element_version_id
: 'composition:'.$member->nested_composition_version_id;
return $member->role.'|'.$target.'|'.trim((string) ($member->placement_note ?? ''))
.'|'.($member->variant?->key ?? '').'|'.($member->requirement ?: 'erforderlich').'|'.json_encode($member->variant_selection);
return $member->role.'|'.$target.'|'.trim((string) ($member->placement_note ?? ''));
})->all();
$next = array_values(array_map(function (array $member): string {
$extras = $this->memberExtras($member);
return trim((string) ($member['role'] ?? '')).'|'.($member['target'] ?? '').'|'.trim((string) ($member['note'] ?? ''))
.'|'.($extras['variant'] ?? '').'|'.$extras['requirement'].'|'.json_encode($extras['selection']);
}, $this->members));
$next = array_values(array_map(
fn (array $member): string => trim((string) ($member['role'] ?? '')).'|'.($member['target'] ?? '').'|'.trim((string) ($member['note'] ?? '')),
$this->members,
));
return $current === $next;
}
@@ -2075,15 +1859,8 @@ protected function didacticChanged(CompositionVersion $version): bool
$storedMinutes = $version->duration_minutes === null ? null : (int) $version->duration_minutes;
$storedVariants = $this->normalizeVariants($version->variants->map(fn ($variant): array => [
'key' => $variant->key, 'name' => $variant->name, 'description' => (string) $variant->description,
])->all());
return $version->learning_goal !== $this->blank($this->learningGoal)
|| $version->material_note !== $this->blank($this->materialNote)
|| $version->prerequisites !== $this->blank($this->prerequisites)
|| ($version->duration_max === null ? null : (string) $version->duration_max) !== $this->blank($this->durationMax)
|| $storedVariants !== $this->normalizeVariants($this->variants)
|| $storedMinutes !== $minutes;
}
@@ -2152,12 +1929,6 @@ protected function persistRedaktion(): bool
protected function persistDraft(): bool
{
if (($reason = $this->schreibschutz()) !== null) {
$this->feedback = $reason;
return false;
}
if ($this->minutes($this->durationMinutes) === false) {
$this->feedback = 'Der Zeitbedarf ist eine Zahl von Minuten oder bleibt leer.';
@@ -2294,16 +2065,12 @@ protected function payload(): array
'learning_goal' => $this->blank($this->learningGoal),
'duration_minutes' => $minutes === false ? $this->durationMinutes : $minutes,
'material_note' => $this->blank($this->materialNote),
'duration_max' => $this->blank($this->durationMax),
'prerequisites' => $this->blank($this->prerequisites),
'variants' => $this->normalizeVariants($this->variants),
'revision_note' => $this->blank($this->revisionNote),
'members' => array_values(array_map(
fn (array $member): array => [
'role' => trim((string) ($member['role'] ?? '')),
'target' => (string) ($member['target'] ?? ''),
'note' => trim((string) ($member['note'] ?? '')),
...$this->memberExtras($member),
],
$members,
)),
@@ -2338,9 +2105,6 @@ protected function readyPayload(): array
'learning_goal' => null,
'duration_minutes' => null,
'material_note' => null,
'duration_max' => null,
'prerequisites' => null,
'variants' => [],
'revision_note' => null,
'members' => [],
];
@@ -2352,18 +2116,12 @@ protected function readyPayload(): array
'learning_goal' => $version->learning_goal,
'duration_minutes' => $version->duration_minutes === null ? null : (int) $version->duration_minutes,
'material_note' => $version->material_note,
'duration_max' => $version->duration_max === null ? null : (string) $version->duration_max,
'prerequisites' => $version->prerequisites,
'variants' => $this->normalizeVariants($version->variants->map(fn ($variant): array => [
'key' => $variant->key, 'name' => $variant->name, 'description' => (string) $variant->description, 'origin' => $variant->origin,
])->all()),
'revision_note' => null,
'members' => array_values(array_map(
fn (array $row): array => [
'role' => trim((string) ($row['role'] ?? '')),
'target' => (string) ($row['target'] ?? ''),
'note' => trim((string) ($row['note'] ?? '')),
...$this->memberExtras($row),
],
$rows,
)),
@@ -2387,7 +2145,6 @@ protected function normalizePayload(array $payload): array
'role' => trim((string) ($member['role'] ?? '')),
'target' => (string) ($member['target'] ?? ''),
'note' => trim((string) ($member['note'] ?? '')),
...$this->memberExtras($member),
];
}
@@ -2395,9 +2152,6 @@ protected function normalizePayload(array $payload): array
'learning_goal' => $payload['learning_goal'] ?? null,
'duration_minutes' => $payload['duration_minutes'] ?? null,
'material_note' => $payload['material_note'] ?? null,
'duration_max' => isset($payload['duration_max']) && $payload['duration_max'] !== '' ? (string) $payload['duration_max'] : null,
'prerequisites' => $payload['prerequisites'] ?? null,
'variants' => $this->normalizeVariants($payload['variants'] ?? []),
'revision_note' => $payload['revision_note'] ?? null,
'members' => $members,
];
@@ -33,12 +33,12 @@ protected function fixedKind(): ?CompositionKind
private function onDesk(): bool
{
return in_array($this->kind(), [CompositionKind::Kurs, CompositionKind::Uebung, CompositionKind::Exercise], true);
return in_array($this->kind(), [CompositionKind::Kurs, CompositionKind::Uebung], true);
}
public function getSubheading(): string|Htmlable|null
{
$desk = $this->onDesk() && $this->kind() !== CompositionKind::Exercise ? ' Programme und Module stehen gemeinsam auch auf dem Arbeitsplatz.' : '';
$desk = $this->onDesk() ? ' Programme und Module stehen gemeinsam auch auf dem Arbeitsplatz.' : '';
return $this->kind()->deskExplanation().$desk;
}
@@ -1,11 +0,0 @@
<?php
namespace App\Filament\Resources\Practices\Pages;
use App\Filament\Resources\Compositions\Pages\EditComposition;
use App\Filament\Resources\Practices\PracticeResource;
class EditPractice extends EditComposition
{
protected static string $resource = PracticeResource::class;
}
@@ -1,17 +0,0 @@
<?php
namespace App\Filament\Resources\Practices\Pages;
use App\Domain\Catalog\CompositionKind;
use App\Filament\Resources\Compositions\Pages\ListCompositionKind;
use App\Filament\Resources\Practices\PracticeResource;
class ListPractices extends ListCompositionKind
{
protected static string $resource = PracticeResource::class;
protected function kind(): CompositionKind
{
return CompositionKind::Exercise;
}
}
@@ -1,38 +0,0 @@
<?php
namespace App\Filament\Resources\Practices;
use App\Domain\Catalog\CompositionKind;
use App\Filament\Resources\Compositions\CompositionKindResource;
use App\Filament\Resources\Practices\Pages\EditPractice;
use App\Filament\Resources\Practices\Pages\ListPractices;
/**
* Die fachliche Übung. Der ältere Eintrag „Module“ (`ExerciseResource`, Adresse `uebungen`) bleibt unverändert und
* zeigt die Zusammenstellungen der Art `uebung`; hier stehen die Übungen mit Varianten.
*/
class PracticeResource extends CompositionKindResource
{
protected static ?string $slug = 'fachuebungen';
protected static ?string $navigationLabel = 'Übungen';
protected static ?string $modelLabel = 'Übung';
protected static ?string $pluralModelLabel = 'Übungen';
protected static ?int $navigationSort = 5;
public static function kind(): CompositionKind
{
return CompositionKind::Exercise;
}
public static function getPages(): array
{
return [
'index' => ListPractices::route('/'),
'edit' => EditPractice::route('/{record}'),
];
}
}
+2 -2
View File
@@ -37,7 +37,7 @@ public static function assignmentTargets(?int $exceptCompositionId = null): arra
$media['element:'.$version->id] = self::elementLabel($version);
}
foreach (CompositionVersion::query()->where('status', ContentVersionStatus::Bereit)->whereHas('composition')->with('composition.editorialContentKind')->orderBy('id')->get() as $version) {
foreach (CompositionVersion::query()->where('status', ContentVersionStatus::Bereit)->with('composition.editorialContentKind')->orderBy('id')->get() as $version) {
if ($exceptCompositionId !== null && (int) $version->composition_id === $exceptCompositionId) {
continue;
}
@@ -94,7 +94,7 @@ public static function readyTargets(): array
$options['element:'.$version->id] = self::elementLabel($version);
}
foreach (CompositionVersion::query()->where('status', ContentVersionStatus::Bereit)->whereHas('composition')->with('composition.editorialContentKind')->orderBy('id')->get() as $version) {
foreach (CompositionVersion::query()->where('status', ContentVersionStatus::Bereit)->with('composition.editorialContentKind')->orderBy('id')->get() as $version) {
$options['composition:'.$version->id] = self::compositionLabel($version);
}
+4 -16
View File
@@ -266,7 +266,7 @@ public function elementUsage(ContentElement $element): array
->get();
foreach ($members as $member) {
$lines[] = self::compositionLabelOf($member->compositionVersion->composition)
$lines[] = self::compositionLabel($member->compositionVersion->composition)
.' · Fassung '.$member->compositionVersion->number
.' · Rolle '.$member->role;
}
@@ -280,9 +280,7 @@ public function elementUsage(ContentElement $element): array
foreach ($contents as $content) {
$lines[] = 'Lizenzartikel '.$content->release->article->code
.' · Stand '.$content->release->number
.' · '.$content->path
.($content->variant_key !== null ? ' · Variante '.$content->variant_key : '')
.($content->requirement === CompositionMember::SUPPLEMENTARY ? ' · ergänzend' : '');
.' · '.$content->path;
}
return $lines === []
@@ -315,7 +313,7 @@ public function compositionMembers(Composition $composition): array
}
$nested = $member->nestedCompositionVersion;
$lines[] = $member->role.' — '.($nested === null ? 'fehlt' : self::compositionLabelOf($nested->composition));
$lines[] = $member->role.' — '.($nested === null ? 'fehlt' : self::compositionLabel($nested->composition));
}
return $lines;
@@ -367,7 +365,7 @@ public function compositionUsage(Composition $composition): array
->get();
foreach ($parents as $member) {
$lines[] = self::compositionLabelOf($member->compositionVersion->composition)
$lines[] = self::compositionLabel($member->compositionVersion->composition)
.' · Fassung '.$member->compositionVersion->number
.' · Rolle '.$member->role;
}
@@ -450,16 +448,6 @@ private function purpose(string $purpose): string
};
}
/**
* Eine Zusammenstellung, die dieser Programmstand nicht kennt, erscheint nur als Hinweis ohne Namen und Inhalt.
*/
private static function compositionLabelOf(?Composition $composition): string
{
return $composition === null
? 'Zusammenstellung einer neueren Programmversion'
: self::compositionLabel($composition);
}
private static function compositionLabel(Composition $composition): string
{
$kind = $composition->kind;
+3 -25
View File
@@ -21,7 +21,6 @@
use App\Filament\Resources\ContentElements\ContentElementResource;
use App\Filament\Resources\Courses\CourseResource;
use App\Filament\Resources\Exercises\ExerciseResource;
use App\Filament\Resources\Practices\PracticeResource;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
@@ -34,7 +33,6 @@ class EditorialCatalog
public function rows(CompositionVersion $version, int $exceptCompositionId): array
{
$version->loadMissing([
'members.variant',
'members.contentElementVersion.element.editorialContentKind',
'members.nestedCompositionVersion.composition.editorialContentKind',
]);
@@ -52,10 +50,6 @@ public function rows(CompositionVersion $version, int $exceptCompositionId): arr
$row['role'] = $member->role;
$row['note'] = trim((string) ($member->placement_note ?? ''));
$row['variant'] = $member->variant?->key;
$row['requirement'] = $member->requirement ?: 'erforderlich';
$row['selection'] = is_array($member->variant_selection) ? $member->variant_selection : null;
$row['origin'] = $member->origin ?: 'lokal';
$rows[] = $row;
}
@@ -146,12 +140,6 @@ public function rowForTarget(string $target, int $exceptCompositionId, bool $all
}
$composition = $version->composition;
// Art, die dieser Programmstand nicht kennt: nicht anbieten und nicht laden (Rückfallschutz).
if ($composition === null) {
return null;
}
$kind = $composition->editorialContentKind?->label
?: ($composition->kind instanceof CompositionKind ? $composition->kind->deskLabel() : 'Zusammenstellung');
@@ -250,11 +238,7 @@ public function search(string $query, string $scope, int $exceptCompositionId):
->with('composition.editorialContentKind')
->whereHas('composition', function ($builder) use ($scope, $query, $like): void {
if ($scope === 'module') {
$builder->whereIn('kind', [CompositionKind::Uebung, CompositionKind::Exercise]);
}
if ($scope === 'uebungen') {
$builder->where('kind', CompositionKind::Exercise);
$builder->where('kind', CompositionKind::Uebung);
}
if ($query === '') {
@@ -327,7 +311,7 @@ public function browse(string $query, string $kind, string $dimension, int $exce
->where('composition_id', '!=', $exceptCompositionId)
->whereHas('composition', function ($builder) use ($query, $like, $kind, $dimensionId, $pillarId): void {
if ($kind === 'modul') {
$builder->whereIn('kind', [CompositionKind::Uebung, CompositionKind::Exercise]);
$builder->where('kind', CompositionKind::Uebung);
}
if ($dimensionId > 0) {
@@ -373,7 +357,7 @@ public function browse(string $query, string $kind, string $dimension, int $exce
$builder->where('status', ContentVersionStatus::Bereit);
})
->when($kind === 'modul', function ($builder): void {
$builder->whereIn('kind', [CompositionKind::Uebung, CompositionKind::Exercise]);
$builder->where('kind', CompositionKind::Uebung);
})
->orderByDesc('id')
->get();
@@ -1044,10 +1028,6 @@ private function suggestPicture(array $members, array $seen = []): ?array
$nested = $version->composition;
if ($nested === null) {
continue;
}
if ($this->cardUrl('komposition', $nested->id, $nested->thumbnail_path) !== null) {
return [
'kind' => 'komposition',
@@ -1083,7 +1063,6 @@ public function create(string $designation, CompositionKind $kind): Composition
$slug = match ($kind) {
CompositionKind::Kurs => 'programm',
CompositionKind::Uebung => 'modul',
CompositionKind::Exercise => 'uebung',
default => null,
};
$editorial = $slug === null ? null : EditorialContentKind::query()->where('slug', $slug)->first();
@@ -1105,7 +1084,6 @@ public static function editUrl(Composition $composition): string
CompositionKind::Kurs => CourseResource::class,
CompositionKind::Kombination => CombinationResource::class,
CompositionKind::Uebung => ExerciseResource::class,
CompositionKind::Exercise => PracticeResource::class,
};
return $resource::getUrl('edit', ['record' => $composition]);
+4 -13
View File
@@ -74,7 +74,6 @@ public function bestand(): array
$einheit = match ($fixed) {
CompositionKind::Kurs => ['Programm', 'Programme'],
CompositionKind::Uebung => ['Modul', 'Module'],
CompositionKind::Exercise => ['Übung', 'Übungen'],
CompositionKind::Kombination => ['Fachliche Kombination', 'Fachliche Kombinationen'],
default => ['Programm oder Modul', 'Programme und Module'],
};
@@ -189,7 +188,7 @@ public function entries(): array
$rows[] = [
'schluessel' => 'c'.$composition->id,
'titel' => $title,
'meta' => $kind->deskLabel().($title !== $composition->designation ? ' · '.$composition->designation : '').($kind === CompositionKind::Exercise ? ' · Herkunft: lokal' : ''),
'meta' => $kind->deskLabel().($title !== $composition->designation ? ' · '.$composition->designation : ''),
'text' => $summary,
'bild' => $cover['url'],
'bildFehlt' => 'Kein Titelbild',
@@ -220,19 +219,11 @@ public function entries(): array
*/
protected function createCompositionAction(CompositionKind $kind): Action
{
$label = match ($kind) {
CompositionKind::Kurs => 'Programm',
CompositionKind::Exercise => 'Übung',
default => 'Modul',
};
$label = $kind === CompositionKind::Kurs ? 'Programm' : 'Modul';
return Action::make(match ($kind) {
CompositionKind::Kurs => 'createProgram',
CompositionKind::Exercise => 'createExercise',
default => 'createModule',
})
return Action::make($kind === CompositionKind::Kurs ? 'createProgram' : 'createModule')
->label($label.' anlegen')
->modalHeading(($kind === CompositionKind::Exercise ? 'Neue ' : 'Neues ').$label)
->modalHeading('Neues '.$label)
->modalDescription('Der Name genügt. Danach öffnet sich der Aufbau; Texte, Bilder und Einordnung folgen dort und in der Redaktion.')
->modalSubmitActionLabel($label.' anlegen')
->modalWidth('lg')
@@ -1,124 +0,0 @@
<?php
namespace App\Http\Controllers\Member;
use App\Domain\Catalog\ArticleRelease;
use App\Domain\Catalog\CompositionVersion;
use App\Domain\Catalog\ExerciseGuide;
use App\Domain\Catalog\ExercisePdf;
use App\Domain\Catalog\LicenseArticle;
use App\Domain\Media\DeliveryLog;
use App\Http\Controllers\Controller;
use App\Http\SignedLink;
use Illuminate\Contracts\View\View;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
/**
* Die Übung als formatierte Anleitung innerhalb des erworbenen Moduls oder Programms und ihre PDF-Ausgabe. Beide zeigen
* die im Artikel-Stand gebundene Übungsfassung und die dort angebotenen Varianten. Über jeden Abschnitt und jedes
* Medium entscheidet `DecideAccess`; auch die direkte PDF-Adresse wird bei jedem Abruf neu entschieden.
*/
class ExerciseController extends Controller
{
public function show(Request $request, LicenseArticle $article, ArticleRelease $release, string $path): View
{
[$guide, $located] = $this->load($request, $article, $release, $path);
$user = $request->user();
$copy = DeliveryLog::newCopyId();
$shown = false;
foreach ($guide['entries'] as $index => $entry) {
$link = fn (string $action) => SignedLink::temporary('member.media', now()->addMinutes(10), [
'article' => $article->id,
'release' => $release->id,
'version' => $entry['version']->id,
'action' => $action,
'reader' => $user->id,
]);
$guide['entries'][$index]['url'] = $entry['allowed'] && $entry['class'] !== 'text' ? $link($entry['action']) : null;
$guide['entries'][$index]['download_url'] = $entry['allowed'] && $entry['may_download'] && $entry['class'] !== 'text' ? $link('laden') : null;
if ($entry['allowed'] && $entry['class'] === 'text' && $entry['grant'] !== null) {
app(DeliveryLog::class)->write($entry['grant'], $article, $release, $entry['version'], 'ansehen', 'text', hash('sha256', (string) $entry['version']->body), 'k2', $copy, $located['version']->id);
$shown = true;
}
}
$pdfAllowed = app(ExercisePdf::class)->sections($guide) !== null;
return view('member.exercise', [
'guide' => $guide,
'article' => $article,
'release' => $release,
'path' => $path,
'reader' => $user->name,
'copy' => $shown ? $copy : null,
'pdfUrl' => $pdfAllowed ? SignedLink::temporary('member.exercise.pdf', now()->addMinutes(10), [
'article' => $article->id,
'release' => $release->id,
'path' => $path,
'variante' => $guide['chosen'],
'reader' => $user->id,
]) : null,
'variantUrl' => fn (string $key): string => route('member.exercise', ['article' => $article, 'release' => $release, 'path' => $path, 'variante' => $key]),
]);
}
public function pdf(Request $request, LicenseArticle $article, ArticleRelease $release, string $path): Response
{
abort_unless((int) $request->query('reader') === $request->user()->id, 403);
[$guide, $located] = $this->load($request, $article, $release, $path);
$pdf = app(ExercisePdf::class);
$sections = $pdf->sections($guide);
abort_if($sections === null, 403, 'Für dieses PDF fehlt die Berechtigung oder ein erforderlicher Bestandteil.');
$copy = DeliveryLog::newCopyId();
$variant = collect($guide['variants'])->firstWhere('key', $guide['chosen']);
$content = $pdf->render(
$guide,
$sections,
$request->user()->name,
$copy,
(string) ($variant['name'] ?? ''),
route('member.exercise', ['article' => $article, 'release' => $release, 'path' => $path, 'variante' => $guide['chosen']]),
);
$checksum = hash('sha256', $content);
foreach ($sections as $section) {
$grant = $section['download_grant'] ?? $section['grant'];
if ($grant !== null) {
app(DeliveryLog::class)->write($grant, $article, $release, $section['version'], 'laden', 'pdf', $checksum, 'k2', $copy, $located['version']->id);
}
}
$name = str($guide['title'])->slug()->value() ?: 'uebung';
return response($content, 200, [
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'attachment; filename="'.$name.'.pdf"',
'X-License-Copy' => $copy,
'Cache-Control' => 'private, no-store',
]);
}
/**
* @return array{0: array<string, mixed>, 1: array{version: CompositionVersion, selection: list<string>|null}}
*/
private function load(Request $request, LicenseArticle $article, ArticleRelease $release, string $path): array
{
$guides = app(ExerciseGuide::class);
abort_unless($guides->mayOpen($request->user(), $article, $release), 403);
$located = $guides->locate($release, $path);
abort_if($located === null, 404);
$variant = $request->query('variante');
return [
$guides->build($request->user(), $article, $release, $located['version'], $located['selection'], is_string($variant) ? $variant : null),
$located,
];
}
}
@@ -6,7 +6,6 @@
use App\Domain\Catalog\Composition;
use App\Domain\Catalog\ContentElement;
use App\Domain\Catalog\ContentElementVersion;
use App\Domain\Catalog\ContentVersionStatus;
use App\Domain\Catalog\EditorialVocabulary;
use App\Domain\Catalog\IdentityDimension;
use App\Domain\Catalog\LicenseArticle;
@@ -502,10 +501,8 @@ private function maySeeThumbnail(Request $request, string $kind, int $subject):
return true;
}
// Ein gesperrtes Medium zeigt auch kein Vorschaubild mehr (Sperre gilt für Ausgaben und Ableitungen).
if ($kind === 'element' && $release->contents->contains(
fn ($content): bool => $content->elementVersion?->content_element_id === $subject
&& $content->elementVersion->status !== ContentVersionStatus::Gesperrt,
fn ($content): bool => $content->elementVersion?->content_element_id === $subject,
)) {
return true;
}
+1 -43
View File
@@ -5,13 +5,11 @@
use App\Domain\Catalog\ArticleRelease;
use App\Domain\Catalog\Composition;
use App\Domain\Catalog\CompositionDisplayRelease;
use App\Domain\Catalog\CompositionKind;
use App\Domain\Catalog\CompositionStructureReader;
use App\Domain\Catalog\CompositionVersion;
use App\Domain\Catalog\ContentElement;
use App\Domain\Catalog\ContentElementVersion;
use App\Domain\Catalog\EditorialProfileReader;
use App\Domain\Catalog\ExerciseGuide;
use App\Domain\Catalog\ReleaseStatus;
use App\Domain\Catalog\StructureNode;
use App\Domain\Entitlement\DecideAccess;
@@ -391,7 +389,7 @@ private function present(User $user, StructureNode $node, bool $full, int $rootI
'view_url' => $view,
'poster_url' => $poster,
'download_url' => $download,
'program_url' => $this->exerciseUrl($user, $rootId, $node) ?? $this->programUrl($node),
'program_url' => $this->programUrl($node),
'composition_id' => $node->compositionId,
'element_id' => $node->contentElementId,
'version_id' => $node->contentElementVersionId,
@@ -493,46 +491,6 @@ private function element(int $id): ?ContentElement
return $this->elements[$id];
}
/**
* Eine Übung im Zusammenhang des erworbenen Moduls oder Programms: die im Stand gebundene Fassung und ihre Varianten,
* nicht die jeweils neueste Fassung der Übung. Gefunden wird der jüngste auslieferbare Stand des Kontos, dessen
* festgeschriebene Wurzel diese Fassung an einer Stelle einbindet.
*/
private function exerciseUrl(User $user, int $rootId, StructureNode $node): ?string
{
if ($node->compositionVersionId === null) {
return null;
}
$nested = CompositionVersion::query()->with('composition')->find($node->compositionVersionId);
if ($nested?->composition?->kind !== CompositionKind::Exercise) {
return null;
}
$guide = app(ExerciseGuide::class);
foreach ($this->grants($user) as $grant) {
$releases = ArticleRelease::query()
->where('license_article_id', $grant->license_article_id)
->whereIn('status', [ReleaseStatus::Veroeffentlicht, ReleaseStatus::AbgeloestVerfuegbar])
->whereHas('rootCompositionVersion', fn ($query) => $query->where('composition_id', $rootId))
->with('rootCompositionVersion')
->orderByDesc('number')
->get();
foreach ($releases as $release) {
$path = $guide->pathTo($release->rootCompositionVersion, $nested->id);
if ($path !== null) {
return route('member.exercise', ['article' => $grant->license_article_id, 'release' => $release->id, 'path' => $path]);
}
}
}
return null;
}
private function programUrl(StructureNode $node): ?string
{
if ($node->compositionId === null || $node->compositionVersionId === null) {
@@ -67,6 +67,12 @@ public function panel(Panel $panel): Panel
->authMiddleware([
Authenticate::class,
])
// Favicon zur Anfragezeit: ->favicon(asset(...)) würde beim Start der Anwendung berechnet, vor der
// Auswertung von Proxy-Kopfzeilen und geöffneter Adresse, und könnte auf einen falschen Host zeigen.
->renderHook(
PanelsRenderHook::HEAD_END,
fn (): string => view('components.site.favicon')->render(),
)
->renderHook(
PanelsRenderHook::STYLES_AFTER,
fn (): string => view('filament.cms.styles')->render().view('filament.verwaltung.styles')->render(),
-6
View File
@@ -42,12 +42,6 @@
'api_base' => env('STRIPE_API_BASE', 'https://api.stripe.com'),
],
// Übernahme von Übungen aus dem Shinkan-Katalog. Adresse und Schlüssel stehen nur in der Umgebungsdatei des Servers.
'shinkan' => [
'url' => env('SHINKAN_DISTRIBUTION_URL'),
'key' => env('SHINKAN_DISTRIBUTION_KEY'),
],
'slack' => [
'notifications' => [
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
@@ -1,90 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
/**
* Übungsverwaltung, rein additiv. Alle neuen Spalten sind nullable oder haben einen Vorgabewert. Der Rückfall auf den
* vorherigen Programmstand setzt nur den Code zurück: Dieser kennt die Spalten nicht, liest Übungen wegen des
* Bereichsfilters am Modell (SupportedKindScope) nicht und verweigert das Veröffentlichen von Aufbauten mit Übungen.
*/
return new class extends Migration
{
public function up(): void
{
Schema::table('composition_versions', function (Blueprint $table) {
$table->unsignedInteger('duration_max')->nullable();
$table->text('prerequisites')->nullable();
// Änderungsnachweis über Felder, Varianten und Verwendungen; resolved_hash deckt nur die Medienmenge ab.
$table->string('structure_hash')->nullable();
});
Schema::table('compatibility_attestations', function (Blueprint $table) {
$table->string('structure_hash')->nullable();
});
Schema::create('composition_version_variants', function (Blueprint $table) {
$table->id();
$table->foreignId('composition_version_id')->constrained()->cascadeOnDelete();
$table->string('key');
$table->unsignedInteger('position');
$table->string('name');
$table->text('description')->nullable();
$table->timestamps();
$table->unique(['composition_version_id', 'key']);
$table->unique(['composition_version_id', 'position']);
});
Schema::table('composition_members', function (Blueprint $table) {
$table->foreignId('variant_id')->nullable()->constrained('composition_version_variants')->restrictOnDelete();
$table->string('requirement')->default('erforderlich');
$table->json('variant_selection')->nullable();
});
Schema::table('release_contents', function (Blueprint $table) {
$table->string('requirement')->nullable();
$table->string('variant_key')->nullable();
});
Schema::table('media_deliveries', function (Blueprint $table) {
$table->unsignedBigInteger('composition_version_id')->nullable();
});
$now = now();
DB::table('editorial_content_kinds')->insertOrIgnore([
'slug' => 'uebung',
'label' => 'Übung',
'sort_order' => 25,
'is_active' => true,
'contexts' => json_encode(['uebung', 'lizenzartikel']),
'created_at' => $now,
'updated_at' => $now,
]);
}
public function down(): void
{
DB::table('editorial_content_kinds')->where('slug', 'uebung')->delete();
Schema::table('media_deliveries', function (Blueprint $table) {
$table->dropColumn('composition_version_id');
});
Schema::table('release_contents', function (Blueprint $table) {
$table->dropColumn(['requirement', 'variant_key']);
});
Schema::table('composition_members', function (Blueprint $table) {
$table->dropConstrainedForeignId('variant_id');
$table->dropColumn(['requirement', 'variant_selection']);
});
Schema::dropIfExists('composition_version_variants');
Schema::table('compatibility_attestations', function (Blueprint $table) {
$table->dropColumn('structure_hash');
});
Schema::table('composition_versions', function (Blueprint $table) {
$table->dropColumn(['duration_max', 'prerequisites', 'structure_hash']);
});
}
};
@@ -1,92 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Übernahme aus einer Quelle (Shinkan), rein additiv. Die Quelle ist an ihre stabile Kennung gebunden; jeder Inhaltsstand
* (Prüfsumme) wird genau einmal festgehalten. Eine lokale Fassung entsteht erst mit der bewussten Übernahme.
*/
return new class extends Migration
{
public function up(): void
{
Schema::create('exercise_sources', function (Blueprint $table) {
$table->id();
$table->string('source_system')->default('shinkan');
$table->string('source_id');
$table->foreignId('composition_id')->nullable()->constrained()->nullOnDelete();
$table->string('title')->nullable();
// bereitgestellt | nicht_mehr_bereitgestellt: nur die Verfügbarkeit an der Quelle, kein Rechtsvorgang.
$table->string('availability')->default('bereitgestellt');
$table->string('last_hash')->nullable();
$table->timestamp('last_seen_at')->nullable();
$table->timestamps();
$table->unique(['source_system', 'source_id']);
});
Schema::create('exercise_source_snapshots', function (Blueprint $table) {
$table->id();
$table->foreignId('exercise_source_id')->constrained()->cascadeOnDelete();
$table->string('content_hash');
$table->json('payload');
$table->unsignedBigInteger('adopted_version_id')->nullable();
$table->timestamp('fetched_at');
$table->timestamps();
$table->unique(['exercise_source_id', 'content_hash']);
});
Schema::create('exercise_import_runs', function (Blueprint $table) {
$table->id();
$table->string('source_system')->default('shinkan');
$table->string('status');
$table->string('cursor')->nullable();
$table->unsignedInteger('added')->default(0);
$table->unsignedInteger('updated')->default(0);
$table->unsignedInteger('removed')->default(0);
$table->text('error')->nullable();
$table->timestamp('started_at');
$table->timestamp('finished_at')->nullable();
$table->timestamps();
});
Schema::table('content_elements', function (Blueprint $table) {
$table->string('source_ref')->nullable()->index();
});
Schema::table('composition_versions', function (Blueprint $table) {
$table->unsignedBigInteger('source_snapshot_id')->nullable();
});
Schema::table('composition_members', function (Blueprint $table) {
// quelle | lokal: Was stammt aus der Quelle, was hat die Redaktion lokal ergänzt?
$table->string('origin')->default('lokal');
});
Schema::table('composition_version_variants', function (Blueprint $table) {
$table->string('origin')->default('lokal');
});
}
public function down(): void
{
Schema::table('composition_version_variants', function (Blueprint $table) {
$table->dropColumn('origin');
});
Schema::table('composition_members', function (Blueprint $table) {
$table->dropColumn('origin');
});
Schema::table('composition_versions', function (Blueprint $table) {
$table->dropColumn('source_snapshot_id');
});
Schema::table('content_elements', function (Blueprint $table) {
$table->dropColumn('source_ref');
});
Schema::dropIfExists('exercise_import_runs');
Schema::dropIfExists('exercise_source_snapshots');
Schema::dropIfExists('exercise_sources');
}
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" role="img" aria-labelledby="favicon-title">
<title id="favicon-title">Lara &amp; Felix</title>
<rect x="1" y="1" width="62" height="62" rx="15" fill="#032551" stroke="#426184" stroke-width="2"/>
<g fill="none" stroke="#fff" stroke-width="8.4" stroke-linecap="round" stroke-linejoin="round">
<path d="M14.8 20 Q14 31 14.8 39 Q20.6 39 25.4 37.8"/>
<path d="M37.4 38.8 Q36.8 29.1 37.8 18.6 Q44.6 17.1 50.1 18.2 M37.5 28.7 Q43 27.9 47.4 28.1"/>
</g>
<path d="M13 51 Q31 44.2 51 49.3" fill="none" stroke="#FCD10A" stroke-width="5.5" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 129" width="250" height="129" role="img" aria-labelledby="motif-title">
<title id="motif-title">Alltagssituationen</title>
<g transform="translate(81 2) scale(.92)"><g transform="translate(0 5) rotate(-7 36 54)"><rect x="10" y="47" width="53" height="33" rx="4.7" fill="none" stroke="#032551" stroke-width="3.9"/><g transform="translate(16.9 44.8) scale(.38)"><path d="M37 26 Q37 22 41 24 L72 43 Q77 47 72 51 L41 70 Q37 73 37 68Z" fill="#032551"/></g><g transform="rotate(-11 11 48)"><rect x="10" y="36" width="53" height="12" rx="3.7" fill="none" stroke="#032551" stroke-width="3.8"/><path d="M16 46 L22 37 M27 47 L33 37 M39 47 L45 37 M51 47 L57 37" fill="none" stroke="#032551" stroke-width="3.6" stroke-linecap="round" stroke-linejoin="round"/></g></g><g transform="translate(61 2) rotate(8 16 20) scale(.86)"><path d="M5 23 L9 9 M16 26 L28 16 M20 35 L35 33" fill="none" stroke="#FCD10A" stroke-width="5.5" stroke-linecap="round" stroke-linejoin="round"/></g></g><path d="M36.25 115.08Q36.33 115.33 36.33 115.57Q36.33 115.9 36.19 116.16Q36.05 116.43 35.82 116.61Q35.59 116.79 35.3 116.89Q35 116.99 34.7 116.99Q34.25 116.99 33.85 116.74Q33.45 116.49 33.32 115.95L32.05 112.69H24.22L22.97 115.95Q22.82 116.5 22.44 116.74Q22.05 116.99 21.61 116.99Q21.32 116.99 21.03 116.89Q20.73 116.79 20.51 116.61Q20.28 116.43 20.14 116.17Q20 115.91 20 115.6Q20 115.47 20.02 115.35Q20.04 115.22 20.1 115.08L25.23 102.27Q25.53 101.41 25.84 100.87Q26.14 100.33 26.49 100.01Q26.84 99.7 27.25 99.58Q27.65 99.46 28.16 99.46Q28.67 99.46 29.08 99.59Q29.5 99.71 29.85 100.03Q30.19 100.35 30.5 100.89Q30.8 101.44 31.1 102.27ZM28.12 101.96 24.9 110.64H31.38L28.17 101.96ZM38.85 100.87Q38.85 100.52 38.97 100.26Q39.1 100 39.3 99.82Q39.5 99.64 39.76 99.55Q40.02 99.46 40.29 99.46Q40.56 99.46 40.82 99.55Q41.07 99.64 41.27 99.82Q41.48 100 41.6 100.26Q41.72 100.52 41.72 100.87V115.58Q41.72 115.94 41.59 116.2Q41.46 116.46 41.26 116.64Q41.06 116.82 40.8 116.91Q40.54 117 40.27 117Q40 117 39.74 116.91Q39.49 116.83 39.29 116.65Q39.1 116.48 38.97 116.21Q38.85 115.94 38.85 115.58ZM45.21 100.87Q45.21 100.52 45.34 100.26Q45.46 100 45.66 99.82Q45.86 99.64 46.12 99.55Q46.39 99.46 46.65 99.46Q46.92 99.46 47.18 99.55Q47.44 99.64 47.64 99.82Q47.84 100 47.96 100.26Q48.08 100.52 48.08 100.87V115.58Q48.08 115.94 47.95 116.2Q47.83 116.46 47.62 116.64Q47.42 116.82 47.16 116.91Q46.9 117 46.63 117Q46.36 117 46.11 116.91Q45.85 116.83 45.65 116.65Q45.46 116.48 45.34 116.21Q45.21 115.94 45.21 115.58ZM52.65 104.78 52.88 101.5Q52.91 101.23 53.04 101.01Q53.16 100.8 53.36 100.65Q53.55 100.51 53.79 100.44Q54.02 100.36 54.25 100.36Q54.69 100.36 55.03 100.63Q55.37 100.9 55.37 101.47V104.78H57.24Q57.74 104.78 58 105.09Q58.25 105.4 58.25 105.77Q58.25 106.14 58 106.44Q57.75 106.75 57.24 106.75H55.37V111.82Q55.37 112.69 55.4 113.29Q55.43 113.89 55.56 114.26Q55.69 114.63 55.97 114.8Q56.24 114.96 56.73 114.96Q56.85 114.96 57 114.95Q57.14 114.94 57.29 114.92Q57.44 114.9 57.56 114.89Q57.69 114.88 57.77 114.88Q58.23 114.88 58.49 115.18Q58.74 115.49 58.74 115.86Q58.74 116.26 58.5 116.5Q58.27 116.74 57.88 116.89Q57.5 117.04 57.02 117.09Q56.55 117.15 56.06 117.15Q55.2 117.15 54.54 116.93Q53.88 116.71 53.43 116.2Q52.98 115.69 52.74 114.86Q52.5 114.03 52.5 112.83V106.75H51.32Q50.81 106.75 50.56 106.44Q50.31 106.14 50.31 105.77Q50.31 105.4 50.56 105.09Q50.82 104.78 51.33 104.78ZM67.95 108.87Q67.95 108.25 67.77 107.83Q67.6 107.42 67.28 107.16Q66.96 106.9 66.52 106.79Q66.07 106.69 65.53 106.69Q64.92 106.69 64.42 106.75Q63.92 106.82 63.49 106.94Q63.05 107.06 62.68 107.22Q62.3 107.37 61.93 107.54Q61.75 107.61 61.57 107.61Q61.39 107.61 61.24 107.55Q61.09 107.48 60.97 107.36Q60.86 107.25 60.79 107.09Q60.72 106.94 60.72 106.78Q60.72 106.65 60.77 106.54Q60.81 106.44 60.89 106.31Q61.48 105.43 62.71 105.03Q63.95 104.63 65.69 104.63Q66.75 104.63 67.66 104.88Q68.57 105.12 69.23 105.65Q69.89 106.18 70.26 107.03Q70.64 107.88 70.64 109.09V115.74Q70.62 116.06 70.51 116.29Q70.39 116.52 70.2 116.68Q70.01 116.84 69.77 116.92Q69.54 117 69.29 117Q69.06 117 68.83 116.93Q68.61 116.85 68.43 116.71Q68.25 116.56 68.14 116.34Q68.03 116.12 68.02 115.83V114.91Q67.77 115.35 67.35 115.8Q66.92 116.24 66.38 116.54Q65.84 116.84 65.23 116.99Q64.62 117.15 63.99 117.15Q63.12 117.15 62.35 116.9Q61.59 116.66 61.03 116.19Q60.48 115.73 60.16 115.05Q59.84 114.36 59.84 113.64Q59.84 112.52 60.33 111.73Q60.81 110.95 61.71 110.45Q62.6 109.96 63.87 109.74Q65.14 109.52 66.72 109.52Q66.96 109.52 67.32 109.52Q67.68 109.53 67.95 109.54ZM67.94 111.14Q67.84 111.14 67.7 111.15Q67.56 111.15 67.41 111.15Q67.25 111.15 67.1 111.15Q66.95 111.15 66.83 111.15Q66.06 111.15 65.29 111.24Q64.52 111.32 63.9 111.57Q63.29 111.82 62.9 112.28Q62.52 112.74 62.52 113.47Q62.52 113.84 62.7 114.23Q62.88 114.62 63.19 114.88Q63.51 115.13 63.93 115.26Q64.36 115.39 64.85 115.4Q65.5 115.39 66.05 115.17Q66.61 114.95 67.02 114.52Q67.44 114.08 67.67 113.52Q67.91 112.96 67.94 112.12ZM82.83 110.92Q82.83 109.97 82.67 109.23Q82.5 108.49 82.12 107.88Q81.75 107.26 81.12 106.9Q80.49 106.54 79.56 106.54Q78.66 106.54 78.07 106.88Q77.47 107.22 77.11 107.83Q76.75 108.43 76.61 109.25Q76.46 110.07 76.46 110.88Q76.46 112.03Line truncated
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96" role="img" aria-labelledby="motif-title">
<title id="motif-title">Bildung</title>
<path d="M25 47 V64 C37 75 59 75 71 64 V47 M82 44 V65" fill="none" stroke="#032551" stroke-width="4.2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 37 L48 22 L87 37 L48 53Z" fill="none" stroke="#3B7B09" stroke-width="4.6" stroke-linecap="round" stroke-linejoin="round"/><circle cx="82" cy="68" r="3.6" fill="#FCD10A" stroke="none" stroke-width="0"/>
</svg>

After

Width:  |  Height:  |  Size: 541 B

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96" role="img" aria-labelledby="motif-title">
<title id="motif-title">Aufgeschlagenes Buch</title>
<path d="M19 29 C29 24 39 25 48 32 C57 25 67 24 77 29 V66 C65 62 55 64 48 70 C41 64 31 62 19 66Z M48 32 V70" fill="none" stroke="#032551" stroke-width="4.3" stroke-linecap="round" stroke-linejoin="round"/><path d="M19 33 H12 V75 C24 70 37 71 48 77 C59 71 72 70 84 75 V33 H77" fill="none" stroke="#3B7B09" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 560 B

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 176 71" width="176" height="71" role="img" aria-labelledby="motif-title">
<title id="motif-title">Das ist nicht okay!</title>
<rect x="5" y="5" width="166" height="61" rx="30.5" fill="#FFF2F1" stroke="#E6BDC1" stroke-width="1.5"/><circle cx="37" cy="35.5" r="22.5" fill="#BC2335" stroke="none" stroke-width="0"/><g transform="translate(9.2 7.7) scale(.58)"><path d="M33 33 L63 63 M63 33 L33 63" fill="none" stroke="#FFFFFF" stroke-width="7.5" stroke-linecap="round" stroke-linejoin="round"/></g><path d="M70.7 31Q70.45 31 70.23 30.91Q70 30.82 69.84 30.65Q69.67 30.49 69.57 30.27Q69.48 30.05 69.48 29.81V19Q69.48 18.75 69.57 18.53Q69.67 18.31 69.84 18.15Q70 17.99 70.23 17.9Q70.45 17.8 70.7 17.8H73.97Q75.75 17.8 77.07 18.24Q78.39 18.69 79.27 19.54Q80.14 20.39 80.58 21.63Q81.01 22.87 81.01 24.45Q81.01 26.04 80.53 27.26Q80.06 28.48 79.17 29.32Q78.28 30.15 76.99 30.57Q75.69 31 74.06 31ZM71.92 29.32H73.99Q75.19 29.32 76.03 28.99Q76.87 28.65 77.4 28.02Q77.93 27.38 78.18 26.47Q78.42 25.57 78.42 24.41Q78.42 23.13 78.11 22.21Q77.79 21.28 77.19 20.67Q76.58 20.07 75.69 19.78Q74.8 19.49 73.65 19.49H71.92ZM88.75 24.89Q88.75 24.42 88.62 24.11Q88.48 23.79 88.24 23.6Q88 23.41 87.67 23.33Q87.33 23.24 86.93 23.24Q86.47 23.24 86.1 23.29Q85.72 23.34 85.39 23.44Q85.07 23.53 84.78 23.64Q84.5 23.76 84.22 23.89Q84.09 23.94 83.95 23.94Q83.82 23.94 83.7 23.89Q83.59 23.84 83.5 23.75Q83.41 23.67 83.36 23.55Q83.31 23.44 83.31 23.32Q83.31 23.22 83.35 23.14Q83.38 23.06 83.44 22.96Q83.88 22.3 84.81 22Q85.74 21.7 87.05 21.7Q87.85 21.7 88.53 21.88Q89.22 22.07 89.71 22.47Q90.21 22.87 90.49 23.5Q90.77 24.14 90.77 25.05V30.05Q90.76 30.29 90.67 30.47Q90.58 30.64 90.44 30.76Q90.3 30.88 90.12 30.94Q89.94 31 89.76 31Q89.58 31 89.41 30.94Q89.24 30.89 89.11 30.78Q88.98 30.67 88.9 30.5Q88.81 30.34 88.8 30.12V29.43Q88.61 29.76 88.29 30.1Q87.98 30.43 87.57 30.66Q87.16 30.88 86.7 31Q86.24 31.11 85.77 31.11Q85.11 31.11 84.54 30.93Q83.97 30.74 83.55 30.39Q83.13 30.05 82.89 29.53Q82.65 29.02 82.65 28.48Q82.65 27.63 83.02 27.04Q83.38 26.45 84.05 26.08Q84.73 25.7 85.68 25.54Q86.64 25.37 87.82 25.37Q88 25.37 88.28 25.38Q88.55 25.38 88.75 25.39ZM88.74 26.59Q88.67 26.59 88.56 26.6Q88.45 26.6 88.34 26.6Q88.23 26.6 88.11 26.6Q88 26.6 87.9 26.6Q87.33 26.6 86.75 26.67Q86.17 26.73 85.71 26.92Q85.24 27.11 84.95 27.45Q84.66 27.8 84.66 28.35Q84.66 28.62 84.8 28.92Q84.94 29.21 85.17 29.4Q85.41 29.6 85.73 29.69Q86.05 29.79 86.42 29.8Q86.9 29.79 87.32 29.62Q87.74 29.46 88.05 29.13Q88.36 28.81 88.54 28.38Q88.72 27.96 88.74 27.33ZM95.08 24.18Q95.08 24.46 95.24 24.66Q95.41 24.85 95.69 24.99Q95.97 25.13 96.36 25.24Q96.75 25.34 97.2 25.44Q97.65 25.54 98.14 25.68Q98.63 25.81 99.11 25.98Q99.99 26.24 100.49 26.79Q100.99 27.34 100.99 28.16Q100.99 28.84 100.67 29.41Q100.34 29.98 99.78 30.36Q99.22 30.73 98.48 30.92Q97.73 31.11 96.87 31.11Q96.1 31.11 95.41 30.98Q94.72 30.85 94.19 30.63Q93.67 30.41 93.36 30.12Q93.06 29.82 93.06 29.49Q93.06 29.24 93.26 29.06Q93.46 28.89 93.77 28.89Q93.96 28.89 94.27 29.01Q94.58 29.13 95 29.29Q95.42 29.46 95.94 29.58Q96.45 29.7 97.05 29.7Q97.42 29.7 97.76 29.62Q98.11 29.54 98.38 29.37Q98.66 29.2 98.82 28.94Q98.99 28.68 98.99 28.32Q98.99 27.99 98.7 27.7Q98.41 27.41 97.88 27.25Q97.27 27.08 96.68 26.95Q96.09 26.82 95.55 26.68Q95.01 26.54 94.56 26.36Q94.1 26.17 93.78 25.89Q93.45 25.61 93.26 25.21Q93.07 24.8 93.07 24.23Q93.07 23.67 93.37 23.17Q93.66 22.67 94.18 22.34Q94.7 22.01 95.41 21.86Q96.11 21.7 96.94 21.7Q97.8 21.7 98.44 21.83Q99.09 21.96 99.51 22.16Q99.94 22.37 100.15 22.63Q100.36 22.89 100.36 23.16Q100.36 23.42 100.16 23.56Q99.96 23.7 99.67 23.7Q99.56 23.7 99.46 23.68Q99.35 23.66 99.25 23.6Q98.88 23.39 98.35 23.26Q97.81 23.13 97.03 23.13Q96.59 23.13 96.23 23.19Q95.86 23.25 95.61 23.39Q95.36 23.53 95.22 23.77Q95.08 24.01 95.08 24.18ZM111.14 18.76Q111.14 19.21 110.79 19.5Q110.43 19.79 109.87 19.79Q109.59 19.79 109.36 19.71Q109.12 19.64 108.95 19.5Q108.78 19.36 108.69 19.17Q108.59 18.98 108.59 18.76Q108.59 18.54 108.69 18.35Q108.78 18.17 108.95 18.03Q109.12 17.89 109.36 17.81Q109.6 17.74 109.88 17.74Q110.15 17.74 110.39 17.81Q110.62 17.89 110.79 18.03Q110.95 18.17 111.05 18.35Q111.14 18.54 111.14 18.76ZM108.79 22.88Q108.79 22.61 108.89 22.41Q108.98 22.22 109.13 22.08Q109.28 21.95 109.48 21.88Q109.68 21.81 109.88 21.81Q110.08 21.81 110.27 21.88Q110.46 21.95 110.62 22.08Q110.77 22.22 110.86 22.41Q110.95 22.61 110.95 22.88V29.94Q110.95 30.2 110.86 30.4Q110.76 30.6 110.61 30.73Q110.46 30.86 110.26 30.93Q110.06 31 109.86 31Q109.66 31 109.46 30.94Q109.27 30.87 109.12 30.74Q108.98 30.61 108.89 30.4Q108.79 30.2 108.79 29.94ZM115.3 24.18Q115.3 24.46 115.46 24.66Q115.63 24.85 115.91 24.99Q116.2 25.13 116.58 25.24Q116.97 25.34 117.42 25.44Q117.87 25.54 118.36 25.68Q118.85 25.81 119.33 25.98Q120.21 26.24 120.71 26.79Q121.21 27.34 121.21 28.16Q121.21 28.84 120.89 29.41Q120.56 29.98 120 30.36Q119.44 30.73 118.7 30.92Q117.95 31.11 117.09 31.11Q116.32 31.11 115.63 30.98Q114.94 30.85 114.41 30.63Q113.89 30.41 113.58 30.12Q113.28 29.82 113.28 29.49Q113.28 29.24 113.48 29.06Q113.68 28.89 113.99 28.89Q114.18 28.89 114.49 29.01Q114.8 29.13 115.22 29.29Q115.64 29.46 116.16 29.58Q116.67 29.7 117.27 29.7Q1Line truncated
</svg>

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 176 71" width="176" height="71" role="img" aria-labelledby="motif-title">
<title id="motif-title">Das ist okay!</title>
<rect x="5" y="5" width="166" height="61" rx="30.5" fill="#F1F6E9" stroke="#B8CDA7" stroke-width="1.5"/><circle cx="37" cy="35.5" r="22.5" fill="#3B7B09" stroke="none" stroke-width="0"/><g transform="translate(9.2 7.7) scale(.58)"><path d="M27 49 L41 63 L70 33" fill="none" stroke="#FFFFFF" stroke-width="7.5" stroke-linecap="round" stroke-linejoin="round"/></g><path d="M70.7 31Q70.45 31 70.23 30.91Q70 30.82 69.84 30.65Q69.67 30.49 69.57 30.27Q69.48 30.05 69.48 29.81V19Q69.48 18.75 69.57 18.53Q69.67 18.31 69.84 18.15Q70 17.99 70.23 17.9Q70.45 17.8 70.7 17.8H73.97Q75.75 17.8 77.07 18.24Q78.39 18.69 79.27 19.54Q80.14 20.39 80.58 21.63Q81.01 22.87 81.01 24.45Q81.01 26.04 80.53 27.26Q80.06 28.48 79.17 29.32Q78.28 30.15 76.99 30.57Q75.69 31 74.06 31ZM71.92 29.32H73.99Q75.19 29.32 76.03 28.99Q76.87 28.65 77.4 28.02Q77.93 27.38 78.18 26.47Q78.42 25.57 78.42 24.41Q78.42 23.13 78.11 22.21Q77.79 21.28 77.19 20.67Q76.58 20.07 75.69 19.78Q74.8 19.49 73.65 19.49H71.92ZM88.75 24.89Q88.75 24.42 88.62 24.11Q88.48 23.79 88.24 23.6Q88 23.41 87.67 23.33Q87.33 23.24 86.93 23.24Q86.47 23.24 86.1 23.29Q85.72 23.34 85.39 23.44Q85.07 23.53 84.78 23.64Q84.5 23.76 84.22 23.89Q84.09 23.94 83.95 23.94Q83.82 23.94 83.7 23.89Q83.59 23.84 83.5 23.75Q83.41 23.67 83.36 23.55Q83.31 23.44 83.31 23.32Q83.31 23.22 83.35 23.14Q83.38 23.06 83.44 22.96Q83.88 22.3 84.81 22Q85.74 21.7 87.05 21.7Q87.85 21.7 88.53 21.88Q89.22 22.07 89.71 22.47Q90.21 22.87 90.49 23.5Q90.77 24.14 90.77 25.05V30.05Q90.76 30.29 90.67 30.47Q90.58 30.64 90.44 30.76Q90.3 30.88 90.12 30.94Q89.94 31 89.76 31Q89.58 31 89.41 30.94Q89.24 30.89 89.11 30.78Q88.98 30.67 88.9 30.5Q88.81 30.34 88.8 30.12V29.43Q88.61 29.76 88.29 30.1Q87.98 30.43 87.57 30.66Q87.16 30.88 86.7 31Q86.24 31.11 85.77 31.11Q85.11 31.11 84.54 30.93Q83.97 30.74 83.55 30.39Q83.13 30.05 82.89 29.53Q82.65 29.02 82.65 28.48Q82.65 27.63 83.02 27.04Q83.38 26.45 84.05 26.08Q84.73 25.7 85.68 25.54Q86.64 25.37 87.82 25.37Q88 25.37 88.28 25.38Q88.55 25.38 88.75 25.39ZM88.74 26.59Q88.67 26.59 88.56 26.6Q88.45 26.6 88.34 26.6Q88.23 26.6 88.11 26.6Q88 26.6 87.9 26.6Q87.33 26.6 86.75 26.67Q86.17 26.73 85.71 26.92Q85.24 27.11 84.95 27.45Q84.66 27.8 84.66 28.35Q84.66 28.62 84.8 28.92Q84.94 29.21 85.17 29.4Q85.41 29.6 85.73 29.69Q86.05 29.79 86.42 29.8Q86.9 29.79 87.32 29.62Q87.74 29.46 88.05 29.13Q88.36 28.81 88.54 28.38Q88.72 27.96 88.74 27.33ZM95.08 24.18Q95.08 24.46 95.24 24.66Q95.41 24.85 95.69 24.99Q95.97 25.13 96.36 25.24Q96.75 25.34 97.2 25.44Q97.65 25.54 98.14 25.68Q98.63 25.81 99.11 25.98Q99.99 26.24 100.49 26.79Q100.99 27.34 100.99 28.16Q100.99 28.84 100.67 29.41Q100.34 29.98 99.78 30.36Q99.22 30.73 98.48 30.92Q97.73 31.11 96.87 31.11Q96.1 31.11 95.41 30.98Q94.72 30.85 94.19 30.63Q93.67 30.41 93.36 30.12Q93.06 29.82 93.06 29.49Q93.06 29.24 93.26 29.06Q93.46 28.89 93.77 28.89Q93.96 28.89 94.27 29.01Q94.58 29.13 95 29.29Q95.42 29.46 95.94 29.58Q96.45 29.7 97.05 29.7Q97.42 29.7 97.76 29.62Q98.11 29.54 98.38 29.37Q98.66 29.2 98.82 28.94Q98.99 28.68 98.99 28.32Q98.99 27.99 98.7 27.7Q98.41 27.41 97.88 27.25Q97.27 27.08 96.68 26.95Q96.09 26.82 95.55 26.68Q95.01 26.54 94.56 26.36Q94.1 26.17 93.78 25.89Q93.45 25.61 93.26 25.21Q93.07 24.8 93.07 24.23Q93.07 23.67 93.37 23.17Q93.66 22.67 94.18 22.34Q94.7 22.01 95.41 21.86Q96.11 21.7 96.94 21.7Q97.8 21.7 98.44 21.83Q99.09 21.96 99.51 22.16Q99.94 22.37 100.15 22.63Q100.36 22.89 100.36 23.16Q100.36 23.42 100.16 23.56Q99.96 23.7 99.67 23.7Q99.56 23.7 99.46 23.68Q99.35 23.66 99.25 23.6Q98.88 23.39 98.35 23.26Q97.81 23.13 97.03 23.13Q96.59 23.13 96.23 23.19Q95.86 23.25 95.61 23.39Q95.36 23.53 95.22 23.77Q95.08 24.01 95.08 24.18ZM111.14 18.76Q111.14 19.21 110.79 19.5Q110.43 19.79 109.87 19.79Q109.59 19.79 109.36 19.71Q109.12 19.64 108.95 19.5Q108.78 19.36 108.69 19.17Q108.59 18.98 108.59 18.76Q108.59 18.54 108.69 18.35Q108.78 18.17 108.95 18.03Q109.12 17.89 109.36 17.81Q109.6 17.74 109.88 17.74Q110.15 17.74 110.39 17.81Q110.62 17.89 110.79 18.03Q110.95 18.17 111.05 18.35Q111.14 18.54 111.14 18.76ZM108.79 22.88Q108.79 22.61 108.89 22.41Q108.98 22.22 109.13 22.08Q109.28 21.95 109.48 21.88Q109.68 21.81 109.88 21.81Q110.08 21.81 110.27 21.88Q110.46 21.95 110.62 22.08Q110.77 22.22 110.86 22.41Q110.95 22.61 110.95 22.88V29.94Q110.95 30.2 110.86 30.4Q110.76 30.6 110.61 30.73Q110.46 30.86 110.26 30.93Q110.06 31 109.86 31Q109.66 31 109.46 30.94Q109.27 30.87 109.12 30.74Q108.98 30.61 108.89 30.4Q108.79 30.2 108.79 29.94ZM115.3 24.18Q115.3 24.46 115.46 24.66Q115.63 24.85 115.91 24.99Q116.2 25.13 116.58 25.24Q116.97 25.34 117.42 25.44Q117.87 25.54 118.36 25.68Q118.85 25.81 119.33 25.98Q120.21 26.24 120.71 26.79Q121.21 27.34 121.21 28.16Q121.21 28.84 120.89 29.41Q120.56 29.98 120 30.36Q119.44 30.73 118.7 30.92Q117.95 31.11 117.09 31.11Q116.32 31.11 115.63 30.98Q114.94 30.85 114.41 30.63Q113.89 30.41 113.58 30.12Q113.28 29.82 113.28 29.49Q113.28 29.24 113.48 29.06Q113.68 28.89 113.99 28.89Q114.18 28.89 114.49 29.01Q114.8 29.13 115.22 29.29Q115.64 29.46 116.16 29.58Q116.67 29.7 117.27 29.7Q117.64 2Line truncated
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 224 74" width="224" height="74" role="img" aria-labelledby="motif-title">
<title id="motif-title">Denkpause</title>
<rect x="10" y="11" width="207" height="51" rx="25.5" fill="#3B7B09" stroke="#FFFFFF" stroke-width="2.3"/><circle cx="33" cy="36.5" r="27.7" fill="#3B7B09" stroke="#FFFFFF" stroke-width="3.1"/><g transform="translate(9 10) scale(.55)"><path d="M30 51 V31 C30 25 37 24 38 31 V45 V19 C38 13 46 13 46 19 V43 V15 C46 9 54 9 54 15 V43 V21 C54 15 62 15 62 21 V46 V29 C62 23 70 23 70 29 V58 C70 73 62 83 49 83 H44 C36 82 30 77 25 69 L17 56 C13 49 21 45 26 50 L34 58 L30 51Z" fill="#FFFFFF"/><path d="M34 57 Q43 58 46 66" fill="none" stroke="#3B7B09" stroke-width="3.6" stroke-linecap="round" stroke-linejoin="round"/></g><path d="M74.33 45Q74 45 73.7 44.88Q73.4 44.76 73.18 44.54Q72.96 44.32 72.84 44.03Q72.71 43.74 72.71 43.41V29.05Q72.71 28.72 72.84 28.42Q72.96 28.13 73.18 27.92Q73.4 27.7 73.7 27.57Q74 27.45 74.33 27.45H78.68Q81.04 27.45 82.8 28.04Q84.56 28.63 85.73 29.76Q86.89 30.89 87.47 32.54Q88.04 34.18 88.04 36.3Q88.04 38.41 87.41 40.03Q86.78 41.66 85.6 42.76Q84.41 43.86 82.69 44.43Q80.97 45 78.8 45ZM75.95 42.77H78.71Q80.3 42.77 81.42 42.32Q82.53 41.88 83.24 41.03Q83.95 40.19 84.27 38.98Q84.6 37.77 84.6 36.24Q84.6 34.54 84.18 33.31Q83.77 32.07 82.96 31.27Q82.16 30.46 80.97 30.08Q79.79 29.69 78.26 29.69H75.95ZM102.57 38.49Q102.57 38.82 102.35 39.07Q102.14 39.32 101.7 39.32H93.39Q93.5 41.09 94.48 42.07Q95.46 43.05 97.08 43.05Q98.06 43.05 98.94 42.77Q99.82 42.49 100.74 42.02Q100.96 41.91 101.15 41.91Q101.48 41.91 101.68 42.16Q101.88 42.4 101.88 42.72Q101.88 42.85 101.84 43Q101.8 43.16 101.7 43.29Q101.31 43.79 100.74 44.15Q100.18 44.5 99.52 44.72Q98.86 44.94 98.16 45.04Q97.45 45.15 96.79 45.15Q95.46 45.15 94.32 44.71Q93.17 44.27 92.32 43.43Q91.47 42.6 90.99 41.37Q90.51 40.14 90.51 38.84Q90.51 37.72 90.96 36.58Q91.41 35.43 92.2 34.58Q92.99 33.72 94.09 33.18Q95.2 32.63 96.66 32.63Q98.16 32.63 99.25 33.11Q100.35 33.59 101.07 34.38Q101.8 35.17 102.17 36.28Q102.54 37.38 102.57 38.49ZM100.03 37.86Q99.98 37.27 99.75 36.61Q99.52 35.95 99.1 35.48Q98.67 35.01 98.07 34.78Q97.47 34.54 96.68 34.54Q95.98 34.54 95.4 34.79Q94.82 35.05 94.4 35.54Q93.97 36.03 93.72 36.67Q93.46 37.32 93.41 37.86ZM105.4 34.12Q105.4 33.79 105.53 33.54Q105.65 33.28 105.85 33.12Q106.05 32.95 106.31 32.87Q106.58 32.78 106.84 32.78Q107.11 32.78 107.36 32.86Q107.61 32.94 107.81 33.1Q108.02 33.27 108.14 33.51Q108.26 33.75 108.27 34.07V35.03Q108.49 34.58 108.91 34.1Q109.33 33.62 109.88 33.3Q110.43 32.98 111.07 32.81Q111.7 32.63 112.36 32.63Q113.22 32.63 113.99 32.9Q114.77 33.17 115.36 33.74Q115.95 34.31 116.3 35.19Q116.65 36.08 116.65 37.3V43.62Q116.65 43.96 116.52 44.22Q116.4 44.48 116.2 44.65Q116 44.83 115.74 44.91Q115.47 45 115.21 45Q114.94 45 114.69 44.91Q114.44 44.83 114.24 44.65Q114.03 44.48 113.91 44.22Q113.79 43.96 113.79 43.62V37.27Q113.79 36.58 113.59 36.06Q113.4 35.55 113.07 35.21Q112.74 34.87 112.3 34.7Q111.86 34.54 111.37 34.54Q110.73 34.54 110.16 34.75Q109.6 34.95 109.18 35.37Q108.76 35.8 108.52 36.35Q108.27 36.89 108.27 37.75V43.62Q108.27 43.96 108.15 44.22Q108.03 44.48 107.83 44.65Q107.62 44.83 107.36 44.91Q107.1 45 106.83 45Q106.56 45 106.31 44.91Q106.05 44.83 105.85 44.65Q105.65 44.48 105.53 44.22Q105.4 43.96 105.4 43.62ZM123.08 38.49V43.57Q123.08 43.93 122.95 44.19Q122.83 44.46 122.62 44.64Q122.42 44.82 122.16 44.91Q121.9 45 121.63 45Q121.36 45 121.11 44.91Q120.86 44.82 120.67 44.64Q120.47 44.46 120.35 44.19Q120.23 43.93 120.23 43.57V28.87Q120.23 28.53 120.35 28.26Q120.47 28 120.67 27.82Q120.87 27.64 121.13 27.55Q121.39 27.46 121.67 27.46Q121.93 27.46 122.18 27.55Q122.44 27.64 122.64 27.82Q122.84 28 122.96 28.26Q123.08 28.53 123.08 28.87V37.69L127.9 33.29Q128.17 33.05 128.41 32.92Q128.65 32.78 128.92 32.78Q129.17 32.78 129.41 32.87Q129.64 32.96 129.82 33.12Q130 33.28 130.11 33.49Q130.22 33.7 130.22 33.93Q130.22 34.12 130.16 34.3Q130.09 34.48 129.92 34.62L125.87 38.1L130.48 43.14Q130.63 43.3 130.66 43.47Q130.7 43.65 130.7 43.8Q130.7 44.05 130.58 44.27Q130.47 44.49 130.27 44.65Q130.08 44.82 129.83 44.91Q129.58 45 129.32 45Q129.03 45 128.77 44.84Q128.51 44.68 128.27 44.4ZM135.76 34.99Q136.09 34.49 136.55 34.03Q137.01 33.56 137.57 33.25Q138.12 32.94 138.75 32.79Q139.38 32.63 140.04 32.63Q141.3 32.63 142.24 33.16Q143.19 33.68 143.82 34.58Q144.45 35.47 144.76 36.63Q145.07 37.8 145.07 38.97Q145.07 40.14 144.73 41.3Q144.4 42.46 143.75 43.32Q143.1 44.17 142.16 44.66Q141.21 45.15 139.98 45.15Q139.36 45.15 138.75 44.99Q138.14 44.84 137.59 44.54Q137.04 44.23 136.57 43.77Q136.1 43.32 135.76 42.86V48.32Q135.76 48.65 135.63 48.91Q135.51 49.16 135.31 49.33Q135.11 49.49 134.85 49.58Q134.6 49.66 134.33 49.66Q134.06 49.66 133.8 49.58Q133.55 49.49 133.34 49.33Q133.14 49.16 133.02 48.91Q132.9 48.65 132.9 48.32V34.14Q132.9 33.79 133.02 33.54Q133.14 33.29 133.34 33.12Q133.53 32.95 133.78 32.87Q134.03 32.78 134.3 32.78Q134.56 32.78 134.8 32.86Q135.05 32.94 135.25 33.09Q135.45 33.24 135.58 33.48Q135.72 33.71 135.76 34.01ZM135.77 38.93Q135.77 39.79 135.95 40.52Q136.12 41.25 136.51 41.86Q136.9 42.47 137.53 42.83Q138.16 43.19 139.06 43.19Q139.97 43.19 140.56 42.8Q141.15 Line truncated
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96" role="img" aria-labelledby="motif-title">
<title id="motif-title">Download</title>
<path d="M16 55 V71 Q16 77 22 77 H74 Q80 77 80 71 V55 M48 17 V59 M33 44 L48 59 L63 44" fill="none" stroke="#032551" stroke-width="5.1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 361 B

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 194 42" width="194" height="42" role="img" aria-labelledby="motif-title">
<title id="motif-title">Film + Merkblatt</title>
<rect x="3" y="3" width="188" height="36" rx="18" fill="#E3EECF" stroke="none" stroke-width="0"/><g transform="translate(12 8) scale(.272)"><path d="M23 13 H57 L73 29 V82 H23Z M57 13 V29 H73 M34 42 H62 M34 54 H62 M34 66 H56" fill="none" stroke="#28580F" stroke-width="4.6" stroke-linecap="round" stroke-linejoin="round"/></g><path d="M45.35 16.48Q45.35 16.25 45.44 16.06Q45.52 15.86 45.67 15.72Q45.81 15.58 46 15.5Q46.19 15.41 46.4 15.41H51.96Q52.16 15.41 52.31 15.48Q52.46 15.55 52.56 15.66Q52.66 15.78 52.71 15.92Q52.76 16.06 52.76 16.21Q52.76 16.36 52.71 16.5Q52.66 16.65 52.56 16.76Q52.46 16.87 52.31 16.94Q52.16 17.01 51.96 17.01H47.52V20.22H51.73Q51.94 20.22 52.08 20.28Q52.23 20.35 52.33 20.47Q52.44 20.58 52.48 20.72Q52.53 20.87 52.53 21.01Q52.53 21.17 52.48 21.31Q52.44 21.46 52.33 21.57Q52.23 21.68 52.08 21.75Q51.94 21.82 51.73 21.82H47.52V25.96Q47.52 26.22 47.43 26.42Q47.34 26.61 47.18 26.74Q47.03 26.87 46.83 26.94Q46.63 27 46.43 27Q46.23 27 46.04 26.94Q45.84 26.87 45.69 26.74Q45.54 26.61 45.45 26.42Q45.35 26.22 45.35 25.96ZM56.7 16.26Q56.7 16.66 56.38 16.91Q56.07 17.16 55.58 17.16Q55.34 17.16 55.13 17.09Q54.93 17.03 54.78 16.91Q54.63 16.78 54.54 16.62Q54.46 16.45 54.46 16.26Q54.46 16.07 54.54 15.9Q54.63 15.74 54.78 15.62Q54.93 15.5 55.14 15.43Q55.35 15.36 55.59 15.36Q55.83 15.36 56.03 15.43Q56.24 15.5 56.38 15.62Q56.53 15.74 56.61 15.9Q56.7 16.07 56.7 16.26ZM54.64 19.87Q54.64 19.64 54.72 19.46Q54.8 19.29 54.93 19.17Q55.06 19.06 55.24 19Q55.41 18.94 55.59 18.94Q55.76 18.94 55.93 19Q56.1 19.06 56.24 19.17Q56.37 19.29 56.45 19.46Q56.53 19.64 56.53 19.87V26.07Q56.53 26.3 56.45 26.47Q56.36 26.65 56.23 26.76Q56.09 26.88 55.92 26.94Q55.75 27 55.57 27Q55.39 27 55.22 26.94Q55.06 26.89 54.93 26.77Q54.8 26.65 54.72 26.48Q54.64 26.3 54.64 26.07ZM58.84 16.36Q58.84 16.12 58.92 15.95Q59 15.78 59.13 15.66Q59.26 15.54 59.44 15.48Q59.61 15.42 59.79 15.42Q59.96 15.42 60.13 15.48Q60.3 15.54 60.44 15.66Q60.57 15.78 60.65 15.95Q60.73 16.12 60.73 16.36V26.07Q60.73 26.3 60.64 26.47Q60.56 26.65 60.43 26.76Q60.29 26.88 60.12 26.94Q59.95 27 59.77 27Q59.59 27 59.42 26.94Q59.26 26.89 59.13 26.77Q59 26.65 58.92 26.48Q58.84 26.3 58.84 26.07ZM74.05 21.9Q74.05 21.44 73.92 21.1Q73.79 20.76 73.57 20.54Q73.36 20.31 73.07 20.2Q72.78 20.1 72.48 20.1Q72.09 20.1 71.72 20.22Q71.36 20.34 71.07 20.6Q70.78 20.87 70.6 21.29Q70.43 21.71 70.43 22.31V26.09Q70.43 26.32 70.35 26.48Q70.27 26.65 70.14 26.77Q70 26.89 69.83 26.94Q69.66 27 69.48 27Q69.3 27 69.14 26.94Q68.97 26.89 68.84 26.77Q68.71 26.65 68.63 26.48Q68.55 26.32 68.55 26.09V21.9Q68.55 21.44 68.41 21.1Q68.28 20.76 68.06 20.54Q67.85 20.31 67.56 20.2Q67.27 20.1 66.97 20.1Q66.55 20.1 66.18 20.23Q65.81 20.37 65.53 20.65Q65.26 20.93 65.1 21.29Q64.94 21.65 64.94 22.21V26.1Q64.94 26.32 64.85 26.49Q64.77 26.66 64.63 26.77Q64.5 26.89 64.33 26.94Q64.16 27 63.98 27Q63.8 27 63.64 26.94Q63.47 26.89 63.34 26.77Q63.2 26.66 63.12 26.49Q63.04 26.32 63.04 26.1V19.82Q63.04 19.6 63.12 19.43Q63.2 19.27 63.34 19.16Q63.47 19.05 63.64 18.99Q63.82 18.94 63.99 18.94Q64.16 18.94 64.32 18.99Q64.49 19.04 64.62 19.14Q64.75 19.24 64.83 19.4Q64.91 19.56 64.93 19.77Q64.93 19.77 64.93 19.87Q64.94 19.97 64.94 20.08Q64.94 20.19 64.94 20.3Q64.94 20.41 64.94 20.42Q65.09 20.12 65.37 19.81Q65.65 19.49 66.01 19.28Q66.37 19.06 66.79 18.95Q67.2 18.84 67.63 18.84Q68.06 18.84 68.47 18.95Q68.88 19.06 69.23 19.28Q69.57 19.51 69.84 19.85Q70.1 20.2 70.25 20.68Q70.53 20.17 70.86 19.82Q71.2 19.47 71.57 19.25Q71.94 19.03 72.34 18.94Q72.74 18.84 73.14 18.84Q73.7 18.84 74.21 19.02Q74.72 19.2 75.1 19.58Q75.49 19.95 75.72 20.53Q75.94 21.11 75.94 21.92V26.1Q75.94 26.32 75.86 26.49Q75.77 26.66 75.64 26.77Q75.51 26.89 75.33 26.94Q75.16 27 74.98 27Q74.81 27 74.64 26.94Q74.48 26.89 74.34 26.77Q74.21 26.66 74.13 26.49Q74.05 26.32 74.05 26.1ZM88.14 22.29H90.92Q91.21 22.29 91.41 22.49Q91.61 22.68 91.61 22.96Q91.61 23.24 91.41 23.43Q91.21 23.63 90.92 23.63H88.14V26.31Q88.14 26.44 88.09 26.56Q88.04 26.69 87.95 26.78Q87.85 26.87 87.73 26.92Q87.6 26.98 87.46 26.98Q87.17 26.98 86.97 26.78Q86.77 26.59 86.77 26.31V23.63H84.01Q83.87 23.63 83.74 23.58Q83.62 23.53 83.52 23.43Q83.43 23.34 83.38 23.22Q83.33 23.1 83.33 22.96Q83.33 22.68 83.52 22.49Q83.72 22.29 84.01 22.29H86.77V19.6Q86.77 19.32 86.97 19.12Q87.17 18.93 87.46 18.93Q87.74 18.93 87.94 19.12Q88.14 19.32 88.14 19.6ZM105.97 24.37 109.23 16.99Q109.42 16.53 109.6 16.22Q109.79 15.92 110 15.74Q110.21 15.56 110.45 15.49Q110.7 15.41 111.01 15.41Q111.32 15.41 111.6 15.51Q111.87 15.61 112.09 15.82Q112.3 16.03 112.43 16.36Q112.55 16.69 112.55 17.15V26.07Q112.55 26.3 112.47 26.47Q112.4 26.65 112.27 26.76Q112.14 26.88 111.98 26.94Q111.81 27 111.64 27Q111.47 27 111.31 26.94Q111.16 26.88 111.03 26.76Q110.9 26.65 110.82 26.47Q110.75 26.3 110.75 26.07V17.49L107.18 25.69Q107.1 25.91 106.96 26.08Q106.83 26.25 106.66 26.37Q106.49 26.48 106.3 26.54Q106.11 26.61 105.92 26.61Q105.55 26.61 105.22 26.38Q104.88 26.16 104.71 25.69L101.15 17.54V26.07Q101.15 26.3 101.07 26.47Q101 26.65 100.87 26.76Q100.74 26.88 100.58 26.94Q100.42 27 1Line truncated
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 184 42" width="184" height="42" role="img" aria-labelledby="motif-title">
<title id="motif-title">Film + Übungen</title>
<rect x="3" y="3" width="178" height="36" rx="18" fill="#E3EECF" stroke="none" stroke-width="0"/><g transform="translate(12 8) scale(.272)"><rect x="14" y="19" width="68" height="58" rx="5.5" fill="none" stroke="#28580F" stroke-width="4.5"/><path d="M29 20 V75 M67 20 V75 M15 39 H29 M15 58 H29 M67 39 H81 M67 58 H81 M29 48 H67" fill="none" stroke="#28580F" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></g><path d="M45.35 16.48Q45.35 16.25 45.44 16.06Q45.52 15.86 45.67 15.72Q45.81 15.58 46 15.5Q46.19 15.41 46.4 15.41H51.96Q52.16 15.41 52.31 15.48Q52.46 15.55 52.56 15.66Q52.66 15.78 52.71 15.92Q52.76 16.06 52.76 16.21Q52.76 16.36 52.71 16.5Q52.66 16.65 52.56 16.76Q52.46 16.87 52.31 16.94Q52.16 17.01 51.96 17.01H47.52V20.22H51.73Q51.94 20.22 52.08 20.28Q52.23 20.35 52.33 20.47Q52.44 20.58 52.48 20.72Q52.53 20.87 52.53 21.01Q52.53 21.17 52.48 21.31Q52.44 21.46 52.33 21.57Q52.23 21.68 52.08 21.75Q51.94 21.82 51.73 21.82H47.52V25.96Q47.52 26.22 47.43 26.42Q47.34 26.61 47.18 26.74Q47.03 26.87 46.83 26.94Q46.63 27 46.43 27Q46.23 27 46.04 26.94Q45.84 26.87 45.69 26.74Q45.54 26.61 45.45 26.42Q45.35 26.22 45.35 25.96ZM56.7 16.26Q56.7 16.66 56.38 16.91Q56.07 17.16 55.58 17.16Q55.34 17.16 55.13 17.09Q54.93 17.03 54.78 16.91Q54.63 16.78 54.54 16.62Q54.46 16.45 54.46 16.26Q54.46 16.07 54.54 15.9Q54.63 15.74 54.78 15.62Q54.93 15.5 55.14 15.43Q55.35 15.36 55.59 15.36Q55.83 15.36 56.03 15.43Q56.24 15.5 56.38 15.62Q56.53 15.74 56.61 15.9Q56.7 16.07 56.7 16.26ZM54.64 19.87Q54.64 19.64 54.72 19.46Q54.8 19.29 54.93 19.17Q55.06 19.06 55.24 19Q55.41 18.94 55.59 18.94Q55.76 18.94 55.93 19Q56.1 19.06 56.24 19.17Q56.37 19.29 56.45 19.46Q56.53 19.64 56.53 19.87V26.07Q56.53 26.3 56.45 26.47Q56.36 26.65 56.23 26.76Q56.09 26.88 55.92 26.94Q55.75 27 55.57 27Q55.39 27 55.22 26.94Q55.06 26.89 54.93 26.77Q54.8 26.65 54.72 26.48Q54.64 26.3 54.64 26.07ZM58.84 16.36Q58.84 16.12 58.92 15.95Q59 15.78 59.13 15.66Q59.26 15.54 59.44 15.48Q59.61 15.42 59.79 15.42Q59.96 15.42 60.13 15.48Q60.3 15.54 60.44 15.66Q60.57 15.78 60.65 15.95Q60.73 16.12 60.73 16.36V26.07Q60.73 26.3 60.64 26.47Q60.56 26.65 60.43 26.76Q60.29 26.88 60.12 26.94Q59.95 27 59.77 27Q59.59 27 59.42 26.94Q59.26 26.89 59.13 26.77Q59 26.65 58.92 26.48Q58.84 26.3 58.84 26.07ZM74.05 21.9Q74.05 21.44 73.92 21.1Q73.79 20.76 73.57 20.54Q73.36 20.31 73.07 20.2Q72.78 20.1 72.48 20.1Q72.09 20.1 71.72 20.22Q71.36 20.34 71.07 20.6Q70.78 20.87 70.6 21.29Q70.43 21.71 70.43 22.31V26.09Q70.43 26.32 70.35 26.48Q70.27 26.65 70.14 26.77Q70 26.89 69.83 26.94Q69.66 27 69.48 27Q69.3 27 69.14 26.94Q68.97 26.89 68.84 26.77Q68.71 26.65 68.63 26.48Q68.55 26.32 68.55 26.09V21.9Q68.55 21.44 68.41 21.1Q68.28 20.76 68.06 20.54Q67.85 20.31 67.56 20.2Q67.27 20.1 66.97 20.1Q66.55 20.1 66.18 20.23Q65.81 20.37 65.53 20.65Q65.26 20.93 65.1 21.29Q64.94 21.65 64.94 22.21V26.1Q64.94 26.32 64.85 26.49Q64.77 26.66 64.63 26.77Q64.5 26.89 64.33 26.94Q64.16 27 63.98 27Q63.8 27 63.64 26.94Q63.47 26.89 63.34 26.77Q63.2 26.66 63.12 26.49Q63.04 26.32 63.04 26.1V19.82Q63.04 19.6 63.12 19.43Q63.2 19.27 63.34 19.16Q63.47 19.05 63.64 18.99Q63.82 18.94 63.99 18.94Q64.16 18.94 64.32 18.99Q64.49 19.04 64.62 19.14Q64.75 19.24 64.83 19.4Q64.91 19.56 64.93 19.77Q64.93 19.77 64.93 19.87Q64.94 19.97 64.94 20.08Q64.94 20.19 64.94 20.3Q64.94 20.41 64.94 20.42Q65.09 20.12 65.37 19.81Q65.65 19.49 66.01 19.28Q66.37 19.06 66.79 18.95Q67.2 18.84 67.63 18.84Q68.06 18.84 68.47 18.95Q68.88 19.06 69.23 19.28Q69.57 19.51 69.84 19.85Q70.1 20.2 70.25 20.68Q70.53 20.17 70.86 19.82Q71.2 19.47 71.57 19.25Q71.94 19.03 72.34 18.94Q72.74 18.84 73.14 18.84Q73.7 18.84 74.21 19.02Q74.72 19.2 75.1 19.58Q75.49 19.95 75.72 20.53Q75.94 21.11 75.94 21.92V26.1Q75.94 26.32 75.86 26.49Q75.77 26.66 75.64 26.77Q75.51 26.89 75.33 26.94Q75.16 27 74.98 27Q74.81 27 74.64 26.94Q74.48 26.89 74.34 26.77Q74.21 26.66 74.13 26.49Q74.05 26.32 74.05 26.1ZM88.14 22.29H90.92Q91.21 22.29 91.41 22.49Q91.61 22.68 91.61 22.96Q91.61 23.24 91.41 23.43Q91.21 23.63 90.92 23.63H88.14V26.31Q88.14 26.44 88.09 26.56Q88.04 26.69 87.95 26.78Q87.85 26.87 87.73 26.92Q87.6 26.98 87.46 26.98Q87.17 26.98 86.97 26.78Q86.77 26.59 86.77 26.31V23.63H84.01Q83.87 23.63 83.74 23.58Q83.62 23.53 83.52 23.43Q83.43 23.34 83.38 23.22Q83.33 23.1 83.33 22.96Q83.33 22.68 83.52 22.49Q83.72 22.29 84.01 22.29H86.77V19.6Q86.77 19.32 86.97 19.12Q87.17 18.93 87.46 18.93Q87.74 18.93 87.94 19.12Q88.14 19.32 88.14 19.6ZM102.3 13.83Q102.06 13.83 101.88 13.75Q101.69 13.67 101.56 13.54Q101.43 13.41 101.36 13.24Q101.29 13.07 101.29 12.88Q101.29 12.7 101.36 12.53Q101.43 12.36 101.56 12.23Q101.69 12.1 101.88 12.02Q102.06 11.94 102.3 11.94Q102.52 11.94 102.71 12.02Q102.89 12.1 103.02 12.23Q103.16 12.36 103.23 12.53Q103.29 12.7 103.29 12.88Q103.29 13.07 103.23 13.24Q103.16 13.41 103.02 13.54Q102.89 13.67 102.71 13.75Q102.52 13.83 102.3 13.83ZM105.65 13.83Q105.41 13.83 105.23 13.75Q105.04 13.67 104.91 13.54Q104.78 13.41 104.71 13.24Q104.64 13.07 104.64 12.88Q104.64 12.7 104.71 12.53Q104.78 12.36 104.91 12.23Q105.04 12.1 1Line truncated
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96" role="img" aria-labelledby="motif-title">
<title id="motif-title">Filmklappe</title>
<g transform="translate(0 5) rotate(-7 36 54)"><rect x="10" y="47" width="53" height="33" rx="4.7" fill="none" stroke="#032551" stroke-width="3.9"/><g transform="translate(16.9 44.8) scale(.38)"><path d="M37 26 Q37 22 41 24 L72 43 Q77 47 72 51 L41 70 Q37 73 37 68Z" fill="#032551"/></g><g transform="rotate(-11 11 48)"><rect x="10" y="36" width="53" height="12" rx="3.7" fill="none" stroke="#032551" stroke-width="3.8"/><path d="M16 46 L22 37 M27 47 L33 37 M39 47 L45 37 M51 47 L57 37" fill="none" stroke="#032551" stroke-width="3.6" stroke-linecap="round" stroke-linejoin="round"/></g></g><g transform="translate(61 2) rotate(8 16 20) scale(.86)"><path d="M5 23 L9 9 M16 26 L28 16 M20 35 L35 33" fill="none" stroke="#FCD10A" stroke-width="5.5" stroke-linecap="round" stroke-linejoin="round"/></g>
</svg>

After

Width:  |  Height:  |  Size: 977 B

Loaded 100 of 154 files, more files were not shown because too many files have changed in this diff. Show more