From 0e9d4bcfe42d178544bd8406b9b3874f944ca861 Mon Sep 17 00:00:00 2001 From: Hamatoma Date: Sun, 12 May 2024 19:30:30 +0200 Subject: [PATCH] V 0.3.4 Task - Korrektur bei Verarbeitung Aufgabe "Schlangentext". --- CHANGELOG.md | 4 ++++ app/Http/Controllers/TaskController.php | 6 +++++- resources/views/task/create.blade.php | 2 -- resources/views/task/edit_snake.blade.php | 6 +++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d4da28..870fed1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# V 0.3.4 Task + +- Korrektur bei Verarbeitung Aufgabe "Schlangentext". + # V 0.3.3 Aufgaben mittels Note/Task, Email bei Note, Farben ## Added diff --git a/app/Http/Controllers/TaskController.php b/app/Http/Controllers/TaskController.php index b1dc546..7a80d68 100644 --- a/app/Http/Controllers/TaskController.php +++ b/app/Http/Controllers/TaskController.php @@ -92,12 +92,16 @@ class TaskController extends Controller } else { $fields = $request->all(); if (count($fields) <= 1) { - $fields['snaketext'] = TextProcessor::compressSnakeText($page->body); + $fields['snaketext'] = TextProcessor::compressSnakeText($page->contents); $fields['solution'] = $note->body != null && $note->body !== '' ? $note->body : $fields['snaketext']; + $fields['message'] = ''; if ($page != null && $note != null) { $fields['pageId'] = $page->id; } } + if ($request->btnSubmit === 'btnCheck') { + $fields['message'] = __('I found 3 errors.'); + } if ($request->btnSubmit === 'btnStore') { $note->update(['body' => $fields['solution']]); } diff --git a/resources/views/task/create.blade.php b/resources/views/task/create.blade.php index 471daef..9893df0 100644 --- a/resources/views/task/create.blade.php +++ b/resources/views/task/create.blade.php @@ -11,8 +11,6 @@ width2="4" /> - diff --git a/resources/views/task/edit_snake.blade.php b/resources/views/task/edit_snake.blade.php index 32f2b2b..1373465 100644 --- a/resources/views/task/edit_snake.blade.php +++ b/resources/views/task/edit_snake.blade.php @@ -6,13 +6,13 @@ - - @if ($context->valueOf('note') != null) - + @if ($context->valueOf('message') != null) + @endif -- 2.39.5