Index: openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl,v diff -u -r1.11.2.1 -r1.11.2.2 --- openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl 18 Apr 2019 07:56:43 -0000 1.11.2.1 +++ openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl 4 Jul 2019 17:51:39 -0000 1.11.2.2 @@ -540,7 +540,7 @@ " \ -instproc render-data {line} { - set __name [:name] + set __name ${:name} if {[$line exists $__name.href] && [set href [$line set $__name.href]] ne ""} { # use the CSS class rather from the Field than not the line Index: openacs-4/packages/xowiki/tcl/chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/chat-procs.tcl,v diff -u -r1.54.2.13 -r1.54.2.14 --- openacs-4/packages/xowiki/tcl/chat-procs.tcl 3 Jul 2019 20:33:04 -0000 1.54.2.13 +++ openacs-4/packages/xowiki/tcl/chat-procs.tcl 4 Jul 2019 17:51:39 -0000 1.54.2.14 @@ -61,7 +61,7 @@ if {![nsv_exists ${:array}-color idx]} { ::xo::clusterwide nsv_set ${:array}-color idx 0 } - if {[:user_id] != 0 || [:session_id] != 0} { + if {${:user_id} != 0 || [:session_id] != 0} { :init_user_color } :set_options 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.18 -r1.284.2.19 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 4 Jul 2019 16:20:58 -0000 1.284.2.18 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 4 Jul 2019 17:51:39 -0000 1.284.2.19 @@ -383,7 +383,7 @@ FormField instproc asWidgetSpec {} { set spec ${:widget_type} - if {[info exists :spell]} {append spec ",[expr {[:spell] ? {} : {no}}]spell"} + if {[info exists :spell]} {append spec ",[expr {${:spell} ? {} : {no}}]spell"} if {![:required]} {append spec ",optional"} if {[info exists :editor]} {append spec " {options {editor ${:editor}}} "} @@ -1175,7 +1175,7 @@ } hidden instproc render_item {} { # don't render the labels - if {[info exists :sign] && [:sign]} { + if {[info exists :sign] && ${:sign}} { set token_id [sec_get_random_cached_token_id] set secret [ns_config "ns/server/[ns_info server]/acs" parametersecret ""] if {[info exists :max_age]} { @@ -1195,7 +1195,7 @@ } hidden instproc check=signature {value} { set v 1 - if {[info exists :sign] && [:sign]} { + if {[info exists :sign] && ${:sign}} { set sig [::xo::cc form_parameter __${:name}:sig] set secret [ns_config "ns/server/[ns_info server]/acs" parametersecret ""] set v [ad_verify_signature -secret $secret $value $sig] Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.239.2.13 -r1.239.2.14 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 24 Jun 2019 11:41:40 -0000 1.239.2.13 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 4 Jul 2019 17:51:39 -0000 1.239.2.14 @@ -3789,7 +3789,7 @@ ::xo::Page requireJS "/resources/xowiki/highcharts/js/highcharts.js" ::xo::Page requireJS "/resources/xowiki/highcharts/js/themes/gray.js" set result "
\n" - set title [:title] + set title ${:title} if {![info exists :id]} {set :id [::xowiki::Includelet html_id [self]]} set id [:id] set values [list] Index: openacs-4/packages/xowiki/tcl/repeat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/repeat-procs.tcl,v diff -u -r1.14.2.5 -r1.14.2.6 --- openacs-4/packages/xowiki/tcl/repeat-procs.tcl 8 May 2019 14:33:40 -0000 1.14.2.5 +++ openacs-4/packages/xowiki/tcl/repeat-procs.tcl 4 Jul 2019 17:51:39 -0000 1.14.2.6 @@ -176,7 +176,7 @@ set values [:value] :trim_values set r [next] - #:msg name=[:name],value=[:get_compound_value] + #:msg name=${:name},value=[:get_compound_value] # # remove "unneeded" entries from instance attributes Index: openacs-4/packages/xowiki/tcl/syndicate-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/syndicate-procs.tcl,v diff -u -r1.51.2.5 -r1.51.2.6 --- openacs-4/packages/xowiki/tcl/syndicate-procs.tcl 17 Jun 2019 10:20:51 -0000 1.51.2.5 +++ openacs-4/packages/xowiki/tcl/syndicate-procs.tcl 4 Jul 2019 17:51:39 -0000 1.51.2.6 @@ -272,7 +272,7 @@ set last_user "" set last_item "" set last_clock "" - if {[info exists :user_id]} { append where_clause " and o.creation_user = [:user_id] " } + if {[info exists :user_id]} { append where_clause " and o.creation_user = ${:user_id} " } if {[info exists :limit]} { set limit [:limit] } ::xo::OrderedComposite items -destroy_on_cleanup Index: openacs-4/packages/xowiki/tcl/weblog-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/weblog-procs.tcl,v diff -u -r1.75.2.10 -r1.75.2.11 --- openacs-4/packages/xowiki/tcl/weblog-procs.tcl 28 Jun 2019 10:30:27 -0000 1.75.2.10 +++ openacs-4/packages/xowiki/tcl/weblog-procs.tcl 4 Jul 2019 17:51:39 -0000 1.75.2.11 @@ -252,14 +252,14 @@ set p [::xo::db::CrClass get_instance_from_db -item_id 0 -revision_id $revision_id] # in cases, the revision was created already earlier, drop the mixins if {[$p info mixin] ne ""} {$p mixin {}} - if {[info exists :entry_flag]} {$p set [:entry_flag] 1} + if {[info exists :entry_flag]} {$p set ${:entry_flag} 1} if {[:no_footer]} {$p set __no_footer 1} ad_try { $p set description [$p render -with_footer false] } on error {errorMsg} { $p set description "Render Error ($errorMsg) $revision_id $name $title" } - if {[info exists :entry_flag]} {$p unset [:entry_flag]} + if {[info exists :entry_flag]} {$p unset ${:entry_flag}} #:log "--W $p render (mixins=[$p info mixin]) => $description" } $p set pretty_date $pretty_date 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.542.2.30 -r1.542.2.31 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 3 Jul 2019 19:57:46 -0000 1.542.2.30 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 4 Jul 2019 17:51:39 -0000 1.542.2.31 @@ -752,19 +752,19 @@ # associative list (attribute/value pairs) for form-field attributes. # #foreach f $form_fields {lappend fns [list [$f name] [$f info class]]} - #:msg "page [:name] build_instance_attribute_map $fns" + #:msg "page ${:name} build_instance_attribute_map $fns" if {![info exists :__instance_attribute_map]} { set :__instance_attribute_map [dict create] } foreach f $form_fields { set multiple [expr {[$f exists multiple] ? [$f set multiple] : 0}] #:msg "$f [$f name] cat_tree [$f exists category_tree] is fc: [$f exists is_category_field]" if {[$f exists category_tree] && [$f exists is_category_field]} { - #:msg "page [:name] field [$f name] is a category_id from [$f category_tree]" + #:msg "page ${:name} field [$f name] is a category_id from [$f category_tree]" dict set :__instance_attribute_map [$f name] [list category [$f category_tree] $multiple] :category_export [$f category_tree] } elseif {[$f exists is_party_id]} { - #:msg "page [:name] field [$f name] is a party_id" + #:msg "page ${:name} field [$f name] is a party_id" dict set :__instance_attribute_map [$f name] [list party_id $multiple] } elseif {[$f istype "::xowiki::formfield::file"]} { dict set :__instance_attribute_map [$f name] [list file 0] @@ -877,7 +877,7 @@ # method. # if {[info exists :__instance_attribute_map]} { - # :log "+++ we have an instance_attribute_map for [:name]" + # :log "+++ we have an instance_attribute_map for ${:name}" # :log "+++ starting with instance_attributes [:instance_attributes]" array set multiple_index [list category 2 party_id 1 file 1] set ia [list] @@ -1018,22 +1018,22 @@ # default value if {![info exists :page_order]} {set :page_order ""} set is_folder_page [:is_folder_page] - #:msg "is-folder-page [:name] => $is_folder_page" + #:msg "is-folder-page ${:name} => $is_folder_page" if {$is_folder_page} { # reset names if necessary (e.g. import from old releases) set :name [:build_name] } else { # Check, if nls_language and lang are aligned. - if {[regexp {^(..):} [:name] _ lang]} { + if {[regexp {^(..):} ${:name} _ lang]} { if {[string range [:nls_language] 0 1] ne $lang} { set old_nls_language [:nls_language] :nls_language [:get_nls_language_from_lang $lang] - ns_log notice "nls_language for item [:name] set from $old_nls_language to [:nls_language]" + ns_log notice "nls_language for item ${:name} set from $old_nls_language to [:nls_language]" } } } # in the general case, no more actions required - #:msg "demarshall [:name] DONE" + #:msg "demarshall ${:name} DONE" } File instproc demarshall {args} { @@ -1090,7 +1090,7 @@ # mapped here again to internal representations :upvar $category_ids_name category_ids if {[info exists ::__xowiki_reverse_category_map($value)]} { - #:msg "map value '$value' (category tree: $use($name)) of [:name] to an ID" + #:msg "map value '$value' (category tree: $use($name)) of ${:name} to an ID" lappend category_ids $::__xowiki_reverse_category_map($value) return $::__xowiki_reverse_category_map($value) } elseif {$map_type eq "party_id"} { @@ -1102,7 +1102,7 @@ return "" } else { :msg "cannot map value '$value' (map_type $map_type)\ - of [:name] to an ID; maybe there is some\ + of ${:name} to an ID; maybe there is some\ same_named category tree with fewer entries..." :msg "reverse category map has values [lsort [array names ::__xowiki_reverse_category_map]]" return "" @@ -1117,7 +1117,7 @@ # to categorize this objects in the source instance. set category_ids [list] - #:msg "[:name] check cm=[info exists ::__xowiki_reverse_category_map] && iam=[info exists :__instance_attribute_map]" + #:msg "${:name} check cm=[info exists ::__xowiki_reverse_category_map] && iam=[info exists :__instance_attribute_map]" if {[info exists ::__xowiki_reverse_category_map] && [info exists :__instance_attribute_map] @@ -1152,7 +1152,7 @@ } } set :instance_attributes $ia - #:msg "[:name] saving instance_attributes $ia" + #:msg "${:name} saving instance_attributes $ia" } set r [next] set :__category_ids [lsort -unique $category_ids] @@ -1355,7 +1355,7 @@ return 0 } FormPage instproc is_folder_page {{-include_folder_links true}} { - set page_template_name [[:page_template] name] + set page_template_name [${:page_template} name] if {$page_template_name eq "en:folder.form"} {return 1} if {$include_folder_links && $page_template_name eq "en:link.form"} { set link_type [:get_property_from_link_page link_type] @@ -1969,7 +1969,7 @@ if {$page_name ne ""} { set page [::${:package_id} resolve_page_name_and_init_context -lang [:lang] $page_name] if {$page eq ""} { - error "Cannot find page '$page_name' to be included in page '[:name]'" + error "Cannot find page '$page_name' to be included in page '${:name}'" } } else { set page [self] @@ -2275,7 +2275,7 @@ # return the pretty_link for the current page ${:package_id} pretty_link -parent_id ${:parent_id} \ -anchor $anchor -query $query -absolute $absolute -siteurl $siteurl \ - -lang $lang -download $download -page [self] [:name] + -lang $lang -download $download -page [self] ${:name} } Page instproc detail_link {} { @@ -2391,7 +2391,7 @@ [dict get $link_info link]] } #ns_log notice "link_info $link_info" - #ns_log notice "--L link <$arg> lang [:lang] CURRENT [:name] nls_lang ${:nls_language} -> item_ref_info $item_ref_info" + #ns_log notice "--L link <$arg> lang [:lang] CURRENT ${:name} nls_lang ${:nls_language} -> item_ref_info $item_ref_info" #:log "link '[dict get $link_info link]' package_id $package_id ${:package_id} => [array get {}]" @@ -2445,7 +2445,7 @@ if {[info exists object_type]} { next } else { - set template_id [:page_template] + set template_id ${:page_template} if {![info exists parent_id]} { set parent_id [::$page_package_id folder_id] } @@ -2559,7 +2559,7 @@ # The provided content and the returned result are strings # containing HTML. # - #:msg "--adp_subst in [:name] vars=[:info vars]" + #:msg "--adp_subst in ${:name} vars=[:info vars]" foreach __v [:info vars] { if {[info exists $__v]} continue #ns_log notice "import instvar $__v into current scope" @@ -2842,7 +2842,7 @@ } # unset -nocomplain :__references # - #:log "Page [:name] render with_footer $with_footer - [ns_conn isconnected] - [catch {ns_conn content}]" + #:log "Page ${:name} render with_footer $with_footer - [ns_conn isconnected] - [catch {ns_conn content}]" # # handle footer # @@ -2926,7 +2926,7 @@ # Page instproc notification_detail_link {} { set link [:pretty_link -absolute 1] - append html "

For more details, see [ns_quotehtml [:title]]

" + append html "

For more details, see [ns_quotehtml ${:title}]

" append text "\nFor more details, see $link ...\n" return [list html $html text $text] } @@ -2938,9 +2938,9 @@ # Page instproc notification_subject {-instance_name {-category_label ""} -state} { if {$category_label eq ""} { - return "\[$instance_name\]: [:title] ($state)" + return "\[$instance_name\]: ${:title} ($state)" } else { - return "\[$instance_name\] $category_label: [:title] ($state)" + return "\[$instance_name\] $category_label: ${:title} ($state)" } } @@ -3210,7 +3210,7 @@ if {$source_item_id ne ""} { set source [FormPage get_instance_from_db -item_id $source_item_id] $f copy_content_vars -from_object $source - set name "[::xowiki::autoname new -parent_id $source_item_id -name [:name]]" + set name "[::xowiki::autoname new -parent_id $source_item_id -name ${:name}]" ::$package_id get_lang_and_name -name $name lang name $f set name $name #:msg nls=[$f nls_language],source-nls=[$source nls_language] @@ -3220,7 +3220,7 @@ } # Finally provide base for auto-titles - $f set __title_prefix [:title] + $f set __title_prefix ${:title} return $f } @@ -3540,7 +3540,7 @@ set name "" } - return [append name [::xowiki::utility formCSSclass [:name]]] + return [append name [::xowiki::utility formCSSclass ${:name}]] } # @@ -3585,7 +3585,7 @@ PageInstance instproc get_short_spec {name} { #set form_constraints [:get_from_template form_constraints] set form_constraints [:get_form_constraints] - #:msg "fc of [self] [:name] = $form_constraints" + #:msg "fc of [self] ${:name} = $form_constraints" if {$form_constraints ne ""} { set s [::xowiki::PageInstance get_short_spec_from_form_constraints \ -name $name -form_constraints $form_constraints] @@ -3643,7 +3643,7 @@ } PageInstance instproc get_template_object {} { - set id [:page_template] + set id ${:page_template} if {![:isobject ::$id]} { ::xo::db::CrClass get_instance_from_db -item_id $id } @@ -3689,7 +3689,7 @@ # The resulting page should be either a Form (PageTemplate) or # a FormPage (PageInstance) # - #:msg "parent of self [:name] is [$form_obj name] type [$form_obj info class]" + #:msg "parent of self ${:name} is [$form_obj name] type [$form_obj info class]" # # If it is as well a PageInstance, we find the information in the # properties of this page. Note that we cannot distinguish here between @@ -3731,7 +3731,7 @@ PageInstance instproc render_content {} { set html [:get_html_from_content [:get_from_template text]] set html [:adp_subst $html] - return "
[:substitute_markup $html]
" + return "
[:substitute_markup $html]
" } PageInstance instproc template_vars {content} { set result [list] @@ -3953,9 +3953,9 @@ # Methods of ::xowiki::FormPage # FormPage instproc initialize_loaded_object {} { - #:msg "[:name] [:info class]" + #:msg "${:name} [:info class]" if {[info exists :page_template]} { - set p [::xo::db::CrClass get_instance_from_db -item_id [:page_template]] + set p [::xo::db::CrClass get_instance_from_db -item_id ${:page_template}] # # The Form might come from a different package type (e.g. a # workflow) make sure, the source package is available. @@ -4513,9 +4513,9 @@ set is_form [:property is_form__ 0] if {[:is_form]} { return [:include [list form-menu -form_item_id ${:item_id} \ - -buttons [list new answers [list form [:page_template]]]]] + -buttons [list new answers [list form ${:page_template}]]]] } else { - return [:include [list form-menu -form_item_id [:page_template] -buttons form]] + return [:include [list form-menu -form_item_id ${:page_template} -buttons form]] } } } @@ -4574,7 +4574,7 @@ } FormPage instproc render_icon {} { - set page_template [:page_template] + set page_template ${:page_template} if {[$page_template istype ::xowiki::FormPage]} { return [list text [$page_template property icon_markup] is_richtext true] } @@ -4597,19 +4597,19 @@ } Page instproc pretty_name {} { - return [:name] + return ${:name} } FormPage instproc pretty_name {} { set anon_instances [:get_from_template anon_instances f] if {$anon_instances} { - return [:title] + return ${:title} } - return [:name] + return ${:name} } File instproc pretty_name {} { - set name [:name] + set name ${:name} regsub {^file:} $name "" name return $name } @@ -4742,7 +4742,7 @@ # page. Since the group_names are global, the group name contains # the parent_id of the FormPage. # - set group_name "fpg-${:parent_id}-[:name]" + set group_name "fpg-${:parent_id}-${:name}" set group_id [group::get_id -group_name $group_name] if {$group_id eq ""} { # group::new does not flush the cache - sigh! Therefore we have 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.368.2.26 -r1.368.2.27 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 2 Jul 2019 11:10:37 -0000 1.368.2.26 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 4 Jul 2019 17:51:39 -0000 1.368.2.27 @@ -471,10 +471,10 @@ || "::xowiki::PageTemplate" ni [::$item_id info precedence]} { error "OK $formName is not suited to be used as template. Should be a Form!" } - if {[:page_template] == $item_id} { + if {${:page_template} == $item_id} { :msg "old page_template $item_id is already the same as the new one" } else { - set msg "change template_id [:page_template] to $item_id" + set msg "change template_id ${:page_template} to $item_id" :page_template $item_id :save #:msg "ok $msg" @@ -1443,7 +1443,7 @@ # "ad_html_text_convert" in Page.get_description tend to use # forever (at least in Tcl 8.5) # - set :description "form-usages for ${:name} [:title]" + set :description "form-usages for ${:name} ${:title}" return [:www-view [:include [list form-usages -form_item_id ${:item_id}]]] } Index: openacs-4/packages/xowiki/tcl/yui-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/yui-procs.tcl,v diff -u -r1.16.2.1 -r1.16.2.2 --- openacs-4/packages/xowiki/tcl/yui-procs.tcl 28 Jun 2019 10:30:28 -0000 1.16.2.1 +++ openacs-4/packages/xowiki/tcl/yui-procs.tcl 4 Jul 2019 17:51:39 -0000 1.16.2.2 @@ -443,9 +443,9 @@ " \ -instproc get-slots {} { - set slots [list -[:name]] + set slots [list -${:name}] foreach subfield {href title CSSclass target onclick} { - lappend slots [list -[:name].$subfield ""] + lappend slots [list -${:name}.$subfield ""] } return $slots } @@ -593,7 +593,7 @@ " \ -instproc render-data {line} { - set __name [:name] + set __name ${:name} if {[$line exists $__name.href] && [set href [$line set $__name.href]] ne ""} { # use the CSS class rather from the Field than not the line Index: openacs-4/packages/xowf/lib/clicker-answer.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/clicker-answer.wf,v diff -u -r1.1 -r1.1.6.1 --- openacs-4/packages/xowf/lib/clicker-answer.wf 28 Aug 2014 08:24:56 -0000 1.1 +++ openacs-4/packages/xowf/lib/clicker-answer.wf 4 Jul 2019 18:01:25 -0000 1.1.6.1 @@ -7,19 +7,19 @@ # @wfTitle@ # @wfQuestion@ -my set autoname 1 +set :autoname 1 Property return_url -default "" -allow_query_parameter true Action allocate -proc activate {obj} { - my set_new_property name ___@wfID@.[::xo::cc set untrusted_user_id] + :set_new_property name ___@wfID@.[::xo::cc set untrusted_user_id] } Action initialize -proc activate {obj} { - my set_new_property _title "@wfTitle@" + :set_new_property _title "@wfTitle@" } Action submit -next_state done State initial -actions {submit} -form ../@wfQuestion@ -view_method edit State done -form ../de:question45 -eval_when_active { - [my object] proc view args { - set return_url [my property return_url] + ${:object} proc view args { + set return_url [:property return_url] if {$return_url ne ""} { ad_returnredirect $return_url ad_script_abort Index: openacs-4/packages/xowf/lib/online-exam-answer.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/online-exam-answer.wf,v diff -u -r1.2.2.2 -r1.2.2.3 --- openacs-4/packages/xowf/lib/online-exam-answer.wf 28 May 2019 14:48:02 -0000 1.2.2.2 +++ openacs-4/packages/xowf/lib/online-exam-answer.wf 4 Jul 2019 18:01:25 -0000 1.2.2.3 @@ -17,8 +17,8 @@ # @wfID@ -my set autoname 1 -my set debug 1 +set :autoname 1 +set :debug 1 set pages [list @wfQuestionNames@] set titles [list @wfQuestionTitles@] @@ -55,7 +55,7 @@ Action $page_count \ -next_state working \ -label "$page_count" \ - -proc activate {obj} [list my goto_page [expr {$page_count -1}]] + -proc activate {obj} [list :goto_page [expr {$page_count -1}]] lappend page_actions $page_count incr page_count } @@ -107,32 +107,32 @@ } Action instproc goto_page {position} { - set pages [my property pages] - my set_property position $position - my set_property current_form [lindex $pages $position] + set pages [:property pages] + :set_property position $position + :set_property current_form [lindex $pages $position] } Action instproc set_page {increment} { - set pages [my property pages] - set position [my property position 0] + set pages [:property pages] + set position [:property position 0] incr position $increment if {$position < 0} { set position 0 } elseif {$position >= [llength $pages]} { set position [expr {[llength $pages] - 1}] } - my set_property position $position - my set_property current_form [lindex $pages $position] + :set_property position $position + :set_property current_form [lindex $pages $position] } Action prev \ -next_state working \ -label "Vorherige Frage" \ - -proc activate {obj} {my set_page -1} + -proc activate {obj} {:set_page -1} Action next \ -next_state working \ -label "Nächste Frage" \ - -proc activate {obj} {my set_page 1} + -proc activate {obj} {:set_page 1} Action abgabe \ -next_state done \ @@ -190,7 +190,7 @@ working proc actions {} { set actions "" if {[more_before]} {lappend actions prev} - set actions [concat $actions [my set page_actions]] + set actions [concat $actions ${:page_actions}] if {[more_ahead]} {lappend actions next} lappend actions save abgabe } @@ -236,7 +236,7 @@ set form [$form_id get_property -name form] set prefix [lindex [split [$form_id name] :] end]-a set counter 0 - set fc [my get_form_constraints] + set fc [:get_form_constraints] lappend fc @cr_fields:hidden dom parse -simple -html $form doc $doc documentElement root @@ -254,7 +254,7 @@ # (e.g. as a handcoded textarea). We set it anyhow here for future # use $form_id set_property -new 1 form_constraints $fc - my set_title -question 1 + :set_title -question 1 return $form_id } @@ -279,13 +279,13 @@ $ctx proc summary_form {form_title} { #my msg "summary_form_loader $form_title" - my set_title -question 0 + :set_title -question 0 set state [${:object} property _state] set summary_form "" set counter 0 foreach form_name [${:object} property pages] { - set form_id [my default_load_form_id $form_name] + set form_id [:default_load_form_id $form_name] set title [lindex [${:object} property titles] $counter] append summary_form "

