Index: openacs-4/packages/dotlrn-recruiting/dotlrn-recruiting.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-recruiting/dotlrn-recruiting.info,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-recruiting/dotlrn-recruiting.info 21 Aug 2002 19:08:15 -0000 1.1
@@ -0,0 +1,31 @@
+
+
+
+
+ dotLRN Recruiting
+ dotLRN Recruiting packages
+ f
+ t
+
+
+
+ oracle
+ postgresql
+
+ Dan Chak
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-recruiting/sql/postgresql/dotlrn-recruiting-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-recruiting/sql/postgresql/dotlrn-recruiting-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-recruiting/sql/postgresql/dotlrn-recruiting-create.sql 21 Aug 2002 19:08:15 -0000 1.1
@@ -0,0 +1,154 @@
+--
+-- Copyright (C) 2001, 2002 OpenForce
+--
+-- This file is part of this.
+--
+-- this 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.
+--
+-- this 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 recruiting applet for this
+--
+-- @author Ben Adida (ben@openforce.net)
+-- @creation-date 2002-05-29
+-- @version $Id: dotlrn-recruiting-create.sql,v 1.1 2002/08/21 19:08:15 chak Exp $
+--
+-- ported to postgres by mohan pakkurti (mohan@pakkurti.com)
+-- 2002-07-12
+--
+
+create function inline_0()
+returns integer as '
+declare
+ foo integer;
+begin
+
+ foo := acs_sc_impl__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''dotlrn_recruiting''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''GetPrettyName'',
+ ''dotlrn_recruiting::get_pretty_name'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''AddApplet'',
+ ''dotlrn_recruiting::add_applet'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''RemoveApplet'',
+ ''dotlrn_recruiting::remove_applet'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''AddAppletToCommunity'',
+ ''dotlrn_recruiting::add_applet_to_community'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''RemoveAppletFromCommunity'',
+ ''dotlrn_recruiting::remove_applet_from_community'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''AddUser'',
+ ''dotlrn_recruiting::add_user'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''RemoveUser'',
+ ''dotlrn_recruiting::remove_user'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''AddUserToCommunity'',
+ ''dotlrn_recruiting::add_user_to_community'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''RemoveUserFromCommunity'',
+ ''dotlrn_recruiting::remove_user_from_community'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''AddPortlet'',
+ ''dotlrn_recruiting::add_portlet'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''RemovePortlet'',
+ ''dotlrn_recruiting::remove_portlet'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''Clone'',
+ ''dotlrn_recruiting::clone'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting'',
+ ''ChangeEventHandler'',
+ ''dotlrn_recruiting::change_event_handler'',
+ ''TCL''
+ );
+
+ perform acs_sc_binding__new (
+ ''dotlrn_applet'',
+ ''dotlrn_recruiting''
+ );
+
+ return 0;
+
+end;' language 'plpgsql';
+
+select inline_0();
+drop function inline_0();
Index: openacs-4/packages/dotlrn-recruiting/tcl/dotlrn-recruiting-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-recruiting/tcl/dotlrn-recruiting-procs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-recruiting/tcl/dotlrn-recruiting-procs.tcl 21 Aug 2002 19:08:15 -0000 1.1
@@ -0,0 +1,289 @@
+#
+# Copyright (C) 2001, 2002 OpenForce
+#
+# This file is part of this.
+#
+# this 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.
+#
+# this 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 this Recruiting applet
+
+ @author chak (chak@openforce.net)
+ @author Arjun Sanyal (arjun@openforce.net)
+
+ @version $Id: dotlrn-recruiting-procs.tcl,v 1.1 2002/08/21 19:08:15 chak Exp $
+
+}
+
+namespace eval dotlrn_recruiting {
+
+ ad_proc -public applet_key {
+ } {
+ What's my applet key?
+ } {
+ return dotlrn_recruiting
+ }
+
+ ad_proc -public my_package_key {
+ } {
+ What's my package key?
+ } {
+ return "dotlrn-recruiting"
+ }
+
+ ad_proc -public package_key {
+ } {
+ What package does this applet deal with?
+ } {
+ return recruiting
+ }
+
+ ad_proc -public get_pretty_name {
+ } {
+ return the pretty name of this applet.
+ } {
+ return Recruiting
+ }
+
+ ad_proc -public add_applet {
+ } {
+ Add the recruiting applet to dotlrn - for one-time init
+ Must be repeatable!
+ } {
+ if {![dotlrn_applet::applet_exists_p -applet_key [applet_key]]} {
+
+ dotlrn_applet::add_applet_to_dotlrn \
+ -applet_key [applet_key] \
+ -package_key [my_package_key]
+
+ }
+ }
+
+ ad_proc -public remove_applet {
+ } {
+ remove the applet from dotlrn
+ } {
+ ad_return_complaint 1 "[applet_key] remove_applet not implemented!"
+ }
+
+ ad_proc -public add_applet_to_community {
+ community_id
+ } {
+ Add the recruiting applet to a dotlrn community
+ } {
+ # Create and Mount the recruiting package
+ set package_id [dotlrn::instantiate_and_mount \
+ -mount_point recruiting \
+ $community_id \
+ [package_key] \
+ ]
+
+ # mount attachments under recruiting, if available
+ # attachments requires that dotlrn-fs is already mounted
+ if {[apm_package_registered_p attachments] && [dotlrn_community::applet_active_p -community_id $community_id -applet_key [dotlrn_fs::applet_key]]} {
+
+ set attachments_node_id [site_node::new \
+ -name [attachments::get_url] \
+ -parent_id [site_node::get_node_id_from_object_id -object_id $package_id]
+ ]
+
+ site_node::mount \
+ -node_id $attachments_node_id \
+ -object_id [apm_package_id_from_key attachments]
+
+ set fs_package_id [dotlrn_community::get_applet_package_id \
+ -community_id $community_id \
+ -applet_key [dotlrn_fs::applet_key] \
+ ]
+
+ # map the fs root folder to the package_id of the new recruiting pkg
+ attachments::map_root_folder \
+ -package_id $package_id \
+ -folder_id [fs::get_root_folder -package_id $fs_package_id]
+
+ }
+
+ # Set up permissions for basic members (Admins inherit no problem)
+ set members [dotlrn_community::get_rel_segment_id \
+ -community_id $community_id \
+ -rel_type dotlrn_member_rel \
+ ]
+
+ # community admin should have admin in recruiting/admin. how to do this?
+ # beats me. -dc
+
+ # set up the admin portlet
+ set admin_portal_id [dotlrn_community::get_admin_portal_id \
+ -community_id $community_id \
+ ]
+
+ recruiting_admin_portlet::add_self_to_page \
+ -portal_id $admin_portal_id \
+ -package_id $package_id
+
+ # set up the portlet for this community
+ set portal_id [dotlrn_community::get_portal_id \
+ -community_id $community_id \
+ ]
+
+ # add the portlet to the comm's portal using add_portlet_helper
+ set args [ns_set create]
+ ns_set put $args package_id $package_id
+ ns_set put $args param_action overwrite
+
+ dotlrn_recruiting::add_portlet_helper $portal_id $args
+
+ return $package_id
+ }
+
+ ad_proc -public remove_applet_from_community {
+ community_id
+ } {
+ remove the applet from the given community
+ } {
+ ad_return_complaint 1 "[applet_key] remove_applet_from_community not implemented!"
+ }
+
+ ad_proc -public add_user {
+ user_id
+ } {
+ Called when the user is initially added as a dotlrn user.
+ For one-time init stuff.
+ } {
+ }
+
+ ad_proc -public remove_user {
+ user_id
+ } {
+ called when a user is removed from dotlrn.
+ } {
+ }
+
+ ad_proc -public add_user_to_community {
+ community_id
+ user_id
+ } {
+ Add a user to a specific dotlrn community
+ } {
+ set portal_id [dotlrn::get_portal_id -user_id $user_id]
+ set package_id [dotlrn_community::get_applet_package_id \
+ -community_id $community_id \
+ -applet_key [applet_key] \
+ ]
+ set args [ns_set create]
+ ns_set put $args package_id $package_id
+ ns_set put $args param_action append
+
+ # don't use the cached version
+ dotlrn_recruiting::add_portlet_helper \
+ [dotlrn::get_portal_id_not_cached -user_id $user_id] \
+ $args
+
+ dotlrn_recruiting::add_portlet_helper $portal_id $args
+
+ }
+
+ ad_proc -public remove_user_from_community {
+ community_id
+ user_id
+ } {
+ Remove a user from a community
+ } {
+ set portal_id [dotlrn::get_portal_id -user_id $user_id]
+ set package_id [dotlrn_community::get_applet_package_id \
+ -community_id $community_id \
+ -applet_key [applet_key] \
+ ]
+
+ 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 set up default params for templates.
+
+ @param portal_id
+ } {
+ set args [ns_set create]
+ ns_set put $args package_id 0
+ ns_set put $args display_group_name_p f
+ ns_set put $args param_action overwrite
+
+ set type [dotlrn::get_type_from_portal_id -portal_id $portal_id]
+
+ if {[string equal $type user]} {
+ # portal_id is a user portal template
+ ns_set put $args display_group_name_p t
+ }
+
+ add_portlet_helper $portal_id $args
+ }
+
+ ad_proc -public add_portlet_helper {
+ portal_id
+ args
+ } {
+ This does the call to add the portlet to the given portal.
+ Params for the portlet are set by the calllers.
+
+ @param portal_id
+ @param args An ns_set of params
+ } {
+ recruiting_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] \
+ -display_group_name_p [ns_set get $args display_group_name_p]
+ }
+
+ 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 An ns_set of args
+ } {
+ set package_id [ns_set get $args package_id]
+ recruiting_portlet::remove_self_from_page $portal_id $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
+ } {
+ dotlrn_recruiting::add_applet_to_community $new_community_id
+ }
+
+ ad_proc -public change_event_handler {
+ community_id
+ event
+ old_value
+ new_value
+ } {
+ listens for the following events: rename
+ } {
+ switch $event {
+ }
+ }
+
+}
Index: openacs-4/packages/recruiting-portlet/recruiting-portlet.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/recruiting-portlet.info,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/recruiting-portlet.info 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,40 @@
+
+
+
+
+ Recruiting Portlet
+ Recruiting Portlet
+ f
+ t
+
+
+
+ oracle
+ postgresql
+
+ dan chak
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/recruiting-portlet/sql/postgresql/recruiting-admin-portlet-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/sql/postgresql/recruiting-admin-portlet-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/sql/postgresql/recruiting-admin-portlet-create.sql 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,211 @@
+--
+-- Copyright (C) 2001, 2002 OpenForce
+--
+-- This file is part of this.
+--
+-- this 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.
+--
+-- this 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.
+--
+
+--
+-- packages/forums-portlet/sql/forums-portlets-create.sql
+--
+
+-- Creates forums datasources for portal portlets
+
+-- Copyright (C) 2001 OpenForce
+-- @author chak (chak@openforce.net) and arjun
+-- @creation-date 2002-08-20
+
+-- $Id: recruiting-admin-portlet-create.sql,v 1.1 2002/08/21 19:11:31 chak 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(
+ ''recruiting_admin_portlet'',
+ ''Displays the Recruiting Admin Summary''
+ );
+
+ -- 4 defaults procs
+
+ -- shadeable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''shadeable_p'',
+ ''f''
+);
+
+ -- shaded_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''shaded_p'',
+ ''f''
+);
+
+ -- 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''
+);
+
+ -- link_hideable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''link_hideable_p'',
+ ''t''
+);
+
+
+ -- recruiting_admin-specific procs
+
+ -- 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_0()
+returns integer as '
+declare
+ foo integer;
+begin
+ -- create the implementation
+ foo := acs_sc_impl__new (
+ ''portal_datasource'',
+ ''recruiting_admin_portlet'',
+ ''recruiting_admin_portlet''
+ );
+
+return 0;
+end;' language 'plpgsql';
+select inline_0();
+drop function inline_0();
+
+create function inline_0()
+returns integer as '
+declare
+ foo integer;
+begin
+
+ -- add all the hooks
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_admin_portlet'',
+ ''GetMyName'',
+ ''recruiting_admin_portlet::get_my_name'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_admin_portlet'',
+ ''GetPrettyName'',
+ ''recruiting_admin_portlet::get_pretty_name'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_admin_portlet'',
+ ''Link'',
+ ''recruiting_admin_portlet::link'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_admin_portlet'',
+ ''AddSelfToPage'',
+ ''recruiting_admin_portlet::add_self_to_page'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_admin_portlet'',
+ ''Show'',
+ ''recruiting_admin_portlet::show'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_admin_portlet'',
+ ''Edit'',
+ ''recruiting_admin_portlet::edit'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_admin_portlet'',
+ ''RemoveSelfFromPage'',
+ ''recruiting_admin_portlet::remove_self_from_page'',
+ ''TCL''
+ );
+
+ return 0;
+
+end;' language 'plpgsql';
+select inline_0();
+drop function inline_0();
+
+create function inline_0()
+returns integer as '
+declare
+ foo integer;
+begin
+
+ -- Add the binding
+ perform acs_sc_binding__new (
+ ''portal_datasource'',
+ ''recruiting_admin_portlet''
+ );
+return 0;
+end;' language 'plpgsql';
+select inline_0();
+drop function inline_0();
+
+
Index: openacs-4/packages/recruiting-portlet/sql/postgresql/recruiting-portlet-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/sql/postgresql/recruiting-portlet-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/sql/postgresql/recruiting-portlet-create.sql 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,206 @@
+--
+-- Copyright (C) 2001, 2002 OpenForce
+--
+--
+-- this 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.
+--
+-- this 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.
+--
+
+-- Creates forums datasources for portal portlets
+
+-- Copyright (C) 2001 OpenForce
+-- @author dan chak (chak@openforce.net) and arjun
+-- @creation-date 2002-08-20
+
+-- $Id: recruiting-portlet-create.sql,v 1.1 2002/08/21 19:11:31 chak Exp $
+
+
+create function inline_0()
+returns integer as '
+declare
+ ds_id portal_datasources.datasource_id%TYPE;
+begin
+ ds_id := portal_datasource__new (
+ ''recruiting_portlet'',
+ ''Candidate Recruiting Info''
+ );
+
+ -- 4 defaults procs
+
+ -- shadeable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''shadeable_p'',
+ ''t''
+ );
+
+ -- shaded_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''shaded_p'',
+ ''f''
+ );
+
+ -- 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''
+ );
+
+ -- link_hideable_p
+ perform portal_datasource__set_def_param (
+ ds_id,
+ ''t'',
+ ''t'',
+ ''link_hideable_p'',
+ ''t''
+ );
+
+
+ -- recruiting-specific procs
+
+ -- 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_0()
+returns integer as '
+declare
+ foo integer;
+begin
+ -- create the implementation
+ foo := acs_sc_impl__new (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''recruiting_portlet''
+ );
+
+ return 0;
+
+end;' language 'plpgsql';
+select inline_0();
+drop function inline_0();
+
+create function inline_0()
+returns integer as '
+declare
+ foo integer;
+begin
+
+ -- add all the hooks
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''GetMyName'',
+ ''recruiting_portlet::get_my_name'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''GetPrettyName'',
+ ''recruiting_portlet::get_pretty_name'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''Link'',
+ ''recruiting_portlet::link'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''AddSelfToPage'',
+ ''recruiting_portlet::add_self_to_page'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''Show'',
+ ''recruiting_portlet::show'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''Edit'',
+ ''recruiting_portlet::edit'',
+ ''TCL''
+ );
+
+ foo := acs_sc_impl_alias__new (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''RemoveSelfFromPage'',
+ ''recruiting_portlet::remove_self_from_page'',
+ ''TCL''
+ );
+
+ return 0;
+
+end;' language 'plpgsql';
+select inline_0();
+drop function inline_0();
+
+create function inline_0()
+returns integer as '
+declare
+ foo integer;
+begin
+
+ -- Add the binding
+ perform acs_sc_binding__new (
+ ''portal_datasource'',
+ ''recruiting_portlet''
+ );
+
+ return 0;
+
+end;' language 'plpgsql';
+select inline_0();
+drop function inline_0();
+
+\i recruiting-admin-portlet-create.sql
+
Index: openacs-4/packages/recruiting-portlet/sql/postgresql/recruiting-portlet-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/sql/postgresql/recruiting-portlet-drop.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/sql/postgresql/recruiting-portlet-drop.sql 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,127 @@
+--
+-- Copyright (C) 2001, 2002 OpenForce
+--
+-- This file is part of this.
+--
+-- this 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.
+--
+-- this 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.
+--
+
+--
+-- packages/forums-portlets/sql/forums-portlets-drop.sql
+--
+
+-- Drops forums datasources for portal portlets
+
+-- @author chak (chak@openforce.net) and arjun
+-- @creation-date 2001-30-09
+
+-- $Id: recruiting-portlet-drop.sql,v 1.1 2002/08/21 19:11:31 chak 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
+
+-- begin
+ select datasource_id into ds_id
+ from portal_datasources
+ where name = ''recruiting-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;
+
+return 0;
+
+end;' language 'plpgsql';
+
+select inline_0();
+drop function inline_0();
+
+
+create function inline_1()
+returns integer as '
+declare
+ foo integer;
+begin
+
+ -- add all the hooks
+ foo := acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''GetMyName''
+ );
+
+ foo := acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''GetPrettyName''
+ );
+
+
+ foo := acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''Link''
+ );
+
+ foo := acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''AddSelfToPage''
+ );
+
+ foo := acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''Show''
+ );
+
+ foo := acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''Edit''
+ );
+
+ foo := acs_sc_impl_alias__delete (
+ ''portal_datasource'',
+ ''recruiting_portlet'',
+ ''RemoveSelfFromPage''
+ );
+
+ -- Drop the binding
+ perform acs_sc_binding__delete (
+ ''portal_datasource'',
+ ''recruiting_portlet''
+ );
+
+ -- drop the impl
+ foo := acs_sc_impl__delete (
+ ''portal_datasource'',
+ ''recruiting_portlet''
+ );
+
+ return 0;
+end;' language 'plpgsql';
+
+select inline_1();
+drop function inline_1();
+
+
Index: openacs-4/packages/recruiting-portlet/tcl/recruiting-admin-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/tcl/recruiting-admin-portlet-procs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/tcl/recruiting-admin-portlet-procs.tcl 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,92 @@
+#
+# Copyright (C) 2001, 2002 OpenForce
+#
+# This file is part of this.
+#
+# this 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.
+#
+# this 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 supports recruiting admin portlets
+
+ @creation-date September 30 2001
+ @author arjun@openforce.net
+ @version $Id: recruiting-admin-portlet-procs.tcl,v 1.1 2002/08/21 19:11:31 chak Exp $
+}
+
+namespace eval recruiting_admin_portlet {
+
+ ad_proc -private get_my_name {
+ } {
+ return "recruiting_admin_portlet"
+ }
+
+ ad_proc -public get_pretty_name {
+ } {
+ return "Recruiting Administration"
+ }
+
+ ad_proc -private my_package_key {
+ } {
+ return "recruiting-portlet"
+ }
+
+ ad_proc -public link {
+ } {
+ return ""
+ }
+
+ ad_proc -public add_self_to_page {
+ {-portal_id:required}
+ {-package_id:required}
+ } {
+ Adds a recruiting admin PE to the admin portal
+
+ @return new element_id
+ } {
+ return [portal::add_element_parameters \
+ -portal_id $portal_id \
+ -portlet_name [get_my_name] \
+ -pretty_name [get_pretty_name] \
+ -key package_id \
+ -value $package_id
+ ]
+ }
+
+ ad_proc -public remove_self_from_page {
+ {-portal_id:required}
+ } {
+ Removes the recruiting admin PE from the portal
+ } {
+ 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 "recruiting-admin-portlet"
+ }
+
+ ad_proc -public edit {
+ cf
+ } {
+ } {
+ return ""
+ }
+
+}
Index: openacs-4/packages/recruiting-portlet/tcl/recruiting-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/tcl/recruiting-portlet-procs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/tcl/recruiting-portlet-procs.tcl 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,95 @@
+#
+# Copyright (C) 2001, 2002 OpenForce
+#
+# This file is part of this.
+#
+# this 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.
+#
+# this 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 supports recruiting portlets
+
+ @creation-date September 30 2001
+ @author arjun@openforce.net
+ @version $Id: recruiting-portlet-procs.tcl,v 1.1 2002/08/21 19:11:31 chak Exp $
+
+}
+
+namespace eval recruiting_portlet {
+
+ ad_proc -private get_my_name {
+ } {
+ return "recruiting_portlet"
+ }
+
+ ad_proc -public get_pretty_name {
+ } {
+ return "Candidate Recruiting"
+ }
+
+ ad_proc -private my_package_key {
+ } {
+ return "recruiting-portlet"
+ }
+
+ ad_proc -public link {
+ } {
+ return ""
+ }
+
+ ad_proc -public add_self_to_page {
+ {-portal_id:required}
+ {-package_id:required}
+ {-display_group_name_p:required}
+ {-param_action:required}
+ } {
+ Adds a recruiting PE to the given portal or appends the given recruiting package_id
+ to the recruiting PE that already on the portal
+ } {
+ return [portal::add_element_parameters \
+ -portal_id $portal_id \
+ -portlet_name [get_my_name] \
+ -pretty_name [get_pretty_name] \
+ -value $package_id \
+ -force_region [parameter::get_from_package_key \
+ -package_key [my_package_key] \
+ -parameter "recruiting_portlet_region"] \
+ -extra_params [list "display_group_name_p" $display_group_name_p] \
+ -param_action $param_action
+ ]
+ }
+
+
+ ad_proc -public remove_self_from_page {
+ portal_id
+ package_id
+ } {
+ Removes a recruiting PE from the given page or just the given recruiting's package_id
+ } {
+ portal::remove_element_parameters \
+ -portal_id $portal_id \
+ -portlet_name [get_my_name] \
+ -value $package_id
+ }
+
+ ad_proc -public show {
+ cf
+ } {
+ } {
+ # no return call required with the helper proc
+ portal::show_proc_helper \
+ -package_key [my_package_key] \
+ -config_list $cf \
+ -template_src "recruiting-portlet"
+ }
+
+}
Index: openacs-4/packages/recruiting-portlet/www/recruiting-admin-portlet.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/www/recruiting-admin-portlet.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/www/recruiting-admin-portlet.adp 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,68 @@
+<%
+
+ #
+ # 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.
+ #
+
+%>
+
+
+
+
+
+
+
+Warning:
+
+
+
+
+- There are no status types defined. You must define status types before you can add and adminster candidates.
+
+
+
+
+- No interview criteria has been defined. You should
+define some interview criteria before you begin assigning interviews.
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<%= [ui::table::output_table summary] %>
+ |
+
+
+Go directly to Recruiting Candidate Administration.
+
+
Index: openacs-4/packages/recruiting-portlet/www/recruiting-admin-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/www/recruiting-admin-portlet.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/www/recruiting-admin-portlet.tcl 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,72 @@
+#
+# 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_page_contract {
+ The display logic for the forums admin portlet
+
+ @author Ben Adida (ben@openforce)
+ @cvs_id $Id: recruiting-admin-portlet.tcl,v 1.1 2002/08/21 19:11:31 chak Exp $
+} -properties {
+
+}
+
+array set config $cf
+
+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 forums for admin purposes"
+}
+
+set package_id [lindex $list_of_package_ids 0]
+
+set url [lindex [site_node::get_url_from_object_id -object_id $package_id] 0]
+
+set package_id [ad_conn package_id]
+set default_name [db_string select_package_name {
+ select instance_name from apm_packages where package_id= :package_id
+}]
+
+set encoded_default_name [ns_urlencode $default_name]
+
+db_1row status_types_defined_p {}
+db_1row criteria_defined_p {}
+
+db_1row get_num_candidates {}
+db_1row get_pending_interviews {}
+db_1row get_num_archived_candidates {}
+
+if {$status_types_defined_p != 0} {
+ set candidate_admin_link "(candidate administration)"
+} else {
+ set candidate_admin_link ""
+}
+
+if {$pending_interviews != 0} {
+ set view_interviews_link "(view interviews)"
+} else {
+ set view_interviews_link ""
+}
+
+ui::table::add_unsorted_row summary [list "Candidates: $num_candidates" "$candidate_admin_link"]
+ui::table::add_unsorted_row summary [list "Pending Interviews: $pending_interviews" "$view_interviews_link"]
+
+if {$num_archived_candidates != 0} {
+ ui::table::add_unsorted_row summary [list "$num_archived_candidates candidates have been archived" "(view archived candidates)"]
+}
+
+ad_return_template
Index: openacs-4/packages/recruiting-portlet/www/recruiting-admin-portlet.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/www/recruiting-admin-portlet.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/www/recruiting-admin-portlet.xql 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,44 @@
+
+
+
+
+
+ select count(*) as status_types_defined_p
+ from recruiting_status_types
+ where enabled_p = 't';
+
+
+
+
+
+ select count(*) as criteria_defined_p
+ from recruiting_criteria
+ where enabled_p = 't';
+
+
+
+
+
+ select count(*) as num_candidates
+ from recruiting_candidates
+
+
+
+
+
+ select count(*) as pending_interviews
+ from recruiting_interviews i
+ where (select count(*)
+ from recruiting_ratings r
+ where r.interview_id = i.interview_id) = 0
+
+
+
+
+
+ select count(*) as num_archived_candidates
+ from archived_recruiting_candidates
+
+
+
+
Index: openacs-4/packages/recruiting-portlet/www/recruiting-portlet-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/www/recruiting-portlet-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/www/recruiting-portlet-postgresql.xql 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+
+
Index: openacs-4/packages/recruiting-portlet/www/recruiting-portlet.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/www/recruiting-portlet.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/www/recruiting-portlet.adp 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,31 @@
+<%
+
+ #
+ # 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.
+ #
+
+%>
+
+
+ You have @num_interviews@
+ candidate interviews to complete.
+
+
+ You may view your old
+ candidate interviews.
+
+
+ You have no candidate interviews to complete.
+
Index: openacs-4/packages/recruiting-portlet/www/recruiting-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/www/recruiting-portlet.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/www/recruiting-portlet.tcl 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,41 @@
+#
+# 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.
+#
+
+array set config $cf
+
+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 forums for admin purposes"
+}
+
+set user_id [ad_verify_and_get_user_id]
+set package_id [lindex $list_of_package_ids 0]
+
+set url [lindex [site_node::get_url_from_object_id -object_id $package_id] 0]
+
+set package_id [ad_conn package_id]
+set default_name [db_string select_package_name {
+ select instance_name from apm_packages where package_id= :package_id
+}]
+
+set encoded_default_name [ns_urlencode $default_name]
+
+set new_interviews [db_string num_new_interviews {}]
+set old_interviews [db_string num_old_interviews {}]
+
+ad_return_template
Index: openacs-4/packages/recruiting-portlet/www/recruiting-portlet.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/www/recruiting-portlet.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/www/recruiting-portlet.xql 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,26 @@
+
+
+
+
+
+ select count(*)
+ from recruiting_interviews i
+ where i.interviewer_id = :user_id
+ and (select count(*)
+ from recruiting_ratings r
+ where r.interview_id = i.interview_id) = 0
+
+
+
+
+
+ select count(*)
+ from recruiting_interviews i
+ where i.interviewer_id = :user_id
+ and (select count(*)
+ from recruiting_ratings r
+ where r.interview_id = i.interview_id) != 0
+
+
+
+
Index: openacs-4/packages/recruiting-portlet/www/recruiting-recruiting-portlet.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting-portlet/www/Attic/recruiting-recruiting-portlet.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/recruiting-portlet/www/recruiting-recruiting-portlet.xql 21 Aug 2002 19:11:31 -0000 1.1
@@ -0,0 +1,26 @@
+
+
+
+
+
+ select count(*)
+ from recruiting_interviews i
+ where i.interviewer_id = :user_id
+ and (select count(*)
+ from recruiting_ratings r
+ where r.interview_id = i.interview_id) = 0
+
+
+
+
+
+ select count(*)
+ from recruiting_interviews i
+ where i.interviewer_id = :user_id
+ and (select count(*)
+ from recruiting_ratings r
+ where r.interview_id = i.interview_id) != 0
+
+
+
+