Index: openacs-4/packages/xowf/tcl/test-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/test-item-procs.tcl,v diff -u -r1.7.2.97 -r1.7.2.98 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 8 Jan 2021 11:56:33 -0000 1.7.2.97 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 11 Jan 2021 11:04:43 -0000 1.7.2.98 @@ -35,6 +35,7 @@ Class create TestItemField -superclass FormGeneratorField -parameter { {feedback_level full} {auto_correct:boolean false} + {nr_attachments 15} } -ad_doc { Abstract class for defining common attributes for all Test Item @@ -45,6 +46,26 @@ } TestItemField set abstract 1 + TestItemField instproc text_attachments {} { + set attachments_html "" + if {[:exists_named_sub_component attachments]} { + set attachments_ff [:get_named_sub_component attachments] + set attachments_count [$attachments_ff count_values [$attachments_ff value]] + for {set i 1} {$i <= $attachments_count} {incr i} { + set attachment_label [dict get [:get_named_sub_component_value attachments $i] name] + append attachments_links \ + "
" + } + if {$attachments_count > 0} { + append attachments_html "