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.20 -r1.2.2.21 --- openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 26 Mar 2020 09:57:26 -0000 1.2.2.20 +++ openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 1 Apr 2020 15:03:43 -0000 1.2.2.21 @@ -136,4 +136,7 @@ Angezeigte Version Abgabeversion L�sung + Online-Beaufsichtigung + Verwende f�r diese Pr�fung eine Online-Beaufsichtigung + 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.17 -r1.2.2.18 --- openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 26 Mar 2020 09:57:26 -0000 1.2.2.17 +++ openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 1 Apr 2020 15:03:43 -0000 1.2.2.18 @@ -156,4 +156,6 @@ Displayed revision Submission revision Solution + Proctoring + Use E-Proctoring for this exam Index: openacs-4/packages/xowf/lib/inclass-exam-answer.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/inclass-exam-answer.wf,v diff -u -r1.1.2.7 -r1.1.2.8 --- openacs-4/packages/xowf/lib/inclass-exam-answer.wf 25 Mar 2020 16:25:14 -0000 1.1.2.7 +++ openacs-4/packages/xowf/lib/inclass-exam-answer.wf 1 Apr 2020 15:03:43 -0000 1.1.2.8 @@ -27,6 +27,7 @@ Property position -default 0 Property return_url -default "" -allow_query_parameter true Property try_out_mode -default 0 -allow_query_parameter true +Property proctor -default 0 -allow_query_parameter true ######################################################################## # @@ -40,7 +41,7 @@ set parent_id [$obj parent_id] set name [ns_md5 $parent_id-[::xo::cc set untrusted_user_id]] set parent_obj [::xo::db::CrClass get_instance_from_db -item_id $parent_id] - :payload [list title [$parent_obj title] name $name] + :payload [list title [$parent_obj title] name $name parent_id [$parent_obj item_id]] } Action initialize -proc activate {obj} { @@ -281,6 +282,12 @@ #:msg set_title-set_parameter-MenuBar-[$obj state] ::xo::cc set_parameter MenuBar 0 ::xo::cc set_parameter template_file view-plain-master + + if {[$obj property proctor 0]} { + template::set_css_property -class header -property display -value none + template::set_css_property -class footer -property display -value none + template::set_css_property -class sidebar -property display -value none + } if {[$parent_obj state] eq "published" && [$obj state] ne "done"} { set target_time [::xowf::test_item::question_manager exam_target_time \ 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.10 -r1.1.2.11 --- openacs-4/packages/xowf/lib/inclass-exam.wf 25 Mar 2020 16:24:00 -0000 1.1.2.10 +++ openacs-4/packages/xowf/lib/inclass-exam.wf 1 Apr 2020 15:03:43 -0000 1.1.2.11 @@ -36,6 +36,7 @@ # The policy has to allow the following methods on FormPages: # # - "answer" (for students), +# - "proctor" (for students), # - "edit" (for students), # - "poll" (for teachers), # - "print-answers" (for teachers), @@ -141,6 +142,8 @@ #:log fullQuestionForm=$fullQuestionForm set text "

$title

" set menu "" + set proctoring [$obj property proctoring] + if {$proctoring eq ""} {set proctoring 0} set wf [xowf::test_item::answer_manager get_answer_wf $obj] if {$wf eq ""} { @@ -159,6 +162,20 @@ }] set aLink [$obj pretty_link -query m=answer] + if {$proctoring} { + # + # send link via "m=proctor" + # + set tLink [export_vars -base [$obj pretty_link] { + {m proctor} {link "$tLink&p.proctor=1"} + }] + # + # We could send answer link ("aLink") as well this way, but we + # want to keep the link short, therefore we handle the proctor + # link inside the www-answer method. + # + } + # # If there are answers, include the full menu. # @@ -456,7 +473,15 @@ util_user_message -html -message "Cannot start answer workflow in this state" } else { set wf [xowf::test_item::answer_manager get_answer_wf [self]] - $wf www-create-or-use -parent_id [:item_id] + set proctoring [:property proctoring] + if {$proctoring ne "" & $proctoring} { + set cLink [export_vars -base [:pretty_link] { + {m proctor} {link "[$wf pretty_link -query m=create-or-use&p.proctor=1]"} + }] + ::${:package_id} returnredirect $cLink + } else { + $wf www-create-or-use -parent_id [:item_id] + } } } @@ -468,6 +493,25 @@ ad_script_abort } + :proc www-proctor {} { + # + # Redirect the exam to an iframe for implementing proctoring. The + # basic idea is that the web application turns on the camera and + # keeps the iframe while the user is iterating throught the exam. + # The line "

You are being proctored!

" is just a + # placeholder and has to be replaced with real code. + # + set link [${:package_id} query_parameter link:localurl ""] + + ::xo::cc set_parameter template_file view-plain-master + ::xo::cc set_parameter MenuBar 0 + + return [:www-view [subst { +

You are being proctored!

+ + }]] + } + ######################################################################## # AJAX call "poll" # 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.41 -r1.7.2.42 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 26 Mar 2020 09:57:26 -0000 1.7.2.41 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 1 Apr 2020 15:03:43 -0000 1.7.2.42 @@ -2082,6 +2082,7 @@ test-item-policy-publish contains { Class create FormPage -array set require_permission { answer {{item_id read}} + proctor {{item_id read}} poll admin edit admin print-answers admin Index: openacs-4/packages/xowf/www/prototypes/select_question.form.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/www/prototypes/Attic/select_question.form.page,v diff -u -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/xowf/www/prototypes/select_question.form.page 8 Mar 2020 17:21:50 -0000 1.1.2.3 +++ openacs-4/packages/xowf/www/prototypes/select_question.form.page 1 Apr 2020 15:03:43 -0000 1.1.2.4 @@ -4,13 +4,14 @@ -title "Select Question" \ -anon_instances f \ -text {} \ - -form {{
@question@ @_nls_language@
} text/html} \ + -form {{
@question@ @shuffle_items@ @signature@ @proctoring@
} text/html} \ -form_constraints { @cr_fields:hidden {_title:text,label=#xowf.online-exam-name#,default=#xowf.online-exam-default_name#} {question:form_page,multiple=true,form=en:TestItemText.form|en:TestItemShortText.form|en:TestItemMC.form|en:TestItemSC.form|en:TestItemUpload.form|en:TestItemReorder.form,required,help_text=#xowf.select_question_help_text#,label=#xowiki.questions#} {shuffle_items:boolean,horizontal=true,label=#xowf.randomized_items#,help_text=#xowf.randomized_items_help_text#} - {signature:boolean,horizontal=true,default=f,label=#xowf.signature#,help_text=#xowf.signature-help_text#} + {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#} _description:omit _page_order:omit }