Index: openacs-4/packages/dotlrn/tcl/applets-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/applets-procs.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn/tcl/applets-procs.tcl 24 Jan 2002 22:32:30 -0000 1.3 +++ openacs-4/packages/dotlrn/tcl/applets-procs.tcl 5 Mar 2002 07:18:23 -0000 1.4 @@ -59,4 +59,40 @@ } { return [db_string select_applet_exists_p {}] } + + ad_proc -public add_applet_to_dotlrn { + {-applet_key:required} + {-activate_p "t"} + } { + dotlrn-init.tcl calls AddApplet on all applets using acs_sc directly. + The add_applet proc in the applet (e.g. dotlrn-calendar) calls this + proc to tell dotlrn to register and/or activate itself. This _must_ + be able to be run multiple times! + } { + + if {![empty_string_p [get_applet_id_from_key -applet_key $applet_key]]} { + return + } + + if {[string equal $activate_p "t"] == 1} { + set status "active" + } else { + set status "inactive" + } + + db_transaction { + set applet_id [db_nextval acs_object_id_seq] + db_dml insert {} + } + } + + ad_proc -public get_applet_id_from_key { + {-applet_key:required} + } { + get the id of the dotlrn applet from the applet key or the null + string if the key dosent exist + } { + return [db_string select {} -default ""] + } + } Index: openacs-4/packages/dotlrn/tcl/applets-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/applets-procs.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/dotlrn/tcl/applets-procs.xql 24 Jan 2002 22:32:30 -0000 1.1 +++ openacs-4/packages/dotlrn/tcl/applets-procs.xql 5 Mar 2002 07:18:23 -0000 1.2 @@ -1,13 +1,33 @@ - - - select count(*) - from dual - where exists (select 1 - from dotlrn_applets - where dotlrn_applets.applet_key = :applet_key) - - + + + + select count(*) + from dual + where exists (select 1 + from dotlrn_applets + where dotlrn_applets.applet_key = :applet_key) + + + + + + select applet_id + from dotlrn_applets + where applet_key = :applet_key + + + + + + insert + into dotlrn_applets + (applet_id, applet_key, status) + values + (:applet_id, :applet_key, :status) + + + Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -N -r1.62 -r1.63 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 4 Mar 2002 23:54:00 -0000 1.62 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 5 Mar 2002 07:18:23 -0000 1.63 @@ -1,20 +1,11 @@ -# -# Procs for DOTLRN Community Management -# Copyright 2001 OpenForce, inc. -# Distributed under the GNU GPL v2 -# -# Started: September 28th, 2001 -# ben@openforce.net, arjun@openforce.net -# -# $Id$ -# ad_library { Procs to manage DOTLRN Communities - @author ben@openforce.net - @author arjun@openforce.net + @author Ben Adida (ben@openforce.net) + @author Arjun Sanyal (arjun@openforce.net) + @author yon (yon@openforce.net) @creation-date 2001-09-28 @version $Id$ @@ -774,44 +765,6 @@ return [db_string select_portal_template_id {} -default ""] } - ad_proc -public add_applet_to_dotlrn { - {-applet_key:required} - {-activate_p "t"} - } { - dotlrn-init.tcl calls AddApplet on all applets using acs_sc directly. - The add_applet proc in the applet (e.g. dotlrn-calendar) calls this - proc to tell dotlrn to register and/or activate itself. This _must_ - be able to be run multiple times! - } { - - if {![empty_string_p [get_applet_id_from_key -applet_key $applet_key]]} { - # there's already a dotlrn applet registered with this key, abort - return - } - - if {$activate_p == "t"} { - set status "active" - } else { - set status "inactive" - } - - ns_log notice "aks debug add_applet_to_dotlrn called with $applet_key" - - db_transaction { - set applet_id [db_nextval acs_object_id_seq] - db_dml insert {} - } - } - - ad_proc -public get_applet_id_from_key { - {-applet_key:required} - } { - get the id of the dotlrn applet from the applet key or the null - string if the key dosent exist - } { - return [db_string select {} -default ""] - } - ad_proc -public add_applet_to_community { community_id applet_key @@ -825,7 +778,7 @@ # Callback set package_id [applet_call $applet_key AddAppletToCommunity [list $community_id]] - set applet_id [get_applet_id_from_key -applet_key $applet_key] + set applet_id [dotlrn_applet::get_applet_id_from_key -applet_key $applet_key] # auto activate for now set active_p "t" Index: openacs-4/packages/dotlrn/www/research-paper-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/research-paper-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/research-paper-add.tcl 5 Mar 2002 07:18:23 -0000 1.1 @@ -0,0 +1,34 @@ +# +# 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. +# + +# dotlrn/www/research-paper-add.tcl + +ad_page_contract { + @author yon (yon@milliped.com) + @creation-date Mar 04, 2002 + @version $Id: research-paper-add.tcl,v 1.1 2002/03/05 07:18:23 yon Exp $ +} -query { + file_id:integer,notnull + {referer "one-community-admin"} +} -properties { +} + +set community_id [dotlrn_community::get_community_id] +dotlrn::require_user_admin_community $community_id + +db_dml add_file_to_community {} + +ad_returnredirect $referer Index: openacs-4/packages/dotlrn/www/research-paper-add.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/research-paper-add.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/research-paper-add.xql 5 Mar 2002 07:18:23 -0000 1.1 @@ -0,0 +1,15 @@ + + + + + + + insert + into dotlrn_research_papers + (community_id, file_id) + values + (:community_id, :file_id) + + + + Index: openacs-4/packages/dotlrn/www/research-paper-remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/research-paper-remove.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/research-paper-remove.tcl 5 Mar 2002 07:18:23 -0000 1.1 @@ -0,0 +1,34 @@ +# +# 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. +# + +# dotlrn/www/research-paper-remove.tcl + +ad_page_contract { + @author yon (yon@milliped.com) + @creation-date Mar 04, 2002 + @version $Id: research-paper-remove.tcl,v 1.1 2002/03/05 07:18:23 yon Exp $ +} -query { + file_id:integer,notnull + {referer "one-community-admin"} +} -properties { +} + +set community_id [dotlrn_community::get_community_id] +dotlrn::require_user_admin_community $community_id + +db_dml remove_file_from_community {} + +ad_returnredirect $referer Index: openacs-4/packages/dotlrn/www/research-paper-remove.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/research-paper-remove.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/research-paper-remove.xql 5 Mar 2002 07:18:23 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + + delete + from dotlrn_research_papers + where community_id = :community_id + and file_id = :file_id + + + + Index: openacs-4/packages/dotlrn-bboard/tcl/dotlrn-bboard-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bboard/tcl/dotlrn-bboard-procs.tcl,v diff -u -N -r1.23 -r1.24 --- openacs-4/packages/dotlrn-bboard/tcl/dotlrn-bboard-procs.tcl 25 Feb 2002 14:19:41 -0000 1.23 +++ openacs-4/packages/dotlrn-bboard/tcl/dotlrn-bboard-procs.tcl 5 Mar 2002 07:18:33 -0000 1.24 @@ -52,7 +52,7 @@ # register/activate self with dotlrn # our service contract is in the db, but we must tell dotlrn # that we exist and want to be active - dotlrn_community::add_applet_to_dotlrn -applet_key "dotlrn_bboard" + dotlrn_applet::add_applet_to_dotlrn -applet_key "dotlrn_bboard" } ad_proc -public add_applet_to_community { Index: openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl,v diff -u -N -r1.32 -r1.33 --- openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl 25 Feb 2002 19:51:44 -0000 1.32 +++ openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl 5 Mar 2002 07:18:40 -0000 1.33 @@ -72,7 +72,7 @@ # register/activate self with dotlrn # our service contract is in the db, but we must tell dotlrn # that we exist and want to be active - dotlrn_community::add_applet_to_dotlrn -applet_key [applet_key] + dotlrn_applet::add_applet_to_dotlrn -applet_key [applet_key] } ad_proc -public add_applet_to_community { Index: openacs-4/packages/dotlrn-faq/tcl/dotlrn-faq-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-faq/tcl/dotlrn-faq-procs.tcl,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/dotlrn-faq/tcl/dotlrn-faq-procs.tcl 25 Feb 2002 14:19:47 -0000 1.20 +++ openacs-4/packages/dotlrn-faq/tcl/dotlrn-faq-procs.tcl 5 Mar 2002 07:18:55 -0000 1.21 @@ -48,7 +48,7 @@ } { Add the faq applet to dotlrn - one time init - must be repeatable! } { - dotlrn_community::add_applet_to_dotlrn -applet_key [applet_key] + dotlrn_applet::add_applet_to_dotlrn -applet_key [applet_key] } ad_proc -public add_applet_to_community { Index: openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl,v diff -u -N -r1.33 -r1.34 --- openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl 4 Mar 2002 18:33:27 -0000 1.33 +++ openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl 5 Mar 2002 07:18:47 -0000 1.34 @@ -7,7 +7,7 @@ @author ben@openforce.net @author arjun@openforce.net @creation-date 2001-10-05 - @cvs-id $Id$ + @version $Id$ } namespace eval dotlrn_fs { @@ -61,7 +61,7 @@ } - dotlrn_community::add_applet_to_dotlrn -applet_key "dotlrn_fs" + dotlrn_applet::add_applet_to_dotlrn -applet_key "dotlrn_fs" } ad_proc -public add_applet_to_community { Index: openacs-4/packages/dotlrn-news/tcl/dotlrn-news-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-news/tcl/dotlrn-news-procs.tcl,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn-news/tcl/dotlrn-news-procs.tcl 25 Feb 2002 14:40:11 -0000 1.12 +++ openacs-4/packages/dotlrn-news/tcl/dotlrn-news-procs.tcl 5 Mar 2002 07:19:16 -0000 1.13 @@ -41,7 +41,7 @@ } { One time init - must be repeatable! } { - dotlrn_community::add_applet_to_dotlrn -applet_key "dotlrn_news" + dotlrn_applet::add_applet_to_dotlrn -applet_key "dotlrn_news" } ad_proc -public add_applet_to_community { 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 -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn-research/dotlrn-research.info 5 Mar 2002 00:41:01 -0000 1.2 +++ openacs-4/packages/dotlrn-research/dotlrn-research.info 5 Mar 2002 07:19:29 -0000 1.3 @@ -20,21 +20,11 @@ - - - - - - - - - - Index: openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl 5 Mar 2002 01:26:40 -0000 1.7 +++ openacs-4/packages/dotlrn-static/tcl/dotlrn-static-procs.tcl 5 Mar 2002 07:19:37 -0000 1.8 @@ -51,8 +51,7 @@ Add the static applet to dotlrn - for one-time init Must be repeatable! } { - dotlrn_community::add_applet_to_dotlrn \ - -applet_key [applet_key] + dotlrn_applet::add_applet_to_dotlrn -applet_key [applet_key] } ad_proc -public add_applet_to_community { Index: openacs-4/packages/fs-portlet/www/fs-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/fs-portlet.adp,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/fs-portlet/www/fs-portlet.adp 21 Feb 2002 19:00:21 -0000 1.3 +++ openacs-4/packages/fs-portlet/www/fs-portlet.adp 5 Mar 2002 07:21:31 -0000 1.4 @@ -9,11 +9,16 @@ @folders.type@ - - @folders.num@ items + + 0 items - @folders.num@ item + + @folders.content_size@ items + + + @folders.content_size@ item + @@ -24,7 +29,7 @@ File - + \[ download \]