| Changelog | Today lists a learner's achievements, and the activity and notification "Achievement unlocked"
open exactly that section (#101). A pool export now comes back field for field, with the pool's
metadata, instructor notes and all translations, and French and Ukrainian join the translation
languages. The certificate logo and background libraries keep every change when several
administrators work at once (#102). The CSV import no longer misreads three kinds of files
(#65), and on PostgreSQL a Leitner answer is no longer lost once "Mastermind" is earned.
Administrators, please read:
- One migration, PostgreSQL only. Version011600Date20261121140000 widens the language
check of the translation tables to de, en, fr, ru, ar, uk on instances that still carry it
from 3.2; anywhere else it does nothing. No tables or columns are added (65 tables, 660
columns).
- Pool export format. occ learning:export-pool --format=json and Export JSON write one
pool document (_meta.format learning-pool/2) instead of a plain list of questions. Scripts
that read the old list need to read questions from it. Older exports still import.
- Certificate libraries. Changes now take Nextcloud's file lock per library; without file
locking ('filelocking.enabled' => false) only the revision check below guards renames and
deletes.
- API contract. The library answers of /api/settings/admin/cert-logos and
/cert-backgrounds add revision; PUT …/{id} needs it in the body and DELETE …/{id} in
the query string, otherwise HTTP 409 library_changed; a change waiting longer than 5
seconds answers 409 library_busy. Other routes and fields are unchanged.
- Known issue: npm audit still reports 6 moderate findings from one advisory for
minimatch under webdav through @nextcloud/dialogs (since 5.15.0); the only fix npm
offers is a breaking downgrade.
Added
- Achievements on Today (#101). With gamification on, Today has an achievements section: the
unlocked achievements, most recently unlocked first, six at a time with "Show all achievements"
to unfold the rest right there (there is no app-wide achievement gallery to link to; the one in
a pool's statistics belongs to that pool), and a friendly line while there are none yet. If the
user state cannot be loaded, the section says so instead of claiming there are no achievements;
the other widgets of Today stay optional as before. The activity "Achievement
unlocked" (stream and email) now opens exactly this section (
/dashboard?section=achievements):
Today scrolls there and moves the keyboard focus to its heading. The list comes from the user
state Today already loads, so the section costs no extra request; with gamification off it is
not shown. Section heading and list are announced as such, the layout follows the reading
direction in Arabic, and the texts are in all six languages. Each achievement shows what it
was for in small text under its name, readable with keyboard, touch and screen reader alike
(it was only a tooltip before).
Fixed
- Certificate logo and background libraries keep every change when several administrators work
at once (#102). Adding, renaming or deleting an image is now done under a lock per library,
and the list is read again from the database under that lock: before, a change made while
another one was in progress could write back an old list, so an image vanished from the list
while its file stayed in the app data. Two images added at the same moment now both stay. A
rename or delete on a list that has changed since the page loaded it is refused with HTTP 409
library_changed and changes nothing; the page shows the list as it is now and says so only
once the list has been loaded again (if that fails too, it asks to reload the page instead). A
change that finds another one still running after 5 seconds is refused with 409
library_busy. If the list cannot be saved after an upload, the file just written is deleted
again. Without Nextcloud's file locking ('filelocking.enabled' => false) the lock does not
hold; then only the revision check guards renames and deletes.
API: the library answers (GET/POST /api/settings/admin/cert-logos and
/cert-backgrounds, and their PUT/DELETE on {id}) add revision; PUT …/{id} reads
revision from the body and DELETE …/{id} from the query string, and both answer 409 without
it or with an outdated one. Uploads take no revision.
- A pool export comes back without losses.
occ learning:export-pool --format=json and
Export JSON now write one pool document in format learning-pool/2 (_meta.format) with
the pool's name, description and chapter fields, and per question also the instructor note
(with "visible to learners"), the translations of question, explanation, scenario and
feedback texts, and the translations of the answers. Imported through occ or Import pools,
it is the same pool field for field; before, the pool's metadata, all translations and the
instructor notes were lost, and a question without difficulty came back as medium. Older exports (a plain list of questions) import as
before. Not part of a pool export, as documented in docs/import-pool-workflow.md (Round trip):
attached images, the audio bundle (--media-dir), review state and course settings.
A translation the app cannot store (another language than de, en, fr, ru, ar, uk, or no
text) is reported in the import and left out; the question is imported.
- Importing an export into an existing pool keeps notes and translations. Manage →
Import read a
learning-pool/2 export but silently dropped the instructor notes (with
"visible to learners") and all question and answer translations; it now stores them, checked
and stored as in Import pools (a translation that cannot be stored is a warning, the
question stays imported). The pool's own name, description and chapter fields are not applied
to the open pool — the result says so and names them, instead of dropping them without a word.
Nor are they filled into the questions: a question of such a file keeps exactly its own
chapter, handbook, exam key and difficulty, as in Import pools, and the preview shows the
same.
- Translations in French and Ukrainian. Questions and answers could be translated into
German, English, Russian and Arabic only, although the app speaks six languages: the
translation dialog, the personal content language and the pool languages in a course now
offer French and Ukrainian as well. On PostgreSQL instances that were upgraded through 3.2,
the database's language check on the translation tables is widened to the six languages by
the update. The new messages of this release address the user informally in French, Russian
and Ukrainian, like the certificate library messages of this release (the note on pool fields
not applied, the CSV ambiguity warning); older messages are unchanged.
- A new achievement shows at once (Pre-existing). The user state behind Today and the
achievement gallery is cached for 30 seconds and was only cleared when XP changed. An
achievement that comes without XP (a RAG contribution, a finished coop simulator) stayed
invisible until the cache ran out, so the activity link could open Today without it. Awarding
an achievement now clears the same cache entries as an XP change. An achievement awarded inside
a Leitner answer (Mastermind) clears them again after that answer is saved, so a page loaded
in between cannot keep the old state for 30 seconds.
- The notification "Achievement unlocked" opens the achievements on Today (Pre-existing), like
the activity for the same event; before, it opened the start page of the app.
- CSV import: three misreadings found by the property tests (#65), in the import and in its
preview alike. (1) A first question that mentions "question" and "answer" (or "Frage" and
"Antwort") is no longer dropped as a header: a header is a first row that names the columns
and does not itself import as a question. Real header rows, English and German, are still
skipped, also one in the open-question form whose first field is a column name (at most four
words, no
? . ! :): question,model_answer,open, Question text,Model answer,open,
Fragen,Antworten,open. (2) An unquoted ; in an answer (cd;ls;pwd, as the CSV export writes it) no longer
switches the file to the ; separator: the separator is the one under which more rows import
as questions; only on a tie does the old rule decide (more fields in the first question, comma
on a tie). (3) An explanation that is a number is no longer read as the number of the correct
answer when that reading cannot import (eight answers and an explanation 2: the old reading
made nine answers and refused the row); then the row is read as answers, number, explanation.
Without a header that names the correct column, every row that imported before is read
exactly as before: when the last field can be the number of the correct answer and that
reading imports, it wins, as in every earlier version.
When the other reading would import too (Q,a,b,1,2: answers a, b, 1 with number 2, or
answers a, b with number 1 and explanation 2), the import and its preview now warn
("Ambiguous numbers — read as correct answer … without explanation"); a header row with a
correct column decides. With a header that names the correct column (whole names only:
correct, correct_answer, correct_number, right answer, richtig, richtige Antwort,
korrekt, korrekte Antwort, solution, Lösung; not Lösungsweg or Solution notes)
as its last or second-last column, the number is read from that column for every row as wide
as the header; that is the one deliberate change for rows that imported before (correct as
the second-last column and a numeric explanation used to be read as one answer more). The shipped examples have a header and are read as before.
- CSV import: a question text or an explanation
0 is text (pre-existing), in the import and
in its preview alike. The readers used PHP empty(), which treats "0" as empty: a question
0 was refused with "Empty question text" and an explanation 0 was dropped. Only an empty or
blank field is empty now.
- A card reaching box 5 is saved again once "Mastermind" is earned (Pre-existing). On
PostgreSQL, every further Leitner card that reached box 5 after the "Mastermind" achievement
failed with an error: the achievement check found "already earned" by a failing insert inside
the answer's transaction, which PostgreSQL then refuses to continue, so the box change and the
XP of that answer were rolled back. The achievement is now inserted with
IDBConnection::insertIgnoreConflict() (ON CONFLICT DO NOTHING on PostgreSQL, INSERT IGNORE
on MySQL/MariaDB), which reports an existing row without an error.
- The same for a learner's first stats row (Pre-existing). When two requests of a learner
without a stats row ran at once (a Leitner answer, a claimed daily mission), the second one
failed on PostgreSQL in the same way, because the row was created by a failing insert inside
its transaction. It is now created the same way as an achievement.
Tests
- A round-trip test checks every column of pools, questions, answers and both translation
tables: carried by the export or excluded with a reason, so a new column cannot go missing
silently; one question per type including two interactive subtypes. The same round trip runs
against a real Nextcloud in the integration suite, where it compares not only the two exports
but the rows stored for the copy with the rows stored for the source, column by column — a
field the export never writes would be missing from both exports alike. Both tests also fail
when a compared column is empty everywhere in the source.
- A shared fixture records how both CSV readers read the shipped examples and 31 hand-written
files before the fix; the preview and
ImportController::importCsv read all of them as
before. The three it.fails pins became normal tests, the property test no longer excludes
the header and separator cases and asserts the ambiguity warning instead of skipping that case, and PHPUnit covers each finding on the server. A differential run against the 5.17.0 preview reader (120,000 generated files without a header, a ; or the header words, about 216,000 records) found no record that imported before and is read differently now; the only records that import now and did not are rows with eight answers and a numeric explanation.
- An integration test brings the 50th Leitner card to box 5 for a learner who already has
"Mastermind" and checks on PostgreSQL and MySQL that box, XP and mastered count are stored; a
unit test models PostgreSQL's aborted transaction and fails on the old failing insert.
- Manage → Import and its preview are tested with a
learning-pool/2 file in the
pools wrapper whose pool has chapter, handbook and exam-key prefix: none of them reaches the
question; without the format marker they still do.
|