Skip to content

Rework the test problem header. - #3204

Open
drgrice1 wants to merge 2 commits into
openwebwork:developfrom
drgrice1:test-problem-header-rework
Open

Rework the test problem header.#3204
drgrice1 wants to merge 2 commits into
openwebwork:developfrom
drgrice1:test-problem-header-rework

Conversation

@drgrice1

@drgrice1 drgrice1 commented Sep 8, 2026

Copy link
Copy Markdown
Member

Currently the message that reports if answers are recorded or not is the first thing in a problem in a test, and that also has the id of the problem. That id element is what is used as the anchor when a problem jump link is used or if entering the test directly to a problem from a link else where. Furthermore, in most of those cases when those fragment URLs are used, that recorded answer div is empty. This results in odd behavior such as that empty div being outlined.

So move that div down after the actual problem header and wrap the problem header (and sub header) in a div that now contains the id of the problem. This is much more intuitive when one of these fragment URLs is used.

Note that this needs #3203 to work better, and will conflict with #3202 (but the changes in #3202 that this conflicts with should probably be removed with this change).

Comment thread templates/ContentGenerator/GatewayQuiz.html.ep Outdated
Comment thread templates/ContentGenerator/GatewayQuiz.html.ep Outdated
@drgrice1
drgrice1 force-pushed the test-problem-header-rework branch 3 times, most recently from 11f8833 to 2eaceb7 Compare September 8, 2026 23:48
Comment thread templates/ContentGenerator/GatewayQuiz.html.ep
Currently the message that reports if answers are recorded or not is the
first thing in a problem in a test, and that also has the `id` of the
problem.  That `id` element is what is used as the anchor when a problem
jump link is used or if entering the test directly to a problem from a
link else where.  Furthermore, in most of those cases when those
fragment URLs are used, that recorded answer div is empty. This results
in odd behavior such as that empty div being outlined.

So move that div down after the actual problem header and wrap the
problem header (and sub header) in a div that now contains the `id` of
the problem. This is much more intuitive when one of these fragment URLs
is used.

Note that this needs openwebwork#3203 to work better, and will conflict with openwebwork#3202
(but the changes in openwebwork#3202 that this conflicts with should be removed
with this change).
@drgrice1
drgrice1 force-pushed the test-problem-header-rework branch from dc724a9 to 161b230 Compare September 9, 2026 18:10
@somiaj

somiaj commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

I did notice that when this is combined with #3202 (or other ways to link to directly to a problem header), the "Problem X" header gets an outline around it when linking directly to the problem from a different page. Is this behavior we want?

@drgrice1

Copy link
Copy Markdown
Member Author

Yeah, you could add back the outline none css if you want. That would fix the issue.

@somiaj

somiaj commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Yea, I was just curious what behavior we would prefer. I would suggest adding it to this PR, since this is the header rework. To me I don't like it, but it is less of an issue for me since it isn't an empty div. So I could go either way.

@drgrice1

Copy link
Copy Markdown
Member Author

I added outline: none to the gw-problem-number class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants