From: Hamatoma Date: Wed, 19 Jun 2024 17:27:15 +0000 (+0200) Subject: V 0.4.6 Mediawiki: field area button X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=5d645c0ed2554dbc730d175b71dc5c88a04b2ce7;p=gadeku.git V 0.4.6 Mediawiki: field area button - MediaWiki: - neue Syntax "%field()% - neue Syntax "%area()%" - PageController: neu: showPrettyClozeText() - TaskController: Korrekturen SnakeText+Lückentext --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c4a55d..0977ce8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# V 0.4.6 Mediawiki: field area button + +- MediaWiki: + - neue Syntax "%field()% + - neue Syntax "%area()%" +- PageController: neu: showPrettyClozeText() +- TaskController: Korrekturen SnakeText+Lückentext + # V 0.4.5 Mediawiki: field area button - MediaWiki: diff --git a/app/Helpers/MediaWiki.php b/app/Helpers/MediaWiki.php index 67cb7bc..ad2ac6c 100644 --- a/app/Helpers/MediaWiki.php +++ b/app/Helpers/MediaWiki.php @@ -45,7 +45,7 @@ class MediaWiki extends MediaWikiBase break; case 'mark': $mode = count($matches) > 3 ? substr($matches[3], 1) : 'info'; - if (str_starts_with($mode, '.')){ + if (str_starts_with($mode, '.')) { $mode = substr($mode, 1); $rc = "$matches[2]"; } else { @@ -59,36 +59,10 @@ class MediaWiki extends MediaWikiBase $rc = '' . (count($matches) == 4 ? ($matches[2] . $matches[3]) : $matches[2]) . ''; break; case 'field': - // name | width | default | solution1 ; solution2... - $name = $matches[2]; - $value = ''; - $width = 8; - if (count($matches) > 3) { - $parts = explode('|', substr($matches[3], 1)); - $width = $parts[0]; - if (count($parts) > 1) { - $value = $parts[1]; - } - } - $rc = ""; + $rc = $this->specialMacrosToHtmlField(true, $matches); break; case 'area': - // name | width | rows | default | solution1 ; solution2... - $name = $matches[2]; - $value = ''; - $width = 8; - $rows = 2; - if (count($matches) > 3) { - $parts = explode('|', substr($matches[3], 1)); - $width = $parts[0]; - if (count($parts) > 1) { - $rows = $parts[1]; - } - if (count($parts) > 2) { - $value = htmlentities($parts[2]); - } - } - $rc = ""; + $rc = $this->specialMacrosToHtmlField(false, $matches); break; case 'button': // name | label | classes | options @@ -102,7 +76,7 @@ class MediaWiki extends MediaWikiBase $classes = $parts[1]; } } - $rc = ""; + $rc = ""; break; case 'icon': $name = $matches[2]; @@ -119,4 +93,91 @@ class MediaWiki extends MediaWikiBase $body = preg_replace('/U\+(x[\dA-F]+;)/', '&#\1', $body); return $body; } + function specialMacrosToHtmlField(bool $isField, array &$matches): string + { + // name | width | default | solution1 ; solution2... + $name = $matches[2]; + $value = ''; + $width = $isField ? 8 : 20; + $rows = 2; + if (count($matches) > 3) { + $parts = explode('|', substr($matches[3], 1)); + $width = $parts[0]; + if (count($parts) > 1) { + if ($isField) { + } + $value = $parts[1]; + } else { + $rows = $parts[1]; + } + if (count($parts) > 2) { + if ($isField) { + $solutions = $parts[2]; + } else { + $value = $parts[2]; + } + } + if (!$isField && count($parts) > 3) { + $solutions = $parts[3]; + } + } + switch ($this->clozeMode) { + case 'fill': + if ($this->clozeData != null && array_key_exists($name, $this->clozeData)){ + $value = $this->clozeData[$name]; + } + if ($isField) { + $rc = ""; + } else { + $value = htmlentities($value); + $rc = ""; + } + break; + case 'preview': + if ($isField) { + $rc = ""; + } else { + $value = str_replace(';', "
\n", $solutions); + $rc = ""; + } + break; + case 'check': + case 'correction': + $value = array_key_exists($name, $this->clozeData) ? $this->clozeData[$name] : ''; + if (($pos = strpos($solutions, ';')) === false) { + $ok = $value === $solutions; + } else { + $ok = strpos(";$solutions;", ";$value;") != false; + if (!$ok) { + $solutions = substr($solutions, 0, $pos); + } + } + if ($this->clozeMode == 'check') { + $class = $ok ? '' : 'lkn-error-field'; + if ($isField) { + $rc = ""; + } else { + $value = htmlentities($value); + $rc = ""; + } + } else { + if ($ok) { + $value2 = htmlentities($value); + } else { + $value2 = '' . htmlentities($value) . ' ' . htmlentities($solutions) . ''; + } + $class = $ok ? 'lkn-pseudo-field' : 'lkn-pseudo-field-error'; + $rc = "$value2clozeErrors++; + } + break; + default: + $rc = "!! unknown mode: $this->clozeMode!!"; + break; + } + return $rc; + } + } diff --git a/app/Helpers/ViewHelperLocal.php b/app/Helpers/ViewHelperLocal.php index 4eaec02..857659c 100644 --- a/app/Helpers/ViewHelperLocal.php +++ b/app/Helpers/ViewHelperLocal.php @@ -24,22 +24,21 @@ class ViewHelperLocal * @param string $options * @param int $referenceId2 used for other links */ - public static function getNavigationTabInfo(string $name, int $indexActive, int $referenceId, ?string $options=null, ?int $referenceId2 = null): ?NavigationTabs + public static function getNavigationTabInfo(string $name, int $indexActive, int $referenceId, ?string $options = null, ?int $referenceId2 = null): ?NavigationTabs { $rc = null; switch ($name) { case 'note-edit': $list = [ + 'Notes;/note-index', "Properties;/note-edit/$referenceId", "Documents;/note-index_documents/$referenceId", "Shift;/note-edit_shift/$referenceId", ]; - if (strpos($options, 'task=1302') !== false) { - $match = null; - if (preg_match('/ref-page=(\d+)/', $options, $match)) { - $pageId = $match[1]; - array_push($list, "Task;/task-edit_snake/$referenceId/$pageId"); - } + if (strpos($options, '_task=1302') !== false) { + array_push($list, "Task;/task-edit_snake/$referenceId/$referenceId2"); + } elseif (strpos($options, '_task=1303') !== false) { + array_push($list, "Task;/task-edit_cloze/$referenceId/$referenceId2"); } $rc = new NavigationTabs($list, $indexActive); break; @@ -91,7 +90,7 @@ class ViewHelperLocal "Document;/transaction-edit_document/$options/$referenceId" ], $indexActive); break; - case 'transaction-edit': + case 'transaction-edit': $rc = new NavigationTabs([ 'Mandators;/mandator-index', "Accounts;/account-index/$referenceId2", diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.php index 05ce5bd..4a96a38 100644 --- a/app/Http/Controllers/PageController.php +++ b/app/Http/Controllers/PageController.php @@ -140,7 +140,11 @@ $sep $optionsPagetype = SProperty::optionsByScope('pagetype', $page->pagetype_scope, ''); $optionsMarkup = SProperty::optionsByScope('markup', $page->markup_scope, ''); $optionsLanguage = SProperty::optionsByScope('localization', $page->language_scope, ''); - $fields = $request->btnSubmit !== 'btnPreview' ? null : ['preview' => $this->asHtml($page)]; + if ($request->btnSubmit === 'btnPreview') { + $wiki = new MediaWiki(); + $wiki->setClozeParameters('preview'); + $fields['preview'] = $wiki->toHtml($page->contents); + } if ($page->audio_id != null) { $file = File::find($page->audio_id); $fields['audio'] = $file->filename; @@ -304,6 +308,9 @@ LEFT JOIN users t4 ON t4.id=t0.owner_id $text = TextProcessor::compressSnakeText($page->contents); $params['text1'] = $this->asHtml($page, $text); break; + case 2033/* cloze text */ : + $params['text1'] = $this->showPrettyClozeText($textRaw, $request); + break; case 2031/* chapter */ : /* Chapter: */ $text1 = $this->asHtml($page); @@ -346,6 +353,16 @@ LEFT JOIN users t4 ON t4.id=t0.owner_id } return $rc; } + protected function showPrettyClozeText(string $text, Request $request): string + { + $rc = ''; + $fields = $request->all(); + $check = $request->btnSubmit === 'btnStore'; + $wiki = new MediaWiki(); + $wiki->setClozeParameters($check ? 'check' : 'fill', $fields); + $rc = $wiki->toHtml($text); + return $rc; + } public function showByName(string $name, int $pageType, Request $request) { $page = Page::where(['name' => $name, 'pagetype_scope' => $pageType])->first(); diff --git a/app/Http/Controllers/TaskController.php b/app/Http/Controllers/TaskController.php index 5b8db95..a2b98aa 100644 --- a/app/Http/Controllers/TaskController.php +++ b/app/Http/Controllers/TaskController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers; -use App\Helpers\TextProcessor; +use App\Helpers\StringHelper; use App\Models\File; use App\Models\Note; use App\Models\Page; @@ -11,10 +11,12 @@ use App\Models\Module; use App\Helpers\Helper; use App\Helpers\DbHelper; use App\Models\SProperty; +use App\Helpers\MediaWiki; use App\Helpers\FileHelper; use App\Helpers\Pagination; use App\Helpers\ViewHelper; use Illuminate\Http\Request; +use App\Helpers\TextProcessor; use App\Helpers\ViewHelperLocal; use App\Helpers\ContextLaraKnife; use Illuminate\Support\Facades\DB; @@ -33,14 +35,15 @@ class TaskController extends Controller $rc->pageId = $pageId; return $rc; } - private function checkSnakeText($solution, $original): int{ + private function checkSnakeText($solution, $original): int + { $solutionWords = TextProcessor::wordStatistics($solution); $originalWords = TextProcessor::wordStatistics($original); $rc = 0; - foreach ($originalWords as $key => $count){ - if (! array_key_exists($key, $solutionWords)){ + foreach ($originalWords as $key => $count) { + if (!array_key_exists($key, $solutionWords)) { $rc += $count; - } elseif ($count != ($count2 = $solutionWords[$key])){ + } elseif ($count != ($count2 = $solutionWords[$key])) { $rc += abs($count - $count2); } } @@ -61,14 +64,24 @@ class TaskController extends Controller 'category_scope' => '1054', 'visibility_scope' => '1091', 'owner_id' => strval(auth()->id()), - 'task' => '' + 'group_id' => '', + 'task' => '', ]; } if ($pageId != null) { $page = Page::find(intval($pageId)); if ($page != null) { $fields['title'] = __('Task') . ": $page->title"; - $fields['options'] = "ref-page=$page->id"; + $fields['reference_id'] = $page->id; + if ($fields['task'] == null) { + if ($page->pagetype_scope === 2033) { + // cloze text + $fields['task'] = '1303'; + } elseif ($page->pagetype_scope === 2035) { + // snake text + $fields['task'] = '1302'; + } + } } } if ($request->btnSubmit === 'btnStore') { @@ -76,8 +89,9 @@ class TaskController extends Controller if ($validator->fails()) { $rc = back()->withErrors($validator)->withInput(); } else { + $fields['module_id'] = Module::idOfModule('Page'); $fields['notestatus_scope'] = 1011; - $fields['options'] .= "\ntask=" . $fields['task']; + $fields['options'] .= "\n_task=" . $fields['task']; $fields['owner_id'] = auth()->id(); $task = Note::create($fields); $rc = redirect("/note-edit/$task->id"); @@ -87,17 +101,59 @@ class TaskController extends Controller $optionsVisibility = SProperty::optionsByScope('visibility', $fields['visibility_scope']); $optionsTask = SProperty::optionsByScope('task', $fields['task'], '-'); $optionsCategory = SProperty::optionsByScope('category', $fields['category_scope']); + $optionsGroup = Group::combobox($fields['group_id'], ''); $context = new ContextLaraKnife($request, $fields); $rc = view('task.create', [ 'context' => $context, 'optionsVisibility' => $optionsVisibility, 'optionsTask' => $optionsTask, + 'optionsGroup' => $optionsGroup, 'optionsCategory' => $optionsCategory, ]); } } return $rc; } + public function editCloze(Note $note, Page $page, Request $request) + { + if ($request->btnSubmit === 'btnCancel') { + $rc = redirect('/page-index'); + } else { + $fields = $request->all(); + $mode = 'check'; + if (count($fields) <= 1) { + $mode = 'fill'; + $fields = StringHelper::explodeAssoc($note->options); + $fields['message'] = ''; + if ($page != null && $note != null) { + $fields['pageId'] = $page->id; + } + } + $wiki = new MediaWiki(); + if ($request->btnSubmit === 'btnCorrect') { + $mode = 'correction'; + } + if ($request->btnSubmit === 'btnStore') { + $value = "_task=1303\n" . StringHelper::implodeAssoc($fields); + $note->update(['options' => $value]); + } + $wiki->setClozeParameters($mode, $fields); + $fields['cloze-text'] = $wiki->toHtml($page->contents); + if ($wiki->clozeErrors > 0){ + $fields['message'] = $wiki->clozeErrors == 1 ? __('I found one error') : str_replace('#', strval($wiki->clozeErrors), __('I found # errors')); + } + $fields['title'] = $page->title; + $navigationTabInfo = ViewHelperLocal::getNavigationTabInfo('note-edit', 4, $note->id, $note->options); + $context = new ContextLaraKnife($request, $fields, $note); + $context->model2 = $page; + $rc = view('task.edit_cloze', [ + 'context' => $context, + 'navTabsInfo' => $navigationTabInfo + ]); + } + return $rc; + + } public function editSnake(Note $note, Page $page, Request $request) { if ($request->btnSubmit === 'btnCancel') { @@ -119,7 +175,8 @@ class TaskController extends Controller if ($request->btnSubmit === 'btnStore') { $note->update(['body' => $fields['solution']]); } - $navigationTabInfo = ViewHelperLocal::getNavigationTabInfo('note-edit', 3, $note->id, $note->options); + $fields['right'] = $request->btnSubmit !== 'btnCorrection' ? '' : $page->contents; + $navigationTabInfo = ViewHelperLocal::getNavigationTabInfo('note-edit', 4, $note->id, $note->options); $context = new ContextLaraKnife($request, $fields, $note); $context->model2 = $page; $rc = view('task.edit_snake', [ @@ -137,6 +194,8 @@ class TaskController extends Controller Route::post('/task-create', [TaskController::class, 'create'])->middleware('auth'); Route::get('/task-edit_snake/{note}/{page}', [TaskController::class, 'editSnake'])->middleware('auth'); Route::post('/task-edit_snake/{note}/{page}', [TaskController::class, 'editSnake'])->middleware('auth'); + Route::get('/task-edit_cloze/{note}/{page}', [TaskController::class, 'editCloze'])->middleware('auth'); + Route::post('/task-edit_cloze/{note}/{page}', [TaskController::class, 'editCloze'])->middleware('auth'); } } diff --git a/composer.lock b/composer.lock index 22d54a6..69cd1e7 100644 --- a/composer.lock +++ b/composer.lock @@ -1087,16 +1087,16 @@ }, { "name": "laravel/framework", - "version": "v11.10.0", + "version": "v11.11.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "99b4255194912044b75ab72329f8c19e6345720e" + "reference": "194102876df42f9f5bb618efa55fa7e15ebf40aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/99b4255194912044b75ab72329f8c19e6345720e", - "reference": "99b4255194912044b75ab72329f8c19e6345720e", + "url": "https://api.github.com/repos/laravel/framework/zipball/194102876df42f9f5bb618efa55fa7e15ebf40aa", + "reference": "194102876df42f9f5bb618efa55fa7e15ebf40aa", "shasum": "" }, "require": { @@ -1199,7 +1199,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.0.15", + "orchestra/testbench-core": "^9.1.5", "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.5|^11.0", @@ -1288,20 +1288,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-04T13:45:55+00:00" + "time": "2024-06-18T17:40:27+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.23", + "version": "v0.1.24", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "9bc4df7c699b0452c6b815e64a2d84b6d7f99400" + "reference": "409b0b4305273472f3754826e68f4edbd0150149" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/9bc4df7c699b0452c6b815e64a2d84b6d7f99400", - "reference": "9bc4df7c699b0452c6b815e64a2d84b6d7f99400", + "url": "https://api.github.com/repos/laravel/prompts/zipball/409b0b4305273472f3754826e68f4edbd0150149", + "reference": "409b0b4305273472f3754826e68f4edbd0150149", "shasum": "" }, "require": { @@ -1344,9 +1344,9 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.23" + "source": "https://github.com/laravel/prompts/tree/v0.1.24" }, - "time": "2024-05-27T13:53:20+00:00" + "time": "2024-06-17T13:58:22+00:00" }, { "name": "laravel/serializable-closure", @@ -6046,16 +6046,16 @@ }, { "name": "laravel/pint", - "version": "v1.16.0", + "version": "v1.16.1", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "1b3a3dc5bc6a81ff52828ba7277621f1d49d6d98" + "reference": "9266a47f1b9231b83e0cfd849009547329d871b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/1b3a3dc5bc6a81ff52828ba7277621f1d49d6d98", - "reference": "1b3a3dc5bc6a81ff52828ba7277621f1d49d6d98", + "url": "https://api.github.com/repos/laravel/pint/zipball/9266a47f1b9231b83e0cfd849009547329d871b1", + "reference": "9266a47f1b9231b83e0cfd849009547329d871b1", "shasum": "" }, "require": { @@ -6066,13 +6066,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.57.1", - "illuminate/view": "^10.48.10", - "larastan/larastan": "^2.9.6", + "friendsofphp/php-cs-fixer": "^3.59.3", + "illuminate/view": "^10.48.12", + "larastan/larastan": "^2.9.7", "laravel-zero/framework": "^10.4.0", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.34.7" + "pestphp/pest": "^2.34.8" }, "bin": [ "builds/pint" @@ -6108,20 +6108,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-05-21T18:08:25+00:00" + "time": "2024-06-18T16:50:05+00:00" }, { "name": "laravel/sail", - "version": "v1.29.2", + "version": "v1.29.3", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "a8e4e749735ba2f091856eafeb3f99db8cd6b621" + "reference": "e35b3ffe1b9ea598246d7e99197ee8799f6dc2e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/a8e4e749735ba2f091856eafeb3f99db8cd6b621", - "reference": "a8e4e749735ba2f091856eafeb3f99db8cd6b621", + "url": "https://api.github.com/repos/laravel/sail/zipball/e35b3ffe1b9ea598246d7e99197ee8799f6dc2e5", + "reference": "e35b3ffe1b9ea598246d7e99197ee8799f6dc2e5", "shasum": "" }, "require": { @@ -6171,7 +6171,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2024-05-16T21:39:11+00:00" + "time": "2024-06-12T16:24:41+00:00" }, { "name": "mockery/mockery", @@ -6854,16 +6854,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.21", + "version": "10.5.22", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ac837816fa52078f7a5e17ed774f256a72a51af6" + "reference": "8afb89b399b17c2ce2618015bdc9f81a117c5ee1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ac837816fa52078f7a5e17ed774f256a72a51af6", - "reference": "ac837816fa52078f7a5e17ed774f256a72a51af6", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8afb89b399b17c2ce2618015bdc9f81a117c5ee1", + "reference": "8afb89b399b17c2ce2618015bdc9f81a117c5ee1", "shasum": "" }, "require": { @@ -6935,7 +6935,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.21" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.22" }, "funding": [ { @@ -6951,7 +6951,7 @@ "type": "tidelift" } ], - "time": "2024-06-15T09:13:15+00:00" + "time": "2024-06-19T05:29:34+00:00" }, { "name": "sebastian/cli-parser", diff --git a/database/migrations/2024_05_09_165242_alter_notes.php b/database/migrations/2024_05_09_165242_alter_notes.php deleted file mode 100644 index d7187d4..0000000 --- a/database/migrations/2024_05_09_165242_alter_notes.php +++ /dev/null @@ -1,28 +0,0 @@ -string('options')->nullable(); - $table->renameColumn('user_id', 'owner_id'); - }); - - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - // - } -}; diff --git a/database/migrations/2024_06_18_105242_alter_notes.php b/database/migrations/2024_06_18_105242_alter_notes.php new file mode 100644 index 0000000..7d7ee96 --- /dev/null +++ b/database/migrations/2024_06_18_105242_alter_notes.php @@ -0,0 +1,27 @@ +dropColumn('options'); + }); + + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // + } +}; diff --git a/database/migrations/2024_06_18_165242_alter_notes.php b/database/migrations/2024_06_18_165242_alter_notes.php new file mode 100644 index 0000000..f284669 --- /dev/null +++ b/database/migrations/2024_06_18_165242_alter_notes.php @@ -0,0 +1,30 @@ +text('options')->nullable(); + $table->foreignId('group_id')->nullable()->references('id')->on('groups'); + $table->foreignId('module_id')->nullable()->references('id')->on('modules'); + $table->bigInteger('reference_id')->nullable(); + }); + + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // + } +}; diff --git a/lang/de_DE.json b/lang/de_DE.json index 281f4d2..c76184a 100644 --- a/lang/de_DE.json +++ b/lang/de_DE.json @@ -4,6 +4,7 @@ "": "", "": "", "": "", + "": "", "A Scoped Property": "Eine bereichsbasierte Eigenschaft", "Account": "Konto", "Accounts": "Konten", @@ -43,6 +44,7 @@ "Confirmation": "Best\u00e4tigung", "Contents": "Inhalt", "Copy": "Kopieren", + "Correction": "Korrektur", "Creation of a Document": "Hochladen eines Dokuments", "Creation of a File": "Hochladen einer Datei", "Creation of a Group": "Erstellen einer Gruppe", @@ -91,7 +93,9 @@ "Group": "Gruppe", "Groups": "Gruppen", "Hello": "Hallo", + "I found # errors": "Ich habe # Fehler gefunden (roter Rahmen)", "I found :n error(s)": "Ich habe :n Fehler gefunden", + "I found one error": "Ich habe einen Fehler gefunden (roter Rahmen)", "Id": "Id", "Import": "Import", "Imprint": "Impressum", @@ -145,6 +149,7 @@ "Responsibility changed": "Verantwortung ge\u00e4ndert", "Role": "Rolle", "Roles": "Rollen", + "Sample solution": "Musterl\u00f6sung", "Scope": "Bereich", "Scoped Properties": "Bereichsbasierte Eigenschaften", "Search": "Suche", @@ -222,6 +227,7 @@ "plain text": "reiner Text", "private": "privat", "public": "\u00f6ffentlich", + "record|records": "Datensatz|Datens\u00e4tze", "section": "Bereich", "snaketext": "Schlangentext", "standard": "Standard", diff --git a/resources/views/chapter/showpretty.blade.php b/resources/views/chapter/showpretty.blade.php index c36bac5..279b0ef 100644 --- a/resources/views/chapter/showpretty.blade.php +++ b/resources/views/chapter/showpretty.blade.php @@ -1,7 +1,7 @@ @extends('layouts.backend') @section('content') -
+ @csrf diff --git a/resources/views/page/show-col1.blade.php b/resources/views/page/show-col1.blade.php index 7658825..0643dec 100644 --- a/resources/views/page/show-col1.blade.php +++ b/resources/views/page/show-col1.blade.php @@ -1,7 +1,7 @@ @extends('layouts.frontend') @section('content') - + @csrf diff --git a/resources/views/page/show-col2.blade.php b/resources/views/page/show-col2.blade.php index 6ca3c9d..b31365d 100644 --- a/resources/views/page/show-col2.blade.php +++ b/resources/views/page/show-col2.blade.php @@ -1,7 +1,7 @@ @extends('layouts.frontend') @section('content') - + @csrf diff --git a/resources/views/page/show-col3.blade.php b/resources/views/page/show-col3.blade.php index a0a4bd5..2a0de41 100644 --- a/resources/views/page/show-col3.blade.php +++ b/resources/views/page/show-col3.blade.php @@ -1,7 +1,7 @@ @extends('layouts.frontend') @section('content') - + @csrf diff --git a/resources/views/page/show-col4.blade.php b/resources/views/page/show-col4.blade.php index 1fa8d12..e5c743b 100644 --- a/resources/views/page/show-col4.blade.php +++ b/resources/views/page/show-col4.blade.php @@ -1,7 +1,7 @@ @extends('layouts.frontend') @section('content') - + @csrf diff --git a/resources/views/task/create.blade.php b/resources/views/task/create.blade.php index 9893df0..30dc511 100644 --- a/resources/views/task/create.blade.php +++ b/resources/views/task/create.blade.php @@ -9,8 +9,10 @@ width2="4" /> - + + diff --git a/resources/views/task/edit_cloze.blade.php b/resources/views/task/edit_cloze.blade.php new file mode 100644 index 0000000..012d873 --- /dev/null +++ b/resources/views/task/edit_cloze.blade.php @@ -0,0 +1,28 @@ +@extends('layouts.backend') + +@section('content') + + @csrf + + + + + @if ($context->valueOf('message') != null) + + @endif +

{{ $context->valueOf('title') }}

+ {!! $context->valueOf('cloze-text') !!} +
+
+ @if (!empty($context->valueOf('preview'))) + +
{!! $context->valueOf('preview') !!} +
+
+ @endif + +@endsection diff --git a/resources/views/task/edit_snake.blade.php b/resources/views/task/edit_snake.blade.php index 1373465..9c02939 100644 --- a/resources/views/task/edit_snake.blade.php +++ b/resources/views/task/edit_snake.blade.php @@ -1,21 +1,28 @@ @extends('layouts.backend') @section('content') -
+ @csrf - + + value="{{ $context->valueOf('snaketext') }}" width2="10" rows="2" attribute="readonly" /> - + value="{{ $context->valueOf('solution') }}" width2="10" rows="2" /> + + + @if ($context->valueOf('right') != null) + + @endif @if ($context->valueOf('message') != null) - + @endif - + @if (!empty($context->valueOf('preview')))
{!! $context->valueOf('preview') !!}