Index: openacs-4/packages/xowf/lib/online-exam.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/online-exam.wf,v diff -u -N -r1.6.2.9 -r1.6.2.10 --- openacs-4/packages/xowf/lib/online-exam.wf 4 Nov 2019 10:24:39 -0000 1.6.2.9 +++ openacs-4/packages/xowf/lib/online-exam.wf 6 Nov 2019 18:49:21 -0000 1.6.2.10 @@ -359,7 +359,9 @@ set wf [[$ctx wf_container] get_answer_wf [self]] if {$wf ne ""} { set items [[$ctx wf_container] get_wf_instances $wf] - + set withSignature [expr {[dict exists ${:instance_attributes} signature] + ? [dict get ${:instance_attributes} signature] + : 0 }] set examTitle ${:title} foreach i [$items children] { set uid [$i property _creation_user] @@ -380,10 +382,24 @@ # $i set __feedback_mode 2 set question_form [$i render_content] - + + if {$withSignature} { + set answerAttributes [xowf::test_item::renaming_form_loader \ + answer_attributes [$i instance_attributes]] + set sha256 [ns_md string -digest sha256 $answerAttributes] + set signatureString "
Aktuelle Signatur: $sha256
\n" + set submissionSignature [$i property signature ""] + if {$submissionSignature ne ""} { + append signatureString "
Abgabe Signatur: $submissionSignature
\n" + } + } else { + set signatureString "" + } + append HTML "\n
" \ "

$examTitle - IP [$i property ip]

" \ "

$userName · [::xo::get_user_name $uid] · $pretty_date

" \ + $signatureString \ $question_form \ "
\n" }