Index: openacs-4/packages/dotlrn-lorsm/dotlrn-lorsm.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-lorsm/dotlrn-lorsm.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-lorsm/dotlrn-lorsm.info 22 Apr 2004 06:52:54 -0000 1.1 @@ -0,0 +1,32 @@ + + + + + dotLRN LORS Management Applet + dotLRN LORS Management Applets + f + t + + + + 0 + + + + + Ernie Ghiglione + 2004-04-10 + OpenACS + + + + + + + + + + + + + Index: openacs-4/packages/dotlrn-lorsm/sql/postgresql/dotlrn-lorsm-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-lorsm/sql/postgresql/Attic/dotlrn-lorsm-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-lorsm/sql/postgresql/dotlrn-lorsm-create.sql 22 Apr 2004 06:52:54 -0000 1.1 @@ -0,0 +1,149 @@ +-- 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 LORSm applet for dotLRN +-- +-- @author Ernie Ghiglione (ErnieG@mm.st) +-- @creation-date 2004-04-10 +-- @cvs-id $Id: dotlrn-lorsm-create.sql,v 1.1 2004/04/22 06:52:54 ernieg Exp $ +-- + +-- create the implementation +select acs_sc_impl__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'dotlrn_lorsm' +); + +-- add all the hooks + +-- GetPrettyName +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'GetPrettyName', + 'dotlrn_lorsm::get_pretty_name', + 'TCL' +); + +-- AddApplet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'AddApplet', + 'dotlrn_lorsm::add_applet', + 'TCL' +); + +-- RemoveApplet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'RemoveApplet', + 'dotlrn_lorsm::remove_applet', + 'TCL' +); + +-- AddAppletToCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'AddAppletToCommunity', + 'dotlrn_lorsm::add_applet_to_community', + 'TCL' +); + +-- RemoveAppletFromCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'RemoveAppletFromCommunity', + 'dotlrn_lorsm::remove_applet_from_community', + 'TCL' +); + +-- AddUser +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'AddUser', + 'dotlrn_lorsm::add_user', + 'TCL' +); + +-- RemoveUser +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'RemoveUser', + 'dotlrn_lorsm::remove_user', + 'TCL' +); + +-- AddUserToCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'AddUserToCommunity', + 'dotlrn_lorsm::add_user_to_community', + 'TCL' +); + +-- RemoveUserFromCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'RemoveUserFromCommunity', + 'dotlrn_lorsm::remove_user_from_community', + 'TCL' +); + +-- AddPortlet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'AddPortlet', + 'dotlrn_lorsm::add_portlet', + 'TCL' + ); + +-- RemovePortlet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'RemovePortlet', + 'dotlrn_lorsm::remove_portlet', + 'TCL' +); + +-- Clone +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'Clone', + 'dotlrn_lorsm::clone', + 'TCL' +); + +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_lorsm', + 'ChangeEventHandler', + 'dotlrn_lorsm::change_event_handler', + 'TCL' +); + +-- Add the binding +select acs_sc_binding__new ( + 'dotlrn_applet', + 'dotlrn_lorsm' +); Index: openacs-4/packages/dotlrn-lorsm/tcl/dotlrn-lorsm-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-lorsm/tcl/dotlrn-lorsm-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-lorsm/tcl/dotlrn-lorsm-procs-postgresql.xql 22 Apr 2004 06:52:54 -0000 1.1 @@ -0,0 +1,16 @@ + + + +postgresql7.1 + + + + select lorsm__clone ( + :old_package_id, + :new_package_id + ); + + + + + Index: openacs-4/packages/dotlrn-lorsm/tcl/dotlrn-lorsm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-lorsm/tcl/dotlrn-lorsm-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-lorsm/tcl/dotlrn-lorsm-procs.tcl 22 Apr 2004 06:52:54 -0000 1.1 @@ -0,0 +1,223 @@ +# +# 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 LORSm applet + + @author Ernie Ghiglione (ErnieG@mm.st) + @version $Id: dotlrn-lorsm-procs.tcl,v 1.1 2004/04/22 06:52:54 ernieg Exp $ + +} + +namespace eval dotlrn_lorsm { + + ad_proc -public applet_key { + } { + What's my applet key? + } { + return "dotlrn_lorsm" + } + + ad_proc -public package_key { + } { + What package do I deal with? + } { + return "lorsm" + } + + ad_proc -public my_package_key { + } { + What's my package key? + } { + return "dotlrn-lorsm" + } + + ad_proc -public get_pretty_name { + } { + returns the pretty name + } { + return "LORS Management" + } + + ad_proc -public add_applet { + } { + Add the lorsm applet to dotlrn. 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 { + community_id + package_id + } { + remove the applet + } { + ad_return_complaint 1 "[applet_key] remove_applet not implemented!" + } + + ad_proc -public add_applet_to_community { + community_id + } { + Add the lorsm applet to a specifc dotlrn community + } { + set portal_id [dotlrn_community::get_portal_id -community_id $community_id] + + # create the lorsm 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 + ] + + lorsm_admin_portlet::add_self_to_page \ + -portal_id $admin_portal_id \ + -package_id $package_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 + 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 implemented!" + } + + 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 implemented!" + } + + 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 + } { + lorsm_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) + } { + lorsm_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_lorsm_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/lorsm-portlet/lorsm-portlet.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/lorsm-portlet.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm-portlet/lorsm-portlet.info 22 Apr 2004 06:55:45 -0000 1.1 @@ -0,0 +1,32 @@ + + + + + LORS Management Portlet + LORS Management Portlets + f + t + + + + 0 + + + + + Ernie Ghiglione + 2004-04-10 + OpenACS + + + + + + + + + + + + + Index: openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-admin-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-admin-portlet-create.sql 22 Apr 2004 06:55:46 -0000 1.1 @@ -0,0 +1,151 @@ +-- /lorsm-portlet/sql/postgresql/lorsm-admin-portlet-create.sql +-- +-- Creates LORS Management portlet +-- +-- @author Ernie Ghiglione (ErnieG@mm.st) +-- @creation-date 2004-04-10 +-- @cvs-id $Id: lorsm-admin-portlet-create.sql,v 1.1 2004/04/22 06:55:46 ernieg Exp $ +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id = portal_datasource__new( + ''lorsm_admin_portlet'', + ''Displays a folder_id'' + ); + +RAISE NOTICE '' created new ds''; + + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''f'' + ); + +RAISE NOTICE '' set shadeable''; + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''f'' + ); + +RAISE NOTICE '' set hideable''; + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' + ); + + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' + ); + + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' + ); + + 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 the implementation +select acs_sc_impl__new ( + 'portal_datasource', + 'lorsm_admin_portlet', + 'lorsm_admin_portlet' +); + +-- add all the hooks +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_admin_portlet', + 'GetMyName', + 'lorsm_admin_portlet::get_my_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_admin_portlet', + 'GetPrettyName', + 'lorsm_admin_portlet::get_pretty_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_admin_portlet', + 'Link', + 'lorsm_admin_portlet::link', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_admin_portlet', + 'AddSelfToPage', + 'lorsm_admin_portlet::add_self_to_page', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_admin_portlet', + 'Show', + 'lorsm_admin_portlet::show', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_admin_portlet', + 'Edit', + 'lorsm_admin_portlet::edit', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_admin_portlet', + 'RemoveSelfFromPage', + 'lorsm_admin_portlet::remove_self_from_page', + 'TCL' +); + +-- Add the binding +select acs_sc_binding__new( + 'portal_datasource', + 'lorsm_admin_portlet' +); Index: openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-portlet-create.sql 22 Apr 2004 06:55:46 -0000 1.1 @@ -0,0 +1,156 @@ +-- /lorsm-portlet/sql/postgresql/lorsm-portlet-create.sql +-- +-- Creates LORS Management portlet +-- +-- @author Ernie Ghiglione (ErnieG@mm.st) +-- @creation-date 2004-04-10 +-- @cvs-id $Id: lorsm-portlet-create.sql,v 1.1 2004/04/22 06:55:46 ernieg Exp $ +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id = portal_datasource__new( + ''lorsm_portlet'', + ''Displays a Folder_id'' + ); + + +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''t'' +); + +perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + +perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + +perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + +perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + +perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''style'', + ''list'' +); + +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 the implementation +select acs_sc_impl__new( + 'portal_datasource', + 'lorsm_portlet', + 'lorsm_portlet' +); + + +-- add all the hooks +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_portlet', + 'GetMyName', + 'lorsm_portlet::get_my_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_portlet', + 'GetPrettyName', + 'lorsm_portlet::get_pretty_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_portlet', + 'Link', + 'lorsm_portlet::link', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_portlet', + 'AddSelfToPage', + 'lorsm_portlet::add_self_to_page', + 'TCL' + ); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_portlet', + 'Show', + 'lorsm_portlet::show', + 'TCL' + ); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_portlet', + 'Edit', + 'lorsm_portlet::edit', + 'TCL' + ); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'lorsm_portlet', + 'RemoveSelfFromPage', + 'lorsm_portlet::remove_self_from_page', + 'TCL' + ); + + -- Add the binding +select acs_sc_binding__new ( + 'portal_datasource', + 'lorsm_portlet' +); + +\i lorsm-admin-portlet-create.sql Index: openacs-4/packages/lorsm-portlet/tcl/lorsm-admin-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/tcl/lorsm-admin-portlet-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm-portlet/tcl/lorsm-admin-portlet-procs.tcl 22 Apr 2004 06:55:46 -0000 1.1 @@ -0,0 +1,71 @@ +ad_library { + + Procedures to support the LORS management portlet. + + @creation-date 2004-04-10 + @author Ernie Ghiglione (ErnieG@mm.st) + @cvs-id $Id: lorsm-admin-portlet-procs.tcl,v 1.1 2004/04/22 06:55:46 ernieg Exp $ + +} + +namespace eval lorsm_admin_portlet { + + ad_proc -private get_my_name { + } { + return "lorsm_admin_portlet" + } + + ad_proc -public get_pretty_name { + } { + return "LORS Management Administration" + } + + ad_proc -private my_package_key { + } { + return "lorsm-portlet" + } + + ad_proc -public link { + } { + return "" + } + + ad_proc -public add_self_to_page { + {-portal_id:required} + {-package_id:required} + } { + Adds a LORS mgt admin PE to the given admin portal. There should only + ever be one of these portals on an admin page with only one lorsm_package_id + + @param portal_id The page to add self to + @param package_id the id of the lorsm 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 + } { + Removes a LORS mgt admin PE from the given 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 "lorsm-admin-portlet" + } + +} Index: openacs-4/packages/lorsm-portlet/tcl/lorsm-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/tcl/lorsm-portlet-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm-portlet/tcl/lorsm-portlet-procs.tcl 22 Apr 2004 06:55:46 -0000 1.1 @@ -0,0 +1,87 @@ +ad_library { + + Procedures to support the LORS Management portlet. + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 2004-04-10 + @cvs-id $Id: lorsm-portlet-procs.tcl,v 1.1 2004/04/22 06:55:46 ernieg Exp $ + +} + +namespace eval lorsm_portlet { + + ad_proc -private get_my_name { + } { + return "lorsm_portlet" + } + + ad_proc -private my_package_key { + } { + return "lorsm-portlet" + } + + ad_proc -public get_pretty_name { + } { + return "LORS Management" + } + + ad_proc -public link { + } { + return "" + } + + ad_proc -public add_self_to_page { + {-portal_id:required} + {-package_id:required} + {-param_action:required} + } { + Adds a LORS Mgt PE to the given portal or appends the given + lorsm_package_id to the params of the lorsm pe already there + + @param portal_id The page to add self to + @param package_id the id of the lorsm package for this community + + @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 \ + -pretty_name [get_pretty_name] \ + -force_region [parameter::get_from_package_key \ + -package_key [my_package_key] \ + -parameter "lorsm_portlet_force_region"] \ + -param_action $param_action + ] + } + + ad_proc -public remove_self_from_page { + {-portal_id:required} + {-package_id:required} + } { + Removes a lorsm PE from the given page or just the passed + in lorsm_package_id parameter from the portlet + (that has other lorsm_package_ids) + + @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] \ + -key package_id \ + -value $package_id + } + + ad_proc -public show { + cf + } { + } { + portal::show_proc_helper \ + -package_key [my_package_key] \ + -config_list $cf \ + -template_src "lorsm-portlet" + } + +} Index: openacs-4/packages/lorsm-portlet/www/lorsm-admin-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/www/lorsm-admin-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm-portlet/www/lorsm-admin-portlet.adp 22 Apr 2004 06:55:46 -0000 1.1 @@ -0,0 +1,5 @@ + Index: openacs-4/packages/lorsm-portlet/www/lorsm-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/www/lorsm-admin-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm-portlet/www/lorsm-admin-portlet.tcl 22 Apr 2004 06:55:46 -0000 1.1 @@ -0,0 +1,25 @@ +ad_page_contract { + + The display logic for the LORS Management admin portlet + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 2004-04-10 + @cvs-id $Id: lorsm-admin-portlet.tcl,v 1.1 2004/04/22 06:55:46 ernieg 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 lorsm 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] + +ad_return_template Index: openacs-4/packages/lorsm-portlet/www/lorsm-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/www/lorsm-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm-portlet/www/lorsm-portlet.adp 22 Apr 2004 06:55:46 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + + + +. + + + + + + +   + Index: openacs-4/packages/lorsm-portlet/www/lorsm-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/www/lorsm-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm-portlet/www/lorsm-portlet.tcl 22 Apr 2004 06:55:46 -0000 1.1 @@ -0,0 +1,18 @@ +ad_page_contract { + + The logic for the lorsm portlet. + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 2004-04-10 + @cvs-id $Id: lorsm-portlet.tcl,v 1.1 2004/04/22 06:55:46 ernieg Exp $ + +} -query { +} + +array set config $cf + +set shaded_p $config(shaded_p) +set list_of_package_ids [lsort $config(package_id)] +set one_instance_p [ad_decode [llength $list_of_package_ids] 1 1 0] + +ad_return_template