Index: openacs-4/packages/dotlrn-wps/dotlrn-wps.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/dotlrn-wps.info,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/dotlrn-wps.info 25 Sep 2003 16:26:21 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+
+ dotLRN Wimpy Point
+
+ f
+ t
+
+
+ roc roc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-wps/wps-portlet.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/Attic/wps-portlet.info,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/wps-portlet.info 25 Sep 2003 16:35:41 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+
+ Wimpy Point Portlet
+
+ f
+ t
+
+
+ Rocael Hernandez
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-wps/sql/oracle/dotlrn-wps-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/sql/oracle/dotlrn-wps-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/sql/oracle/dotlrn-wps-create.sql 25 Sep 2003 16:26:22 -0000 1.1
@@ -0,0 +1,164 @@
+--
+-- Copyright (C) 2001, 2002 MIT
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 2 of the License, or (at your option) any later
+-- version.
+--
+-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-- details.
+--
+
+
+--
+-- The wps applet for dotLRN
+--
+-- Copyright (C) 2003 MIT
+-- @author Rocael Hernandez (roc@viaro.net)
+-- @creation-date 2003-05-24
+
+-- $Id: dotlrn-wps-create.sql,v 1.1 2003/09/25 16:26:22 rocaelh Exp $
+--
+
+
+declare
+ foo integer;
+begin
+ -- create the implementation
+ foo := acs_sc_impl.new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'dotlrn_wps'
+ );
+
+ -- add all the hooks
+
+ -- GetPrettyName
+ foo := acs_sc_impl.new_alias (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'GetPrettyName',
+ 'dotlrn_wps::get_pretty_name',
+ 'TCL'
+ );
+
+ -- AddApplet
+ foo := acs_sc_impl.new_alias (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddApplet',
+ 'dotlrn_wps::add_applet',
+ 'TCL'
+ );
+
+ -- RemoveApplet
+ foo := acs_sc_impl.new_alias (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveApplet',
+ 'dotlrn_wps::remove_applet',
+ 'TCL'
+ );
+
+ -- AddAppletToCommunity
+ foo := acs_sc_impl.new_alias (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddAppletToCommunity',
+ 'dotlrn_wps::add_applet_to_community',
+ 'TCL'
+ );
+
+ -- RemoveAppletFromCommunity
+ foo := acs_sc_impl.new_alias (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveAppletFromCommunity',
+ 'dotlrn_wps::remove_applet_from_community',
+ 'TCL'
+ );
+
+ -- AddUser
+ foo := acs_sc_impl.new_alias (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddUser',
+ 'dotlrn_wps::add_user',
+ 'TCL'
+ );
+
+ -- RemoveUser
+ foo := acs_sc_impl.new_alias (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveUser',
+ 'dotlrn_wps::remove_user',
+ 'TCL'
+ );
+
+ -- AddUserToCommunity
+ foo := acs_sc_impl.new_alias (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddUserToCommunity',
+ 'dotlrn_wps::add_user_to_community',
+ 'TCL'
+ );
+
+ -- RemoveUserFromCommunity
+ foo := acs_sc_impl.new_alias (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveUserFromCommunity',
+ 'dotlrn_wps::remove_user_from_community',
+ 'TCL'
+ );
+
+ -- AddPortlet
+ foo := acs_sc_impl.new_alias (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_wps',
+ impl_operation_name => 'AddPortlet',
+ impl_alias => 'dotlrn_wps::add_portlet',
+ impl_pl => 'TCL'
+ );
+
+ -- RemovePortlet
+ foo := acs_sc_impl.new_alias (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_wps',
+ impl_operation_name => 'RemovePortlet',
+ impl_alias => 'dotlrn_wps::remove_portlet',
+ impl_pl => 'TCL'
+ );
+
+ -- Clone
+ foo := acs_sc_impl.new_alias (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_wps',
+ impl_operation_name => 'Clone',
+ impl_alias => 'dotlrn_wps::clone',
+ impl_pl => 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_wps',
+ impl_operation_name => 'ChangeEventHandler',
+ impl_alias => 'dotlrn_wps::change_event_handler',
+ impl_pl => 'TCL'
+ );
+
+ -- Add the binding
+ acs_sc_binding.new (
+ contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_wps'
+ );
+end;
+/
+show errors
Index: openacs-4/packages/dotlrn-wps/sql/oracle/wps-admin-portlet-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/sql/oracle/Attic/wps-admin-portlet-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/sql/oracle/wps-admin-portlet-create.sql 25 Sep 2003 16:35:41 -0000 1.1
@@ -0,0 +1,194 @@
+--
+-- Copyright (C) 2001, 2002, 2003 MIT
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 2 of the License, or (at your option) any later
+-- version.
+--
+-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-- details.
+--
+
+--
+-- /wps-portlet/sql/oracle/wps-admin-portlet-create.sql
+--
+
+-- Creates wps admin portlet
+
+-- Copyright (C) 2003 MIT
+-- @author Rocael Hernandez (roc@viaro.net)
+-- @creation-date 2003-05-24
+
+-- $Id: wps-admin-portlet-create.sql,v 1.1 2003/09/25 16:35:41 rocaelh Exp $
+
+-- This is free software distributed under the terms of the GNU Public
+-- License version 2 or higher. Full text of the license is available
+-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html
+
+declare
+ ds_id portal_datasources.datasource_id%TYPE;
+begin
+ ds_id := portal_datasource.new(
+ name => 'wps_admin_portlet',
+ description => 'Wimpy Point Admin portlet'
+ );
+
+ -- the standard 4 params
+
+ -- shadeable_p
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 't',
+ key => 'shadeable_p',
+ value => 'f'
+);
+
+
+ -- hideable_p
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 't',
+ key => 'hideable_p',
+ value => 'f'
+);
+
+ -- user_editable_p
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 't',
+ key => 'user_editable_p',
+ value => 'f'
+);
+
+ -- shaded_p
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 't',
+ key => 'shaded_p',
+ value => 'f'
+);
+
+ -- link_hideable_p
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 't',
+ key => 'link_hideable_p',
+ value => 't'
+);
+
+-- wps_admin-specific params
+
+ -- package_id must be configured
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 'f',
+ key => 'package_id',
+ value => ''
+);
+
+
+end;
+/
+show errors
+
+declare
+ foo integer;
+begin
+ -- create the implementation
+ foo := acs_sc_impl.new (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'wps_admin_portlet'
+ );
+
+end;
+/
+show errors
+
+declare
+ foo integer;
+begin
+ -- add all the hooks
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'GetMyName',
+ 'wps_admin_portlet::get_my_name',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'GetPrettyName',
+ 'wps_admin_portlet::get_pretty_name',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'Link',
+ 'wps_admin_portlet::link',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'AddSelfToPage',
+ 'wps_admin_portlet::add_self_to_page',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'Show',
+ 'wps_admin_portlet::show',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'Edit',
+ 'wps_admin_portlet::edit',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'RemoveSelfFromPage',
+ 'wps_admin_portlet::remove_self_from_page',
+ 'TCL'
+ );
+
+end;
+/
+show errors
+
+declare
+ foo integer;
+begin
+ -- Add the binding
+ acs_sc_binding.new (
+ contract_name => 'portal_datasource',
+ impl_name => 'wps_admin_portlet'
+ );
+end;
+/
+show errors
+
Index: openacs-4/packages/dotlrn-wps/sql/oracle/wps-portlet-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/sql/oracle/Attic/wps-portlet-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/sql/oracle/wps-portlet-create.sql 25 Sep 2003 16:35:41 -0000 1.1
@@ -0,0 +1,196 @@
+--
+-- Copyright (C) 2001, 2002, 2003 MIT
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 2 of the License, or (at your option) any later
+-- version.
+--
+-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-- details.
+--
+
+--
+-- /wps-portlet/sql/oracle/wps-portlet-create.sql
+--
+
+-- Creates wps portlet
+
+-- Copyright (C) 2003 MIT
+-- @author Rocael Hernandez (roc@viaro.net)
+-- @creation-date 2003-05-24
+
+-- $Id: wps-portlet-create.sql,v 1.1 2003/09/25 16:35:41 rocaelh Exp $
+
+-- This is free software distributed under the terms of the GNU Public
+-- License version 2 or higher. Full text of the license is available
+-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html
+
+declare
+ ds_id portal_datasources.datasource_id%TYPE;
+begin
+ ds_id := portal_datasource.new(
+ name => 'wps_portlet',
+ description => 'Wimpy Point portlet'
+ );
+
+ -- the standard 4 params
+
+ -- shadeable_p
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 't',
+ key => 'shadeable_p',
+ value => 't'
+);
+
+
+ -- hideable_p
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 't',
+ key => 'hideable_p',
+ value => 't'
+);
+
+ -- user_editable_p
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 't',
+ key => 'user_editable_p',
+ value => 'f'
+);
+
+ -- shaded_p
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 't',
+ key => 'shaded_p',
+ value => 'f'
+);
+
+ -- link_hideable_p
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 't',
+ key => 'link_hideable_p',
+ value => 't'
+);
+
+-- wps-specific params
+
+ -- community_id must be configured
+ portal_datasource.set_def_param (
+ datasource_id => ds_id,
+ config_required_p => 't',
+ configured_p => 'f',
+ key => 'package_id',
+ value => ''
+);
+
+
+end;
+/
+show errors
+
+declare
+ foo integer;
+begin
+ -- create the implementation
+ foo := acs_sc_impl.new (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'wps_portlet'
+ );
+
+end;
+/
+show errors
+
+declare
+ foo integer;
+begin
+ -- add all the hooks
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'GetMyName',
+ 'wps_portlet::get_my_name',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'GetPrettyName',
+ 'wps_portlet::get_pretty_name',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'Link',
+ 'wps_portlet::link',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'AddSelfToPage',
+ 'wps_portlet::add_self_to_page',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'Show',
+ 'wps_portlet::show',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'Edit',
+ 'wps_portlet::edit',
+ 'TCL'
+ );
+
+ foo := acs_sc_impl.new_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'RemoveSelfFromPage',
+ 'wps_portlet::remove_self_from_page',
+ 'TCL'
+ );
+
+end;
+/
+show errors
+
+declare
+ foo integer;
+begin
+ -- Add the binding
+ acs_sc_binding.new (
+ contract_name => 'portal_datasource',
+ impl_name => 'wps_portlet'
+ );
+end;
+/
+show errors
+
+
+@wps-admin-portlet-create.sql
Index: openacs-4/packages/dotlrn-wps/sql/oracle/wps-portlet-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/sql/oracle/Attic/wps-portlet-drop.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/sql/oracle/wps-portlet-drop.sql 25 Sep 2003 16:35:41 -0000 1.1
@@ -0,0 +1,115 @@
+--
+-- Copyright (C) 2001, 2002 MIT
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 2 of the License, or (at your option) any later
+-- version.
+--
+-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-- details.
+--
+
+--
+-- /wps-portlet/sql/oracle/wps-portlet-drop.sql
+--
+
+-- Drops wps portlet
+
+-- Copyright (C) 2003 MIT
+-- @author Rocael Hernandez (roc@viaro.net)
+-- @creation-date 2003-05-24
+
+-- $Id: wps-portlet-drop.sql,v 1.1 2003/09/25 16:35:41 rocaelh Exp $
+
+-- This is free software distributed under the terms of the GNU Public
+-- License version 2 or higher. Full text of the license is available
+-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html
+
+declare
+ ds_id portal_datasources.datasource_id%TYPE;
+begin
+
+ begin
+ select datasource_id into ds_id
+ from portal_datasources
+ where name = 'wps_portlet';
+ exception when no_data_found then
+ ds_id := null;
+ end;
+
+ if ds_id is not null then
+ portal_datasource.delete(ds_id);
+ end if;
+
+end;
+/
+show errors;
+
+declare
+ foo integer;
+begin
+
+ -- drop the hooks
+ foo := acs_sc_impl.delete_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'GetMyName'
+ );
+
+ foo := acs_sc_impl.delete_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'GetPrettyName'
+ );
+
+
+ foo := acs_sc_impl.delete_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'Link'
+ );
+
+ foo := acs_sc_impl.delete_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'AddSelfToPage'
+ );
+
+ foo := acs_sc_impl.delete_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'Show'
+ );
+
+ foo := acs_sc_impl.delete_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'Edit'
+ );
+
+ foo := acs_sc_impl.delete_alias (
+ 'portal_datasource',
+ 'wps_portlet',
+ 'RemoveSelfFromPage'
+ );
+
+ -- Drop the binding
+ acs_sc_binding.delete (
+ contract_name => 'portal_datasource',
+ impl_name => 'wps_portlet'
+ );
+
+ -- drop the impl
+ foo := acs_sc_impl.delete (
+ 'portal_datasource',
+ 'wps_portlet'
+ );
+end;
+/
+show errors
+
Index: openacs-4/packages/dotlrn-wps/sql/postgresql/dotlrn-wps-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/sql/postgresql/dotlrn-wps-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/sql/postgresql/dotlrn-wps-create.sql 25 Sep 2003 16:26:22 -0000 1.1
@@ -0,0 +1,157 @@
+--
+-- Copyright (C) 2001, 2002 MIT
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 2 of the License, or (at your option) any later
+-- version.
+--
+-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-- details.
+--
+
+
+--
+-- The wps applet for dotLRN
+--
+-- Copyright (C) 2003 MIT
+-- @author Rocael Hernandez (roc@viaro.net)
+-- @creation-date 2003-05-24
+
+-- $Id: dotlrn-wps-create.sql,v 1.1 2003/09/25 16:26:22 rocaelh Exp $
+
+
+-- create the implementation
+select acs_sc_impl__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'dotlrn_wps'
+);
+
+-- add all the hooks
+
+-- GetPrettyName
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'GetPrettyName',
+ 'dotlrn_wps::get_pretty_name',
+ 'TCL'
+);
+
+-- AddApplet
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddApplet',
+ 'dotlrn_wps::add_applet',
+ 'TCL'
+);
+
+-- RemoveApplet
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveApplet',
+ 'dotlrn_wps::remove_applet',
+ 'TCL'
+);
+
+-- AddAppletToCommunity
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddAppletToCommunity',
+ 'dotlrn_wps::add_applet_to_community',
+ 'TCL'
+);
+
+-- RemoveAppletFromCommunity
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveAppletFromCommunity',
+ 'dotlrn_wps::remove_applet_from_community',
+ 'TCL'
+);
+
+-- AddUser
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddUser',
+ 'dotlrn_wps::add_user',
+ 'TCL'
+);
+
+-- RemoveUser
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveUser',
+ 'dotlrn_wps::remove_user',
+ 'TCL'
+);
+
+-- AddUserToCommunity
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddUserToCommunity',
+ 'dotlrn_wps::add_user_to_community',
+ 'TCL'
+);
+
+-- RemoveUserFromCommunity
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveUserFromCommunity',
+ 'dotlrn_wps::remove_user_from_community',
+ 'TCL'
+);
+
+-- AddPortlet
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddPortlet',
+ 'dotlrn_wps::add_portlet',
+ 'TCL'
+ );
+
+-- RemovePortlet
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemovePortlet',
+ 'dotlrn_wps::remove_portlet',
+ 'TCL'
+);
+
+-- Clone
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'Clone',
+ 'dotlrn_wps::clone',
+ 'TCL'
+);
+
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'ChangeEventHandler',
+ 'dotlrn_wps::change_event_handler',
+ 'TCL'
+);
+
+-- Add the binding
+select acs_sc_binding__new (
+ 'dotlrn_applet',
+ 'dotlrn_wps'
+);
Index: openacs-4/packages/dotlrn-wps/sql/postgresql/dotlrn-wps-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/sql/postgresql/dotlrn-wps-drop.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/sql/postgresql/dotlrn-wps-drop.sql 25 Sep 2003 16:26:22 -0000 1.1
@@ -0,0 +1,125 @@
+--
+-- Copyright (C) 2001, 2002 MIT
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 2 of the License, or (at your option) any later
+-- version.
+--
+-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-- details.
+--
+
+
+--
+-- The wps applet for dotLRN
+--
+-- Copyright (C) 2003 MIT
+-- @author Rocael Hernandez (roc@viaro.net)
+-- @creation-date 2003-05-24
+
+-- $Id: dotlrn-wps-drop.sql,v 1.1 2003/09/25 16:26:22 rocaelh Exp $
+
+
+select acs_sc_impl__delete(
+ 'dotlrn_applet', -- impl_contract_name
+ 'dotlrn_wps' -- impl_name
+);
+
+
+-- add all the hooks
+
+-- GetPrettyName
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'GetPrettyName'
+);
+
+-- AddApplet
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddApplet'
+);
+
+-- RemoveApplet
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveApplet'
+);
+
+-- AddAppletToCommunity
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddAppletToCommunity'
+);
+
+-- RemoveAppletFromCommunity
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveAppletFromCommunity'
+);
+
+-- AddUser
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddUser'
+);
+
+-- RemoveUser
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveUser'
+);
+
+-- AddUserToCommunity
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddUserToCommunity'
+);
+
+-- RemoveUserFromCommunity
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemoveUserFromCommunity'
+);
+
+-- AddPortlet
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'AddPortlet'
+ );
+
+-- RemovePortlet
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'RemovePortlet'
+);
+
+-- Clone
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps',
+ 'Clone'
+);
+
+
+-- Add the binding
+select acs_sc_binding__delete (
+ 'dotlrn_applet',
+ 'dotlrn_wps'
+);
Index: openacs-4/packages/dotlrn-wps/sql/postgresql/wps-admin-portlet-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/sql/postgresql/wps-admin-portlet-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/sql/postgresql/wps-admin-portlet-create.sql 25 Sep 2003 16:35:42 -0000 1.1
@@ -0,0 +1,186 @@
+--
+-- Copyright (C) 2001, 2002 MIT
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 2 of the License, or (at your option) any later
+-- version.
+--
+-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-- details.
+--
+
+--
+-- /wps-portlet/sql/postgresql/wps-admin-portlet-create.sql
+--
+
+-- Creates news admin portlet
+
+-- Copyright (C) 2003 MIT
+-- @author Rocael Hernandez (roc@viaro.net)
+-- @creation-date 2003-05-24
+
+-- $Id: wps-admin-portlet-create.sql,v 1.1 2003/09/25 16:35:42 rocaelh Exp $
+
+
+create function inline_0()
+returns integer as '
+declare
+ ds_id portal_datasources.datasource_id%TYPE;
+begin
+
+ ds_id = portal_datasource__new( ''wps_admin_portlet'', ''Wimpy Point Admin portlet'');
+
+
+ -- the standard 4 params
+
+ -- shadeable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''shadeable_p'',
+ ''f''
+);
+
+
+ -- hideable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''hideable_p'',
+ ''f''
+);
+
+ -- user_editable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''user_editable_p'',
+ ''f''
+);
+
+ -- shaded_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''shaded_p'',
+ ''f''
+);
+
+ -- link_hideable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''link_hideable_p'',
+ ''t''
+);
+
+-- wps_admin-specific params
+
+ -- package_id must be configured
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''f'',
+ ''package_id'',
+ ''''
+);
+
+ return 0;
+
+end;' language 'plpgsql';
+
+select inline_0();
+drop function inline_0();
+
+
+create function inline_1()
+returns integer as '
+begin
+
+ -- create the implementation
+ perform acs_sc_impl__new (
+ ''portal_datasource'',
+ ''wps_admin_portlet'',
+ ''wps_admin_portlet''
+ );
+
+ -- add all the hooks
+ perform acs_sc_impl_alias__new(
+ ''portal_datasource'',
+ ''wps_admin_portlet'',
+ ''GetMyName'',
+ ''wps_admin_portlet::get_my_name'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_admin_portlet'',
+ ''GetPrettyName'',
+ ''wps_admin_portlet::get_pretty_name'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_admin_portlet'',
+ ''Link'',
+ ''wps_admin_portlet::link'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_admin_portlet'',
+ ''AddSelfToPage'',
+ ''wps_admin_portlet::add_self_to_page'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_admin_portlet'',
+ ''Show'',
+ ''wps_admin_portlet::show'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_admin_portlet'',
+ ''Edit'',
+ ''wps_admin_portlet::edit'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_admin_portlet'',
+ ''RemoveSelfFromPage'',
+ ''wps_admin_portlet::remove_self_from_page'',
+ ''TCL''
+ );
+
+ -- Add the binding
+ perform acs_sc_binding__new (
+ ''portal_datasource'',
+ ''wps_admin_portlet''
+ );
+
+ return 0;
+end;' language 'plpgsql';
+
+select inline_1();
+drop function inline_1();
+
+
Index: openacs-4/packages/dotlrn-wps/sql/postgresql/wps-admin-portlet-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/sql/postgresql/wps-admin-portlet-drop.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/sql/postgresql/wps-admin-portlet-drop.sql 25 Sep 2003 16:35:42 -0000 1.1
@@ -0,0 +1,118 @@
+--
+-- Copyright (C) 2001, 2002 MIT
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 2 of the License, or (at your option) any later
+-- version.
+--
+-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-- details.
+--
+
+--
+-- /wps-portlet/sql/oracle/wps-admin-portlet-create.sql
+--
+
+-- Creates wps admin portlet
+
+-- Copyright (C) 2003 MIT
+-- @author Rocael Hernandez (roc@viaro.net)
+-- @creation-date 2003-05-24
+
+-- $Id: wps-admin-portlet-drop.sql,v 1.1 2003/09/25 16:35:42 rocaelh Exp $
+
+-- This is free software distributed under the terms of the GNU Public
+-- License version 2 or higher. Full text of the license is available
+-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html
+--
+-- Postgresql port adarsh@symphinity.com
+--
+-- 10 July 2002
+
+create function inline_0 ()
+returns integer as '
+declare
+ ds_id portal_datasources.datasource_id%TYPE;
+begin
+
+ select datasource_id into ds_id
+ from portal_datasources
+ where name = ''wps_admin_portlet'';
+
+ if not found then
+ raise exception ''No datasource_id found here '',ds_id ;
+ ds_id := null;
+ end if;
+
+
+ if ds_id is NOT null then
+ perform portal_datasource__delete(ds_id);
+ end if;
+
+return 0;
+
+end;' language 'plpgsql';
+
+select inline_0 ();
+
+drop function inline_0 ();
+
+-- create the implementation
+select acs_sc_impl__delete (
+ 'portal_datasource',
+ 'wps_admin_portlet'
+);
+
+-- delete all the hooks
+select acs_sc_impl_alias__delete (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'GetMyName'
+);
+
+select acs_sc_impl_alias__delete (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'GetPrettyName'
+);
+
+select acs_sc_impl_alias__delete (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'Link'
+);
+
+select acs_sc_impl_alias__delete (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'AddSelfToPage'
+);
+
+select acs_sc_impl_alias__delete (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'Show'
+);
+
+select acs_sc_impl_alias__delete (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'Edit'
+);
+
+select acs_sc_impl_alias__delete (
+ 'portal_datasource',
+ 'wps_admin_portlet',
+ 'RemoveSelfFromPage'
+);
+
+-- Add the binding
+select acs_sc_binding__delete (
+ 'portal_datasource',
+ 'wps_admin_portlet'
+);
Index: openacs-4/packages/dotlrn-wps/sql/postgresql/wps-portlet-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/sql/postgresql/wps-portlet-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/sql/postgresql/wps-portlet-create.sql 25 Sep 2003 16:35:42 -0000 1.1
@@ -0,0 +1,194 @@
+--
+-- Copyright (C) 2001, 2002 MIT
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 2 of the License, or (at your option) any later
+-- version.
+--
+-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-- details.
+--
+
+--
+-- /wps-portlet/sql/postgresql/wps-portlet-create.sql
+--
+
+-- Creates wps portlet
+
+-- Copyright (C) 2003 MIT
+-- @author Rocael Hernandez (roc@viaro.net)
+-- @creation-date 2003-05-24
+
+-- $Id: wps-portlet-create.sql,v 1.1 2003/09/25 16:35:42 rocaelh Exp $
+
+-- This is free software distributed under the terms of the GNU Public
+-- License version 2 or higher. Full text of the license is available
+-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html
+
+create function inline_0()
+returns integer as '
+declare
+ ds_id portal_datasources.datasource_id%TYPE;
+begin
+
+ ds_id = portal_datasource__new(
+ ''wps_portlet'', -- Name
+ ''Wps portlet'' -- description
+ );
+
+ -- the standard 4 params
+
+ -- shadeable_p
+ perform portal_datasource__set_def_param (
+ ds_id, -- datasource_id
+ ''t'', -- config_required_p
+ ''t'', -- configured_p
+ ''shadeable_p'', -- key
+ ''t'' -- value
+);
+
+
+ -- hideable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''hideable_p'',
+ ''t''
+);
+
+ -- user_editable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''user_editable_p'',
+ ''f''
+);
+
+ -- shaded_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''shaded_p'',
+ ''f''
+);
+
+ -- link_hideable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''link_hideable_p'',
+ ''t''
+);
+
+-- wps-specific params
+
+ -- community_id must be configured
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''f'',
+ ''package_id'',
+ ''''
+);
+
+ return 0;
+
+end;' language 'plpgsql';
+
+select inline_0();
+
+drop function inline_0();
+
+
+create function inline_1()
+returns integer as '
+begin
+
+ -- create the implementation
+ perform acs_sc_impl__new (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''wps_portlet''
+ );
+
+ -- add all the hooks
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''GetMyName'',
+ ''wps_portlet::get_my_name'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''GetPrettyName'',
+ ''wps_portlet::get_pretty_name'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''Link'',
+ ''wps_portlet::link'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''AddSelfToPage'',
+ ''wps_portlet::add_self_to_page'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''Show'',
+ ''wps_portlet::show'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''Edit'',
+ ''wps_portlet::edit'',
+ ''TCL''
+ );
+
+ perform acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''RemoveSelfFromPage'',
+ ''wps_portlet::remove_self_from_page'',
+ ''TCL''
+ );
+
+ -- Add the binding
+ perform acs_sc_binding__new (
+ ''portal_datasource'',
+ ''wps_portlet''
+ );
+
+ return 0;
+end;' language 'plpgsql';
+
+select inline_1();
+
+drop function inline_1();
+
+
+\i wps-admin-portlet-create.sql
Index: openacs-4/packages/dotlrn-wps/sql/postgresql/wps-portlet-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/sql/postgresql/wps-portlet-drop.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/sql/postgresql/wps-portlet-drop.sql 25 Sep 2003 16:35:42 -0000 1.1
@@ -0,0 +1,122 @@
+--
+-- Copyright (C) 2001, 2002 MIT
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN is free software; you can redistribute it and/or modify it under the
+-- terms of the GNU General Public License as published by the Free Software
+-- Foundation; either version 2 of the License, or (at your option) any later
+-- version.
+--
+-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+-- details.
+--
+
+--
+-- /wps-portlet/sql/oracle/wps-portlet-drop.sql
+--
+
+-- Drops wps portlet
+
+-- Copyright (C) 2003 MIT
+-- @author Rocael Hernandez (roc@viaro.net)
+-- @creation-date 2003-05-24
+
+-- $Id: wps-portlet-drop.sql,v 1.1 2003/09/25 16:35:42 rocaelh Exp $
+
+-- This is free software distributed under the terms of the GNU Public
+-- License version 2 or higher. Full text of the license is available
+-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html
+--
+-- PostGreSQL port samir@symphinity.com
+--
+
+
+create function inline_1()
+returns integer as '
+declare
+ ds_id portal_datasources.datasource_id%TYPE;
+begin
+
+ select datasource_id into ds_id
+ from portal_datasources
+ where name = ''wps_portlet'';
+
+ if not found then
+ RAISE EXCEPTION '' No datasource id found '', ds_id;
+ ds_id := null;
+ end if;
+
+ if ds_id is NOT null then
+ perform portal_datasource__delete(ds_id);
+ end if;
+
+ -- drop the hooks
+ perform acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''GetMyName''
+ );
+
+ perform acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''GetPrettyName''
+ );
+
+
+ perform acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''Link''
+ );
+
+ perform acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''AddSelfToPage''
+ );
+
+ perform acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''Show''
+ );
+
+ perform acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''Edit''
+ );
+
+ perform acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''wps_portlet'',
+ ''RemoveSelfFromPage''
+ );
+
+ -- Drop the binding
+ perform acs_sc_binding__delete (
+ ''portal_datasource'',
+ ''wps_portlet''
+ );
+
+ -- drop the impl
+ perform acs_sc_impl__delete (
+ ''portal_datasource'',
+ ''wps_portlet''
+ );
+
+ return 0;
+end;' language 'plpgsql';
+
+select inline_1();
+drop function inline_1();
+
+\i wps-admin-portlet-drop.sql
+
+
+
+
Index: openacs-4/packages/dotlrn-wps/tcl/dotlrn-wps-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/tcl/dotlrn-wps-procs-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/tcl/dotlrn-wps-procs-oracle.xql 25 Sep 2003 16:26:22 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+oracle8.1.6
+
+
+
+ begin
+ wps.clone (
+ old_package_id => :old_package_id,
+ new_package_id => :new_package_id
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/dotlrn-wps/tcl/dotlrn-wps-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/tcl/dotlrn-wps-procs-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/tcl/dotlrn-wps-procs-postgresql.xql 25 Sep 2003 16:26:22 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+
+postgresql7.1
+
+
+
+ select wps__clone (
+ :old_package_id,
+ :new_package_id
+ );
+
+
+
+
+
Index: openacs-4/packages/dotlrn-wps/tcl/dotlrn-wps-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/tcl/dotlrn-wps-procs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/tcl/dotlrn-wps-procs.tcl 25 Sep 2003 16:26:22 -0000 1.1
@@ -0,0 +1,221 @@
+#
+# Copyright (C) 2001, 2002 MIT
+#
+# This file is part of dotLRN.
+#
+# dotLRN is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+
+ad_library {
+
+ Procs to set up the dotLRN news applet
+
+ @author ben@openforce.net,arjun@openforce.net
+ @version $Id: dotlrn-wps-procs.tcl,v 1.1 2003/09/25 16:26:22 rocaelh Exp $
+
+}
+
+namespace eval dotlrn_wps {
+
+ ad_proc -public applet_key {
+ } {
+ What's my applet key?
+ } {
+ return dotlrn_wps
+ }
+
+ ad_proc -public package_key {
+ } {
+ What package do I deal with?
+ } {
+ return wp-slim
+ }
+
+ ad_proc -public my_package_key {
+ } {
+ What package do I deal with?
+ } {
+ return "dotlrn-wps"
+ }
+
+ ad_proc -public get_pretty_name {
+ } {
+ returns the pretty name
+ } {
+ return "Wimpy Point Slim"
+ }
+
+ ad_proc -public add_applet {
+ } {
+ One time init - must be repeatable!
+ } {
+ dotlrn_applet::add_applet_to_dotlrn -applet_key [applet_key] -package_key [my_package_key]
+ }
+
+ ad_proc -public remove_applet {
+ } {
+ One time destroy.
+ } {
+ dotlrn_applet::remove_applet_from_dotlrn -applet_key [applet_key]
+ }
+
+ ad_proc -public add_applet_to_community {
+ community_id
+ } {
+ Add the wps applet to a specifc dotlrn community
+ } {
+ set portal_id [dotlrn_community::get_portal_id -community_id $community_id]
+
+ # create the wps package instance (all in one, I've mounted it)
+ set package_id [dotlrn::instantiate_and_mount $community_id [package_key]]
+
+ # set up the admin portal
+ set admin_portal_id [dotlrn_community::get_admin_portal_id \
+ -community_id $community_id
+ ]
+
+ wps_admin_portlet::add_self_to_page \
+ -portal_id $admin_portal_id \
+ -package_id $package_id
+
+ set args [ns_set create]
+ ns_set put $args package_id $package_id
+ add_portlet_helper $portal_id $args
+
+ return $package_id
+ }
+
+ ad_proc -public remove_applet_from_community {
+ community_id
+ } {
+ remove the applet from the community
+ } {
+ ad_return_complaint 1 "[applet_key] remove_applet_from_community not implimented!"
+ }
+
+ ad_proc -public add_user {
+ user_id
+ } {
+ one time user-specifuc init
+ } {
+ # noop
+ }
+
+ ad_proc -public remove_user {
+ user_id
+ } {
+ } {
+ ad_return_complaint 1 "[applet_key] remove_user not implimented!"
+ }
+
+ ad_proc -public add_user_to_community {
+ community_id
+ user_id
+ } {
+ Add a user to a specifc dotlrn community
+ } {
+ set package_id [dotlrn_community::get_applet_package_id -community_id $community_id -applet_key [applet_key]]
+ set portal_id [dotlrn::get_portal_id -user_id $user_id]
+
+ # use "append" here since we want to aggregate
+ set args [ns_set create]
+ ns_set put $args package_id $package_id
+ ns_set put $args param_action append
+ add_portlet_helper $portal_id $args
+ }
+
+ ad_proc -public remove_user_from_community {
+ community_id
+ user_id
+ } {
+ Remove a user from a community
+ } {
+ set package_id [dotlrn_community::get_applet_package_id -community_id $community_id -applet_key [applet_key]]
+ set portal_id [dotlrn::get_portal_id -user_id $user_id]
+
+ set args [ns_set create]
+ ns_set put $args package_id $package_id
+
+ remove_portlet $portal_id $args
+ }
+
+ ad_proc -public add_portlet {
+ portal_id
+ } {
+ A helper proc to add the underlying portlet to the given portal.
+
+ @param portal_id
+ } {
+ # simple, no type specific stuff, just set some dummy values
+
+ set args [ns_set create]
+ ns_set put $args package_id 0
+ ns_set put $args param_action overwrite
+ add_portlet_helper $portal_id $args
+ }
+
+ ad_proc -public add_portlet_helper {
+ portal_id
+ args
+ } {
+ A helper proc to add the underlying portlet to the given portal.
+
+ @param portal_id
+ @param args an ns_set
+ } {
+ wps_portlet::add_self_to_page \
+ -portal_id $portal_id \
+ -package_id [ns_set get $args package_id] \
+ -param_action [ns_set get $args param_action]
+ }
+
+ ad_proc -public remove_portlet {
+ portal_id
+ args
+ } {
+ A helper proc to remove the underlying portlet from the given portal.
+
+ @param portal_id
+ @param args A list of key-value pairs (possibly user_id, community_id, and more)
+ } {
+ wps_portlet::remove_self_from_page \
+ -portal_id $portal_id \
+ -package_id [ns_set get $args package_id]
+ }
+
+ ad_proc -public clone {
+ old_community_id
+ new_community_id
+ } {
+ Clone this applet's content from the old community to the new one
+ } {
+ ns_log notice "Cloning: [applet_key]"
+ set new_package_id [add_applet_to_community $new_community_id]
+ set old_package_id [dotlrn_community::get_applet_package_id \
+ -community_id $old_community_id \
+ -applet_key [applet_key]
+ ]
+
+ db_exec_plsql call_wps_clone {}
+ return $new_package_id
+ }
+
+ ad_proc -public change_event_handler {
+ community_id
+ event
+ old_value
+ new_value
+ } {
+ listens for the following events:
+ } {
+ }
+
+}
Index: openacs-4/packages/dotlrn-wps/tcl/wps-admin-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/tcl/Attic/wps-admin-portlet-procs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/tcl/wps-admin-portlet-procs.tcl 25 Sep 2003 16:35:43 -0000 1.1
@@ -0,0 +1,90 @@
+#
+# Copyright (C) 2001, 2002 MIT
+#
+# This file is part of dotLRN.
+#
+# dotLRN is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+
+ad_library {
+
+ Procedures to support the wps admin portlet
+
+ @creation-date Jan 2002
+ @author ben@openforce.net
+ @cvs-id $Id: wps-admin-portlet-procs.tcl,v 1.1 2003/09/25 16:35:43 rocaelh Exp $
+
+}
+
+namespace eval wps_admin_portlet {
+
+ ad_proc -private get_my_name {
+ } {
+ return "wps_admin_portlet"
+ }
+
+ ad_proc -public get_pretty_name {
+ } {
+ return "Wimpy Point Administration"
+ }
+
+ ad_proc -private my_package_key {
+ } {
+ return "wps-portlet"
+ }
+
+ ad_proc -public link {
+ } {
+ return ""
+ }
+
+ ad_proc -public add_self_to_page {
+ {-portal_id:required}
+ {-page_name ""}
+ {-package_id:required}
+ } {
+ Adds a wps admin PE to the given portal
+
+ @param portal_id The page to add self to
+ @param package_id The package_id of the wps package
+
+ @return element_id The new element's id
+ } {
+ return [portal::add_element_parameters \
+ -portal_id $portal_id \
+ -portlet_name [get_my_name] \
+ -key package_id \
+ -value $package_id
+ ]
+ }
+
+ ad_proc -public remove_self_from_page {
+ {-portal_id:required}
+ } {
+ Removes a wps admin PE from the given page
+ } {
+ portal::remove_element \
+ -portal_id $portal_id \
+ -portlet_name [get_my_name]
+ }
+
+ ad_proc -public show {
+ cf
+ } {
+ } {
+ portal::show_proc_helper \
+ -package_key [my_package_key] \
+ -config_list $cf \
+ -template_src "wps-admin-portlet"
+
+ }
+
+}
Index: openacs-4/packages/dotlrn-wps/tcl/wps-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/tcl/Attic/wps-portlet-procs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/tcl/wps-portlet-procs.tcl 25 Sep 2003 16:35:43 -0000 1.1
@@ -0,0 +1,103 @@
+#
+# Copyright (C) 2001, 2002 MIT
+#
+# This file is part of dotLRN.
+#
+# dotLRN is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+
+ad_library {
+
+ Procedures to support the news portlet
+
+ @creation-date Nov 2001
+ @author arjun@openforce.net
+ @cvs-id $Id: wps-portlet-procs.tcl,v 1.1 2003/09/25 16:35:43 rocaelh Exp $
+
+}
+
+namespace eval wps_portlet {
+
+ ad_proc -private get_my_name {
+ } {
+ return "wps_portlet"
+ }
+
+ ad_proc -private my_package_key {
+ } {
+ return "wps-portlet"
+ }
+
+ ad_proc -public get_pretty_name {
+ } {
+ return [parameter::get_from_package_key \
+ -package_key [my_package_key] \
+ -parameter pretty_name \
+ -default "Wimpy Point"
+ ]
+ }
+
+ ad_proc -public link {
+ } {
+ return ""
+ }
+
+ ad_proc -public add_self_to_page {
+ {-portal_id:required}
+ {-package_id:required}
+ {-param_action:required}
+ } {
+ Adds a wps PE to the given portal.
+
+ @param portal_id The page to add self to
+ @param package_id The community with the folder
+
+ @return element_id The new element's id
+ } {
+ return [portal::add_element_parameters \
+ -portal_id $portal_id \
+ -portlet_name [get_my_name] \
+ -value $package_id \
+ -force_region [parameter::get_from_package_key \
+ -parameter "wps_portlet_force_region" \
+ -package_key [my_package_key]] \
+ -pretty_name [get_pretty_name] \
+ -param_action $param_action
+ ]
+ }
+
+ ad_proc -public remove_self_from_page {
+ {-portal_id:required}
+ {-package_id:required}
+ } {
+ Removes a wps PE from the given page or the package_id of the
+ wps package from the portlet if there are others remaining
+
+ @param portal_id The page to remove self from
+ @param package_id
+ } {
+ portal::remove_element_parameters \
+ -portal_id $portal_id \
+ -portlet_name [get_my_name] \
+ -value $package_id
+ }
+
+ ad_proc -public show {
+ cf
+ } {
+ } {
+ portal::show_proc_helper \
+ -package_key [my_package_key] \
+ -config_list $cf \
+ -template_src "wps-portlet"
+ }
+
+}
Index: openacs-4/packages/dotlrn-wps/www/wps-admin-portlet-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/www/Attic/wps-admin-portlet-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/www/wps-admin-portlet-oracle.xql 25 Sep 2003 16:35:43 -0000 1.1
@@ -0,0 +1,23 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select i.item_id as pres_item_id,
+ p.pres_title as title,
+ acs_permission.permission_p(i.item_id, :user_id, 'admin') as admin_p,
+ to_char(ao.creation_date, 'Month DD, YYYY') as creation_date
+ from cr_items i, cr_wp_presentations p, acs_objects ao
+ where i.live_revision = p.presentation_id
+ and ao.object_id = i.item_id
+ and ao.creation_user = :user_id
+ and ao.context_id = :package_id
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-wps/www/wps-admin-portlet-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/www/Attic/wps-admin-portlet-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/www/wps-admin-portlet-postgresql.xql 25 Sep 2003 16:35:43 -0000 1.1
@@ -0,0 +1,23 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select i.item_id as pres_item_id,
+ p.pres_title as title,
+ acs_permission__permission_p(i.item_id, :user_id, 'admin') as admin_p,
+ to_char(ao.creation_date, 'Month DD, YYYY') as creation_date
+ from cr_items i, cr_wp_presentations p, acs_objects ao
+ where i.live_revision = p.presentation_id
+ and ao.object_id = i.item_id
+ and ao.creation_user = :user_id
+ and ao.context_id = :package_id
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-wps/www/wps-admin-portlet.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/www/Attic/wps-admin-portlet.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/www/wps-admin-portlet.adp 25 Sep 2003 16:35:43 -0000 1.1
@@ -0,0 +1,19 @@
+<%
+# @author Rocael Hernandez (roc@viaro.net)
+%>
+
+
+
+
+ No Presentations Available
+
+
+ Create a new presentation.
Index: openacs-4/packages/dotlrn-wps/www/wps-admin-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/www/Attic/wps-admin-portlet.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/www/wps-admin-portlet.tcl 25 Sep 2003 16:35:43 -0000 1.1
@@ -0,0 +1,42 @@
+ad_page_contract {
+ @author Rocael Hernandez (roc@viaro.net)
+ @creation-date 2003-05-24
+
+} -properties {
+
+}
+
+# Configuration
+array set config $cf
+
+# Should be a list already!
+set list_of_package_ids $config(package_id)
+
+if {[llength $list_of_package_ids] > 1} {
+ # We have a problem!
+ return -code error "There should be only one instance of Wimpy Point for admin purposes"
+}
+
+set package_id [lindex $list_of_package_ids 0]
+
+
+set user_id [ad_verify_and_get_user_id]
+
+
+db_multirow presentations select_presentations {
+
+ select i.item_id as pres_item_id,
+ p.pres_title as title,
+ acs_permission__permission_p(i.item_id, :user_id, 'admin') as admin_p,
+ to_char(ao.creation_date, 'Month DD, YYYY') as creation_date
+ from cr_items i, cr_wp_presentations p, acs_objects ao
+ where i.live_revision = p.presentation_id
+ and ao.object_id = i.item_id
+ and ao.creation_user = :user_id
+ and ao.context_id = :package_id
+
+}
+
+set url [lindex [site_node::get_url_from_object_id -object_id $package_id] 0]
+
+ad_return_template
Index: openacs-4/packages/dotlrn-wps/www/wps-portlet-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/www/Attic/wps-portlet-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/www/wps-portlet-oracle.xql 25 Sep 2003 16:35:43 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+ oracle8.1.6
+
+
+
+ select o.context_id as package_id, i.item_id as pres_item_id,
+ acs_object.name(apm_package.parent_id(o.context_id)) as parent_name,
+ p.pres_title, (select site_node.url(site_nodes.node_id) from site_nodes where site_nodes.object_id = o.context_id) as url
+ from cr_items i, cr_wp_presentations p , acs_objects o
+ where o.context_id in ( [join $list_of_package_ids ", "] )
+ and p.presentation_id = i.live_revision
+ and i.item_id = o.object_id
+ and p.public_p = 't'
+ order by i.item_id desc, pres_title
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-wps/www/wps-portlet-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/www/Attic/wps-portlet-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/www/wps-portlet-postgresql.xql 25 Sep 2003 16:35:43 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+ postgresql7.1
+
+
+
+ select o.context_id as package_id, i.item_id as pres_item_id,
+ acs_object__name(apm_package__parent_id(o.context_id)) as parent_name,
+ p.pres_title, (select site_node__url(site_nodes.node_id) from site_nodes where site_nodes.object_id = o.context_id) as url
+ from cr_items i, cr_wp_presentations p , acs_objects o
+ where o.context_id in ( [join $list_of_package_ids ", "] )
+ and p.presentation_id = i.live_revision
+ and i.item_id = o.object_id
+ and p.public_p = 't'
+ order by i.item_id desc, pres_title
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-wps/www/wps-portlet.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/www/Attic/wps-portlet.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/www/wps-portlet.adp 25 Sep 2003 16:35:43 -0000 1.1
@@ -0,0 +1,68 @@
+<%
+# @author Rocael Hernandez (roc@viaro.net)
+%>
+
+
+
+ <%
+ set new_package_id ""
+ set old_package_id ""
+ %>
+
+
+
+
+
+
+
+ @presentation_name@
+ [ Print View ]
+
+
+
+ No Presentations Available
+
+
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-wps/www/wps-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/www/Attic/wps-portlet.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-wps/www/wps-portlet.tcl 25 Sep 2003 16:35:43 -0000 1.1
@@ -0,0 +1,35 @@
+ad_page_contract {
+ @author Rocael Hernandez (roc@viaro.net)
+ @creation-date 2003-05-24
+
+} -properties {
+
+}
+
+array set config $cf
+
+set shaded_p $config(shaded_p)
+set list_of_package_ids $config(package_id)
+set package_id [lindex $list_of_package_ids 0]
+set one_instance_p [ad_decode [llength $list_of_package_ids] 1 1 0]
+set user_id [ad_verify_and_get_user_id]
+
+set counter 0
+db_multirow presentations select_presentations { *SQL* } {
+ incr counter
+ # we don't want to fill the users portlet with 1000 presentations! roc@viaro.net
+ # specially true in users portal page, we do it this way because the lack of oracle
+ # on limiting the amount of rows returned
+ if {$counter > 25} {break}
+}
+
+if {${presentations:rowcount} == 1} {
+ set presentation_name [lindex [array get {presentations:1} pres_title] 1]
+ set presentation_url [lindex [array get {presentations:1} url] 1]
+ set presentation_id [lindex [array get {presentations:1} pres_item_id] 1]
+
+}
+
+
+
+