Project @ iMath: Issueshttps://project.math.uzh.ch/https://project.math.uzh.ch/favicon.ico?16668783892024-03-06T19:06:54ZProject @ iMath
Redmine QFQ - Bug #18094 (Ready to sync (develop)): Loading Fabric without Form not working anymorehttps://project.math.uzh.ch/issues/180942024-03-06T19:06:54ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Multi Form has broken the old way to load fabric without form.</p>
<p>Adding a new way to load fabric without any forms.</p> QFQ - Feature #18008 (Closed): filepond: Rename type & size to standard mimeType and fileSizehttps://project.math.uzh.ch/issues/180082024-02-27T11:05:06ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p><img src="https://project.math.uzh.ch/attachments/download/9348/clipboard-202402271204-1rtip.png" alt="" /></p>
<p>Please use default column names for report filepond, same as are filled by the form upload.</p>
<p><a class="external" href="http://docs.qfq.io/en/develop/Report.html#column-upload">http://docs.qfq.io/en/develop/Report.html#column-upload</a></p> QFQ - Feature #17972 (In Progress): Javascript in Forms for Dynamic Update (among others)https://project.math.uzh.ch/issues/179722024-02-22T07:17:18ZBenjamin Baerbenjamin.baer@math.uzh.ch
<ul>
<li>New textfield in form for javascript per formelement</li>
<li>QFQ Variables inside the javascript get replaced (ex: {{id:R0}} = 25, {{SELECT name FROM person WHERE vorname = "Benjamin"}} = Baer)</li>
<li>New variables for references to make dynamic update possible. Bsp: Form Element: name%d, im Javascript block ref returns a css selector: {{ref:name}} = [data-reference="name%d"]</li>
<li>All Javascript text get added after the form</li>
</ul>
<pre>
<form class="qfq-form">
...
</form>
<script>
[insert here]
</script>
</pre>
<p>Beispiel script im form:<br /><pre>
// document.querySelectorAll("{{&name%d:V}}") # no jquery
if($("{{&name%d}}").value === "{{SELECT name FROM person WHERE vorname = "Benjamin"}}") {
$("{{&matrikelnr}}").hide()
}
</pre></p>
<p>Beispiel Ausgabe:<br /><pre>
// document.querySelectorAll("[data-reference='name%d']") # no jquery
if($("[data-reference='name%d']").value === "Baer") {
$("[data-reference='matrikelnr']").hide()
}
</pre></p>
<p>Anmerkung:</p>
<ul>
<li>Fuer die Referenzvariable war urspruenglich <code>{{ref:<name>}}</code> vereinbart und nichts gesagt zum Store.</li>
<li>Das Zeichen ':' hinter 'ref' kollidiert mit dem Delimiter fuer Store, Escape, Action ... - nicht gut.</li>
<li>Neu: Anstelle von <code>{{ref:...</code> wird vorgeschlagen (und ist implementiert) <code>{{&<name>:V}}</code></li>
<li>Das '&' ist in C als Adressoperator bekannt - das passt hier ziemlich gut.</li>
<li>Der STORE_VAR wurde gewaehlt weil bereits andere System Angaben wie RANDOM, MIMETYPE usw. enthaelt. Der STORE_FORM ist mehr fuer Content gedacht, der STORE_RECORD passt hier gar nicht.</li>
<li>Mit dem '&' am Anfang sollten Kollisionen sehr unwahrscheinlich sein.</li>
</ul> QFQ - Feature #17739 (Closed): multiform: gridhttps://project.math.uzh.ch/issues/177392024-01-29T17:21:35ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Multiform grid:</p>
<p>optionally, instead of table wrap it in a div with a grid with optional rows:</p>
<p>Example 4 columns:<br /><pre>
<div style="display: grid; grid-template-columns: 1fr 1fr 1fr 1fr">
</pre></p>
<p>Wrap every current <td> instead in <div>. tr are not needed and can be configured by the number of 1fr (or just generally grid-template-columns).<br />Make style tag customizable.</p>
<p>If you want just two culumns: 1fr 1fr<br />for 5 columns: 1fr 1fr 1fr 1fr 1fr</p>
<p>or probably even easier: `repeat(5, 1fr)` (repeat 1fr 5 times<br />also possible: `repeat(autofill, min-content)` (sizes each column as small as possible and adds columns until row is full)<br />or: `repeat(autofill, 40px)` (each column 40px, fill until entire row is full, then it breaks.</p>
<p>so with this we have a lot of flexibility for multiform.</p>
<p>result would be:<br /><pre>
<div class="optional" style="display: grid; grid-template-columns: repeat(3, 1fr)">
<div>first element</div>
<div>second element</div>
<div>third element</div>
<div>fourth element</div>
...
</div>
</pre></p>
<p>No row breaks (trs), so the user can change it how they prefer it.</p> QFQ - Feature #17214 (In Progress): Fabric improvementshttps://project.math.uzh.ch/issues/172142023-10-31T14:25:19ZBenjamin Baerbenjamin.baer@math.uzh.ch
<ul>
<li>Zoom improvement</li>
<li>Deleting / Erasing</li>
<li>Better guidance for things like text tool</li>
<li>Emoji</li>
</ul> QFQ - Bug #17160 (Ready to sync (develop)): TinyMCE: Do not convert to auto urlhttps://project.math.uzh.ch/issues/171602023-10-24T11:56:08ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Problem: #17159</p>
<p>Can be configured in url-handling:<br /><a class="external" href="https://www.tiny.cloud/docs/configure/url-handling/">https://www.tiny.cloud/docs/configure/url-handling/</a></p>
<p>Updated tinymce helper to always set it to to false:</p>
<p><a class="external" href="https://git.math.uzh.ch/typo3/qfq/-/merge_requests/628">https://git.math.uzh.ch/typo3/qfq/-/merge_requests/628</a></p> QFQ - Bug #17087 (New): Fabric: Zoom / Move doesn't work https://project.math.uzh.ch/issues/170872023-10-09T13:01:40ZBenjamin Baerbenjamin.baer@math.uzh.chQFQ - Feature #17086 (Closed): Multiple Forms on a pagehttps://project.math.uzh.ch/issues/170862023-10-09T11:43:23ZBenjamin Baerbenjamin.baer@math.uzh.ch
<ul>
<li>Currently there is only one form per page</li>
<li>Forms are insatiated from PHP in Javascript directly.</li>
</ul>
<ul>
<li>New:
<ul>
<li>Forms have data properties with the required urls / sips in their outermost container</li>
<li>Forms will be loaded automatically by the client with parameter from those properties</li>
<li>Allows for various things, such as on demand form loading via modal, opening forms without site change or just have multiple forms open where it makes sense.</li>
</ul></li>
</ul> QFQ - Bug #16900 (New): Error display behaviourhttps://project.math.uzh.ch/issues/169002023-09-19T14:12:18ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Error reporting in QFQ with setting production = yes; and the debug display error values set to auto:</p>
<p>when not loggend in to the backend:<br /><img src="https://project.math.uzh.ch/attachments/download/8421/error_notloggedin.png" alt="" /></p>
<p>when logged in:<br /><img src="https://project.math.uzh.ch/attachments/download/8420/error_loggedin.png" alt="" /></p>
<p>Also maybe an example of the stack trace showing. Here to cause the error I simply added an i before the first select statement.</p> QFQ - Feature #16172 (New): Tablesorter: Update {{10.10.line.count}} after every sorthttps://project.math.uzh.ch/issues/161722023-05-10T08:41:01ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>renumber rows after every sort:</p>
<p><a class="external" href="https://stackoverflow.com/questions/6549518/jquery-tablesorter-with-row-numbers">https://stackoverflow.com/questions/6549518/jquery-tablesorter-with-row-numbers</a></p>
<p>To make it apply everytime, we either need some rules (ie., row numbers always on first column + add a class to table with qfq-renumber) or mark the row in some way (for instance, having # as the title row)</p> QFQ - Bug #14590 (Closed): TypeAhead: Empty Query request at the beginninghttps://project.math.uzh.ch/issues/145902022-08-23T11:40:25ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Triggers at least one empty query typeahead request at form load, which generates errors.</p> QFQ - Feature #14589 (In Progress): max width for Form wraphttps://project.math.uzh.ch/issues/145892022-08-23T06:23:51ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Problem:<br />Pages with multiple widths run into a problem with sizing per number of columns. Too small on narrow pages, too wide on full width pages.</p>
<p>Solution:<br />Limit size with CSS max-width wraps.</p>
<p>Old default:<br />col-md-12 col-lg-9</p>
<p>New default:<br />col-md-12 qfq-max-size-1280</p>
<p>Other option: qfq-max-size-1600</p>
<p>Don't use any on elements that should size to max, for example fabric elements.</p>
<p>(There needs to be an option to deactivate / replace this part for fabric in for instance My)</p> QFQ - Bug #14518 (Rejected): Upload Problem with multiple configured base urlshttps://project.math.uzh.ch/issues/145182022-07-19T13:23:52ZBenjamin Baerbenjamin.baer@math.uzh.ch
<ul>
<li>After the update to 22.5 QFQ Version, we added the second url to base url on our math homepage:<br /><a class="external" href="http://www.math.uzh.ch/,w16.math.uzh.ch/math/">www.math.uzh.ch/,w16.math.uzh.ch/math/</a></li>
<li>Uploads on the dynamics form did not work on the url <a class="external" href="https://www.math.uzh.ch">https://www.math.uzh.ch</a> - they did on w16.math.uzh.ch/math/
<ul>
<li>Uploads displayed an Error message on the top right without details</li>
</ul>
</li>
<li>After adding the protocol again, the uploads worked on both. Current base url:<br /><a class="external" href="https://www.math.uzh.ch/,https://w16.math.uzh.ch/math/">https://www.math.uzh.ch/,https://w16.math.uzh.ch/math/</a></li>
<li>I remember carsten telling me that the protocol isn't needed anymore. If that's true, please investigate, else everything is correct.</li>
</ul>
<p>Problem trat vermutlich auf bei der Konferenz Registrierung / Upload von Abstracts.</p> QFQ - Bug #14508 (New): _exec: output will not be passed downhttps://project.math.uzh.ch/issues/145082022-07-12T10:48:54ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>The output of _exec can't be passed down to fields below, even with AS '_exec|column'</p>
<p>{{column}} will return the command, not the output
{{&column}} will return empty, not the output</p>
<p>BTW: folgender Code verhaelt sich korrekt</p>
<pre>
10.sql = SELECT 'echo "Hello World"' AS '_exec'
20.sql = SELECT '{{10.exec}}'
</pre> QFQ - Bug #14283 (Priorize): HEIC / HEIF convert doesn't triggerhttps://project.math.uzh.ch/issues/142832022-06-07T11:52:16ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Related to #14255 - Konvertierung wird nicht angestossen nach upload.</p>
<p>Beispiel auf: <a class="external" href="https://exam.math.uzh.ch">https://exam.math.uzh.ch</a> > Test Exam (als User bbaer)<br />Uploaded file location: fileadmin/protected/exam/2/student/1/22014.HEIC</p>
<p>File wird nicht angezeigt. Beim ersten laden der Seite die die Thumbnails anzeigt, dauert das laden ewig (evtl haengt da was im konvertierungsprozess?)</p>
<p>Konvertieren von hand per heic-convert hat funktioniert bei allen dateien aus #14255 - angehaengte Beispiele sind umbenannt von jpg -> heic und heif.</p>
<p>Falls problem behoben wird / gefunden wird, muss ich danach auf exam noch den Standard Upload anpassen und .heic/.heif anfuegen, bitte Ticket zurueck geben.</p> QFQ - Bug #13647 (New): Autofocus funktioniert nicht auf Chromehttps://project.math.uzh.ch/issues/136472022-01-11T16:14:52ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Beispiel:</p>
<p>Forked: <a class="external" href="https://webwork16.math.uzh.ch/forkred/">https://webwork16.math.uzh.ch/forkred/</a> > Gesuch UZH Candoc / Postdoc Grant > Neues Gesuch - wenn das Form aufgerufen wird springt der vert scrollbalken gleich nach unten.</p>
<p><img src="https://project.math.uzh.ch/attachments/download/5764/forkred.png" alt="" /></p>
<p>Das tritt auf Chrome und Chromebasierten Browser auf.</p>
<p>Firefox hingegen scrollt korrekt zum gesetzten Autofokus:</p>
<p><img src="https://project.math.uzh.ch/attachments/download/5762/betterScroll.gif" alt="" /></p>
<p>autofocus="1" ist im Element gesetzt.</p> QFQ - Feature #13354 (New): Using Websocket in QFQhttps://project.math.uzh.ch/issues/133542021-11-10T14:47:23ZBenjamin Baerbenjamin.baer@math.uzh.ch
<ul>
<li>Usage for Chat / Forum like application</li>
<li>Editing records concurrently (like Google Docs)</li>
<li>Less page reloads / current information in reports / forms</li>
<li>Needs alternative to nchan, either php, python or javascript endpoint in qfq without need of webserver configuration (similar to APIs)</li>
</ul> QFQ - Bug #13139 (Closed): Buttons shine trough sticky header in tablesort - Tablesorter: some el...https://project.math.uzh.ch/issues/131392021-10-08T05:22:01ZBenjamin Baerbenjamin.baer@math.uzh.chQFQ - Feature #12490 (New): Loading Plugins in QFQ - see what tinymce does. (lazy loading)https://project.math.uzh.ch/issues/124902021-05-04T09:34:14ZBenjamin Baerbenjamin.baer@math.uzh.ch
<ul>
<li>make tinymce plugin into a standard tinymce plugin</li>
<li>see if we can use the loading method for qfq plugins</li>
</ul> QFQ - Feature #10782 (Closed): Tiny MCE: Image Uploadhttps://project.math.uzh.ch/issues/107822020-06-22T14:35:10ZBenjamin Baerbenjamin.baer@math.uzh.ch
<ul>
<li><a class="external" href="https://www.tiny.cloud/docs/plugins/image/">https://www.tiny.cloud/docs/plugins/image/</a></li>
<li><a class="external" href="https://www.tiny.cloud/blog/make-your-content-accessible-with-tinymce/">https://www.tiny.cloud/blog/make-your-content-accessible-with-tinymce/</a></li>
<li><a class="external" href="https://github.com/instructure/tinymce-a11y-checker">https://github.com/instructure/tinymce-a11y-checker</a></li>
<li><a class="external" href="https://www.washington.edu/accessibility/checklist/images/">https://www.washington.edu/accessibility/checklist/images/</a></li>
</ul>
<p>Using tinymce for image upload, request by hannah</p> QFQ - Feature #10443 (In Progress): Konzept _api / _livehttps://project.math.uzh.ch/issues/104432020-04-22T13:38:56ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Analog zu _link.</p>
<p>Eine einfache Moeglichkeit mittels API Datenbank Felder abzurufen, zu setzen oder zu loeschen.</p>
<p>'t:blablabla|table:TABLE|params:&id=recordId&FIELDNAME=value|c:btn|delay:ms|function:javascriptFunction|s' AS _api</p>
<p>return {<br /> status: OK / ERROR,<br /> data: '{fieldname: value}'<br />}</p>
<ul>
<li>delay | onClick | etc. zum ausfuehren der function.</li>
<li>vorgefertigte Funktionen fuer edit / delete.
<ul>
<li>Beispiel: Edit input field mit |E - kann zb. ein Text anzeigen, bis darauf geklickt wird - dann wird daraus ein input field</li>
</ul></li>
</ul>
<p>PHP Seite:</p>
<p>Eine Mini API die den request per get oder sip entgegen nimmt und je nach funktion ein return liefert.</p>
<ul>
<li>Bei Edit - return mit den geaenderten Feldern in der Datenbank</li>
<li>Bei Delete - return mit true</li>
<li>Bei Select - return der angegebenen Felder einer bestimmten id (oder eventuell auch nach sql selector)</li>
</ul>
<p>Client Seite:<br />Wird zuerst ueber GET getestet bei aktuellen anforderung des Exam Tools und dann entsprechend aufgearbeitet. _api konvertierung im report muss also noch nicht erstellt werden - fokus auf die API.</p> QFQ - Feature #10345 (New): Templates - Patterns QFQ Stylehttps://project.math.uzh.ch/issues/103452020-04-02T21:10:52ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Ein "Pattern" im Design ist eine Vorgabe wie etwas aussehen soll.</p>
<p>Nehmen wir mal als Beispiel das teachingtool:</p>
<pre><div class="item">
<div class="item-background"></div>
<a class="item-image" style="background-image: url('typo3conf/ext/qfq/Classes/Api/download.php?s=5e8651ff802ce')" href="?id=tool&amp;toolId=118"></a>
<div class="item-description">Hinweise für die Übertragung einer geplanten Multiple-Choice-Prüfung in ein alternatives digitales Format</div>
<span class="item-meta">1.4.2020 17:02 Uhr</span><a class="item-title" href="?id=tool&amp;toolId=118">MC-Prüfungen (Remote)</a>
<div class="item-tags">
Tags:
<a class="label label-primary" href="index.php?id=alltools&amp;tagId=104">Leistungsnachweise</a>
<a class="label label-primary" href="index.php?id=alltools&amp;tagId=126">Digitale Lehre</a>
</div>
</div></pre>
<p>Nun brauchen wir diesen Satz an mehreren Orten vom Teachingtool - und wenn man etwas am Grunddesign aendert, muss man an jeden Ort denken in dem es vorkommt.</p>
<p>Mit dingen wie _link machen wir es uns relativ einfach diese Dinge zu erstellen - ist in diesem Sinne bereits ein Pattern.</p>
<p>Nun, wandeln wir obigen Satz mal in ein Pattern um:<br /> <pre><div class="item">
<div class="item-background"></div>
<a class="item-image" style="background-image: url('{{backgroundImage:R}}')" href="{{toolLink:R}}"></a>
<div class="item-description">{{itemDescription:R}}</div>
<span class="item-meta">{{dateTime:R0}}</span><a class="item-title" href="{{toolLink:R}}">{{itemTitle:RE}}</a>
<div class="item-tags">
Tags:
{{@tagLoopStart}}<a class="label label-primary" href="{{itemTagLink:R}}">{{itemTagName:R0}}</a>{{@tagLoopEnd}}
</div>
</div></pre></p>
<p>Und dazu dann der SQL Aufruf:<br /><pre>10 {
sql = SELECT "blabla" AS _itemTitle, ....
pattern = item
20 {
sql = SELECT CONCAT('index.php?id=tag&tagId=", tag.id) AS _itemTagLink, tag.name AS _itemTagName ...
loop = tagLoop
}
}</pre></p>
<p>Die Designs selbst koennten dabei aehnlich wie System Variabeln definiert werden und seitenweit abgelegt sein. Oder besser wie Form direkt ueber eine Art editor im frontend erstellt (bzw. gleich als git datei - um die eigenen HTML Editoren verwenden zu koennen)</p>
<p>Pattern wird natuerlich hier immer quasi erst "renr" ausgefuehrt, da einzelne Teile aus subqueries kommen koennten (und mit loops sogar muessen). Neben Store :R koennte man auch die anderen Stores abfragen, vorallem Y und U.</p> QFQ - Feature #9704 (Some day maybe): Thumbnails Generieren beim Splitten von PDF Fileshttps://project.math.uzh.ch/issues/97042019-12-04T13:45:31ZBenjamin Baerbenjamin.baer@math.uzh.ch
<ul>
<li>Im moment werden Thumbnails auf Anfrage generiert (Mit parameter |W:900x)</li>
<li>Gut waere wenn diese direkt beim Upload nach dem Splitten generiert werden</li>
<li>Da die Devices unterschiedliche Pixeldichte haetten, waeren ein bisschen groessere Thumbnails wuenschenswert</li>
<li>Meine Empfehlung waere einfach mal alle auf die Width 800 zu skalieren (fuer 4k Devices) - und diese so abzulegen.
<ul>
<li>Wenn der User groessere Thumbnails braucht, kann er dies manuell mit dem W parameter setzen</li>
<li>Wenn dies nicht der Fall ist muss kein |W parameter mitgegeben werden und das 800 width thumbnail wird geliefert</li>
<li>Der User kann dann mittels css/style/etc die Anzeige groesse des Thumbnails bestimmen</li>
</ul></li>
</ul> QFQ - Support #9690 (Closed): Required auf SELECT elementen scheint nicht zu funktionierenhttps://project.math.uzh.ch/issues/96902019-12-03T08:11:31ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p><a class="external" href="http://webwork16.math.uzh.ch/bbaer/index.php?id=10">http://webwork16.math.uzh.ch/bbaer/index.php?id=10</a></p>
<p>Select Liste ist auf required, loest aber keinen validator Fehler aus und wird erst beim Server abgelehnt.</p> QFQ - Feature #9617 (Closed): Save even if required fails: formGlobalMode=requiredOffButMark (e...https://project.math.uzh.ch/issues/96172019-11-21T12:22:18ZBenjamin Baerbenjamin.baer@math.uzh.chQFQ - Feature #9579 (Closed): Multiform with Process Rowhttps://project.math.uzh.ch/issues/95792019-11-15T09:19:04ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Multiform element with checkboxes like the one used in LI to assign students to exercise groups.</p>
<p>Form.parameter.processRow: Active, show checkboxes<br />Form.parameter.processRow = Title: <th>Title<th><br />Form.parameter.processRow = {{ SELECT 'Title' }}: <th>Title</th></p> QFQ - Support #9525 (Closed): Grunt: only-js faster, watcher now only does only-js and lesshttps://project.math.uzh.ch/issues/95252019-11-07T13:11:30ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>sped up the standard grunt stuff.</p>
<ul>
<li>only-js did also copy all the included libraries before - which took a long time - now only does build and copy our own js files.</li>
<li>default still builds everything</li>
<li>watcher did default before, now it does only-js and less (so essentially our js files and our css) - substantially faster.</li>
</ul> QFQ - Bug #8665 (Closed): QFQ Fabric - Readonly stopped displaying annotationhttps://project.math.uzh.ch/issues/86652019-07-03T11:09:40ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>A missing merge removed the functionality and led to problems in the correction tool of my.</p>
<p>Is in current master.</p> QFQ - Support #7955 (Closed): CodeCorrection viewOnlyhttps://project.math.uzh.ch/issues/79552019-02-27T04:33:31ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Is implemented in the branch readOnly and on both mys.</p>
<p>Please merge for new versions.</p> QFQ - Feature #7945 (Rejected): New Report Shorthand: AS _annotationhttps://project.math.uzh.ch/issues/79452019-02-25T12:47:44ZBenjamin Baerbenjamin.baer@math.uzh.ch
<code>CONCAT('<div class="fabric" data-fabric-json=', '\'',
a.fabricString,'\' data-view-only="true" data-background-image="'), '<img src="'),
CONCAT('d|f:', IF(ISNULL(s.id)=1, n.data, s.pathFileName), '|r:7|s') AS _link,
IF(ISNULL(a.id) = 0, '"></div>', '">')
</code> QFQ - Feature #7860 (Closed): mailto Link (Antispam) - JS bricht nicht um an UTF8 Character Grenzenhttps://project.math.uzh.ch/issues/78602019-02-12T12:22:40ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Bei Gelegenheit updaten, jetzige Implementation erzeugt falsche Darstellungen mit Sonderzeichen.</p>
<p>Stack zum Thema:<br /><a class="external" href="https://stackoverflow.com/questions/483212/effective-method-to-hide-email-from-spam-bots">https://stackoverflow.com/questions/483212/effective-method-to-hide-email-from-spam-bots</a></p>
<p>Aktuellste Quelle laut Stack: <br /><a class="external" href="http://www.grall.name/posts/1/antiSpam-emailAddressObfuscation.html">http://www.grall.name/posts/1/antiSpam-emailAddressObfuscation.html</a></p> QFQ - Feature #7746 (Closed): Rest API Importhttps://project.math.uzh.ch/issues/77462019-01-25T15:54:06ZBenjamin Baerbenjamin.baer@math.uzh.ch
<a name="Using-Forms-to-import-any-data"></a>
<h1 >Using Forms to import any data<a href="#Using-Forms-to-import-any-data" class="wiki-anchor">¶</a></h1>
<a name="Why"></a>
<h2 >Why<a href="#Why" class="wiki-anchor">¶</a></h2>
<p>Forms already check data and have mechanism to insert further things after save or check the existence of other records before save.<br />If it uses the same form as the user, there is also a good chance that the import mechanism won't get out of date.</p>
<a name="How"></a>
<h2 >How<a href="#How" class="wiki-anchor">¶</a></h2>
<ul>
<li>Using QFQ Element
<ul>
<li>Defines Form to be used</li>
<li>Defines REST API URL to be used (can be generated with SQL, if we want to trigger multiple API request in succession)</li>
<li>Defines which JSON Element has to be input into which Form Element</li>
<li>Does use the same API as the Javascript Client uses to pass data for save</li>
<li>Prints error message and cancels if one entry can't be imported
<ul>
<li>Option for force continue</li>
</ul>
</li>
<li>Logs errors</li>
</ul></li>
</ul>
<a name="What"></a>
<h2 >What<a href="#What" class="wiki-anchor">¶</a></h2>
<ul>
<li>Calls a REST API</li>
<li>Receives and handles JSON according to FormElement Mapping</li>
<li>Uses existing QFQ Code</li>
</ul> QFQ - Bug #7634 (Closed): Session Timeout zu kurzhttps://project.math.uzh.ch/issues/76342019-01-11T18:30:42ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Seitdem pro Form ein Custom Timeout konfiguriert werden kann, bekommt man nach Ablauf einen Sip error auf allen seiten. mit einem relaod ist dann wieder alles ok.</p> QFQ - Bug #7633 (Closed): ERR_CACHE_MISS / form resubmission errorhttps://project.math.uzh.ch/issues/76332019-01-11T18:29:12ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Wenn man auf IK einen antrag sucht, auf den antrag klickt (edit antrag) und dann close macht, zeigt min. Chrome/Opera einen err_cache_miss Fehler an.</p> QFQ - Feature #7522 (Priorize): Inserting default index.html to folder (Avoid Apache Indexing)https://project.math.uzh.ch/issues/75222018-12-20T17:27:11ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Check during upload:</p>
<ul>
<li>In QFQ config is a default configured: fileadmin/index.404.html. If this file does not exist, copy the QFQ delivered template file to it.</li>
<li>Insert an ln -s index.html to the configured 'index.404.html' in any upload folder automatically</li>
</ul>
<p>Furher:</p>
<ul>
<li>Adding a honeypot file under 'fileadmin/protected' that we can check with icinga (should be access denied).</li>
<li>Adding a honeypot folder under fileadmin/index.html that we can check with icinga (should NOT list the directory contents)</li>
<li>Confgigure nagios checks</li>
</ul> QFQ - Feature #7294 (Rejected): Fabric: prepare meta information (size)https://project.math.uzh.ch/issues/72942018-11-19T09:32:08ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Currently: Fabric gets meta information by directly requesting the file, which probably causes multiple calls to the caching on php<br />New: Fabric gets Meta ifnormation from PHP</p> QFQ - Support #6436 (Closed): Added ephraim as a Developerhttps://project.math.uzh.ch/issues/64362018-07-16T14:49:29ZBenjamin Baerbenjamin.baer@math.uzh.ch
<ul>
<li>Created branch "corrections" </li>
<li>Set up git at his home</li>
<li>Gave him temporary access as developer until 1.9. (can be extended of course)</li>
</ul>
<p>Reason: Ephraim asked if there was a way to directly correct errors he sees in the Documentation</p> QFQ - Feature #6292 (New): Download: File speichern mit Hash aber original Filename in der Datenb...https://project.math.uzh.ch/issues/62922018-06-22T11:01:47ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Die Idee:</p>
<ul>
<li>Datei wird hochgeladen</li>
<li>QFQ speichert die Datei unter md5 hash in einem Ordner (auch ohne Datei Endungen)</li>
<li>QFQ schreibt im Datensatz der auf das file verlinkt auch den original Filenamen rein</li>
<li>Bei korrektem Download ueber die Download API wird der richtige filename aus der Datenbank zurueck geliefert</li>
</ul>
<p>Probleme mit den leserlichen Filenamen ist das diese meist Informationen ueber den Inhalt liefern (bsp: Arztzeugnis_Max_Muster.pdf).</p>
<p>Dies ist natuerlich nur sinnvoll fuer Dateien die sicher gespeichert werden muessen, nicht zB. den Flyer oder ein Bild das direkt auf die Homepage kommt.</p> QFQ - Bug #6140 (Priorize): QFQ DnD Sort: Locked fieldshttps://project.math.uzh.ch/issues/61402018-06-04T14:05:01ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Lock fields with classes: qfq-dnd-no-drag / qfq-dnd-no-drop</p>
<p>Vermutlich war gemeint:</p>
<ul>
<li>Tabelle mit 5 Spalten</li>
<li>Die letzte Spalte mit Symbol 'Hand' - nur diese Spalte reagiert auf drag'n'drop.</li>
<li>Alle anderen Spalten kann man mit der Maus markieren und copy/paste machen.</li>
</ul> QFQ - Feature #5548 (Some day maybe): 801 Textfiles/Scriptfiles als Thumbnailhttps://project.math.uzh.ch/issues/55482018-02-26T17:10:35ZBenjamin Baerbenjamin.baer@math.uzh.chQFQ - Feature #5366 (Priorize): Saving with keyboard shortcutshttps://project.math.uzh.ch/issues/53662018-02-05T16:33:06ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Saving etc with key inputs.</p>
<p>ctrl + s - save<br />ctrl + n - save & new</p>
<p>evtl:<br />ctrl + q - save & close</p>
<p><a class="external" href="https://stackoverflow.com/questions/93695/best-cross-browser-method-to-capture-ctrls-with-jquery#14180949">https://stackoverflow.com/questions/93695/best-cross-browser-method-to-capture-ctrls-with-jquery#14180949</a></p> QFQ - Feature #5342 (Some day maybe): _link - with HTML Attributeshttps://project.math.uzh.ch/issues/53422018-02-02T17:50:28ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>data Attributes need to be set sometime.</p>
<p>Carsten proposed a general attribute option:</p>
<pre>
'p:...|c:someClass|a:data-target="www.google.ch" data-payload="stuff"' AS _link
</pre> QFQ - Feature #5333 (Closed): thumbnailshttps://project.math.uzh.ch/issues/53332018-02-01T16:51:52ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>If a width or height in pixels is supplied, create a thumbnail with imageMagick before sending the image back.</p>
<p>Notation:<br /><pre>..|d|F:pic.png|width:400|...</pre></p>
<p>Create a cache file with a hash of:<br />filename<br />modified / created<br />filesize<br />width/height</p>
<p>Important: If possible create png thumbnails from SVG files</p> QFQ - Feature #5129 (Some day maybe): Reports: SQL fuer x Achse und y Achsehttps://project.math.uzh.ch/issues/51292017-12-15T14:08:56ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Moeglichkeit x und y Achse in einer SQL Stufe zu generieren und Kinder dann beide Values zu vererben</p>
<p>Nuetzlich fuer Tabellen die Horizontal und Vertikal generiert werden, bsp. Overview Points</p>
<p>Beispiel:<br /><pre>
10 {
xsql = SELECT id FROM Exercises
ysql = SELECT id FROM Students
rbeg = <tr>
xhead = <thead>
yhead = <tbody>
xfbeg = <th>
xfend = </th>
yfbeg = <td>
...
20 {
sql = SELECT grade FROM Grades WHERE idExercise = {{10x.id}} AND idStudent = {{10y.id}}
}
</pre></p> QFQ - Feature #5024 (Some day maybe): Fabric: Generate PDF with editshttps://project.math.uzh.ch/issues/50242017-11-29T15:28:34ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Function to use the split and annotate to get a full fledged pdf in return.</p>
<ul>
<li>Should use WKHTML</li>
<li>Probably on an empty page which displays the images</li>
<li>Concatinated back into one PDF</li>
</ul> QFQ - Feature #5023 (Rejected): Fabric: Cut, rotate and enhance uploaded imageshttps://project.math.uzh.ch/issues/50232017-11-29T15:27:23ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Feature to edit freshly uploaded pictures, which then should generate a data url for the server to save.</p> QFQ - Feature #4974 (Some day maybe): Long polling - inform all listening clients of changeshttps://project.math.uzh.ch/issues/49742017-11-21T08:23:46ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p><a class="external" href="https://stackoverflow.com/questions/333664/how-do-i-implement-basic-long-polling">https://stackoverflow.com/questions/333664/how-do-i-implement-basic-long-polling</a></p>
<pre>
<?php
if(rand(1,3) == 1){
/* Fake an error */
header("HTTP/1.0 404 Not Found");
die();
}
/* Send a string after a random number of seconds (2-10) */
sleep(rand(2,10));
echo("Hi! Have a random number: " . rand(1,10));
?>
</pre>
<p>Note: With a real site, running this on a regular web-server like Apache will quickly tie up all the "worker threads" and leave it unable to respond to other requests.. There are ways around this, but it is recommended to write a "long-poll server" in something like Python's twisted, which does not rely on one thread per request. cometD is an popular one (which is available in several languages), and Tornado is a new framework made specifically for such tasks (it was built for FriendFeed's long-polling code)... but as a simple example, Apache is more than adequate! This script could easily be written in any language (I chose Apache/PHP as they are very common, and I happened to be running them locally)</p>
<p>Javascript:</p>
<pre>
<script type="text/javascript" charset="utf-8">
function addmsg(type, msg){
/* Simple helper to add a div.
type is the name of a CSS class (old/new/error).
msg is the contents of the div */
$("#messages").append(
"<div class='msg "+ type +"'>"+ msg +"</div>"
);
}
function waitForMsg(){
/* This requests the url "msgsrv.php"
When it complete (or errors)*/
$.ajax({
type: "GET",
url: "msgsrv.php",
async: true, /* If set to non-async, browser shows page as "Loading.."*/
cache: false,
timeout:50000, /* Timeout in ms */
success: function(data){ /* called when request to barge.php completes */
addmsg("new", data); /* Add response to a .msg div (with the "new" class)*/
setTimeout(
waitForMsg, /* Request next message */
1000 /* ..after 1 seconds */
);
},
error: function(XMLHttpRequest, textStatus, errorThrown){
addmsg("error", textStatus + " (" + errorThrown + ")");
setTimeout(
waitForMsg, /* Try again after.. */
15000); /* milliseconds (15seconds) */
}
});
};
$(document).ready(function(){
waitForMsg(); /* Start the inital request */
});
</script>
</pre> QFQ - Feature #4816 (Some day maybe): Templates for QFQ Reports (Tables, Radios, ..)https://project.math.uzh.ch/issues/48162017-10-25T11:33:18ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Easy way to create bootstrap tables and other template based fluff.</p>
<p>Now:<br /><pre>
10 {
sql = SELECT v.id AS _id, m.nr, CONCAT(v.name, ' (', v.gr_id, ')'), CONCAT('p:cassignment&grId=', v.gr_id, '&semId=',
v.sem_id, '|S|s') AS _link, CONCAT('p:exercisesheets&vId=', v.id, '&gr_id=', v.gr_id, '&semId=', v.sem_id,
'|E|s') AS _link
FROM vorlesung AS v, gruppe_member AS gm, modul AS m
WHERE v.sem_id = 35
AND v.v_typ = 'VL'
AND v.id = gm.x_id2
AND gm.gr_id = 896
AND m.id = gm.x_id
head = <table class="table table-condensed table-striped">
<thead>
<tr>
<th width="70">Modul</th>
<th>Name</th>
<th width="50"></th>
<th width="50"></th>
</tr>
</thead>
<tbody>
rbeg = <tr>
rend = </tr>
fbeg = <td>
fend = </td>
tail = </tbody></table>
}
</pre></p>
<p>Then:</p>
<pre>
10 {
sql = SELECT v.id AS _id, m.nr, CONCAT(v.name, ' (', v.gr_id, ')'), CONCAT('p:cassignment&grId=', v.gr_id, '&semId=',
v.sem_id, '|S|s') AS _link, CONCAT('p:exercisesheets&vId=', v.id, '&gr_id=', v.gr_id, '&semId=', v.sem_id,
'|E|s') AS _link
FROM vorlesung AS v, gruppe_member AS gm, modul AS m
WHERE v.sem_id = 35
AND v.v_typ = 'VL'
AND v.id = gm.x_id2
AND gm.gr_id = 896
AND m.id = gm.x_id
type = table
head = <th width="70">Modul</th>
<th>Name</th>
<th width="50"></th>
<th width="50"></th>
}
</pre>
<p>list</p>
<p>Now:<br /><pre>
10 {
sql = SELECT p.name, ', ', p.vorname
FROM person AS p
WHERE ....
head = <ul>
rbeg = <li>
rend = </li>
tail = </ul>
}
</pre></p>
<p>Then: <br /><pre>
10 {
sql = SELECT p.name, ', ', p.vorname
FROM person AS p
WHERE ....
type = list
}
</pre></p> QFQ - Bug #4253 (Closed): Record Lock not deleted when window closes without savehttps://project.math.uzh.ch/issues/42532017-08-18T16:18:35ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Beispiel: <br /><a class="external" href="https://webwork16.math.uzh.ch/bbaer/index.php?id=5&s=5996eded08a03">https://webwork16.math.uzh.ch/bbaer/index.php?id=5&s=5996eded08a03</a></p>
<p>Version von heute Morgen. Evtl. schon gefixt.</p>
<p>Muss ein internales Timeout geben falls die Seite ueber tab schliessen geschlossen wird nach einem Lock Event.</p>
<ul>
<li>Alice oeffnet den Eintrag</li>
<li>Bob bearbeitet die gleiche Datei, erhaelt einen Fehler, klickt reload</li>
<li>Record ist gelockt</li>
<li>Alice schliesst tab ohne zu speichern</li>
<li>Record bleibt gelockt.</li>
</ul> QFQ - Bug #3446 (Closed): Fehlermeldung bei Form: Unknown permission mode: 'logged_in'https://project.math.uzh.ch/issues/34462017-03-27T16:35:09ZBenjamin Baerbenjamin.baer@math.uzh.ch
<p>Siehe Screenshot</p>