Skip to content

Conversation

@somiaj
Copy link
Contributor

@somiaj somiaj commented Jan 2, 2026

I found it confusing when no message was given when there were no pg critic violations.

This adds a message that no violations were found. I couldn't think of much to say, so this is simple now, but was thinking maybe it could contain other information to help problem authors even though their problem code doesn't trigger any pg critic violations.

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Comment on lines 9 to 10
</div>
% last;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drgrice1 I just realized these aren't needed, as the following two conditionals will fail and the only output after this is the trailing div. Any preference on if I should remove lines 9 and 10 and have two more if checks?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, please remove the </div> and % last; lines. I really don't like unbalanced code in the templates, and would prefer to avoid it when it can be done. You added a similar thing to the file templates/ContentGenerator/ProblemSet/auxiliary_tools.html.ep in pull request #2869. I am allowing that for now, but I don't like it. Here it isn't needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem I have with this sort of thing is that it can make it difficult to check HTML validity by analyzing the code. In this case there is a <div> that starts, and then there are two corresponding </div> endings. The old theme templates had a ton of this, and it was a nightmare to sort out.

@Alex-Jordan Alex-Jordan merged commit 07f5b04 into openwebwork:develop Jan 3, 2026
2 checks passed
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.

3 participants