Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually handle failure to find a problem from a grouping set gracefully. #2670

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Feb 13, 2025

Actually, this handles any failure to generate a new test version gracefully. This wraps the set version assignment call in an eval and catches any exceptions that occur in the process including issues from an instructor not setting up grouping sets correctly. If any exceptions do occur the user is shown the usual invalid set screen with a message stating, "Unable to generate a valid test version. This is usually caused by invalid usage of grouping sets or a database error. Please speak to your instructor to fix the error. A system administrator can obtain more details on this error from the logs." The actual exception is logged to the webwork2 application log file (logs/webwork2.log) so an instructor can ask a system administrator for details of the error. Note this does not add to the general webwork2 issue of showing exceptions in the user interface.

Edit: I forgot to mention that if a test version is created in the process when an exception occurs, then it is immediately (and quietly) deleted.

This is one way to resolve issue #2669 and probably the best way without massively revising the GatewayQuiz module.

…lly.

Actually, this handles any failure to generate a new test version
gracefully. This wraps the set version assignment call in an `eval` and
catches any exceptions that occur in the process including issues from
an instructor not setting up grouping sets correctly.  If any exceptions
do occur the user is shown the usual invalid set screen with a message
stating, "Unable to generate a valid test version. This is usually
caused by invalid usage of grouping sets or a database error. Please
speak to your instructor to fix the error. A system administrator can
obtain more details on this error from the logs." The actual exception
is logged to the webwork2 application log file (logs/webwork2.log) so an
instructor can ask a system administrator for details of the error. Note
this does not add to the general webwork2 issue of showing exceptions in
the user interface.

This is one way to resolve issue openwebwork#2669 and probably the best way without
massively revising the GatewayQuiz module.
@drgrice1 drgrice1 force-pushed the graceful-grouping-set-failure branch from 27957b1 to b45b5ae Compare February 18, 2025 02:07
Copy link
Member

@pstaabp pstaabp left a comment

Choose a reason for hiding this comment

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

Fixes the issue more gracefully than before. And +1 for fixing a known issue that is 20 years old.

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