Repository navigation
Conversation
|
The one use case I can think of is in test mode. Some PG problems behave differently in test mode (usually to do with legacy named answers), so having the set detail page spawn a new window with a mock test was a quick way to test to see if the problem worked properly in a test. |
|
The problem with that is that it was not a proper validation that a problem will properly work in a test. The "Undefined_Set" was a hack that did not give a proper test. The only way to really get that is to create an actual test version. The "Undefined_Set" faked a single page test, and so problems with bad hard coded answer names would actually work for that. |
drgrice1
left a comment
There was a problem hiding this comment.
I think I like this approach much better than #3267. It allows for considerable code clean up, and eliminates the hackery of acting like there is a set when there isn't.
I need to review this better yet, but here are a couple of things I see now.
The templates/HelpFiles/InstructorPGProblemEditor.hml.ep file needs to be updated. It still mentions the "Open in new window" option.
4606bca to
ea430d1
Compare
|
Help file updated, removed mention of "Open in new window". There was no "Try it" button mentioned in the Library Browser help, so nothing needed changed there. |
|
@dlglin I think the more subtle issues only occur with multiple problems on the same page, or saving answers between multiple pages, neither of which are tested with the Undefined_Set and a single problem. |
ae20cae to
493aa98
Compare
Problems can currently be rendered and tested in the problem editor, set details page, and library browser. Support for viewing them in their own window is historical from when it was not always possible to test a problem directly within those pages. To support viewing a a problem using an `Undefined_Set` required extra handling, fake sets, problems, and extra logic. Furthermore extra care is needed when viewing these problems to not allow submission, showing another version, or doing actions which may alter the database or not be valid for only testing a problem. This removes links and extra handling around using an `Undefined_Set`, and problems are now only viewed/tested within the page they are rendered in. This simplifies the logic in many pages, specifically the Problem.pm and GatewayQuiz.pm modules, which need lots of additional logic to handle this case. This also adds `show_me_another` to checkSet. There is now currently no use of `fake_test_version`, but `fake_set`, `fake_test`, and `fake_problem` are still used by renderRPC. Initial code removal was by me, then tested by Claude and cleaned up some of the things found I missed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
493aa98 to
14aec6c
Compare
drgrice1
left a comment
There was a problem hiding this comment.
This looks good. I really like the massive quantity of code that this cleans up by not having to fake a set or problem and deal with the undefined set case. Now the WeBWorK::ContentGenerator::Problem and WeBWorK::ContentGenerator::GatewayQuiz packages can focus on their true purpose of delivering content for students and making that reviewable by instructors.
This is an alternative solution to #3267. I don't use this feature and have no strong opinions on which way to go. I do know from comments I've seen in the forums that others do use this feature, so removing it may affect others workflow. I will leave this here, and let approvals decide if we want to keep supporting the
Undefined_Setapproach, or remove it altogether. Please only merge one of the PRs, and close the other if/when it is decided which approach to use.Problems can currently be rendered and tested in the problem editor, set details page, and library browser. Support for viewing them in their own window is historical from when it was not always possible to test a problem directly within those pages. To support viewing a a problem using an
Undefined_Setrequired extra handling, fake sets, problems, and extra logic. Furthermore extra care is needed when viewing these problems to not allow submission, showing another version, or doing actions which may alter the database or not be valid for only testing a problem.This removes links and extra handling around using an
Undefined_Set, and problems are now only viewed/tested within the page they are rendered in. This simplifies the logic in many pages, specifically the Problem.pm and GatewayQuiz.pm modules, which need lots of additional logic to handle this case.This also adds
show_me_anotherto checkSet.There is now currently no use of
fake_test_version, butfake_set,fake_test, andfake_problemare still used by renderRPC.