- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::formfield::text_interaction
::xowiki::formfield::text_interaction create ...
Class Relations
::xotcl::Class create ::xowiki::formfield::text_interaction \ -superclass ::xowiki::formfield::TestItemFieldMethods (to be applied on instances)
convert_to_internal (scripted)
next set intro_text [:get_named_sub_component_value text] append intro_text [:text_attachments] set fc_dict { _name answer _type textarea disabled_as_div 1 label #xowf.answer# autosave true } dict set fc_dict rows [:get_named_sub_component_value lines] dict set fc_dict cols [:get_named_sub_component_value columns] if {${:auto_correct}} { dict set fc_dict correct_when [:comp_correct_when_from_value [:get_named_sub_component_value correct_when]] } set form [:form_markup -interaction text -intro_text $intro_text -body @answer@] lappend fc @categories:off @cr_fields:hidden [:dict_to_spec $fc_dict] #ns_log notice "text_interaction $form\n$fc" ${:object} set_property -new 1 form $form ${:object} set_property -new 1 form_constraints $fc set anon_instances true ;# TODO make me configurable ${:object} set_property -new 1 anon_instances $anon_instances ${:object} set_property -new 1 auto_correct ${:auto_correct} ${:object} set_property -new 1 has_solution falseinitialize (scripted)
if {${:__state} ne "after_specs"} return # # Create component structure. # set widget [test_item set richtextWidget] :create_components [subst { {text {$widget,label=#xowf.exercise-text#,plugins=OacsFs}} {lines {number,form_item_wrapper_CSSclass=form-inline,min=1,default=10,label=#xowf.answer_lines#}} {columns {number,form_item_wrapper_CSSclass=form-inline,min=1,max=80,default=60,label=#xowf.answer_columns#}} {attachments {[:attachments_widget ${:nr_attachments}]}} [:correct_when_spec] }] set :__initialized 1
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables