export_form_scope_vars

one of the documented procedures in this installation of the ACS
Usage:
export_form_scope_vars   args
What it does:
assumes scope is set up in the topmost environment. if scope=group it assumes group_id is set in the topmost environment, if scope=user it assumes that user_id is set in topmost environment and if scope=table it assumes on_which_table and on_what_id are set in topmost environment. this procedure operates in the same manner as export_form_vars except that it automatically figures out and sets appropriate scope variables. (e.g. for scope=group_id, export_form_scope_vars return_url would return the following string
Defined in: /web/philip/tcl/ad-scope.tcl

Source code:



    if { [empty_string_p $args] } {
	set form_vars ""
    } else {
	set form_vars [eval uplevel {"export_form_vars $args"}]
    }

    if { [uplevel [ad_scope_upvar_level] {string compare $scope public}]==0 } {
	return "
	<input type=hidden name=scope value=public>
	$form_vars
	"
    }
    if { [uplevel [ad_scope_upvar_level] {string compare $scope group}]==0 } {
	upvar [ad_scope_upvar_level] group_id group_id
	return "
	<input type=hidden name=scope value=group>\n
	<input type=hidden name=group_id value=$group_id>
	$form_vars
	"
    }
    if { [uplevel [ad_scope_upvar_level] {string compare $scope user}]==0 } {
	upvar [ad_scope_upvar_level] user_id user_id
	return "
 	<input type=hidden name=scope value=user>\n
	<input type=hidden name=user_id value=$user_id>
	$form_vars
	"
    }
    if { [uplevel [ad_scope_upvar_level] {string compare $scope table}]==0 } {
	upvar [ad_scope_upvar_level] on_which_table on_which_table
	upvar [ad_scope_upvar_level] on_what_id on_what_id
	return "
 	<input type=hidden name=scope value=table>\n
	<input type=hidden name=on_which_table value=\"[philg_quote_double_quotes $on_which_table]\">\n
	<input type=hidden name=on_what_id value=$on_what_id>
	$form_vars
	"
    }


philg@mit.edu