Index: openacs-4/packages/proctoring-support/lib/proctored-page.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/lib/Attic/proctored-page.adp,v diff -u -N -r1.1.2.11 -r1.1.2.12 --- openacs-4/packages/proctoring-support/lib/proctored-page.adp 22 Oct 2020 14:22:20 -0000 1.1.2.11 +++ openacs-4/packages/proctoring-support/lib/proctored-page.adp 21 Nov 2021 20:26:06 -0000 1.1.2.12 @@ -131,6 +131,7 @@ var microphoneTooLowMessage = "@msg.microphone_too_low;noquote@"; var isMobile = @mobile_p;literal@; var checkActive = @check_active_p;literal@; + var record_p = @record_p;literal@; var nextLabel = "#acs-kernel.common_Next#"; var submitLabel = "#proctoring-support.wizard_finish#"; var acceptLabel = "#proctoring-support.accept#"; Index: openacs-4/packages/proctoring-support/lib/proctored-page.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/lib/Attic/proctored-page.tcl,v diff -u -N -r1.1.2.10 -r1.1.2.11 --- openacs-4/packages/proctoring-support/lib/proctored-page.tcl 14 Jun 2021 15:35:18 -0000 1.1.2.10 +++ openacs-4/packages/proctoring-support/lib/proctored-page.tcl 21 Nov 2021 20:26:06 -0000 1.1.2.11 @@ -64,6 +64,10 @@ proctoring will happen), 'proctoring_banner' (message in the red proctoring banner). Any of those fields can be omitted and will default to message keys in this package. + @param record_p should requested proctoring content (audio, images) be + recorded (default true). This flag is useful to turn off + recording of proctored content for e.g. mock exams to avoid + privacy issues. } { object_url:localurl object_id:naturalnum,notnull @@ -80,6 +84,7 @@ {examination_statement_p:boolean true} {examination_statement_url:localurl "/proctoring/examination-statement-accept"} {upload_p:boolean true} + {record_p:boolean true} {upload_url:localurl "/proctoring/upload"} msg:array,optional } @@ -128,8 +133,9 @@ set audio_p [expr {$audio_p ? true : false}] set camera_p [expr {$camera_p ? true : false}] set desktop_p [expr {$desktop_p ? true : false}] +set record_p [expr {$record_p ? true : false}] -#ns_log notice "PROCTORED PAGE sees desktop_p $desktop_p, camera_p $camera_p, examination_statement_p $examination_statement_p preview_p $preview_p" +#ns_log notice "PROCTORED PAGE sees desktop_p $desktop_p, camera_p $camera_p, examination_statement_p $examination_statement_p preview_p $preview_p record_p $record_p" # # Local variables: Index: openacs-4/packages/proctoring-support/lib/proctoring-upload.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/lib/Attic/proctoring-upload.tcl,v diff -u -N -r1.1.2.7 -r1.1.2.8 --- openacs-4/packages/proctoring-support/lib/proctoring-upload.tcl 27 Apr 2021 14:28:48 -0000 1.1.2.7 +++ openacs-4/packages/proctoring-support/lib/proctoring-upload.tcl 21 Nov 2021 20:26:07 -0000 1.1.2.8 @@ -27,75 +27,87 @@ file.tmpfile {notify_p:boolean false} {check_active_p:boolean true} + {record_p:boolean true} } -auth::require_login +ns_log notice "LIB PROCTORING_UPLOAD called with record_p $record_p, notify_p $notify_p" -set user_id [ad_conn user_id] +if {!$record_p} { + ad_file delete ${file.tmpfile} + ns_log notice "proctoring-support: do not save uploaded content" -set proctoring_dir [::proctoring::folder \ - -object_id $object_id -user_id $user_id] - -if {$type eq "audio"} { - # set mime_type [exec [util::which file] --mime-type -b ${file.tmpfile}] - set mime_type video/webm } else { - set mime_type [ns_imgmime ${file.tmpfile}] -} -if {($type eq "image" && ![regexp {^image/(.*)$} $mime_type m extension]) || - ($type eq "audio" && ![regexp {^video/(.*)$} $mime_type m extension]) -} { - ns_log warning "Proctoring: user $user_id uploaded a non-$type ($mime_type) file for object $object_id" - ns_return 500 text/plain "KO" - ad_script_abort -} elseif {$check_active_p && ![::proctoring::active_p -object_id $object_id]} { - ns_return 200 text/plain "OFF" - ad_script_abort -} + auth::require_login -# A client-side timeout might still end up being processed by the -# server. Here we make sure we do not process files twice for a -# specific user. -if {[::proctoring::file_already_received_p \ - -object_id $object_id \ - -user_id $user_id \ - -file ${file.tmpfile}]} { - # We do not tell anything to the client: for what they are - # concerned, file has been received and they should go on with - # their lives. - ns_log warning "Proctoring: user $user_id tried to upload content twice, skipping silently..." - ns_return 200 text/plain OK - ad_script_abort -} + set user_id [ad_conn user_id] -set timestamp [clock seconds] -set file_path $proctoring_dir/${name}-${type}-$timestamp.$extension + set proctoring_dir [::proctoring::folder \ + -object_id $object_id -user_id $user_id] -file mkdir -- $proctoring_dir -file rename -force -- ${file.tmpfile} $file_path + if {$type eq "audio"} { + # set mime_type [exec [util::which file] --mime-type -b ${file.tmpfile}] + set mime_type video/webm + } else { + set mime_type [ns_imgmime ${file.tmpfile}] + } + if {($type eq "image" && ![regexp {^image/(.*)$} $mime_type m extension]) || + ($type eq "audio" && ![regexp {^video/(.*)$} $mime_type m extension]) + } { + ns_log warning "Proctoring: user $user_id uploaded a non-$type ($mime_type) file for object $object_id" + ns_return 500 text/plain "KO" + ad_script_abort + } elseif {$check_active_p && ![::proctoring::active_p -object_id $object_id]} { + ns_return 200 text/plain "OFF" + ad_script_abort + } -# Notify a websocket about the upload so that e.g. a UI can be updated -# in real time. -if {$notify_p} { - set message [subst -nocommands { - { - "user_id": "$user_id", - "name": "$name", - "type": "$type", - "timestamp": "$timestamp", - "file": "$file_path" - } - }] + # A client-side timeout might still end up being processed by the + # server. Here we make sure we do not process files twice for a + # specific user. + if {[::proctoring::file_already_received_p \ + -object_id $object_id \ + -user_id $user_id \ + -file ${file.tmpfile}]} { + # We do not tell anything to the client: for what they are + # concerned, file has been received and they should go on with + # their lives. + ns_log warning "Proctoring: user $user_id tried to upload content twice, skipping silently..." + ns_return 200 text/plain OK + ad_script_abort + } - set message [::ws::build_msg $message] + set timestamp [clock seconds] + set file_path $proctoring_dir/${name}-${type}-$timestamp.$extension - set chat proctoring-${object_id} - #ns_log warning "Sending to chat $chat" - ::ws::multicast $chat $message + file mkdir -- $proctoring_dir + file rename -force -- ${file.tmpfile} $file_path - set chat proctoring-${object_id}-${user_id} - #ns_log warning "Sending to chat $chat" - ::ws::multicast $chat $message -} + # Notify a websocket about the upload so that e.g. a UI can be updated + # in real time. + if {$notify_p} { + if {[info commands "::ws::build_msg"] eq ""} { + ns_log warning "proctoring-upload: notify was requested, but websockets are NOT configured" + } else { + set message [subst -nocommands { + { + "user_id": "$user_id", + "name": "$name", + "type": "$type", + "timestamp": "$timestamp", + "file": "$file_path" + } + }] + set message [::ws::build_msg $message] + + set chat proctoring-${object_id} + #ns_log warning "Sending to chat $chat" + ::ws::multicast $chat $message + + set chat proctoring-${object_id}-${user_id} + #ns_log warning "Sending to chat $chat" + ::ws::multicast $chat $message + } + } +} ns_return 200 text/plain OK Index: openacs-4/packages/proctoring-support/www/upload.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/www/Attic/upload.adp,v diff -u -N -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/proctoring-support/www/upload.adp 27 Apr 2021 14:28:48 -0000 1.1.2.3 +++ openacs-4/packages/proctoring-support/www/upload.adp 21 Nov 2021 20:26:07 -0000 1.1.2.4 @@ -6,4 +6,5 @@ &="object_id" &="check_active_p" &="notify_p" + &="record_p" > Index: openacs-4/packages/proctoring-support/www/upload.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/www/Attic/upload.tcl,v diff -u -N -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/proctoring-support/www/upload.tcl 27 Apr 2021 14:28:48 -0000 1.1.2.3 +++ openacs-4/packages/proctoring-support/www/upload.tcl 21 Nov 2021 20:26:07 -0000 1.1.2.4 @@ -7,5 +7,7 @@ file file.tmpfile {check_active_p:boolean true} - {notify_p:boolean true} + {notify_p:boolean false} + {record_p:boolean true} } +#ns_log notice "UPLOAD called with notify_p $notify_p record_p $record_p" Index: openacs-4/packages/proctoring-support/www/resources/proctored-page.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/www/resources/Attic/proctored-page.js,v diff -u -N -r1.1.2.21 -r1.1.2.22 --- openacs-4/packages/proctoring-support/www/resources/proctored-page.js 27 Apr 2021 10:30:39 -0000 1.1.2.21 +++ openacs-4/packages/proctoring-support/www/resources/proctored-page.js 21 Nov 2021 20:26:07 -0000 1.1.2.22 @@ -109,6 +109,7 @@ formData.append("object_id", objectId); formData.append("file", blob); formData.append("check_active_p", checkActive); + formData.append("record_p", record_p); uploadQueue.push(formData); } Index: openacs-4/packages/xowf/xowf.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/xowf.info,v diff -u -N -r1.12.2.58 -r1.12.2.59 --- openacs-4/packages/xowf/xowf.info 19 Nov 2021 11:43:53 -0000 1.12.2.58 +++ openacs-4/packages/xowf/xowf.info 21 Nov 2021 20:26:05 -0000 1.12.2.59 @@ -10,15 +10,15 @@ t xowf - + Gustaf Neumann XoWiki Content Flow - an XoWiki based workflow system implementing state-based behavior of wiki pages and forms 2021-09-15 WU Vienna BSD-Style 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 -N -r1.2.2.61 -r1.2.2.62 --- openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 19 Nov 2021 09:42:19 -0000 1.2.2.61 +++ openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 21 Nov 2021 20:26:06 -0000 1.2.2.62 @@ -109,7 +109,7 @@ Quiz ... Abgabe der Pr�fung - Submit exam. Exam cannot be modified afterwards. + Pr�fung abgeben. Diese kann danach nicht mehr bearbeitet werden. Ihre Pr�fung ist abgegeben und gespeichert. W�hlen Sie Fragen mittels Drag & Drop aus @@ -215,6 +215,8 @@ Sicherheit Optionen f�r Online-Beaufsichtigung Detailangaben, welche Funktionen der Online-Beaufsichtigung genutzt werden sollen + Aufnahmen speichern + Speichere die Aufnahmen der Teilnehmer Vorschau Frage markieren 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 -N -r1.2.2.67 -r1.2.2.68 --- openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 19 Nov 2021 09:42:20 -0000 1.2.2.67 +++ openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 21 Nov 2021 20:26:06 -0000 1.2.2.68 @@ -239,6 +239,8 @@ Security Proctoring Options Options to tailor proctoring behavior + Record proctoring + Record proctoring (images and audio files of participants) Preview Flag this Question Index: openacs-4/packages/xowf/lib/inclass-exam.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/Attic/inclass-exam.wf,v diff -u -N -r1.1.2.82 -r1.1.2.83 --- openacs-4/packages/xowf/lib/inclass-exam.wf 15 Nov 2021 17:02:37 -0000 1.1.2.82 +++ openacs-4/packages/xowf/lib/inclass-exam.wf 21 Nov 2021 20:26:06 -0000 1.1.2.83 @@ -296,7 +296,6 @@ if {$state in {published done submission_review} || [llength $answers] > 0 } { if {$state eq "done"} { - [$ctx object] setCSSDefaults set marked [xowf::test_item::answer_manager marked_results -obj $obj -wf $wf $combined_form_info] set marked "" ;# not needed right now } @@ -577,8 +576,10 @@ set proctoring [:property proctoring] if {$proctoring ne "" && $proctoring} { set po [:property proctoring_options] + set record_p [:property proctoring_record true] set cLink [export_vars -base [:pretty_link] { - {m proctor} {link "[:pretty_link -query m=proctor-answer&proctoring_options=$po]"} + {m proctor} + {link "[:pretty_link -query m=proctor-answer&proctoring_options=$po&record_p=$record_p]"} }] ::${:package_id} returnredirect $cLink } else { @@ -655,6 +656,7 @@ set object_id ${:item_id} set object_url $link set examination_statement_p [expr {![string match *p.try_out_mode=1* $link]}] + set record_p [:property proctoring_record true] set proctoring_options [:property proctoring_options "d c a s"] foreach \ proctoring_parm {d c a s} \ @@ -675,6 +677,7 @@ desktop_p camera_p audio_p + record_p max_ms_interval examination_statement_p {check_active_p false} @@ -764,7 +767,7 @@ ns_return 200 text/plain ok ad_script_abort } - + #ns_log notice "==== object-specific inclass-exam [self] state ${:state} DONE" } Index: openacs-4/packages/xowf/resources/prototypes/select_question.form.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/resources/prototypes/Attic/select_question.form.page,v diff -u -N -r1.1.2.5 -r1.1.2.6 --- openacs-4/packages/xowf/resources/prototypes/select_question.form.page 15 Nov 2021 17:02:38 -0000 1.1.2.5 +++ openacs-4/packages/xowf/resources/prototypes/select_question.form.page 21 Nov 2021 20:26:06 -0000 1.1.2.6 @@ -16,6 +16,7 @@

@proctoring@ @proctoring_options@ + @proctoring_record@ @signature@
@@ -38,6 +39,7 @@ {signature:boolean,horizontal=true,default=f,label=#xowf.Signature#,help_text=#xowf.Signature_help_text#} {proctoring:boolean,horizontal=true,default=f,label=#xowf.Proctoring#,help_text=#xowf.Proctoring_help_text#} {proctoring_options:checkbox,horizontal=true,options={Desktop d} {Camera c} {Audio a} {Statement s},default=d c a s,label=#xowf.Proctoring_options#,help_text=#xowf.Proctoring_options_help_text#,swa?:disabled=1} + {proctoring_record:boolean,horizontal=true,default=t,label=#xowf.Proctoring_record#,help_text=#xowf.Proctoring_record_help_text#} _description:omit _page_order:omit }