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.131 -r1.132 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 12 Feb 2009 15:07:15 -0000 1.131 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 14 Feb 2009 13:39:07 -0000 1.132 @@ -442,7 +442,7 @@ return $v } - FormField instproc value_if_nothing_is_returned_from_from {default} { + FormField instproc value_if_nothing_is_returned_from_form {default} { return $default } @@ -1326,7 +1326,7 @@ my set widget_type text(checkbox) next } - checkbox instproc value_if_nothing_is_returned_from_from {default} { + checkbox instproc value_if_nothing_is_returned_from_form {default} { return "" } checkbox instproc render_input {} { @@ -2093,7 +2093,7 @@ Class boolean -superclass radio -parameter { {default t} } - boolean instproc value_if_nothing_is_returned_from_from {default} { + boolean instproc value_if_nothing_is_returned_from_form {default} { return f } boolean instproc initialize {} { Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.333 -r1.334 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 13 Feb 2009 20:39:32 -0000 1.333 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 14 Feb 2009 13:39:07 -0000 1.334 @@ -170,6 +170,9 @@ time timestamp" ::xo::db::require index -table xowiki_tags -col user_id,item_id ::xo::db::require index -table xowiki_tags -col tag,package_id + ::xo::db::require index -table xowiki_tags -col user_id,package_id + ::xo::db::require index -table xowiki_tags -col package_id + ::xo::db::require index -table xowiki_page -col page_order \ -using [expr {[::xo::db::has_ltree] ? "gist" : ""}] Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.218 -r1.219 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 13 Feb 2009 22:42:23 -0000 1.218 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 14 Feb 2009 13:39:07 -0000 1.219 @@ -913,25 +913,28 @@ _* { # instance attribute fields set varname [string range $att 1 end] - set preset "" - if {[my exists $varname]} {set preset [my set $varname]} - set v [$f value_if_nothing_is_returned_from_from $preset] + set default "" + if {[my exists $varname]} {set default [my set $varname]} + set v [$f value_if_nothing_is_returned_from_form $default] set value [$f value $v] - if {$v ne $preset} { + if {$v ne $default} { if {![string match *.* $att]} {my set $varname $value} } } default { # user form content fields - set preset "" - if {[info exists __ia($att)]} {set preset $__ia($att)} - set v [$f value_if_nothing_is_returned_from_from $preset] + set default "" + # The reason, why we set in the next line the default to + # the old value is due to "show-solution" in the qti + # use-case. Maybe one should alter this use-case to + # simplify the semantics here. + if {[info exists __ia($att)]} {set default $__ia($att)} + set v [$f value_if_nothing_is_returned_from_form $default] + #my msg "value_if_nothing_is_returned_from_form '$default' => '$v' (type=[$f info class])" set value [$f value $v] - if {$v ne $preset} { - if {![string match *.* $att]} {set __ia($att) $value} - } + if {![string match *.* $att]} {set __ia($att) $value} } - } + } } #