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.17 -r1.1.2.18
--- openacs-4/packages/xowf/lib/inclass-exam.wf 18 Apr 2020 16:16:15 -0000 1.1.2.17
+++ openacs-4/packages/xowf/lib/inclass-exam.wf 18 Apr 2020 16:58:34 -0000 1.1.2.18
@@ -462,8 +462,14 @@
set files [glob -nocomplain -path $proctoring_dir *.*]
ns_log notice "proctoring_dir $proctoring_dir files $files"
- set start_date [ns_set get [lindex $revisions 0] creation_date]
- set end_date [ns_set get [lindex $revisions end] creation_date]
+ if {$revision_id ne ""} {
+ set filtered_revisions [xowf::test_item::answer_manager revisions_up_to $revisions $revision_id]
+ } else {
+ set filtered_revisions $revisions
+ }
+
+ set start_date [ns_set get [lindex $filtered_revisions 0] creation_date]
+ set end_date [ns_set get [lindex $filtered_revisions end] creation_date]
set start_clock [clock scan [::xo::db::tcl_date $start_date tz_var]]
set end_clock [clock scan [::xo::db::tcl_date $end_date tz_var]]
foreach r $revisions {
@@ -481,7 +487,7 @@
$start_clock ([expr {$stamp >= $start_clock}]) \
&& $stamp <= $end_clock ([expr {$stamp <= $end_clock}])"
if {$inWindow} {
- dict set image $stamp $type $stamp
+ dict set image $stamp $type $ext
}
}
}
@@ -492,10 +498,12 @@
append markup {
}
foreach type {camera-image desktop-image} {
if {[dict exists $image $ts $type]} {
+ set ext [dict get $image $ts $type]
append markup [subst {
}]
}
}
if {[dict exists $image $ts camera-audio]} {
+ set ext [dict get $image $ts camera-audio]
append markup [subst {
\n
@@ -630,7 +638,7 @@
set proctoring_dir [acs_root_dir]/proctoring/$id/$user_id
set png_path $proctoring_dir/$type-$ts.$ext
#ns_log notice "image: $png_path"
- ns_returnfile 200 image/png $png_path
+ ns_returnfile 200 [ns_guesstype $ts.$ext] $png_path
ad_script_abort
}
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.47 -r1.7.2.48
--- openacs-4/packages/xowf/tcl/test-item-procs.tcl 18 Apr 2020 11:35:49 -0000 1.7.2.47
+++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 18 Apr 2020 16:58:34 -0000 1.7.2.48
@@ -1137,6 +1137,7 @@
# - marked_results
# - answers_panel
# - result_table
+ # - revisions_up_to
#
:public method create_workflow {
@@ -1335,7 +1336,12 @@
########################################################################
- :method revisions_up_to {revision_sets revision_id} {
+ :public method revisions_up_to {revision_sets revision_id} {
+ #
+ # Return the revisions of the provided revision set up the
+ # provided revision_id. If this revision_id does not exist,
+ # return the full set.
+ #
set result ""
set stop 0
return [lmap s $revision_sets {