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 -N -r1.7.2.222 -r1.7.2.223 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 15 Mar 2022 11:56:49 -0000 1.7.2.222 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 20 Mar 2022 19:47:19 -0000 1.7.2.223 @@ -1626,6 +1626,7 @@ # # - create_workflow # - delete_all_answer_data + # - allow_answering # - get_answer_wf # - get_wf_instances # - get_answer_attributes @@ -2016,8 +2017,27 @@ -forms [$obj property wfName]] } + #---------------------------------------------------------------------- # Class: Answer_manager + # Method: allow_answering + #---------------------------------------------------------------------- + :public method allow_answering {-examwf:object -ip:required} { + set iprange [$examwf property iprange] + set iprangeObj ::xowf::iprange::$iprange + if {$iprange ne "all" + && (![nsf::is object $iprangeObj] + || ![$iprangeObj allow_access $ip] + )} { + ns_log notice "ANSWER: [list $iprangeObj allow_access $ip] ->" \ + [$iprangeObj allow_access $ip] + return 0 + } + return 1 + } + + #---------------------------------------------------------------------- + # Class: Answer_manager # Method: get_wf_instances #---------------------------------------------------------------------- :public method get_wf_instances { @@ -6363,7 +6383,7 @@ -id config-security \ -form_constraints $fcrepo \ -obj $obj { - proctoring proctoring_options proctoring_record signature + proctoring proctoring_options proctoring_record signature iprange }] \ [:exam_configuration_render_fields -modifiable $modifiable \ [$obj create_form_fields_from_names -lookup -set_values \