+# 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:
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 = "<span class=\"$mode\">$matches[2]</span>";
} else {
$rc = '<del class="lkn-del">' . (count($matches) == 4 ? ($matches[2] . $matches[3]) : $matches[2]) . '</del>';
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 = "<input class=\"lkn-field\" name=\"$name\" value=\"$value\" size=\"$width\">";
+ $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 = "<textarea class=\"lkn-field\" name=\"$name\" \" size=\"$width\" rows=\"$rows\">$value</textarea>";
+ $rc = $this->specialMacrosToHtmlField(false, $matches);
break;
case 'button':
// name | label | classes | options
$classes = $parts[1];
}
}
- $rc = "<button class=\"lkn-text-button $classes\">$label</button>";
+ $rc = "<button name=\"btnSubmit\" value=\"$name\" class=\"lkn-text-button $classes\">$label</button>";
break;
case 'icon':
$name = $matches[2];
$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 = "<input class=\"lkn-field\" name=\"$name\" value=\"$value\" size=\"$width\">";
+ } else {
+ $value = htmlentities($value);
+ $rc = "<textarea class=\"lkn-field\" name=\"$name\" \" size=\"$width\" rows=\"$rows\">$value</textarea>";
+ }
+ break;
+ case 'preview':
+ if ($isField) {
+ $rc = "<input class=\"lkn-field\" name=\"$name\" value=\"$solutions\" size=\"$width\">";
+ } else {
+ $value = str_replace(';', "<br/>\n", $solutions);
+ $rc = "<textarea class=\"lkn-field\" name=\"$name\" \" size=\"$width\" rows=\"$rows\">$value</textarea>";
+ }
+ 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 = "<input class=\"lkn-field $class\" name=\"$name\" value=\"$value\" size=\"$width\">";
+ } else {
+ $value = htmlentities($value);
+ $rc = "<textarea class=\"lkn-field $class\" name=\"$name\" size=\"$width\" rows=\"$rows\">$value</textarea>";
+ }
+ } else {
+ if ($ok) {
+ $value2 = htmlentities($value);
+ } else {
+ $value2 = '<del>' . htmlentities($value) . '</del> <ins>' . htmlentities($solutions) . '</ins>';
+ }
+ $class = $ok ? 'lkn-pseudo-field' : 'lkn-pseudo-field-error';
+ $rc = "<span class=\"$class\">$value2</span><input type=\"hidden\" name=\"$name\" value=\"$value\"";
+ }
+ if (! $ok){
+ $this->clozeErrors++;
+ }
+ break;
+ default:
+ $rc = "!! unknown mode: $this->clozeMode!!";
+ break;
+ }
+ return $rc;
+ }
+
}
* @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;
"Document;/transaction-edit_document/$options/$referenceId"
], $indexActive);
break;
- case 'transaction-edit':
+ case 'transaction-edit':
$rc = new NavigationTabs([
'Mandators;/mandator-index',
"Accounts;/account-index/$referenceId2",
$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;
$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);
}
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();
namespace App\Http\Controllers;
-use App\Helpers\TextProcessor;
+use App\Helpers\StringHelper;
use App\Models\File;
use App\Models\Note;
use App\Models\Page;
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;
$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);
}
}
'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') {
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");
$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'], '<no group>');
$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') {
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', [
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');
}
}
},
{
"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": {
"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",
"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": {
"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",
},
{
"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": {
"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"
"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": {
"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",
},
{
"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": {
"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": [
{
"type": "tidelift"
}
],
- "time": "2024-06-15T09:13:15+00:00"
+ "time": "2024-06-19T05:29:34+00:00"
},
{
"name": "sebastian/cli-parser",
+++ /dev/null
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-return new class extends Migration
-{
- /**
- * Run the migrations.
- */
- public function up(): void
- {
- Schema::table('notes', function(Blueprint $table) {
- $table->string('options')->nullable();
- $table->renameColumn('user_id', 'owner_id');
- });
-
- }
-
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- //
- }
-};
--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ */
+ public function up(): void
+ {
+ Schema::table('notes', function(Blueprint $table) {
+ $table->dropColumn('options');
+ });
+
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ //
+ }
+};
--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ */
+ public function up(): void
+ {
+ Schema::table('notes', function(Blueprint $table) {
+ $table->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
+ {
+ //
+ }
+};
"<All>": "<Alle>",
"<Not verified>": "<Nicht verifiziert>",
"<Please select>": "<Bitte w\u00e4hlen>",
+ "<no group>": "<keine Gruppe>",
"A Scoped Property": "Eine bereichsbasierte Eigenschaft",
"Account": "Konto",
"Accounts": "Konten",
"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",
"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",
"Responsibility changed": "Verantwortung ge\u00e4ndert",
"Role": "Rolle",
"Roles": "Rollen",
+ "Sample solution": "Musterl\u00f6sung",
"Scope": "Bereich",
"Scoped Properties": "Bereichsbasierte Eigenschaften",
"Search": "Suche",
"plain text": "reiner Text",
"private": "privat",
"public": "\u00f6ffentlich",
+ "record|records": "Datensatz|Datens\u00e4tze",
"section": "Bereich",
"snaketext": "Schlangentext",
"standard": "Standard",
@extends('layouts.backend')
@section('content')
- <form id="chapter-show" action="/chapter-show/{{ $context->model->id }}" method="POST">
+ <form id="chapter-show" action="/page-showpretty/{{ $context->model->id }}" method="POST">
@csrf
<x-laraknife.panels.noform-text title="{{ $context->valueof('title') }}" prev="{{ $context->valueof('prev') }}"
next="{{ $context->valueof('next') }}">
@extends('layouts.frontend')
@section('content')
- <form id="page-show" action="/page-show/{{ $context->model->id }}" method="POST">
+ <form id="page-showcol1" action="/page-showpretty/{{ $context->model->id }}" method="POST">
@csrf
<x-laraknife.panels.text-area title="{{ $context->valueof('title') }}" prev="{{ $context->valueof('prev') }}"
up="{{ $context->valueof('up') }}" next="{{ $context->valueof('next') }}" audio="{{ $context->valueof('audio') }}">
@extends('layouts.frontend')
@section('content')
- <form id="page-show" action="/page-show/{{ $context->model->id }}" method="POST">
+ <form id="page-showcol2" action="/page-showpretty/{{ $context->model->id }}" method="POST">
@csrf
<x-laraknife.panels.text-area title="{{ $context->valueof('title') }}" prev="{{ $context->valueof('prev') }}"
up="{{ $context->valueof('up') }}" next="{{ $context->valueof('next') }}" audio="{{ $context->valueof('audio') }}">
@extends('layouts.frontend')
@section('content')
- <form id="page-show" action="/page-show/{{ $context->model->id }}" method="POST">
+ <form id="page-showcol3" action="/page-showpretty/{{ $context->model->id }}" method="POST">
@csrf
<x-laraknife.panels.text-area title="{{ $context->valueof('title') }}" prev="{{ $context->valueof('prev') }}"
up="{{ $context->valueof('up') }}" next="{{ $context->valueof('next') }}" audio="{{ $context->valueof('audio') }}">
@extends('layouts.frontend')
@section('content')
- <form id="page-show" action="/page-show/{{ $context->model->id }}" method="POST">
+ <form id="page-showcol4" action="/page-showcol4/{{ $context->model->id }}" method="POST">
@csrf
<x-laraknife.panels.text-area title="{{ $context->valueof('title') }}" prev="{{ $context->valueof('prev') }}"
up="{{ $context->valueof('up') }}" next="{{ $context->valueof('next') }}" audio="{{ $context->valueof('audio') }}">
width2="4" />
<x-laraknife.forms.combobox position="last" name="visibility_scope" label="Visibility" :options="$optionsVisibility"
width2="4" />
- <x-laraknife.forms.string position="alone" name="title" label="Title"
- value="{{ $context->valueOf('title') }}" width2="10" />
+ <x-laraknife.forms.string position="first" name="title" label="Title"
+ value="{{ $context->valueOf('title') }}" width2="4" />
+ <x-laraknife.forms.combobox position="last" name="group_id" label="Group" :options="$optionsGroup"
+ width2="4" />
<x-laraknife.forms.combobox position="first" name="task" label="Task" :options="$optionsTask"
width2="4" />
</x-laraknife.panels.create>
--- /dev/null
+@extends('layouts.backend')
+
+@section('content')
+ <form id="page-edit_cloze" enctype="multipart/form-data"
+ action="/task-edit_cloze/{{ $context->model->id }}/{{ $context->model2->id }}" method="POST">
+ @csrf
+ <x-laraknife.panels.standard title="{{ __('Change of a Task') }}" fieldset="false" button1Name="" button2Name="">
+ <x-laraknife.layout.nav-tabs :info="$navTabsInfo" fieldset="false" button1Name="" button2Name=""
+ class="lkn-text-area">
+ <x-laraknife.buttons.button-position position="first" name="btnStore" label="Check" width1="1" width2="4"
+ class="lkn-gap-bottom-1" />
+ <x-laraknife.buttons.button-position position="last" name="btnCorrect" label="Correction" width1="2" width2="4"
+ class="lkn-gap-bottom-1" />
+ @if ($context->valueOf('message') != null)
+ <x-laraknife.forms.const-text text="{{ $context->valueOf('message') }}" width1="0" width2="12" class="lkn-text-error"/>
+ @endif
+ <h2 class="lkn-background-white">{{ $context->valueOf('title') }}</h2>
+ {!! $context->valueOf('cloze-text') !!}
+ </x-laraknife.layout.nav-tabs>
+ </x-laraknife.panels.standard>
+ @if (!empty($context->valueOf('preview')))
+ <x-laraknife.panels.noform title="{{ __('Preview') }}">
+ <div class="lkn-text">{!! $context->valueOf('preview') !!}
+ </div>
+ </x-laraknife.panels.noform>
+ @endif
+ </form>
+@endsection
@extends('layouts.backend')
@section('content')
- <form id="page-edit_snake" enctype="multipart/form-data" action="/task-edit_snake/{{ $context->model->id }}/{{ $context->model2->id}}" method="POST">
+ <form id="page-edit_snake" enctype="multipart/form-data"
+ action="/task-edit_snake/{{ $context->model->id }}/{{ $context->model2->id }}" method="POST">
@csrf
- <x-laraknife.panels.edit title="{{ __('Change of a Task') }}">
+ <x-laraknife.panels.standard title="{{ __('Change of a Task') }}" fieldset="false">
<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="snaketext" label="Snaketext"
- value="{{ $context->valueOf('snaketext') }}" width2="10" rows="4" attribute="readonly" />
+ value="{{ $context->valueOf('snaketext') }}" width2="10" rows="2" 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" />
+ value="{{ $context->valueOf('solution') }}" width2="10" rows="2" />
+ <x-laraknife.buttons.button-position position="first" name="btnCheck" label="Check" width2="4" />
+ <x-laraknife.buttons.button-position position="last" name="btnCorrection" label="Correction"
+ width2="4" />
+ @if ($context->valueOf('right') != null)
+ <x-laraknife.forms.text position="alone" name="right" label="Sample solution"
+ value="{{ $context->valueOf('right') }}" width2="10" rows="2" />
+ @endif
@if ($context->valueOf('message') != null)
- <x-laraknife.forms.const-text text="{{ $context->valueOf('message')}}" width2="10" />
+ <x-laraknife.forms.const-text text="{{ $context->valueOf('message') }}" width2="10" />
@endif
</x-laraknife.layout.nav-tabs>
- </x-laraknife.panels.edit>
+ </x-laraknife.panels.standard>
@if (!empty($context->valueOf('preview')))
<x-laraknife.panels.noform title="{{ __('Preview') }}">
<div class="lkn-text">{!! $context->valueOf('preview') !!}