xowf::test_item::Question_manager method item_substitute_markup (public)

 <instance of xowf::test_item::Question_manager[i]> item_substitute_markup \
    [ -obj obj ] [ -form_obj form_obj ] [ -position position ] \
    [ -do_substitutions ]

Defined in packages/xowf/tcl/test-item-procs.tcl

Substitute everything item-specific in the text, including markup (handling e.g. images resolving in the context of the original question) and also percent-substitutions (if desired). ns_log notice "=== item_substitute_markup [$form_obj name] do percent subst (have pos [info exists position])"

Switches:
-obj (optional, object)
-form_obj (optional, object)
-position (optional, integer)
-do_substitutions (optional, defaults to "1")

Testcases:
No testcase defined.
Source code:
:assert_answer_instance $obj

$obj do_substitutions $do_substitutions
set html [$obj substitute_markup  -context_obj $form_obj  [$form_obj property form]]
#ns_log notice "after subst [$obj serialize]\nhtml"
if {[info exists position]} {
  return [:percent_substitute_in_form  -obj $obj  -form_obj $form_obj  -position $position  $html]
} else {
  set fc [$form_obj property form_constraints]
  set dfc [$form_obj property disabled_form_constraints]
  return [list form $html form_constraints $fc disabled_form_constraints $dfc]
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: