search::dotlrn::get_community_id (public)

 search::dotlrn::get_community_id -package_id package_id

Defined in packages/search/tcl/search-procs.tcl

If dotlrn is installed find the package's community_id

Switches:
-package_id
(required)
Package to find community
Returns:
dotLRN community_id. Empty string if package_id is not under a dotlrn package instance

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_installed_p apm_package_installed_p (public) db_string db_string (public) site_node::closest_ancestor_package site_node::closest_ancestor_package (public) site_node::get_node_id_from_object_id site_node::get_node_id_from_object_id (public) search::dotlrn::get_community_id search::dotlrn::get_community_id search::dotlrn::get_community_id->apm_package_installed_p search::dotlrn::get_community_id->db_string search::dotlrn::get_community_id->site_node::closest_ancestor_package search::dotlrn::get_community_id->site_node::get_node_id_from_object_id

Testcases:
No testcase defined.
Source code:
    if {[apm_package_installed_p dotlrn]} {
        set site_node [site_node::get_node_id_from_object_id -object_id $package_id]
        set dotlrn_package_id [site_node::closest_ancestor_package  -node_id $site_node  -package_key dotlrn  -include_self]
        set community_id [db_string get_community_id {
            select community_id from dotlrn_communities_all
            where package_id = :dotlrn_package_id
        } -default ""]
        return $community_id
    }
    return ""
XQL Not present:
PostgreSQL
Generic XQL file:
packages/search/tcl/search-procs.xql

Oracle XQL file:
packages/search/tcl/search-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: