Skip to content

12/test/feat refactor questions - #12099

Merged
thojou merged 78 commits into
ILIAS-eLearning:trunkfrom
kergomard:12/test/feat-refactor-questions
Oct 28, 2026
Merged

thojou merged 78 commits into
ILIAS-eLearning:trunkfrom
kergomard:12/test/feat-refactor-questions

Conversation

@kergomard

@kergomard kergomard commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Hi all

This is the basic implementation of the component Questions containing the basic infrastructure and the implementation of the question-type Cloze. There are a few things that will be improved in the next few weeks, but this PR gives this upcoming addition some visibility.

That will be fixed:

  • The question table will need to be expanded to show more information and to be expandable by the consuming component.
  • Answer forms are currently deleted once they are removed in the page editor. This does stop the history feature of the page editor from working. We will try to find a good solution for this in the coming weeks.

What needs to be added:

  • Currently the documentation is still missing. It will be added as soon as possible.
  • Currently unit tests are missing. They will be added further down the line as this is not going to be used productively for a little while longer.

Thank you very much and best,
@kergomard

@dsstrassner

Copy link
Copy Markdown
Contributor

Hi @kergomard, ich habe mir das auf der Testplattform angeschaut, dass sieht mir aus funktionaler Sicht soweit mit den schon kommunizierten Einschränkungen gut aus für die Beta-Phase. Vielleicht hat @thojou noch Anmerkungen. Ansonsten würde ich dich bitten, dass vor Coding Complete zu committen, damit die Community ihre Fragen auf ihren Staging Plattformen testen kann.

Das Navigations-Fortschritts-Informations-Element aus der KS muss dann noch ergänzt werden, sobald ein passendes identifiziert ist und beim JF besprochen wurde, damit 1 weiß, an welchen Schritt der Erstellung es steht.

@thojou

thojou commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Hey @kergomard,

I've reviewed your changes and here is a list of findings.

  • Setup: setup.php status stops with a fatal error because the status check builds the Cloze tables with a missing class name and one missing constructor argument, and getNamedObjectives() returns a single object instead of an array.
  • Shared points step and capabilities: The shared step for partial points calls Cloze-specific methods (getClozeText(), getGaps(), toCarry()), so another question type cannot open that step. A Cloze question whose maximum points are still empty is also hidden from the author table and cannot be edited.
  • Marking: Awarded points are always a float. There is no null state for "not marked yet", so a manual question that is still waiting for a tutor looks the same as a question that scored 0 points.
  • Cloze scoring and copying: Several Cloze cases calculate or store different points than the legacy question (combinations, text-matching modes, identical answers, numeric bounds, missing gaps, feedback keys, and editing saved numeric options), and copying a question with combinations fails on readonly properties.
  • Migration: Migrating a Cloze text gap stops with a type error because NULL limits are passed into limitToFloat(), and skipped questions or copies keep the remaining migration count above 0.
  • Output, preview, page copy, and batch delete: The static gap outputs unescaped text, failed preview and settings actions continue executing after showing the error, deleting preview responses clears the whole attempt instead of the one question (you already mentioned that), copying a page looks up the new answer-form ID instead of the old one, and deleting more than 100 questions skips every 101st item.
  • Housekeeping: A few places have missing keywords or imports on exceptions, Cloze wiring inside LocalDIC, an unimplemented units command, maintenance.json pointing to Modules/Test.

I'll hand more information about the findings to you in Discord.

Kind regards,
@thojou

@kergomard
kergomard force-pushed the 12/test/feat-refactor-questions branch 2 times, most recently from aadc265 to 637ca98 Compare October 22, 2026 15:06
@kergomard

Copy link
Copy Markdown
Contributor Author

Thank you very much @thojou for the review!

I took care of the first issues as far as I got today. I will try to do more at the beginning of next week. I would kindly ask you @thojou to merge before coding complete and I promise to take care of the rest asap after that.

On

Marking: Awarded points are always a float. There is no null state for "not marked yet", so a manual question that is still waiting for a tutor looks the same as a question that scored 0 points.
We discussed this and we do currently believe that the behavior is correct: All AnswerForms supporting Marking will always be marked automatically as soon as there is a Response. If there is no way to calculate the current mark, 0.0 is the correct default value. Any form of manual marking is the domain of the consumer.

Thanks again and best,
@kergomard

@kergomard

Copy link
Copy Markdown
Contributor Author

I've no idea what the hard fail on conflict means currently. I will have a closer look on Monday.

@kergomard
kergomard force-pushed the 12/test/feat-refactor-questions branch 2 times, most recently from 7fe5f4b to 096eaff Compare October 26, 2026 18:17
@thojou
thojou force-pushed the 12/test/feat-refactor-questions branch from 096eaff to 1e11b0c Compare October 28, 2026 14:10
@kergomard
kergomard force-pushed the 12/test/feat-refactor-questions branch 2 times, most recently from fe97b21 to ffd8d4f Compare October 28, 2026 15:26
@kergomard

Copy link
Copy Markdown
Contributor Author

Ok, I split up the PR, as there seemed to be to many commits and somehow Github fell flat on its nose :-( .

...so this is part 1.

Best,
@kergomard

@thojou
thojou merged commit 6bf300f into ILIAS-eLearning:trunk Oct 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants