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

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: