- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowf::test_item::Renaming_form_loader
::xowf::test_item::Renaming_form_loader create ...Form loader that renames "generic" form-field-names as provided by the test-item form-field classes (@answer@) into names based on the form name, such that multiple of these form names can be processed together without name clashes. - answer_attributes - answer_for_form - answers_for_form - form_name_based_attribute_stem - name_to_question_obj_dict - rename_attributes
Defined in packages/xowf/tcl/test-item-procs.tcl
Class Relations
Methods (to be applied on instances)
answer_attributes (scripted, public)
<instance of xowf::test_item::Renaming_form_loader> answer_attributes \ instance_attributesReturn all form-loader specific attributes from instance_attributes.
- Parameters:
- instance_attributes (required)
- Testcases:
- No testcase defined.
answer_for_form (scripted, public)
<instance of xowf::test_item::Renaming_form_loader> answer_for_form \ formName instance_attributesReturn answer for the provided formName from instance_attributes of a single object.
- Parameters:
- formName (required)
- instance_attributes (required)
- Testcases:
- No testcase defined.
answers_for_form (scripted, public)
<instance of xowf::test_item::Renaming_form_loader> answers_for_form \ formName answersReturn a list of dicts for the provided formName from the answers (as returned from [answer_manager get_answer_attributes ...]).
- Parameters:
- formName (required)
- answers (required)
- Testcases:
- No testcase defined.
form_name_based_attribute_stem (scripted, public)
<instance of xowf::test_item::Renaming_form_loader> form_name_based_attribute_stem \ formNameProduce from the provided 'formName' an attribute stem for the input fields of this form.
- Parameters:
- formName (required)
- Testcases:
- No testcase defined.
name_to_question_obj_dict (scripted, public)
<instance of xowf::test_item::Renaming_form_loader> name_to_question_obj_dict \ question_objsProduce a dict for attribute name to question_obj
- Parameters:
- question_objs (required)
- Testcases:
- No testcase defined.
rename_attributes (scripted, public)
<instance of xowf::test_item::Renaming_form_loader> rename_attributes \ form_objPerform attribute renaming in the provided form_obj and return this form_obj. In essence, this changes the generic "@answer@" value in the form and in the form constraints to a name based on the form name.
- Parameters:
- form_obj (required, object)
- Testcases:
- No testcase defined.
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables