Index: openacs-4/packages/proctoring-support/tcl/proctoring-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/tcl/Attic/proctoring-procs.tcl,v diff -u -N -r1.1.2.18 -r1.1.2.19 --- openacs-4/packages/proctoring-support/tcl/proctoring-procs.tcl 10 Feb 2022 16:31:03 -0000 1.1.2.18 +++ openacs-4/packages/proctoring-support/tcl/proctoring-procs.tcl 4 Mar 2022 09:55:28 -0000 1.1.2.19 @@ -272,23 +272,25 @@ @param object_id id of the proctored object @param user_id id of the user this artifact was created for - @param timestamp epoch in seconds. Defaults to clock seconds when - not specified + @param timestamp epoch in seconds. Defaults to current timestamp + when not specified, with microseconds resolution. @param name name of the source for this artifact (e.g. 'camera' or 'desktop') @param type type of artifact (e.g. 'image' or 'audio') @param file absolute path to the artifact file. The file will be moved inside of the proctoring folder, so this can be a tempfile from a request. - @return dict of fields 'artifact_id' and 'file'. File is the final - path of the file in the proctoring folder. + @return dict of fields 'artifact_id', 'timestamp' and + 'file'. Timestamp is the epoch of the artifact's creation, + File is the final path of the file in the proctoring + folder. } { if {![file exists $file]} { error "File does not exist" } if {![info exists timestamp]} { - set timestamp [clock seconds] + set timestamp [expr {[clock microseconds] / 1000000.0}] } set proctoring_dir [::proctoring::folder \ @@ -325,16 +327,18 @@ :type, :file_path ) - returning artifact_id + returning artifact_id, + extract(seconds from timestamp) as timestamp ) - select artifact_id from insert + select * from insert }] callback ::proctoring::callback::artifact::postprocess \ -artifact_id $artifact_id return [list \ artifact_id $artifact_id \ + timestamp $timestamp \ file $file_path] }