Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-admins-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-admins-package-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/oracle/dotlrn-admins-package-create.sql 29 Mar 2002 19:14:44 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-admins-package-create.sql 28 Apr 2002 04:08:41 -0000 1.3 @@ -25,10 +25,13 @@ as function new ( rel_id in dotlrn_admin_profile_rels.rel_id%TYPE default null, + user_id in users.user_id%TYPE, + portal_id in dotlrn_user_profile_rels.portal_id%TYPE, + access_level in dotlrn_user_profile_rels.access_level%TYPE, + theme_id in dotlrn_user_profile_rels.theme_id%TYPE default null, id in dotlrn_user_profile_rels.id%TYPE default null, rel_type in acs_rels.rel_type%TYPE default 'dotlrn_admin_profile_rel', group_id in groups.group_id%TYPE default null, - user_id in users.user_id%TYPE, creation_user in acs_objects.creation_user%TYPE default null, creation_ip in acs_objects.creation_ip%TYPE default null ) return dotlrn_user_profile_rels.rel_id%TYPE; @@ -45,10 +48,13 @@ as function new ( rel_id in dotlrn_admin_profile_rels.rel_id%TYPE default null, + user_id in users.user_id%TYPE, + portal_id in dotlrn_user_profile_rels.portal_id%TYPE, + access_level in dotlrn_user_profile_rels.access_level%TYPE, + theme_id in dotlrn_user_profile_rels.theme_id%TYPE default null, id in dotlrn_user_profile_rels.id%TYPE default null, rel_type in acs_rels.rel_type%TYPE default 'dotlrn_admin_profile_rel', group_id in groups.group_id%TYPE default null, - user_id in users.user_id%TYPE, creation_user in acs_objects.creation_user%TYPE default null, creation_ip in acs_objects.creation_ip%TYPE default null ) return dotlrn_user_profile_rels.rel_id%TYPE @@ -69,10 +75,13 @@ v_rel_id := dotlrn_user_profile_rel.new( rel_id => rel_id, + user_id => user_id, + portal_id => portal_id, + access_level => access_level, + theme_id => theme_id, id => id, rel_type => rel_type, group_id => v_group_id, - user_id => user_id, creation_user => creation_user, creation_ip => creation_ip ); @@ -101,90 +110,3 @@ end; / show errors - -create or replace package dotlrn_full_admin_profile_rel -as - function new ( - rel_id in dotlrn_full_admin_profile_rels.rel_id%TYPE default null, - portal_id in dotlrn_full_user_profile_rels.portal_id%TYPE, - theme_id in dotlrn_full_user_profile_rels.theme_id%TYPE default null, - id in dotlrn_user_profile_rels.id%TYPE default null, - rel_type in acs_rels.rel_type%TYPE default 'dotlrn_full_admin_profile_rel', - group_id in groups.group_id%TYPE default null, - user_id in users.user_id%TYPE, - creation_user in acs_objects.creation_user%TYPE default null, - creation_ip in acs_objects.creation_ip%TYPE default null - ) return dotlrn_full_user_profile_rels.rel_id%TYPE; - - procedure delete ( - rel_id in dotlrn_full_admin_profile_rels.rel_id%TYPE - ); - -end; -/ -show errors - -create or replace package body dotlrn_full_admin_profile_rel -as - function new ( - rel_id in dotlrn_full_admin_profile_rels.rel_id%TYPE default null, - portal_id in dotlrn_full_user_profile_rels.portal_id%TYPE, - theme_id in dotlrn_full_user_profile_rels.theme_id%TYPE default null, - id in dotlrn_user_profile_rels.id%TYPE default null, - rel_type in acs_rels.rel_type%TYPE default 'dotlrn_full_admin_profile_rel', - group_id in groups.group_id%TYPE default null, - user_id in users.user_id%TYPE, - creation_user in acs_objects.creation_user%TYPE default null, - creation_ip in acs_objects.creation_ip%TYPE default null - ) return dotlrn_full_user_profile_rels.rel_id%TYPE - is - v_rel_id dotlrn_full_user_profile_rels.rel_id%TYPE; - v_group_id groups.group_id%TYPE; - begin - if group_id is null then - select min(group_id) - into v_group_id - from profiled_groups - where profile_provider = (select min(impl_id) - from acs_sc_impls - where impl_name = 'dotlrn_admin_profile_provider'); - else - v_group_id := group_id; - end if; - - v_rel_id := dotlrn_full_user_profile_rel.new( - rel_id => rel_id, - portal_id => portal_id, - theme_id => theme_id, - id => id, - rel_type => rel_type, - group_id => v_group_id, - user_id => user_id, - creation_user => creation_user, - creation_ip => creation_ip - ); - - insert - into dotlrn_full_admin_profile_rels - (rel_id) - values - (v_rel_id); - - return v_rel_id; - end; - - procedure delete ( - rel_id in dotlrn_full_admin_profile_rels.rel_id%TYPE - ) - is - begin - delete - from dotlrn_full_admin_profile_rels - where rel_id = dotlrn_full_admin_profile_rel.delete.rel_id; - - dotlrn_full_user_profile_rel.delete(rel_id); - end; - -end; -/ -show errors