48210 - Cloze gaps ignore their configured field width - #12033
Closed
lorenzgith wants to merge 1 commit into
Closed
Conversation
Limit the full-width rule for cloze text gaps to the mobile breakpoint so the size attribute governs the width again on wider screens. Includes the regenerated block in the compiled delos.css.
Contributor
|
Hey @lorenzgith, thanks for the PR. Your change works in the test player view, but it reintroduces a regression in manual scoring that was fixed in #11513 (https://mantis.ilias.de/view.php?id=47413): cloze inputs in the scoring view no longer span the full width. #12032 restores the configured gap width in the test view without breaking the manual scoring layout. I will therefore proceed with #12032 and close this PR. Again thanks for the effort. Kind regards, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://mantis.ilias.de/view.php?id=48210
A cloze question lets the author define the width of a text gap, either per gap or for the whole question via the fixed text length. ILIAS still writes this into the markup correctly, the rendered input carries
size="20" maxlength="20"for a configured length of 20.In ILIAS 10 the field nevertheless always spans the full width of the line, so the setting has no visible effect. The character limit still works, only the width is ignored.
The cause is a rule that was newly introduced in ILIAS 10, in
templates/default/070-components/legacy/Modules/_component_test.scss:An explicit
widthoverrides thesizeattribute of an input element, so every gap is rendered full width regardless of its configuration. ILIAS 9 had no comparable rule, the only styling for these inputs was aline-height. The gap templates and the size handling inassClozeTestGUIare unchanged between 9 and 10, so the regression is limited to this rule.Assuming the rule is meant to keep gaps usable on narrow screens, this scopes it to the mobile breakpoint instead of applying it unconditionally. That is the same pattern the neighbouring rule for
.ilc_qinput_TextInputin_component_test_legacy.scssalready uses, and it keepsmax-width: 65vwas the upper bound on wide screens.The compiled
templates/default/delos.cssis included, since it is committed in the repository. To keep it free of noise from a different sass version, I compileddelos.scssbefore and after the change with the same binary and verified that the only difference is this one rule, then applied exactly that block to the committed file.