xowf::test_item::Answer_manager method submissions (protected)
<instance of xowf::test_item::Answer_manager> submissions \ [ -creation_user creation_user ] \ [ -filter_submission_id filter_submission_id ] \ [ -revision_id revision_id ] [ -wf wf ]
Defined in packages/xowf/tcl/test-item-procs.tcl
Return an ordered composite built form all student submission, potentially filtered via the provided values.
- Switches:
- -creation_user (optional, integer, accept empty)
- -filter_submission_id (optional, integer, accept empty)
- -revision_id (optional, integer, accept empty)
- -wf (optional, object)
- Testcases:
- No testcase defined.
Source code: if {$revision_id ne ""} { # # In case we have a revision_id, return this single # revision. # set r [::xowiki::FormPage get_instance_from_db -revision_id $revision_id] set submissions [::xo::OrderedComposite new -destroy_on_cleanup] $submissions add $r } else { set submissions [:get_wf_instances {*}[expr {$creation_user ne "" ? "-creation_user $creation_user" : ""}] {*}[expr {$filter_submission_id ne "" ? "-item_id $filter_submission_id" : ""}] $wf] } # # Provide additional attributes to the instances such as the # userName and fullName. # foreach submission [$submissions children] { set submission_item_id [$submission set item_id] set feedbackFiles [xo::dc list_of_lists . { select item_id, name from cr_items where parent_id = :submission_item_id }] #ns_log notice "item_id $submission_item_id : children <$feedbackFiles>" $submission set online-exam-userName [acs_user::get_element -user_id [$submission creation_user] -element username] $submission set online-exam-fullName [::xo::get_user_name [$submission creation_user]] $submission set online-exam-feedbackFiles $feedbackFiles } return $submissionsXQL Not present: Generic, PostgreSQL, Oracle