Frage [incr counter]: $title

" \n append summary_form [$form_id property form] \n
\n Index: openacs-4/packages/xowf/lib/online-exam.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/online-exam.wf,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/xowf/lib/online-exam.wf 21 May 2019 14:22:13 -0000 1.6.2.2 +++ openacs-4/packages/xowf/lib/online-exam.wf 4 Jul 2019 18:01:25 -0000 1.6.2.3 @@ -20,9 +20,9 @@ # # Gustaf Neumann, Feb 2012 ######################################################################## -my set autoname 1 -my set debug 1 -my set masterWorkflow //xowf/de:workflow.wf +set :autoname 1 +set :debug 1 +set :masterWorkflow //xowf/de:workflow.wf Action select -next_state created -label {Erstelle Prüfung} Action publish -next_state published -label {Schalte Prüfung frei} @@ -77,19 +77,19 @@ # instance and recorded in the formfield "wfName". # my proc create_answer_workflow {obj} { - my log "create_answer_workflow $obj" + :log "create_answer_workflow $obj" # first delete workflow and data, when it exists if {[$obj property wfName] ne ""} { - set wf [my delete_all_answer_data $obj] + set wf [:delete_all_answer_data $obj] if {$wf ne ""} {$wf delete} } # create a fresh workflow set wfName [$obj name].wf $obj set_property -new 1 wfName $wfName - set wfMaster [my set masterWorkflow] + set wfMaster ${:masterWorkflow} set wfTitle [$obj property _title] set questionObjs [[:wf_context] get_questions] set wfQuestionNames {} @@ -134,7 +134,7 @@ -instance_attributes [list workflow_definition $wfDef \ form_constraints "@table:_name,_state,$attributeNames @cr_fields:hidden"]] $f save_new - my log "create_answer_workflow $obj DONE [$f pretty_link]" + :log "create_answer_workflow $obj DONE [$f pretty_link]" } ######################################################################## @@ -161,9 +161,9 @@ # delete_all_answer_data: delete all instances of the answer workflow # my proc delete_all_answer_data {obj} { - set wf [my get_answer_wf $obj] + set wf [:get_answer_wf $obj] if {$wf ne ""} { - set items [my get_wf_instances -initialize false $wf] + set items [:get_wf_instances -initialize false $wf] foreach i [$items children] { $i delete } } return $wf @@ -235,7 +235,7 @@ if {$HTML ne ""} { ns_return 200 text/html " - + $HTML @@ -257,12 +257,12 @@ # workflow in a state different to "published" # :proc www-answer {} { - if {[my property _state] ne "published"} { + if {[:property _state] ne "published"} { util_user_message -html -message "Cannot start answer workflow in this state" } else { set ctx [::xowf::Context require [self]] set wf [[$ctx wf_container] get_answer_wf [self]] - $wf www-create-or-use -parent_id [my item_id] + $wf www-create-or-use -parent_id [:item_id] } } @@ -284,9 +284,9 @@ # questions and the survey results (the results can be refreshed) # $ctx proc load_form {title} { - set state [my property _state] + set state [:property _state] - set questions [my get_questions] + set questions [:get_questions] set counter 0 set fullQuestionForm "" foreach q $questions { @@ -305,7 +305,7 @@ set wf [[:wf_container] get_answer_wf $obj] if {$wf eq ""} { - my msg "cannot get current workflow for [$obj name]" + :msg "cannot get current workflow for [$obj name]" set lLink "." set tLink "." set aLink "." @@ -324,15 +324,15 @@ } set extraAction "" - switch [my property _state] { + switch [:property _state] { "created" {set extraAction "
Do you want to try out the exam?"} "published" {set extraAction "
Students can now answer via $aLink"} } append text "$menu $extraAction\n" set style "background: #cccccc; padding: 10px; margin:10px;" set report "" - set wfName [my property wfName] + set wfName [:property wfName] if {$wfName ne ""} {set report "{{form-stats -parent_id [$obj item_id] -form $wfName}}\n"} append report "
$menu" @@ -349,7 +349,7 @@ # get_question: load and initialize the interaction forms # $ctx proc get_questions {} { - set questions [lmap ref [my property question] { + set questions [lmap ref [:property question] { if {![string match "*/*" $ref]} { set ref [[${:object} parent_id] name]/$ref } 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.2 -r1.7.2.3 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 24 Jun 2019 11:38:40 -0000 1.7.2.2 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 4 Jul 2019 18:01:25 -0000 1.7.2.3 @@ -227,8 +227,8 @@ "\n" \ "\n" } else { - #:msg $correct_field_name,[:name],$input_field_name - set correct [expr {"[:name].$input_field_name" eq $correct_field_name}] + #:msg $correct_field_name,${:name},$input_field_name + set correct [expr {"${:name}.$input_field_name" eq $correct_field_name}] append form \ "\n" \ "\n" @@ -307,10 +307,10 @@ # We are in a single choice item; provide for editing a single # radio group spanning all entries. Use as name for grouping # the form-field name minus the last segment. - regsub -all {[.][^.]+$} [:name] "" groupname + regsub -all {[.][^.]+$} ${:name} "" groupname :create_components [subst { {text {richtext,editor=ckeditor4,$text_config}} - {correct {radio,label=#xowf.correct#,forced_name=$groupname.correct,options={"" [:name]}}} + {correct {radio,label=#xowf.correct#,forced_name=$groupname.correct,options={"" ${:name}}}} $feedback_fields }] } Index: openacs-4/packages/xowf/tcl/xowf-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-procs.tcl,v diff -u -r1.28.2.13 -r1.28.2.14 --- openacs-4/packages/xowf/tcl/xowf-procs.tcl 25 Jun 2019 11:58:14 -0000 1.28.2.13 +++ openacs-4/packages/xowf/tcl/xowf-procs.tcl 4 Jul 2019 18:01:25 -0000 1.28.2.14 @@ -1168,7 +1168,7 @@ } else { return [::xo::cc role=$role \ -user_id [::xo::cc user_id] \ - -package_id [:package_id]] + -package_id ${:package_id}] } } @@ -1184,7 +1184,7 @@ Provide an icon or text for describing the kind of application. } { if {[:is_wf_instance]} { - set page_template [:page_template] + set page_template ${:page_template} set title [::$page_template title] regsub {[.]wf$} $title "" title return [list text $title is_richtext false] @@ -1371,23 +1371,20 @@ :include_header_info -css [$s extra_css] -js [$s extra_js] if {$method ne "" && $method ne "view"} { - set package_id [:package_id] #:msg "view redirects to $method in state [$ctx get_current_state]" switch -- $method { view_user_input { #:msg "calling edit with disable_input_fields=1" return [:www-edit -disable_input_fields 1] - #return [::$package_id call [self] edit [list -disable_input_fields 1]] } view_user_input_with_feedback { set :__feedback_mode 1 #:msg "calling edit with disable_input_fields=1" return [:www-edit -disable_input_fields 1] - #return [::$package_id call [self] edit [list -disable_input_fields 1]] } default { #:msg "calling $method" - return [::$package_id invoke -method $method] + return [::${:package_id} invoke -method $method] } } } @@ -1429,7 +1426,7 @@ -creation_date ${:creation_date} \ -last_modified ${:last_modified} \ -dtstart "now" \ - -uid $package_id-${:revision_id} \ + -uid ${:package_id}-${:revision_id} \ -url [:pretty_link -absolute true] \ -summary $subject \ -description "Workflow instance of workflow $wf_name ${:description}"] @@ -1499,8 +1496,8 @@ set errorInfo [dict get $errorDict -errorinfo] set error "error in action '$action' of workflow instance ${:name}\ of workflow [${:page_template} name]:" - if {[[:package_id] exists __batch_mode]} { - [:package_id] set __evaluation_error "$error\n\n$errorInfo" + if {[::${:package_id} exists __batch_mode]} { + ::${:package_id} set __evaluation_error "$error\n\n$errorInfo" incr validation_errors } else { :msg -html 1 "$error
[ns_quotehtml $errorInfo]
" @@ -1526,7 +1523,7 @@ if {$validation_errors == 0} { #:msg "validation ok" set ctx [::xowf::Context require [self]] - set cc [[:package_id] context] + set cc [${:package_id} context] foreach {name value} [$cc get_all_form_parameter] { if {[regexp {^__action_(.+)$} $name _ action]} { set next_state [:activate $ctx $action] @@ -1629,7 +1626,7 @@ WorkflowPage instproc save_in_hstore {} { # - if {[::xo::dc has_hstore] && [[:package_id] get_parameter use_hstore 0]} { + if {[::xo::dc has_hstore] && [${:package_id} get_parameter use_hstore 0]} { set hkey [::xowiki::hstore::dict_as_hkey [:hstore_attributes]] set revision_id ${:revision_id} xo::dc dml update_hstore "update xowiki_page_instance \ @@ -1908,7 +1905,6 @@ if {[info exists :__no_form_page_footer]} { next } else { - set package_id [:package_id] set parent_id [:parent_id] set form_item_id ${:page_template} #:msg "is wf page [:is_wf], is wf instance page [:is_wf_instance]" @@ -1925,17 +1921,17 @@ set button_objs [list] # create new workflow instance button with start form - #if {[:parent_id] != [::$package_id folder_id]} { + #if {[:parent_id] != [::${:package_id} folder_id]} { # set parent_id [:parent_id] #} - set link [::$package_id make_link -link $wf_base $wf create-new parent_id return_url] + set link [::${:package_id} make_link -link $wf_base $wf create-new parent_id return_url] lappend button_objs [::xowiki::includelet::form-menu-button-new new -volatile \ -parent_id $parent_id \ -form $wf -link $link] # list workflow instances button set obj [::xowiki::includelet::form-menu-button-wf-instances new -volatile \ - -package_id $package_id -parent_id $parent_id \ + -package_id ${:package_id} -parent_id $parent_id \ -base $wf_base -form $wf] if {[info exists return_url]} { $obj return_url $return_url @@ -1944,7 +1940,7 @@ # work flow definition button set obj [::xowiki::includelet::form-menu-button-form new -volatile \ - -package_id $package_id -parent_id $parent_id \ + -package_id ${:package_id} -parent_id $parent_id \ -base $work_flow_base -form $work_flow_form] if {[info exists return_url]} {$obj return_url $return_url} lappend button_objs $obj @@ -1973,7 +1969,7 @@ set form [::xo::db::CrClass get_instance_from_db -item_id $entry_form_item_id] set base [$form pretty_link] set obj [::xowiki::includelet::form-menu-button-form new -volatile \ - -package_id $package_id -parent_id $parent_id \ + -package_id ${:package_id} -parent_id $parent_id \ -base $base -form $form] if {[info exists return_url]} { $obj return_url $return_url @@ -1984,7 +1980,7 @@ # work flow definition button # set obj [::xowiki::includelet::form-menu-button-wf new -volatile \ - -package_id $package_id -parent_id $parent_id \ + -package_id ${:package_id} -parent_id $parent_id \ -base $work_flow_base -form $work_flow_form] if {[info exists return_url]} {$obj return_url $return_url} lappend button_objs $obj @@ -2001,7 +1997,7 @@ by the list of page names } { foreach page_name $page_names { - set page [[:package_id] get_page_from_name -parent_id [:parent_id] -name $page_name] + set page [${:package_id} get_page_from_name -parent_id [:parent_id] -name $page_name] if {$page ne ""} { $page call_action -action $action -attributes $attributes } else {