Class ::xowiki::formfield::upload_interaction
::xowiki::formfield::upload_interaction
create ...
Class Relations
- class: ::xotcl::Class
![[i]](/resources/acs-subsite/ZoomIn16.gif)
- superclass: ::xowiki::formfield::TestItemField
![[i]](/resources/acs-subsite/ZoomIn16.gif)
::xotcl::Class create ::xowiki::formfield::upload_interaction \
-superclass ::xowiki::formfield::TestItemField
Methods (to be applied on instances)
convert_to_internal (scripted)
next
set intro_text [:get_named_sub_component_value text]
set max_nr_submission_files [${:parent_field} get_named_sub_component_value max_nr_submission_files]
set file_dict {_name answer _type file}
if {$max_nr_submission_files > 1} {
dict set file_dict repeat 1..$max_nr_submission_files
dict set file_dict repeat_add_label #xowiki.form-repeatable-add-another-file#
dict set file_dict label #xowf.online-exam-submission_files#
} else {
dict set file_dict label #xowf.online-exam-submission_file#
}
append intro_text [:text_attachments]
set form [:form_markup -interaction upload -intro_text $intro_text -body @answer@]
lappend fc @categories:off @cr_fields:hidden [:dict_to_spec $file_dict]
${:object} set_property -new 1 form $form
${:object} set_property -new 1 form_constraints $fc
set anon_instances true ;
${:object} set_property -new 1 anon_instances $anon_instances
${:object} set_property -new 1 auto_correct [[self class] set closed_question_type]
${:object} set_property -new 1 has_solution falseinitialize (scripted)
if {${:__state} ne "after_specs"} {
return
}
set widget [test_item set richtextWidget]
:create_components [subst {
{text {$widget,height=150px,label=#xowf.exercise-text#,plugins=OacsFs}}
{attachments {[:attachments_widget ${:nr_attachments}]}}
}]
set :__initialized 1