Browse Source

fix for rerender ignoring prompts

tags/current_release
adam j hartz 5 months ago
parent
commit
993de8b5ae
2 changed files with 11 additions and 2 deletions
  1. +3
    -0
      CHANGELOG.md
  2. +8
    -2
      catsoop/__HANDLERS__/default/default.py

+ 3
- 0
CHANGELOG.md View File

@@ -27,6 +27,9 @@ _Work toward next release. Currently under development._

* Fixed alignment of first line within `<pre><code>` tags.

* Fixed issue with `csq_rerender` ignoring prompts (courtesy of Valerie
Richmond).

**SECURITY:**

**DOCUMENTATION:**


+ 8
- 2
catsoop/__HANDLERS__/default/default.py View File

@@ -942,7 +942,10 @@ def handle_check(context):

rerender = args.get("csq_rerender", question.get("always_rerender", False))
if rerender is True:
out["rerender"] = question["render_html"](
out["rerender"] = context["csm_language"].source_transform_string(
context, args.get("csq_prompt", "")
)
out["rerender"] += question["render_html"](
newstate["last_submit"], **args
)
elif rerender:
@@ -1168,7 +1171,10 @@ def handle_submit(context):
newstate["last_submit_time"] = context["cs_timestamp"]
rerender = args.get("csq_rerender", question.get("always_rerender", False))
if rerender is True:
out["rerender"] = question["render_html"](newstate["last_submit"], **args)
out["rerender"] = context["csm_language"].source_transform_string(
context, args.get("csq_prompt", "")
)
out["rerender"] += question["render_html"](newstate["last_submit"], **args)
elif rerender:
out["rerender"] = rerender



Loading…
Cancel
Save