select rel_id from dotlrn_member_rels_full
where user_id = :user_id
and community_id = :community_id
select *
from dotlrn_member_rels_full
where user_id = :user_id
and community_id = :community_id
update dotlrn_community_types set package_id= :package_id where community_type= :community_type
update dotlrn_communities_all set package_id= :package_id where community_id= :community_id
update application_groups set package_id= :package_id where group_id= :community_id
select dotlrn_communities.parent_community_id
from dotlrn_communities
where dotlrn_communities.community_id = :community_id
select community_key
from dotlrn_communities_all
select 1 from dual where exists (
select 1 from dotlrn_communities_all
where (:parent_community_id is null or parent_community_id = :parent_community_id)
and community_key = :community_key)
update dotlrn_communities_all
set portal_id = :portal_id,
non_member_portal_id = :non_member_portal_id,
admin_portal_id = :admin_portal_id
where community_id = :community_id
select acs_rel_types.rel_type,
acs_rel_roles.role,
acs_rel_roles.pretty_name,
acs_rel_roles.pretty_plural
from acs_rel_types,
acs_rel_roles
where acs_rel_types.object_type_one = :community_type
and acs_rel_types.role_two = acs_rel_roles.role
select acs_rel_types.rel_type,
acs_rel_roles.role,
acs_rel_roles.pretty_name,
acs_rel_roles.pretty_plural
from acs_rel_types,
acs_rel_roles
where acs_rel_types.object_type_one in (select dotlrn_community_types.community_type
from dotlrn_community_types
where dotlrn_community_types.supertype is null
or dotlrn_community_types.supertype = 'dotlrn_community')
and acs_rel_types.role_two = acs_rel_roles.role
select segment_id
from rel_segments
where group_id = :community_id
and rel_type= :rel_type
select dotlrn_member_rels_approved.rel_id,
dotlrn_member_rels_approved.rel_type,
dotlrn_member_rels_approved.role,
dotlrn_member_rels_approved.user_id,
acs_users_all.first_names,
acs_users_all.last_name,
acs_users_all.email,
(select count(*) from acs_rels where rel_type = 'user_portrait_rel' and object_id_one = dotlrn_member_rels_approved.user_id) as portrait_p,
(select count(*) from acs_attribute_values where object_id = dotlrn_member_rels_approved.user_id and attribute_id =
:bio_attribute_id and attr_value is not null) as bio_p
from acs_users_all,
dotlrn_member_rels_approved
where dotlrn_member_rels_approved.community_id = :community_id
and dotlrn_member_rels_approved.user_id = acs_users_all.user_id
order by dotlrn_member_rels_approved.rel_type, acs_users_all.last_name
select dotlrn_member_rels_approved.rel_id,
dotlrn_member_rels_approved.rel_type,
dotlrn_member_rels_approved.role,
dotlrn_member_rels_approved.user_id,
acs_users_all.first_names,
acs_users_all.last_name,
acs_users_all.email
from acs_users_all,
dotlrn_member_rels_approved,
dotlrn_communities
where dotlrn_communities.community_id = :subcomm_id
and dotlrn_communities.parent_community_id = dotlrn_member_rels_approved.community_id
and acs_users_all.user_id = dotlrn_member_rels_approved.user_id
and acs_users_all.user_id not in (select dm.user_id
from dotlrn_member_rels_full dm
where dm.community_id = :subcomm_id)
order by last_name
select dotlrn_member_rels_approved.rel_id,
dotlrn_member_rels_approved.rel_type,
dotlrn_member_rels_approved.role,
dotlrn_member_rels_approved.user_id,
acs_users_all.first_names,
acs_users_all.last_name,
acs_users_all.email
from acs_users_all,
dotlrn_member_rels_approved
where dotlrn_member_rels_approved.community_id = :community_id
and dotlrn_member_rels_approved.user_id = acs_users_all.user_id
and dotlrn_member_rels_approved.rel_type = :rel_type
select 1 from dual where exists (select 1
from dotlrn_member_rels_approved
where community_id = :community_id
and user_id = :user_id)
select 1 from dual where exists (select 1
from dotlrn_member_rels_full
where community_id = :community_id
and user_id = :user_id
and member_state = 'needs approval')
select rel_id, rel_type
from dotlrn_member_rels_full
where community_id = :community_id
and user_id = :user_id
select dotlrn_communities_full.*
from dotlrn_communities_full,
dotlrn_member_rels_approved
where dotlrn_communities_full.community_id = dotlrn_member_rels_approved.community_id
and dotlrn_member_rels_approved.user_id = :user_id
select dotlrn_communities.*
from dotlrn_communities,
dotlrn_member_rels_full
where dotlrn_communities.community_type = :community_type
and dotlrn_member_rels_full.user_id = :user_id
and dotlrn_communities.community_id = dotlrn_member_rels_full.community_id
select dotlrn_communities.*
from dotlrn_communities
where community_type = :community_type
select community_type
from dotlrn_community_types
where package_id = :package_id
select community_type
from dotlrn_communities_all
where community_id = :community_id
select 1 from dual where exists (select 1
from dotlrn_communities
where parent_community_id = :community_id)
select community_id as subcomm_id
from dotlrn_communities
where parent_community_id = :community_id
order by pretty_name
select package_id
from dotlrn_community_types
where community_type = :community_type
select package_id
from dotlrn_communities_all
where community_id = :community_id
select dotlrn_community_applets.package_id
from dotlrn_community_applets,
dotlrn_applets
where dotlrn_community_applets.community_id = :community_id
and dotlrn_community_applets.applet_id = dotlrn_applets.applet_id
and dotlrn_applets.applet_key = :applet_key
select pretty_name
from dotlrn_community_types
where community_type = :community_type
update dotlrn_communities_all
set pretty_name = :pretty_name
where community_id = :community_id
select pretty_name
from dotlrn_communities_all
where community_id = :community_id
select description
from dotlrn_communities
where community_id = :community_id
update dotlrn_communities_all
set description = :description
where community_id = :community_id
select community_key
from dotlrn_communities
where community_id = :community_id
select 1
from dotlrn_communities_not_closed
where community_id = :community_id
select 1
from dotlrn_communities_not_closed
where community_id = :community_id
and join_policy = 'open'
select 1
from dotlrn_communities_not_closed
where community_id = :community_id
and join_policy = 'needs approval'
delete
from dotlrn_community_applets
where community_id = :community_id
and applet_id = :applet_id
update dotlrn_communities_all
set portal_id = :portal_id,
non_member_portal_id = :non_member_portal_id,
admin_portal_id = :admin_portal_id
where community_id = :clone_id
delete
from acs_attribute_values
where object_id = :clone_id
insert into acs_attribute_values
(object_id,attribute_id,attr_value)
select :clone_id, attribute_id, attr_value
from acs_attribute_values where object_id = :community_id
update dotlrn_communities_all set archived_p = 't' where community_id = :community_id
update dotlrn_communities_all set archived_p = 'f' where community_id = :community_id
select portal_id
from dotlrn_communities_all
where community_id = :community_id
select non_member_portal_id
from dotlrn_communities_all
where community_id = :community_id
select admin_portal_id
from dotlrn_communities
where community_id = :community_id
insert into dotlrn_community_applets
(community_id, applet_id, package_id, active_p)
values
(:community_id, :applet_id, :package_id, :active_p)
select dotlrn_applets.applet_key
from dotlrn_community_applets,
dotlrn_applets
where dotlrn_community_applets.community_id = :community_id
and dotlrn_community_applets.applet_id = dotlrn_applets.applet_id
select dotlrn_applets.applet_key
from dotlrn_community_applets,
dotlrn_applets
where dotlrn_community_applets.community_id = :community_id
and dotlrn_community_applets.active_p = 't'
and dotlrn_community_applets.applet_id = dotlrn_applets.applet_id
and dotlrn_applets.active_p = 't'
select 1
from dotlrn_community_applets,
dotlrn_applets
where dotlrn_community_applets.community_id = :community_id
and dotlrn_community_applets.applet_id = dotlrn_applets.applet_id
and dotlrn_applets.applet_key = :applet_key
and dotlrn_community_applets.active_p = 't'
and dotlrn_applets.active_p = 't'
select attribute_id,
attribute_name
from acs_attributes
where object_type = 'dotlrn_community'
select acs_attributes.attribute_name,
acs_attribute_values.attr_value
from acs_attributes,
acs_attribute_values
where acs_attribute_values.object_id = :community_id
and acs_attribute_values.attribute_id = acs_attributes.attribute_id
insert
into acs_attribute_values
(object_id, attribute_id, attr_value)
values
(:community_id, :attribute_id, :attribute_value)
update acs_attribute_values
set attr_value = :attribute_value
where attribute_id = :attribute_id
and object_id = :community_id
delete from acs_attribute_values
where attribute_id = :attribute_id
and object_id = :community_id
delete from acs_attribute_values
where object_id = :community_id
select package_id
from dotlrn_community_types
where community_type = :community_type
update dotlrn_communities_all
set site_template_id = :site_template_id
where community_id = :community_id
select portal_theme_id
from dotlrn_site_templates
where site_template_id = :site_template_id
select portal_theme_id
from dotlrn_site_templates
where site_template_id = :site_template_id
update portals
set theme_id = :new_theme_id
where portal_id = :portal_id
update portals
set theme_id = :new_theme_id
where portal_id in (select portal_id from dotlrn_communities_all )
update portals
set theme_id = :new_theme_id
where portal_id in (select admin_portal_id from dotlrn_communities_all )
select
portal_id
from dotlrn_communities_all
select site_template_id
from dotlrn_communities_all
where community_id = :community_id