select group_id as run_group_id
from imsld_run_users_group_ext
where run_id=:run_id
select coalesce(title,role_type) as role_name,item_id as role_item_id
from imsld_rolesi
where role_id=:role_id
select create_new_p
from imsld_roles
where role_id=:role_id
select iri1.role_id
from imsld_rolesi iri1,
imsld_rolesi iri2
where iri1.parent_role_id=iri2.item_id
and iri2.role_id=:role_id
select acs_group__new( null,
'imsld_role_group',
now(),
:user_id,
:peeraddr,
null,
null,
:role_name,
null,
null
);
select gr.group_name
from groups gr,
acs_rels ar1,
acs_rels ar2,
imsld_run_users_group_ext iruge,
imsld_rolesi iri
where ar1.rel_type='imsld_roleinstance_run_rel'
and ar1.object_id_one=gr.group_id
and ar1.object_id_two=iruge.group_id
and iruge.run_id=:run_id
and iri.role_id=:role_id
and iri.item_id=ar2.object_id_one
and ar2.rel_type='imsld_role_group_rel'
and ar2.object_id_two=gr.group_id
order by gr.group_name desc limit 1
select acs_group__delete(:group_to_remove);
select object_id_two as children_list
from acs_rels
where object_id_one=:group_id
and rel_type='composition_rel'
select ir.role_id
from imsld_roles ir,
imsld_imsldsi iii,
imsld_componentsi ici
where ir.component_id=ici.item_id
and ici.imsld_id=iii.item_id
and iii.imsld_id=:imsld_id
order by ir.role_id
select ir2.role_id as parent_role_id
from imsld_roles ir,
imsld_rolesi ir2
where ir.role_id=:role_id
and ir.parent_role_id > 0
and ir.parent_role_id=ir2.item_id
select title as name
from imsld_rolesi
where role_id=:role_item
select title as name
from imsld_rolesi
where role_id=:role_item
select max_persons,min_persons,create_new_p,match_persons_p
from imsld_roles
where role_id=:role_id
select ar.object_id_two
from acs_rels ar,
acs_rels ar2,
imsld_rolesi iri,
imsld_run_users_group_ext iruge
where ar.object_id_one=iri.item_id
and ar.rel_type='imsld_role_group_rel'
and ar.object_id_two=ar2.object_id_one
and ar2.rel_type='imsld_roleinstance_run_rel'
and ar2.object_id_two=iruge.group_id
and iruge.run_id=:run_id
and iri.role_id=:role_id
select ar.object_id_two
from acs_rels ar,
imsld_rolesi iri
where ar.object_id_one=iri.item_id
and iri.role_id=:role_id
and ar.rel_type='imsld_role_group_rel'
select iri.role_id as parent_role
from imsld_rolesi iri,
imsld_rolesi iri1
where iri1.parent_role_id=iri.item_id
and iri1.role_id=:role
select object_id_one as parent_group_id
from acs_rels
where object_id_two=:group_id
and rel_type='composition_rel'
select iri.role_id
from imsld_rolesi iri,
group_member_map gmm,
acs_objects ao,
acs_rels ar,
acs_rels ar2 ,
imsld_run_users_group_ext iruge
where ao.object_id=gmm.group_id
and ao.object_type='imsld_role_group'
and ar.object_id_one=gmm.group_id
and ar.rel_type='imsld_roleinstance_run_rel'
and gmm.member_id=:user_id
and iruge.group_id=ar.object_id_two
and iruge.run_id=:run_id
and gmm.container_id = gmm.group_id
and ar2.object_id_two=gmm.group_id
and ar2.rel_type='imsld_role_group_rel'
and ar2.object_id_one=iri.item_id
select iri.role_id
from imsld_rolesi iri,
group_member_map gmm,
acs_objects ao,
acs_rels ar,
acs_rels ar2
where ao.object_id=gmm.group_id
and ao.object_type='imsld_role_group'
and ar.object_id_one=gmm.group_id
and ar.rel_type='imsld_roleinstance_run_rel'
and gmm.member_id=:user_id
and ar2.object_id_two=gmm.group_id
and ar2.rel_type='imsld_role_group_rel'
and ar2.object_id_one=iri.item_id
select ar1.object_id_two as group
from imsld_rolesi iri,
acs_rels ar1
where ar1.rel_type='imsld_role_group_rel'
and ar1.object_id_one=iri.item_id
and iri.role_id=:role_id
select object_id_one
from acs_rels
where rel_type='imsld_roleinstance_club_rel'
and object_id_one in ([join $groups_list ","])
and object_id_two = :community_id