Skip to content

Feedback button changes.#1440

Open
somiaj wants to merge 1 commit into
openwebwork:PG-2.21from
somiaj:feedback-changes
Open

Feedback button changes.#1440
somiaj wants to merge 1 commit into
openwebwork:PG-2.21from
somiaj:feedback-changes

Conversation

@somiaj

@somiaj somiaj commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

I am using this PR as a discussion (so it is a draft). I'm unsure what others will think of these changes, but this is to address two issues I have with the feedback buttons. I have attempted to implement suggested changes to address the issues.

The first is themes can change the feedback button colors since they are using the bootstrap color classes. This may not be desirable that the feedback buttons match the webwork button colors, so new classes are created for the feedback buttons that can be themed independently of the bootstrap classes.

The second is when $showPartialCorrectAnswers=0 and the student didn't get the problem correct, the feedback looks like a "Preview Answers" and it confuses students as they think they hit "Preview Answers" and not "Submit Answer" button. This makes it so the feedback has its own look for this case. It uses the yellow color for partially correct, a title of "Unknown" (I think something better could be used here to indicate it is unknown if the answer is correct or incorrect) and a question mark in a circle as the icon (my question mark needs to be improved, I had trouble finding a good SVG question mark).

@somiaj somiaj marked this pull request as draft June 14, 2026 02:12
@somiaj somiaj force-pushed the feedback-changes branch 3 times, most recently from 8d461f4 to 0e7eb5b Compare June 16, 2026 19:42
@pstaabp

pstaabp commented Jun 16, 2026

Copy link
Copy Markdown
Member

About the circle, I think the font awesome one looks good. Here it is:

<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'><!--!Font Awesome Free v7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.--><path d='M528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320zM64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320zM320 240C302.3 240 288 254.3 288 272C288 285.3 277.3 296 264 296C250.7 296 240 285.3 240 272C240 227.8 275.8 192 320 192C364.2 192 400 227.8 400 272C400 319.2 364 339.2 344 346.5L344 350.3C344 363.6 333.3 374.3 320 374.3C306.7 374.3 296 363.6 296 350.3L296 342.2C296 321.7 310.8 307 326.1 302C332.5 299.9 339.3 296.5 344.3 291.7C348.6 287.5 352 281.7 352 272.1C352 254.4 337.7 240.1 320 240.1zM288 432C288 414.3 302.3 400 320 400C337.7 400 352 414.3 352 432C352 449.7 337.7 464 320 464C302.3 464 288 449.7 288 432z'/></svg>

This changes the feedback buttons in two ways.

1) Use copies of the bootstrap classes to color buttons. This way the
   feedback colors don't get changed by theming on the client side.
   The themes can still modify the actual classes used to change
   the buttons if desired, but the feedback buttons themselves can be
   themed independently of other bootstrap buttons.

2) Create a new feedback class "unknown" to use when showing the
   results of a problem with `$showPartialCorrectAnswers=0`. Currently
   on problems with limited feedback, it can be unclear to the student
   that they actually submitted the answer vs previewed the answer.
   This is accomplished by marking the buttons as incorrect if
   no answer is correct (0% on the problem), and marking them
   as "unknown" which shows a yellow button with a question mark
   in a circle if the problem is partially correct.
@somiaj somiaj force-pushed the feedback-changes branch from 0e7eb5b to cfdc61c Compare June 16, 2026 20:50
@somiaj

somiaj commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks I updated this to be the icon.

@somiaj

somiaj commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

After the meeting it seemed that others were okay with these changes so I'll change it from a draft so it can be fully reviewed.

@somiaj somiaj marked this pull request as ready for review June 16, 2026 20:51
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