Index: openacs-4/packages/xowf/xowf.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/xowf.info,v diff -u -r1.12.2.11 -r1.12.2.12 --- openacs-4/packages/xowf/xowf.info 8 Mar 2020 17:21:50 -0000 1.12.2.11 +++ openacs-4/packages/xowf/xowf.info 21 Mar 2020 09:43:13 -0000 1.12.2.12 @@ -10,16 +10,16 @@ t xowf - + Gustaf Neumann XoWiki Content Flow - an XoWiki based workflow system implementing state-based behavior of wiki pages and forms 2017-08-06 WU Vienna 2 - + - + Index: openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml,v diff -u -r1.2.2.15 -r1.2.2.16 --- openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 10 Mar 2020 07:09:57 -0000 1.2.2.15 +++ openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 21 Mar 2020 09:43:13 -0000 1.2.2.16 @@ -126,4 +126,6 @@ Entwurf des Inclass-Exams (nicht freigegeben) Inclass-Exam ge�ffnet (Zur Bearbeitung freigegeben) Inclass-Exam geschlossen + Anzahl der �nderungen + Dauer Index: openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml,v diff -u -r1.2.2.12 -r1.2.2.13 --- openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 8 Mar 2020 17:21:50 -0000 1.2.2.12 +++ openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 21 Mar 2020 09:43:13 -0000 1.2.2.13 @@ -146,4 +146,6 @@ Created Questions Created Assessments + Number of changes + Duration Index: openacs-4/packages/xowf/lib/inclass-exam.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/inclass-exam.wf,v diff -u -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/xowf/lib/inclass-exam.wf 20 Mar 2020 12:00:12 -0000 1.1.2.3 +++ openacs-4/packages/xowf/lib/inclass-exam.wf 21 Mar 2020 09:43:13 -0000 1.1.2.4 @@ -373,11 +373,11 @@ # "summary_form" of online-exam-answer.wf when the submit # instance is in state "done". We set the __feedback_mode to # get the auto-correction included. - set current_user [xo::cc user_id] - xo::cc user_id [$i creation_user] - $i set __feedback_mode 2 - set question_form [$i render_content] - xo::cc user_id $current_user + # + xo::cc eval_as_user -user_id [$i creation_user] { + $i set __feedback_mode 2 + set question_form [$i render_content] + } if {$withSignature} { set answerAttributes [xowf::test_item::renaming_form_loader \ @@ -394,12 +394,21 @@ set time [::xo::db::tcl_date [$i property _last_modified] tz_var] set pretty_date [clock format [clock scan $time] -format "%Y-%m-%d %T"] - - append HTML "\n
" \ - "

$userName · $fullName · $pretty_date · IP [$i property ip]

" \ - $signatureString \ - $question_form \ - "
\n" + set revisions [$i get_revision_sets] + set duration [xowf::test_item::answer_manager get_duration $revisions] + set IPs [xowf::test_item::answer_manager get_IPs $revisions] + append HTML [subst { +
+

$userName · $fullName · $pretty_date

+
+ #xowf.nr_changes#: [llength $revisions]
+ #xowf.duration#: [dict get $duration from] - [dict get $duration to] ([dict get $duration duration])
+ IP: $IPs +
+ $signatureString + $question_form +
+ }] } } 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.30 -r1.7.2.31 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 21 Mar 2020 05:51:02 -0000 1.7.2.30 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 21 Mar 2020 09:43:13 -0000 1.7.2.31 @@ -1126,6 +1126,9 @@ # - get_wf_instances # - get_answers # + # - get_duration + # - get_IPs + # # - marked_results # - answers_panel # - result_table @@ -1242,6 +1245,7 @@ wf:object } { # get_wf_instances: return the workflow instances + :assert_assessment_container $wf return [::xowiki::FormPage get_form_entries \ @@ -1272,6 +1276,41 @@ ######################################################################## + :public method get_duration {revision_sets} { + # + # Get the duration from a set of revisions and return a dict + # containing at least "from", "to" and "duration" + # + + set first [lindex $revision_sets 0] + set last [lindex $revision_sets end] + set fromClock [clock scan [::xo::db::tcl_date [ns_set get $first creation_date] tz]] + set toClock [clock scan [::xo::db::tcl_date [ns_set get $last creation_date] tz]] + dict set r from [clock format $fromClock -format "%H:%M:%S"] + dict set r to [clock format $toClock -format "%H:%M:%S"] + set timeDiff [expr {$toClock - $fromClock}] + dict set r duration "[expr {$timeDiff/60}]m [expr {$timeDiff%60}]s" + return $r + } + + ######################################################################## + + :public method get_IPs {revision_sets} { + # + # Get the IP addresses for the given revision set. Should be + # actually only one. The revision_set must not be empty. + # + foreach revision_set $revision_sets { + set ip [ns_set get $revision_set creation_ip] + if {$ip ne ""} { + dict set IPs [ns_set get $revision_set creation_ip] 1 + } + } + return [dict keys $IPs] + } + + ######################################################################## + :method participant_result { -obj:object answerObj:object Index: openacs-4/packages/xowf/www/resources/test-item.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/www/resources/test-item.css,v diff -u -r1.1.2.14 -r1.1.2.15 --- openacs-4/packages/xowf/www/resources/test-item.css 8 Mar 2020 17:21:50 -0000 1.1.2.14 +++ openacs-4/packages/xowf/www/resources/test-item.css 21 Mar 2020 09:43:13 -0000 1.1.2.15 @@ -15,6 +15,11 @@ background: #FFdddd; color: black; } +div.single_exam div.runtime-data { + background: #efefef; + color: black; + padding: 4px 10px 4px 10px; +} @media print{ div {