Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.234.2.16 -r1.234.2.17 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 8 Feb 2021 11:00:39 -0000 1.234.2.16 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 17 Feb 2021 18:43:02 -0000 1.234.2.17 @@ -1081,14 +1081,16 @@ {-url ""} } { Returns the community from a URL. + + @param url if no URL specified, the function will break when + called without connection } { if {$url eq ""} { set url [ad_conn url] } - set package_id [site_node::closest_ancestor_package -include_self -url $url -package_key dotlrn] - - return [get_community_id -package_id $package_id] + + return [expr {$package_id eq "" ? "" : [get_community_id -package_id $package_id]}] } ad_proc -public get_community_id { Index: openacs-4/packages/survey/tcl/survey-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/tcl/survey-procs.tcl,v diff -u -r1.14.2.3 -r1.14.2.4 --- openacs-4/packages/survey/tcl/survey-procs.tcl 9 Feb 2020 16:10:31 -0000 1.14.2.3 +++ openacs-4/packages/survey/tcl/survey-procs.tcl 17 Feb 2021 18:43:02 -0000 1.14.2.4 @@ -65,7 +65,7 @@ # some useful stats about the survey, dotLRN specific for sloanspace if {[apm_package_installed_p dotlrn]} { - set community_id [dotlrn_community::get_community_id_from_url] + set community_id [dotlrn_community::get_community_id_from_url -url [ad_conn url]] set survey_info(eligible) [db_string n_eligible {}] set survey_info(completed) [db_string n_completed {}] set survey_info(not_completed) [expr {$survey_info(eligible) - $survey_info(completed)}] Index: openacs-4/packages/survey/www/admin/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/one.tcl,v diff -u -r1.13.2.2 -r1.13.2.3 --- openacs-4/packages/survey/www/admin/one.tcl 9 Feb 2020 16:10:31 -0000 1.13.2.2 +++ openacs-4/packages/survey/www/admin/one.tcl 17 Feb 2021 18:43:02 -0000 1.13.2.3 @@ -32,7 +32,7 @@ # get users and # who responded etc... if {[apm_package_installed_p dotlrn]} { - set community_id [dotlrn_community::get_community_id_from_url] + set community_id [dotlrn_community::get_community_id_from_url -url [ad_conn url]] set n_eligible [db_string n_eligible { select count(*) from dotlrn_member_rels_full where rel_type='dotlrn_member_rel'