[catsoop-users] CATSOOP - question about plugin infrastructure

ADITI YADAV ADITI.YADAV at ucalgary.ca
Sat May 17 17:41:58 EDT 2025


Hi CAT-SOOP Team,

I hope you're doing well!

I'm currently working on a local setup of CAT-SOOP (installed via pip) for a research project. I'm trying to implement a custom hint structure that would allow students to view progressive hints during quizzes, and eventually track which students view which hints. Since CAT-SOOP doesn’t currently have an inbuilt hint system, I’ve been attempting to implement this as a plugin.

Here's what I've tried so far:

I created a plugin named hints inside courses/sample_course/__PLUGINS__/hints/.
I started with post_load.py, and confirmed via available_plugins(context, course) and terminal output that the plugin is being detected.
In post_load.py, I attempted to inject HTML into context["cs_content"], and then into context["csq_content"], and finally context["csq_prompt"], but the hint button never appears on the rendered quiz page.
I also tried using a pre_render.py file instead, but none of the print() debug statements in that file ever appear in the terminal, suggesting that pre_render hooks may not be executed at all.

I'm running CAT-SOOP locally using catsoop start, with course content authored via <question pythonliteral> blocks in .catsoop files.

I'd appreciate any guidance on the following:

  *
Which plugin hook(s) are guaranteed to run before the question box is rendered (e.g., so I can inject hints inline with the prompt)?
  *
Is there a reliable way to modify or append content to questions created using the pythonliteral qtype from within a plugin?
  *
Are there limitations on where csq_content, csq_prompt, or cs_content_addons are used depending on the question type?
  *
Does pre_render.py work in the current pip-installable version, or is it only supported when running CAT-SOOP from source?

Is there any working example of a plugin that successfully injects HTML into question content?

I’ve tried to exhaust all avenues of documentation and debugging (including reading loader.py), but I feel a bit stuck.

Thanks so much for your time.

Best,
Aditi Yadav
Undergraduate Researcher
University of Calgary

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mit.edu/pipermail/catsoop-users/attachments/20250517/beea7d5d/attachment.htm>


More information about the catsoop-users mailing list