xo::lti::LTI method get_context (protected)
<instance of xo::lti::LTI> get_context
Defined in packages/xooauth/tcl/lti-procs.tcl
- Testcases:
- No testcase defined.
Source code: if {![ns_conn isconnected]} { ns_log warning "LTI get_context requires an active connection" return } if {[info exists :context_id] && [info exists :context_title] && [info exists :context_label] } { # # Everything is already set # return } set community_id "" # # Try to get community_id and community_name from dotlrn community. # if {[llength [info commands dotlrn_community::get_community_id]] > 0} { set community_id [dotlrn_community::get_community_id] if {$community_id ne ""} { set community_name [lang::util::localize [dotlrn_community::get_community_name $community_id]] } } # # If there is still no community_id (and community_name) # get it from the subsite. # if {$community_id eq ""} { set community_id [ad_conn subsite_id] set community_name [subsite::get_element -subsite_id $community_id -element instance_name] } if {$community_id ne "" && ![info exists :context_id]} { set :context_id $community_id } if {$community_name ne ""} { if {![info exists :context_title]} { set :context_title $community_name } if {![info exists :context_label]} { set :context_label $community_name } }XQL Not present: Generic, PostgreSQL, Oracle