Index: openacs-4/packages/dotlrn/dotlrn.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v diff -u -r1.100 -r1.101 --- openacs-4/packages/dotlrn/dotlrn.info 23 Jul 2002 13:40:45 -0000 1.100 +++ openacs-4/packages/dotlrn/dotlrn.info 26 Jul 2002 21:14:59 -0000 1.101 @@ -24,6 +24,7 @@ + @@ -93,6 +94,7 @@ + @@ -209,6 +211,8 @@ + + @@ -458,39 +462,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/dotlrn/tcl/class-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/class-procs.tcl,v diff -u -r1.40 -r1.41 --- openacs-4/packages/dotlrn/tcl/class-procs.tcl 24 May 2002 01:58:45 -0000 1.40 +++ openacs-4/packages/dotlrn/tcl/class-procs.tcl 26 Jul 2002 21:14:59 -0000 1.41 @@ -36,27 +36,27 @@ ad_proc -public community_type {} { returns the base community type for classes } { - return "dotlrn_class_instance" + return dotlrn_class_instance } ad_proc -public package_key { } { Returns the package key for this package } { - return "dotlrn" + return dotlrn } ad_proc -public one_class_package_key { } { Returns the package key for this package } { - return "dotlrn" + return dotlrn } ad_proc -public get_url_part {} { returns the url part for this community type } { - return "classes" + return classes } ad_proc -public get_url {} { @@ -153,7 +153,7 @@ {-term_id:required} {-pretty_name ""} {-description ""} - {-join_policy "closed"} + {-join_policy closed} } { Creates a new instance of a class for a particular term and year, and returns the class instance key. @@ -169,17 +169,17 @@ if {[empty_string_p $pretty_name]} { set pretty_name "[dotlrn_community::get_community_type_name $class_key]; $term $year" } - set community_key [dotlrn::generate_key -name "${pretty_name}"] + set community_key [dotlrn::generate_key -name $pretty_name] db_transaction { - # Create the community set community_id [dotlrn_community::new \ - -description $description \ - -community_type $class_key \ - -object_type [community_type] \ - -community_key $community_key \ - -pretty_name $pretty_name \ - -extra_vars $extra_vars] + -description $description \ + -community_type $class_key \ + -object_type [community_type] \ + -community_key $community_key \ + -pretty_name $pretty_name \ + -extra_vars $extra_vars \ + ] dotlrn_community::set_active_dates \ -community_id $community_id \ @@ -197,7 +197,7 @@ {-member_state "approved"} } { Assigns a user to a particular role for that class. - Roles in DOTLRN can be student, prof, ta, admin + Roles in dotLRN can be student, prof, ta, admin } { if {[empty_string_p $rel_type]} { set rel_type "dotlrn_student_rel" Index: openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl,v diff -u -r1.29 -r1.30 --- openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 2 Jul 2002 22:31:15 -0000 1.29 +++ openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 26 Jul 2002 21:14:59 -0000 1.30 @@ -36,21 +36,32 @@ permission::set_not_inherit -object_id $package_id } + # we now mount new-portal at the automount point if it's not already mounted, of course set portal_package_key [portal::package_key] set portal_mount_point [portal::automount_point] - # we now mount new-portal at the automount point if it's not already mounted, of course if {[apm_num_instances $portal_package_key] == 0} { - ns_log notice "dotlrn-init: $portal_package_key being automounted at /$portal_mount_point" - dotlrn::mount_package \ -parent_node_id [site_node_id "/"] \ -package_key $portal_package_key \ -url $portal_mount_point \ -directory_p t } + # we now mount attachments if it's not already mounted under dotLRN + set attachments_package_key [attachments::get_package_key] + set attachments_mount_point [attachments::get_url] + + if {![dotlrn::is_package_mounted -package_key $attachments_package_key]} { + ns_log notice "dotlrn-init: $attachments_package_key being automounted at [dotlrn::get_url]/$attachments_mount_point" + dotlrn::mount_package \ + -parent_node_id [dotlrn::get_node_id] \ + -package_key $attachments_package_key \ + -url $attachments_mount_point \ + -directory_p t + } + db_transaction { ns_log notice "dotlrn-init: dotlrn is instantiated, about to call dotlrn_applet::init" Index: openacs-4/packages/dotlrn/tcl/user-type-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/user-type-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/tcl/user-type-procs.tcl 26 Jul 2002 21:14:59 -0000 1.1 @@ -0,0 +1,73 @@ +# +# Copyright (C) 2001, 2002 OpenForce, Inc. +# +# 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 { + + general support for dotLRN user types + + @author yon@openforce.net + @creation-date 2002-07-26 + @version $Id: user-type-procs.tcl,v 1.1 2002/07/26 21:14:59 yon Exp $ + +} + +namespace eval dotlrn::user::type { + + ad_proc -public get { + {-type:required} + } { + get the user type info for the given dotlrn_user_type (cached) + } { + return [util_memoize "dotlrn::user::type::get_not_cached -type $type"] + } + + ad_proc -public get_not_cached { + {-type:required} + } { + get the user type info for the given dotlrn_user_type (cached) + } { + db_1row select_dotlrn_user_type_info {} -column_array row + return [array get row] + } + + ad_proc -public get_rel_type { + {-type:required} + } { + get the rel_type for a given dotlrn_user_type + } { + array set user_type [get -type $type] + return $user_type(rel_type) + } + + ad_proc -public get_group_id { + {-type:required} + } { + get the group_id of a dotlrn_user_type + } { + array set user_type [get -type $type] + return $user_type(group_id) + } + + ad_proc -public get_segment_id { + {-type:required} + } { + get the rel_segment_id of a dotlrn_user_type + } { + array set user_type [get -type $type] + return $user_type(segment_id) + } + +} Index: openacs-4/packages/dotlrn/tcl/user-type-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/user-type-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/tcl/user-type-procs.xql 26 Jul 2002 21:14:59 -0000 1.1 @@ -0,0 +1,13 @@ + + + + + + + select * + from dotlrn_user_types + where type = :type + + + + Index: openacs-4/packages/dotlrn-research/dotlrn-research.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/dotlrn-research.info,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn-research/dotlrn-research.info 19 Jun 2002 20:56:53 -0000 1.6 +++ openacs-4/packages/dotlrn-research/dotlrn-research.info 26 Jul 2002 21:14:59 -0000 1.7 @@ -7,40 +7,30 @@ f t - + oracle postgresql Yonatan Feldman OpenForce + + - - - - + + + + - - - - - - - - - - - - Index: openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-create.sql 15 May 2002 19:30:42 -0000 1.5 +++ openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-create.sql 26 Jul 2002 21:15:00 -0000 1.6 @@ -23,126 +23,112 @@ -- declare - foo integer; + foo integer; begin - -- create the implementation - foo := acs_sc_impl.new ( + foo := acs_sc_impl.new( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_owner_name => 'dotlrn_research' ); - -- GetPrettyName - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'GetPrettyName', impl_alias => 'dotlrn_research::get_pretty_name', impl_pl => 'TCL' ); - -- AddApplet - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'AddApplet', impl_alias => 'dotlrn_research::add_applet', impl_pl => 'TCL' ); - -- RemoveApplet - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'RemoveApplet', impl_alias => 'dotlrn_research::remove_applet', impl_pl => 'TCL' ); - -- AddAppletToCommunity - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'AddAppletToCommunity', impl_alias => 'dotlrn_research::add_applet_to_community', impl_pl => 'TCL' ); - -- RemoveAppletFromCommunity - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'RemoveAppletFromCommunity', impl_alias => 'dotlrn_research::remove_applet_from_community', impl_pl => 'TCL' ); - -- AddUser - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'AddUser', impl_alias => 'dotlrn_research::add_user', impl_pl => 'TCL' ); - -- RemoveUser - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'RemoveUser', impl_alias => 'dotlrn_research::remove_user', impl_pl => 'TCL' ); - -- AddUserToCommunity - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'AddUserToCommunity', impl_alias => 'dotlrn_research::add_user_to_community', impl_pl => 'TCL' ); - -- RemoveUserFromCommunity - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'RemoveUserFromCommunity', impl_alias => 'dotlrn_research::remove_user_from_community', impl_pl => 'TCL' ); - -- AddPortlet - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'AddPortlet', impl_alias => 'dotlrn_research::add_portlet', impl_pl => 'TCL' ); - -- RemovePortlet - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'RemovePortlet', impl_alias => 'dotlrn_research::remove_portlet', impl_pl => 'TCL' ); - -- Clone - foo := acs_sc_impl.new_alias ( + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'Clone', impl_alias => 'dotlrn_research::clone', impl_pl => 'TCL' ); - -- Add the binding - acs_sc_binding.new ( + acs_sc_binding.new( contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research' ); Index: openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-drop.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-drop.sql 15 May 2002 19:30:42 -0000 1.3 +++ openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-applet-drop.sql 26 Jul 2002 21:15:00 -0000 1.4 @@ -23,99 +23,87 @@ -- declare - foo integer; + foo integer; begin - acs_sc_binding.delete ( + acs_sc_binding.delete( contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research' ); - -- GetPrettyName - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'GetPrettyName' ); - -- AddApplet - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'AddApplet' ); - -- RemoveApplet - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'RemoveApplet' ); - -- AddAppletToCommunity - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'AddAppletToCommunity' ); - -- RemoveAppletFromCommunity - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'RemoveAppletFromCommunity' ); - -- AddUser - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'AddUser' ); - -- RemoveUser - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'RemoveUser' ); - -- AddUserToCommunity - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'AddUserToCommunity' ); - -- RemoveUserFromCommunity - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'RemoveUserFromCommunity' ); - -- AddPortlet - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'AddPortlet' ); - -- RemovePortlet - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'RemovePortlet' ); - -- Clone - foo := acs_sc_impl.delete_alias ( + foo := acs_sc_impl.delete_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research', impl_operation_name => 'Clone' ); - acs_sc_impl.delete ( + acs_sc_impl.delete( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_research' ); Index: openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-create.sql 15 May 2002 19:30:42 -0000 1.4 +++ openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-create.sql 26 Jul 2002 21:15:00 -0000 1.5 @@ -22,19 +22,4 @@ -- @version $Id$ -- -create table dotlrn_research_papers ( - community_id constraint dotlrn_rp_community_id_fk - references dotlrn_communities_all (community_id) - constraint dotlrn_rp_community_id_nn - not null, - file_id constraint dotlrn_rp_file_id_fk - references cr_revisions (revision_id) - constraint dotlrn_rp_file_id_nn - not null, - constraint dotlrn_research_papers_pk - primary key (community_id, file_id) -); - -@@ research-portlet-create.sql; -@@ research-admin-portlet-create.sql; @@ dotlrn-research-applet-create.sql Index: openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-drop.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-drop.sql 29 Mar 2002 19:22:48 -0000 1.2 +++ openacs-4/packages/dotlrn-research/sql/oracle/dotlrn-research-drop.sql 26 Jul 2002 21:15:00 -0000 1.3 @@ -23,7 +23,3 @@ -- @@ dotlrn-research-applet-drop.sql -@@ research-admin-portlet-drop.sql; -@@ research-portlet-drop.sql; - -drop table dotlrn_research_papers; Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/sql/oracle/research-admin-portlet-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/sql/oracle/research-admin-portlet-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/sql/oracle/research-portlet-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/sql/oracle/research-portlet-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql 15 Jul 2002 20:43:41 -0000 1.1 +++ openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql 26 Jul 2002 21:15:00 -0000 1.2 @@ -21,128 +21,114 @@ -- @creation-date 2002-02-24 -- @version $Id$ -- --- Postgresql port adarsh@symphinity.com --- +-- postgresql port adarsh@symphinity.com +-- -- 11th July 2002 -- --- create the implementation select acs_sc_impl__new ( - 'dotlrn_applet', --impl_contract_name - 'dotlrn_research', --impl_name - 'dotlrn_research' --impl_owner_name + 'dotlrn_applet', + 'dotlrn_research', + 'dotlrn_research' ); --- GetPrettyName select acs_sc_impl_alias__new ( - 'dotlrn_applet', --impl_contract_name - 'dotlrn_research', --impl_name - 'GetPrettyName', --impl_operation_name - 'dotlrn_research::get_pretty_name', --impl_alias - 'TCL' --impl_pl + 'dotlrn_applet', + 'dotlrn_research', + 'GetPrettyName', + 'dotlrn_research::get_pretty_name', + 'TCL' ); --- AddApplet select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'AddApplet', - 'dotlrn_research::add_applet', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'AddApplet', + 'dotlrn_research::add_applet', + 'TCL' +); - -- RemoveApplet select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'RemoveApplet', - 'dotlrn_research::remove_applet', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveApplet', + 'dotlrn_research::remove_applet', + 'TCL' +); - -- AddAppletToCommunity select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'AddAppletToCommunity', - 'dotlrn_research::add_applet_to_community', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'AddAppletToCommunity', + 'dotlrn_research::add_applet_to_community', + 'TCL' +); - -- RemoveAppletFromCommunity select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'RemoveAppletFromCommunity', - 'dotlrn_research::remove_applet_from_community', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveAppletFromCommunity', + 'dotlrn_research::remove_applet_from_community', + 'TCL' +); - -- AddUser select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'AddUser', - 'dotlrn_research::add_user', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'AddUser', + 'dotlrn_research::add_user', + 'TCL' +); - -- RemoveUser select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'RemoveUser', - 'dotlrn_research::remove_user', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveUser', + 'dotlrn_research::remove_user', + 'TCL' +); - -- AddUserToCommunity select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'AddUserToCommunity', - 'dotlrn_research::add_user_to_community', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'AddUserToCommunity', + 'dotlrn_research::add_user_to_community', + 'TCL' +); - -- RemoveUserFromCommunity select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'RemoveUserFromCommunity', - 'dotlrn_research::remove_user_from_community', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveUserFromCommunity', + 'dotlrn_research::remove_user_from_community', + 'TCL' +); - -- AddPortlet select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'AddPortlet', - 'dotlrn_research::add_portlet', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'AddPortlet', + 'dotlrn_research::add_portlet', + 'TCL' +); - -- RemovePortlet select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'RemovePortlet', - 'dotlrn_research::remove_portlet', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'RemovePortlet', + 'dotlrn_research::remove_portlet', + 'TCL' +); - -- Clone select acs_sc_impl_alias__new ( - 'dotlrn_applet', - 'dotlrn_research', - 'Clone', - 'dotlrn_research::clone', - 'TCL' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'Clone', + 'dotlrn_research::clone', + 'TCL' +); --- Add the binding select acs_sc_binding__new ( - 'dotlrn_applet', --contract_name - 'dotlrn_research' --impl_name + 'dotlrn_applet', + 'dotlrn_research' ); Index: openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-drop.sql 15 Jul 2002 20:43:41 -0000 1.1 +++ openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-drop.sql 26 Jul 2002 21:15:00 -0000 1.2 @@ -21,101 +21,89 @@ -- @creation-date 2002-02-24 -- @version $Id$ -- --- Postgresql port adarsh@symphinity.com --- +-- postgresql port adarsh@symphinity.com +-- -- 11th July 2002 -- select acs_sc_binding__delete ( - 'dotlrn_applet', --contract_name - 'dotlrn_research' --impl_name + 'dotlrn_applet', + 'dotlrn_research' ); --- GetPrettyName select acs_sc_impl_alias__delete ( - 'dotlrn_applet', --impl_contract_name - 'dotlrn_research', --impl_name - 'GetPrettyName' --impl_operation_name + 'dotlrn_applet', + 'dotlrn_research', + 'GetPrettyName' ); --- AddApplet select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'AddApplet' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'AddApplet' +); - -- RemoveApplet select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'RemoveApplet' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveApplet' +); - -- AddAppletToCommunity select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'AddAppletToCommunity' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'AddAppletToCommunity' +); - -- RemoveAppletFromCommunity select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'RemoveAppletFromCommunity' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveAppletFromCommunity' +); - -- AddUser select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'AddUser' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'AddUser' +); - -- RemoveUser select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'RemoveUser' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveUser' +); - -- AddUserToCommunity select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'AddUserToCommunity' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'AddUserToCommunity' +); - -- RemoveUserFromCommunity select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'RemoveUserFromCommunity' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveUserFromCommunity' +); - -- AddPortlet select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'AddPortlet' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'AddPortlet' +); - -- RemovePortlet select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'RemovePortlet' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'RemovePortlet' +); - -- Clone select acs_sc_impl_alias__delete ( - 'dotlrn_applet', - 'dotlrn_research', - 'Clone' - ); + 'dotlrn_applet', + 'dotlrn_research', + 'Clone' +); select acs_sc_impl__delete ( - 'dotlrn_applet', --impl_contract_name - 'dotlrn_research' --impl_name - ); + 'dotlrn_applet', + 'dotlrn_research' +); Index: openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-create.sql 15 Jul 2002 20:43:41 -0000 1.1 +++ openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-create.sql 26 Jul 2002 21:15:00 -0000 1.2 @@ -21,24 +21,9 @@ -- @creation-date 2002-02-24 -- @version $Id$ -- --- Postgresql port adarsh@symphinity.com +-- postgresql port adarsh@symphinity.com -- -- 11th July 2002 -- -create table dotlrn_research_papers ( - community_id integer constraint dotlrn_rp_community_id_fk - references dotlrn_communities_all (community_id) - constraint dotlrn_rp_community_id_nn - not null, - file_id integer constraint dotlrn_rp_file_id_fk - references cr_revisions (revision_id) - constraint dotlrn_rp_file_id_nn - not null, - constraint dotlrn_research_papers_pk - primary key (community_id, file_id) -); - -\i research-portlet-create.sql -\i research-admin-portlet-create.sql \i dotlrn-research-applet-create.sql Index: openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-drop.sql 15 Jul 2002 20:43:41 -0000 1.1 +++ openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-drop.sql 26 Jul 2002 21:15:00 -0000 1.2 @@ -21,14 +21,9 @@ -- @creation-date 2002-02-24 -- @version $Id$ -- --- Postgresql port adarsh@symphinity.com +-- postgresql port adarsh@symphinity.com -- -- 11th July 2002 -- \i dotlrn-research-applet-drop.sql -\i research-admin-portlet-drop.sql; -\i research-portlet-drop.sql; - -drop table dotlrn_research_papers; - Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/sql/postgresql/research-admin-portlet-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/sql/postgresql/research-admin-portlet-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/sql/postgresql/research-portlet-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/sql/postgresql/research-portlet-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/dotlrn-research/tcl/dotlrn-research-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/tcl/dotlrn-research-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/dotlrn-research/tcl/dotlrn-research-procs.tcl 13 Jul 2002 17:33:12 -0000 1.12 +++ openacs-4/packages/dotlrn-research/tcl/dotlrn-research-procs.tcl 26 Jul 2002 21:15:00 -0000 1.13 @@ -30,7 +30,7 @@ } { What's my applet key? } { - return "dotlrn_research" + return dotlrn_research } ad_proc -public package_key { @@ -68,31 +68,15 @@ } { Add the research paper applet to a specifc dotlrn community } { - # set up stuff + set type [dotlrn_community::get_toplevel_community_type_from_community_id $community_id] - set package_id [dotlrn::instantiate_and_mount \ - -mount_point "research-papers" \ - $community_id \ - [package_key] - ] - - - # portlet stff - - set portal_id [dotlrn_community::get_portal_id \ - -community_id $community_id - ] - set args [ns_set create] - ns_set put $args "party_id" $community_id - add_portlet_helper $portal_id $args + if {[string equal $type dotlrn_class_instance]} { + set portal_id [dotlrn_community::get_portal_id -community_id $community_id] + add_portlet_helper $portal_id - # set up the admin portlet - call directly - set admin_portal_id [dotlrn_community::get_admin_portal_id \ - -community_id $community_id - ] - research_admin_portlet::add_self_to_page \ - -portal_id $admin_portal_id \ - -party_id $community_id + set admin_portal_id [dotlrn_community::get_admin_portal_id -community_id $community_id] + research_admin_portlet::add_self_to_page -portal_id $admin_portal_id + } } ad_proc -public remove_applet_from_community { @@ -106,75 +90,55 @@ ad_proc -public add_user { user_id } { - One time user-specfic init - } { - # noop + # no-op } ad_proc -public remove_user { user_id } { - } { - # noop + # no-op } ad_proc -public add_user_to_community { community_id user_id } { - Add a user to a to a specifc dotlrn community - } { - # noop + # no-op } ad_proc -public remove_user_from_community { community_id user_id } { - Remove a user from a community - } { - #noop + # no-op } ad_proc -public add_portlet { portal_id } { - } { - set args [ns_set create] - ns_set put $args party_id 0 + set type [dotlrn::dotlrn::get_type_from_portal_id -portal_id $portal_id] - set type [dotlrn::get_type_from_portal_id -portal_id $portal_id] - - if {![string equal $type "user"] - && ![string equal $type "dotlrn_community"] - && ![string equal $type "dotlrn_club"]} { - # Add the portlet only to class instaces - add_portlet_helper $portal_id $args + if {![string equal $type user] && ![string equal $type dotlrn_community] && ![string equal $type dotlrn_club]} { + add_portlet_helper $portal_id } } ad_proc -public add_portlet_helper { portal_id - args } { - } { - research_portlet::add_self_to_page \ - -portal_id $portal_id \ - -party_id [ns_set get $args "party_id"] + research_portlet::add_self_to_page -portal_id $portal_id } ad_proc -public remove_portlet { portal_id - args } { - } { + # no-op } ad_proc -public clone { old_community_id new_community_id } { - } { ns_log notice "Cloning: [applet_key]" add_applet_to_community $new_community_id } Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/tcl/research-admin-portlet-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.7 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/tcl/research-portlet-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/www/add.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/www/add.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/www/remove.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/www/remove.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/www/research-admin-portlet-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.7 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/www/research-admin-portlet.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/www/research-admin-portlet.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.7 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/www/research-portlet-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.8 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/www/research-portlet.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-research/www/research-portlet.tcl'. Fisheye: No comparison available. Pass `N' to diff?