xowf::test_item::Answer_manager method export_file_submission (protected)

 <instance of xowf::test_item::Answer_manager[i]> 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)
-zipFile
(optional)
-check_for_file_submission_exists
(boolean) (defaults to "false") (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 ad_sanitize_filename ad_sanitize_filename (public) xowf::test_item::Answer_manager instproc export_file_submission xowf::test_item::Answer_manager instproc export_file_submission xowf::test_item::Answer_manager instproc export_file_submission->ad_sanitize_filename

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
[ hide source ] | [ make this the default ]
Show another procedure: