@@ -7,6 +7,7 @@ use IMATHUZH\Qfq\Core\Database\Database;
useIMATHUZH\Qfq\Core\Helper\HelperFile;
useIMATHUZH\Qfq\Core\Helper\OnString;
useIMATHUZH\Qfq\Core\Helper\SqlQuery;
useIMATHUZH\Qfq\Core\Store\Store;
// TODO: Fix all broken tests... one easy solution?
// TODO: Carsten Fragen: Habe keine Unittests zu QuickFormQuery->doForm gefunden. Wird nicht getestet. FormAsFile nicht testen oder vielleicht nur mit selenium?
...
...
@@ -19,15 +20,11 @@ use IMATHUZH\Qfq\Core\Helper\SqlQuery;
// TODO: Carsten Fragen: Kann es sein, dass records in Dirty tabelle nicht mehr richtig abegraeumt werden, weil forms die ID wechseln?
// TODO: Carsten Fragen: Exceptions werden teilweise ohne Developer message angezeigt (API). Deshalb habe ich die Message teilweise in User message getan.
// TODO: Carsten Fragen: PHP version von gitlab runner hochstellen, damit ?string und void type syntax fuer funktionen erlaubt ist? verhindert einige fehler
// TODO: Carsten Fragen: Regex fuer erlaubte file names und form names im editor (+ erlauben?): ^([-\.\w]+)$ VS [a-zA-Z0-9._+-]+
// TODO: Carsten Fragen: Muss die neue Column fileStats von Form tabelle in DatabaseUpdateData.php? Form Editor wird ja sowieso neu eingespielt bei einem update.
// TODO: Carsten Fragen: QFQ as file
// TODO: BEFOORE PRUDUCTION
// TODO: add Exception hint as hint instead of in main message?
// TODO: move formFile code in QuickFormQuery.php into methods in this file as much as possible?
// TODO: remove DEBUG blocks
// TODO: Form-Editor form name einschraenken auf eindeutige und valide file names
// TODO: Form-Editor anpassen: container name muessen eindeutig sein.
// TODO: add fileStats column to Form schema and to DatabaseUpdateData.php. Actually formEditor.sql is run in DatabaseUpdate.php after the DatabaseUpdateData.php changes are executed. So is this neccessary? (ASK Carsten)
// TODO: move Constants to Constants.php if this file is actually used
// TODO: extract all sql queries and make them reusable
// TODO: write tests (file test https://medium.com/weebly-engineering/phpunit-mocking-the-file-system-using-vfsstream-5d7d79b1eb2a)
// TODO: maybe: update button in form list which removes forms from DB if their file was deleted
...
...
@@ -50,7 +47,6 @@ use IMATHUZH\Qfq\Core\Helper\SqlQuery;
// form file form element added => added in form editor
// form file form element changed => changed in form editor
// form file form element removed => removed in form editor
// form file changed => request for dirty lock throws exception
// form folder does not exist but formEditor is opened => form folder is created, all forms exported
...
...
@@ -93,10 +89,6 @@ use IMATHUZH\Qfq\Core\Helper\SqlQuery;
// ]));
///////////////////////
constSYSTEM_FORM_FILE_PATH='fileadmin/protected/qfq/form';// where form specification files are saved and loaded
constFORM_FILE_FORM_ELEMENT='FormElement_ff';// Key for FormElements array saved in Form File
constFORM_FILE_CONTAINER_NAME='containerName_ff';// key for referencing container FormElements by name in form file
classFormAsFile
{
/**
...
...
@@ -171,7 +163,7 @@ class FormAsFile
// Insert FormElements to DB and collect container ids
# cat=config/date; type=string; label=Date format:Default is 'dd.mm.yyyy'. Possible options: 'yyyy-mm-dd', 'dd.mm.yyyy'
dateFormat = dd.mm.yyyy
# cat=config/config; type=string; label=QFQ project directory:Default is 'fileadmin/protected/qfqProject'. Important: secure the directory (recursive) against direct access. Forms and reports are saved in this directory.
qfqProjectDir = fileadmin/protected/qfqProject
# cat=config/config; type=string; label=Thumbnail directory 'secure':Default is 'fileadmin/protected/qfqThumbnail'. Important: secure the directory (recursive) against direct access. Will be used by a special columnname '_thumbnail'.