Index: openacs-4/packages/xowf/xowf.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/xowf.info,v diff -u -r1.12.2.51 -r1.12.2.52 --- openacs-4/packages/xowf/xowf.info 16 Oct 2021 14:46:52 -0000 1.12.2.51 +++ openacs-4/packages/xowf/xowf.info 21 Oct 2021 08:54:21 -0000 1.12.2.52 @@ -10,16 +10,16 @@ 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.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.58 -r1.2.2.59 --- openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 16 Sep 2021 18:16:44 -0000 1.2.2.58 +++ openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 21 Oct 2021 08:54:22 -0000 1.2.2.59 @@ -187,6 +187,10 @@ Is the student allowed to use cut and paste in multiline text fields? Cut and Paste is allowed in multi-line text fields Cut and Paste is not allowed in multi-line text fields + Allow spellcheck + Is the built-in spellcheck activated in multiline text fields? + Spellcheck is activated in multi-line text fields + Spellcheck is deactivated in multi-line text fields Show points Show student points during exam Show minutes 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.44 -r1.1.2.45 --- openacs-4/packages/xowf/lib/inclass-exam-answer.wf 27 Jul 2021 12:20:50 -0000 1.1.2.44 +++ openacs-4/packages/xowf/lib/inclass-exam-answer.wf 21 Oct 2021 08:54:22 -0000 1.1.2.45 @@ -287,12 +287,13 @@ ns_log notice "============ working_form_loader: set title -position $position -item_nr $item_nr " # - # Disallow paste if required + # Disallow spellcheck/paste if required # - if {![$parent_obj property allow_paste true]} { - ${:QM} disallow_paste $form_obj + foreach p {paste spellcheck} { + if {![$parent_obj property allow_$p true]} { + ${:QM} disallow_$p $form_obj + } } - #$form_obj lappend form_constraints {__item_nr:hidden} #ns_log notice "============ working_form_loader: [$form_obj serialize] " Index: openacs-4/packages/xowf/resources/prototypes/select_question.form.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/resources/prototypes/select_question.form.page,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/xowf/resources/prototypes/select_question.form.page 19 Oct 2021 12:17:23 -0000 1.1.2.2 +++ openacs-4/packages/xowf/resources/prototypes/select_question.form.page 21 Oct 2021 08:54:22 -0000 1.1.2.3 @@ -8,7 +8,7 @@ @question@

#xowf.Detail_configuration#

- @shuffle_items@ @max_items@ @allow_paste@ @show_minutes@ @show_points@ @show_ip@ @time_budget@ + @shuffle_items@ @max_items@ @allow_paste@ @allow_spellcheck@ @show_minutes@ @show_points@ @show_ip@ @time_budget@

