- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::formfield::mc_choice
::xowiki::formfield::mc_choice create ... \
[ -multiple (default "true") ]
Class Relations
::xotcl::Class create ::xowiki::formfield::mc_choice \ -superclass ::xowiki::formfield::TestItemFieldMethods (to be applied on instances)
initialize (scripted)
if {${:__state} ne "after_specs"} return set text_config [subst {height=100px,label=Text}] if {[:feedback_level] eq "full"} { set feedback_fields { {feedback_correct {textarea,cols=60,label=#xowf.feedback_correct#}} {feedback_incorrect {textarea,cols=60,label=#xowf.feedback_incorrect#}} } } else { set feedback_fields "" } set widget [test_item set richtextWidget] if {${:multiple}} { # We are in a multiple-choice item; provide for editing a radio # group per alternative. :create_components [subst { {text {$widget,$text_config}} {correct {boolean,horizontal=true,label=#xowf.correct#}} $feedback_fields }] } else { # We are in a single-choice item; provide for editing a single # radio group spanning all entries. Use as name for grouping # the form-field name minus the last segment. regsub -all -- {[.][^.]+$} ${:name} "" groupname :create_components [subst { {text {$widget,$text_config}} {correct {radio,label=#xowf.correct#,forced_name=$groupname.correct,options={"" ${:name}}}} $feedback_fields }] } set :__initialized 1multiple (setter)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables