]> gitweb.hamatoma.de Git - gadeku.git/commitdiff
V 0.3.4 Task
authorHamatoma <author@hamatoma.de>
Sun, 12 May 2024 17:30:30 +0000 (19:30 +0200)
committerHamatoma <author@hamatoma.de>
Sun, 12 May 2024 17:30:30 +0000 (19:30 +0200)
- Korrektur bei Verarbeitung Aufgabe "Schlangentext".

CHANGELOG.md
app/Http/Controllers/TaskController.php
resources/views/task/create.blade.php
resources/views/task/edit_snake.blade.php

index 0d4da28718756ff60c7edbfa2897cd47595ac455..870fed1cdd37cc6bc3ae58a5ec6a21361fbd6551 100644 (file)
@@ -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
index b1dc546f0e21645fdbb42312cf199149c78d880a..7a80d682a66c74d99ae71d51111e9fa63295b135 100644 (file)
@@ -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']]);
             }
index 471daef5093c4ac841d909a96d2c58e3ff71558e..9893df00c9ff882880d717ab949dba086c684e7a 100644 (file)
@@ -11,8 +11,6 @@
                 width2="4" />
             <x-laraknife.forms.string position="alone" name="title" label="Title"
                 value="{{ $context->valueOf('title') }}" width2="10" />
-            <x-laraknife.forms.text position="alone" name="body" label="Body" value="{{ $context->valueOf('body') }}"
-                width2="10" rows="10" />
             <x-laraknife.forms.combobox position="first" name="task" label="Task" :options="$optionsTask"
                 width2="4" />
         </x-laraknife.panels.create>
index 32f2b2bfd89ff65d6111824ee3f5b3f0a8f89a9f..1373465a3120cedccff67b04fcd2dab1961b61d0 100644 (file)
@@ -6,13 +6,13 @@
         <x-laraknife.panels.edit title="{{ __('Change of a Task') }}">
             <x-laraknife.layout.nav-tabs :info="$navTabsInfo" fieldset="true">
                 <input type="hidden" name="pageNo" value="{{ $context->valueOf('pageNo') }}" />
-                <x-laraknife.forms.text position="alone" name="contents" label="Snaketext"
+                <x-laraknife.forms.text position="alone" name="snaketext" label="Snaketext"
                     value="{{ $context->valueOf('snaketext') }}" width2="10" rows="4" attribute="readonly" />
                 <x-laraknife.forms.text position="alone" name="solution" label="Solution"
                     value="{{ $context->valueOf('solution') }}" width2="10" rows="4" />
                 <x-laraknife.buttons.button-position position="alone" name="btnCheck" label="Check" width2="4" />
-                @if ($context->valueOf('note') != null)
-                    <x-laraknife.forms.const-text text="" width2="10" />
+                @if ($context->valueOf('message') != null)
+                    <x-laraknife.forms.const-text text="{{ $context->valueOf('message')}}" width2="10" />
                 @endif
             </x-laraknife.layout.nav-tabs>
         </x-laraknife.panels.edit>