- @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 }