xowf::test_item::Answer_manager method export_file_submission (protected)
<instance of xowf::test_item::Answer_manager> export_file_submission \ [ -submission submission ] [ -zipFile zipFile ] \ [ -check_for_file_submission_exists on|off ]
Defined in packages/xowf/tcl/test-item-procs.tcl
Get all nonempty file form-fields and add these to a zip file. The filename is composed of the user, the exercise and the provided file-name.
- Switches:
- -submission (optional, object)
- -zipFile (optional, object)
- -check_for_file_submission_exists (optional, boolean, defaults to
"false"
)- Testcases:
- No testcase defined.
Source code: foreach f_obj [:get_non_empty_file_formfields -submission $submission] { set exercise_name [:pretty_formfield_name $f_obj] foreach file_revision_id [dict get [$f_obj value] revision_id] { set file_object [::xo::db::CrClass get_instance_from_db -revision_id $file_revision_id] set download_file_name "" append download_file_name [$submission set online-exam-userName] "-" $exercise_name "-" [$file_object title] $zipFile addFile [$file_object full_file_name] [$zipFile cget -name]/[ad_sanitize_filename $download_file_name] } }XQL Not present: Generic, PostgreSQL, Oracle