@synchronized@ @time_window@ @@ -27,6 +27,7 @@ {shuffle_items:boolean,horizontal=true,label=#xowf.randomized_items#,help_text=#xowf.randomized_items_help_text#} {max_items:number,min=1,label=#xowf.Max_items#,help_text=#xowf.Max_items_help_text#} {allow_paste:boolean,horizontal=true,default=t,label=#xowf.Allow_paste#,help_text=#xowf.Allow_paste_help_text#} + {allow_spellcheck:boolean,horizontal=true,default=t,label=#xowf.Allow_spellcheck#,help_text=#xowf.Allow_spellcheck_help_text#} {show_minutes:boolean,horizontal=true,default=t,label=#xowf.Show_minutes#,help_text=#xowf.Show_minutes_help_text#} {show_points:boolean,horizontal=true,default=t,label=#xowf.Show_points#,help_text=#xowf.Show_points_help_text#} {show_ip:boolean,horizontal=true,default=t,label=#xowf.Show_IP#,help_text=#xowf.Show_IP_help_text#} 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.165 -r1.7.2.166 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 18 Oct 2021 13:18:14 -0000 1.7.2.165 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 21 Oct 2021 08:54:23 -0000 1.7.2.166 @@ -4215,19 +4215,19 @@ #---------------------------------------------------------------------- # Class: Question_manager - # Method: disallow_paste + # Method: disable_text_field_feature #---------------------------------------------------------------------- - :public method disallow_paste {form_obj:object} { + :method disable_text_field_feature {form_obj:object feature} { # # This function changes the form_constraints of the provided - # form object by adding "paste=false" properties to textarea or + # form object by adding "$feature=false" properties to textarea or # text_fields entries. # set fc {} foreach e [$form_obj property form_constraints] { if {[regexp {^[^:]+_:(textarea|text_fields)} $e]} { - #ns_log notice "======= turn paste off" - append e , paste=false + #ns_log notice "======= turn $feature off" + append e , $feature=false } lappend fc $e } @@ -4236,6 +4236,31 @@ #---------------------------------------------------------------------- # Class: Question_manager + # Method: disallow_paste + #---------------------------------------------------------------------- + :public method disallow_paste {form_obj:object} { + # + # This function changes the form_constraints of the provided + # form object by adding "paste=false" properties to textarea or + # text_fields entries. + :disable_text_field_feature $form_obj paste + } + + #---------------------------------------------------------------------- + # Class: Question_manager + # Method: disallow_spellcheck + #---------------------------------------------------------------------- + :public method disallow_spellcheck {form_obj:object} { + # + # This function changes the form_constraints of the provided + # form object by adding "spellcheck=false" properties to textarea or + # text_fields entries. + # + :disable_text_field_feature $form_obj spellcheck + } + + #---------------------------------------------------------------------- + # Class: Question_manager # Method: add_to_fc #---------------------------------------------------------------------- :method add_to_fc {-fc:required -position -minutes -points} { @@ -4770,6 +4795,7 @@ set allow_paste [$obj property allow_paste 1] set max_items [$obj property max_items ""] set time_window [$obj property time_window ""] + set allow_spellcheck [$obj property allow_spellcheck true] append text [subst {

[expr {$synchronized ? "" : "Non-"}]Synchronized Exam @@ -4818,6 +4844,7 @@ [expr {$autograde ? "#xowf.exam_review_possible#" : "#xowf.exam_review_not_possible#"}]
[expr {$randomizationOk ? "#xowf.randomization_for_exam_ok#" : "#xowf.randomization_for_exam_not_ok#"}]
[expr {$allow_paste ? "#xowf.Cut_and_paste_allowed#" : "#xowf.Cut_and_paste_not_allowed#"}]
+ [expr {$allow_spellcheck ? "#xowf.Spellcheck_allowed#" : "#xowf.Spellcheck_not_allowed#"}]
$time_window_msg [expr {[llength $published_periods] > 0 ? "
#xowf.inclass-exam-open#: [join $published_periods {, }]
" : ""}] [expr {[llength $review_periods] > 0 ? "#xowf.inclass-exam-review#: [join $review_periods {, }]
" : ""}] Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -r1.180.2.73 -r1.180.2.74 --- openacs-4/packages/xowiki/xowiki.info 16 Oct 2021 14:45:39 -0000 1.180.2.73 +++ openacs-4/packages/xowiki/xowiki.info 21 Oct 2021 08:54:23 -0000 1.180.2.74 @@ -10,7 +10,7 @@ t xowiki - + Gustaf Neumann

A xotcl-based enterprise wiki system with multiple object types 2021-09-15 @@ -55,7 +55,7 @@ BSD-Style 2 - + Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.284.2.173 -r1.284.2.174 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 16 Oct 2021 14:45:39 -0000 1.284.2.173 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 21 Oct 2021 08:54:23 -0000 1.284.2.174 @@ -2985,6 +2985,7 @@ {rows 2} {cols 80} {spell false} + {spellcheck:boolean true} {autosave:boolean false} {paste:boolean true} } @@ -3024,6 +3025,7 @@ :render_disabled_as_div textarea } else { set booleanAtts [:booleanAttributes {*}${:booleanHTMLAttributes}] + set spellcheck ${:spellcheck} if {${:autosave}} { ::html::div -class "autosave" { ::html::div -id ${:id}-status \ @@ -3034,7 +3036,7 @@ ::html::t "" ;#"no change" } ::html::textarea [:get_attributes id name cols rows style wrap placeholder \ - data-repeat-template-id {CSSclass class} \ + data-repeat-template-id {CSSclass class} spellcheck \ {*}$booleanAtts] { ::html::t [:value] } @@ -4586,6 +4588,7 @@ Class create text_fields -superclass {CompoundField ShuffleField} -parameter { {descriptions ""} {paste:boolean true} + {spellcheck:boolean true} {substvalues} } -ad_doc { @@ -4642,6 +4645,9 @@ if {!${:paste}} { dict set field_fc_dict paste false } + if {!${:spellcheck}} { + dict set field_fc_dict spellcheck false + } } number { set type numeric; dict set field_fc_dict keep_string_rep 1 } file_upload { set type file }