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.18 -r1.2.2.19 --- openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 22 Mar 2020 13:48:54 -0000 1.2.2.18 +++ openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 22 Mar 2020 17:11:25 -0000 1.2.2.19 @@ -130,6 +130,9 @@ Dauer nicht abgegeben abgegeben - Status - + Status + Verwende angezeigte Version als Abgabe + Gehe zu dieser Version + Angezeigte Version + Abgabeversion 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.15 -r1.2.2.16 --- openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 22 Mar 2020 13:48:54 -0000 1.2.2.15 +++ openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 22 Mar 2020 17:11:25 -0000 1.2.2.16 @@ -150,5 +150,9 @@ Duration not submitted submitted - State + State + Use displayed revision as submission + Go to this revision + Displayed revision + Submission revision 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.36 -r1.7.2.37 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 22 Mar 2020 13:48:54 -0000 1.7.2.36 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 22 Mar 2020 17:11:25 -0000 1.7.2.37 @@ -1339,33 +1339,67 @@ # - per-revision statistics: when revision_id is provided # set revision_sets [$answerObj get_revision_sets] - set page_info "" if {$filter_id ne ""} { + set displayed_revision_info "" + set live_revision_info "" + set make_live_info "" + set page_info "" + set baseUrl [ns_conn url] set filtered_revision_sets [:revisions_up_to $revision_sets $revision_id] set c 0 + set item_id [$answerObj item_id] + set live_revision_id [xo::dc get_value -prepare integer live_revision_id { + select live_revision from cr_items where item_id = :item_id + }] + foreach s $revision_sets { set rid [ns_set get $s revision_id] + incr c + if {$rid == $live_revision_id} { + set liveCSSclass "live" + set live_revision_info "#xowf.Live_revision#: $c" + } else { + set liveCSSclass "other" + } set revision_url $baseUrl?[::xo::update_query [ns_conn query] rid $rid] if {$rid == [$answerObj revision_id]} { set suffix "*" - set CSSclass "current" - set current_item [expr {[dict get [$answerObj instance_attributes] position] + 1}] - set page_info "#xowf.question#: $current_item" + set current_question [expr {[dict get [$answerObj instance_attributes] position] + 1}] + set page_info "#xowf.question#: $current_question" + set displayed_revision_info "#xowf.Displayed_revision#: $c" + + if {$rid ne $live_revision_id} { + set query [::xo::update_query [ns_conn query] m make-live-revision] + set query [::xo::update_query $query revision_id $rid] + set query [::xo::update_query $query local_return_url [ad_return_url]] + set live_revision_link $baseUrl?$query + set make_live_info [subst { + #xowf.Make_live_revision# + }] + lappend revision_list "$c" + } else { + lappend revision_list "$c" + } } else { - set suffix "" - set CSSclass "other" + lappend revision_list [subst { + $c + }] } - lappend revision_list [subst {[incr c]$suffix}] } set revision_sets $filtered_revision_sets - set revisionDetails "#xowiki.revisions#: [join $revision_list {, }]" + set revisionDetails [subst {#xowiki.revisions#: [join $revision_list {, }] +
$displayed_revision_info
$live_revision_info
+ $make_live_info +
+ }] } else { set revisionDetails "#xowf.nr_changes#: [llength $revision_sets]" } set duration [xowf::test_item::answer_manager get_duration $revision_sets] set IPs [xowf::test_item::answer_manager get_IPs $revision_sets] + set state [$answerObj state] if {$state eq "done"} { set submission_info "#xowf.submitted#" @@ -1379,10 +1413,8 @@ ([dict get $duration duration])
IP: $IPs }] - return $HTML } - ######################################################################## :method participant_result { @@ -2039,6 +2071,7 @@ print-answer-table admin delete admin qrcode admin + make-live-revision admin } } test-item-policy-answer contains { 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.17 -r1.1.2.18 --- openacs-4/packages/xowf/www/resources/test-item.css 22 Mar 2020 13:48:54 -0000 1.1.2.17 +++ openacs-4/packages/xowf/www/resources/test-item.css 22 Mar 2020 17:11:25 -0000 1.1.2.18 @@ -23,9 +23,16 @@ div.single_exam div.runtime-data .data { color: #888; } -div.single_exam div.runtime-data a { +div.single_exam div.runtime-data a.other, +div.single_exam div.runtime-data a.live { color: #66f; } +div.single_exam div.runtime-data .right { + float: right; +} +div.single_exam div.runtime-data .revision-details { + text-align: right; +} @media print{ div {