catsoop docs for website and pythonic-multiline #111
No reviewers
Labels
No labels
accessibility
backport to lts
bug
code
critical
cygwin
documentation
duplicate
error reporting
external
feature
feedback
good first issue
help wanted
infrastructure
invalid
investigate
language spec
logs
lti
lts only
mac
maybe
qtype:bigbox
qtype:checkoff
qtype:expression
qtype:fileupload
qtype:multiexpression
qtype:multiplechoice
qtype:number
qtype:pythoncode
qtype:pythonic
qtype:pythonliteral
qtype:richtext
qtype:smallbox
question
question types
sandbox
security
syntax highlighting
ui/ux
wontfix
wsl
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
catsoop/catsoop!111
Loading…
Reference in a new issue
No description provided.
Delete branch "ichuang/catsoop:pythonic-multiline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR expands the
pythonicquestion type with explicit multi-line inputand multi-prompt grading, adds focused unit coverage for the new behavior, and
substantially expands CAT-SOOP's course-authoring documentation.
The implementation work is intentionally limited to
pythonic. The remainingchanges are documentation, examples, navigation, a screenshot used by the
pythoncodeguide, and changelog entries.pythonicchangesExplicit renderers and solution formatting
csq_rendererwith explicit support for:"smallbox"(the default)"bigbox""ace""textarea"pythoncodeACE and textarea rendering paths whileretaining
pythonic's expression-only parsing and grading behavior.csq_rowsfor editor height.
csq_rowsalone does not switcha question away from
smallbox.csq_output_mode:"default"usesreprfor raw-mode solutions."formatted"usesstr.Multi-prompt questions
csq_prompts, a non-empty list of labels that renders severalsingle-line fields as one
pythonicquestion."0","1", and so on) before applying the existing sandbox and check-functionpipeline.
csq_solnsfor optional per-field solution display while retainingcsq_solnas the value used for grading.values, escapes rendered values and attributes, and adds associated labels
and ARIA metadata.
Safer failure logging
Invalid
pythonicsubmissions now log the question name and exception typewithout logging the raw student response or exception details. Student-facing
behavior still uses the existing invalid-expression message or a configured
csq_msg_function.Documentation
This branch adds authoring documentation for:
preload.py, roles, andrelease/due dates;
cs_form;__STATIC__, and theCURRENT,COURSE, andBASEprefixes;
cs_handler, raw responses, content types, redirects,request-driven endpoints, and staff-only actions;
cs_scripts, modules, and avoiding conflictswith CAT-SOOP's bundled JavaScript;
__USERS__files and common user fields;problemactions,problemstate,_question_info, and_checker;checkoffquestion type and its queue prerequisites;pythonicquestion type, including multi-line and multi-prompt usage;pythoniccheck functions, partial credit, rich HTML/image feedback,and the native
csm_checkchecker library;pythoncodequestion type, its execution model, tests, attempt limits,source validation, and targeted hints through check functions and
csq_hint;testing; and
self_partnerandsympy_checkas contrasting case studies of stateful andcomputation-oriented course-local qtypes.
The
pythoncodeguide includes a student-view screenshot. The two custom-qtypecase studies document course-local examples; this PR does not add
self_partnerorsympy_checkas built-in CAT-SOOP question types.Navigation under “Running a Course” and “Customizing, Extending, and Modifying
CAT-SOOP” has been updated to expose the new pages.
Compatibility and migration
pythonicquestions continue to use thesmallboxrenderer andthe existing grading contract by default.
"bigbox"questions remain supported.(score, message), and{"score": ..., "msg": ...}—are unchanged.__question_name_0000, soauthors should keep
csq_namestable.csq_solnscontrols only per-field solution display;csq_solnremains thegrading solution.
Testing
Targeted
pythonicand Markdown tests:All 16 new documentation pages were also loaded and rendered through
CAT-SOOP's page loader, with checks for malformed question parsing.
The complete local suite was run with:
It produced 43 passes and 9 environment-specific failures on macOS:
cslogstress tests define multiprocessing targets locallyand cannot be pickled by macOS's default
spawnstart method.pythoncodesandbox tests fail while applying processlimits in
preexec_fnin this local environment.The branch-specific
pythonictests pass, and the files involved in those ninefailures are unchanged by this PR.
git diff --checkalso passes.Changelog
The unreleased changelog now records the new
pythonicrenderers,multi-prompt support, safer failure logging, and the new
pythonicandpythoncodeauthoring guides.Sorry for the long delay, @ichuang ! Thanks for putting in the work here, but, as a general rule, I'm not accepting pull requests that were generated by LLMs. If it's easy to separate out the parts that were written by a human, I'd be happy to merge, especially since the changes to
pythonicdo seem quite nice. If not, no worries; I can rewrite those pieces if need be.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.