Index: openacs-4/packages/curriculum/tcl/element-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/tcl/element-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/curriculum/tcl/element-procs.tcl 25 Jun 2003 17:34:17 -0000 1.3 +++ openacs-4/packages/curriculum/tcl/element-procs.tcl 22 Sep 2003 18:37:46 -0000 1.4 @@ -16,7 +16,7 @@ {-name:required} {-description ""} {-desc_format "text/html"} - {-url:required} + {-url ""} {-enabled_p t} {-sort_key ""} } { @@ -28,7 +28,7 @@ @param name The name of the element. @param description Long description of the element. @param desc_format The format of the description. Current formats are: text/enhanced text/plain text/html text/fixed-width - @param url Url that this element is linked to. (URLs without "http://" are considered to be relative to the page root). + @param url Url that this element is linked to. (URLs without "http://" are considered to be relative to the page root, and no URL at all will make the element point to its info page). @param enabled_p Should the element be enabled or disabled (archived) upon creation? This can be toggled afterwards. @param sort_key The relative sort order of the elements in a curriculum. @@ -67,9 +67,6 @@ set external_p t } else { # Try to determine if the URL belongs to another subsite. - #array set node [site_node::get_from_url -url $url] - - # FIXME. This condition does not tell the whole truth ... set subsite_id [site_node_closest_ancestor_package -url $url [curriculum::package_keys]] @@ -89,7 +86,7 @@ {-name:required} {-description:required} {-desc_format:required} - {-url:required} + {-url ""} } { Edit a curriculum element. Index: openacs-4/packages/curriculum/tcl/misc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/tcl/misc-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/curriculum/tcl/misc-procs.tcl 5 Sep 2003 09:32:15 -0000 1.10 +++ openacs-4/packages/curriculum/tcl/misc-procs.tcl 22 Sep 2003 18:37:46 -0000 1.11 @@ -733,12 +733,18 @@ # to curriculums to consider adding to cookie. set list_of_lists [curriculum::enabled_elements_memoized -package_id $package_id] set current_url [ad_conn url] + + # Check for query vars. URL decode the vars here if they exist, and do the same + # when we compare current_url to the element URLs to ensure consistency ... + if { ![empty_string_p [set query_vars [ad_conn query]]] } { + append current_url "?[ns_urldecode $query_vars]" + } foreach list $list_of_lists { array set info $list # Is the user visiting this curriculum element url? - if { [string equal $current_url $info(url)] } { + if { [string equal $current_url [ns_urldecode $info(url)]] } { # See if this element isn't already in user's cookie. set element_id $info(element_id)