Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-classes-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-classes-create.sql,v diff -u -r1.10 -r1.11 --- openacs-4/packages/dotlrn/sql/oracle/dotlrn-classes-create.sql 1 Dec 2001 23:16:27 -0000 1.10 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-classes-create.sql 11 Dec 2001 00:45:15 -0000 1.11 @@ -1,61 +1,82 @@ - -- -- The DotLRN basic system -- copyright 2001, OpenForce, Inc. -- distributed under the GNU GPL v2 -- -- for Oracle 8/8i. (We're guessing 9i works, too). -- --- ben@openforce.net --- started August 18th, 2001 +-- @author Ben Adida (ben@openforce.net) +-- @author yon (yon@openforce.net) +-- @creation-date 2001-08-18 +-- @version $Id$ -- create table dotlrn_classes ( - class_key constraint dotlrn_class_class_key_fk - references dotlrn_community_types(community_type) - constraint dotlrn_class_class_key_pk - primary key + class_key constraint dotlrn_class_class_key_fk + references dotlrn_community_types(community_type) + constraint dotlrn_class_class_key_pk + primary key ); -create view dotlrn_classes_full as select class_key, pretty_name, description, package_id, supertype from dotlrn_classes, dotlrn_community_types where dotlrn_community_types.community_type=dotlrn_classes.class_key; +create or replace view dotlrn_classes_full +as + select class_key, + pretty_name, + description, + package_id, + supertype + from dotlrn_classes, + dotlrn_community_types + where dotlrn_classes.class_key = dotlrn_community_types.community_type; create table dotlrn_class_instances ( - class_instance_id constraint dotlrn_class_i_id_fk - references dotlrn_communities(community_id) - constraint dotlrn_class_i_id_pk - primary key, - class_key constraint dotlrn_class_i_class_key_fk - references dotlrn_classes(class_key), - year varchar(10), - term varchar(20) + class_instance_id constraint dotlrn_class_i_id_fk + references dotlrn_communities(community_id) + constraint dotlrn_class_i_id_pk + primary key, + class_key constraint dotlrn_class_i_class_key_fk + references dotlrn_classes(class_key), + year varchar(10), + term varchar(20) ); -create view dotlrn_class_instances_full as select class_instance_id, class_key, year, term, community_key, pretty_name, description, portal_template_id, package_id from dotlrn_class_instances, dotlrn_communities where dotlrn_class_instances.class_instance_id = dotlrn_communities.community_id; +create or replace view dotlrn_class_instances_full +as + select class_instance_id, + class_key, + year, + term, + community_key, + pretty_name, + description, + portal_template_id, + package_id + from dotlrn_class_instances, + dotlrn_communities + where dotlrn_class_instances.class_instance_id = dotlrn_communities.community_id; - - -- -- PL/SQL stuff -- create or replace package dotlrn_class is function new ( - class_key in dotlrn_classes.class_key%TYPE, - pretty_name in dotlrn_communities.pretty_name%TYPE, - pretty_plural in dotlrn_community_types.pretty_name%TYPE default null, - description in dotlrn_community_types.description%TYPE, - package_id in dotlrn_community_types.package_id%TYPE default null, + class_key in dotlrn_classes.class_key%TYPE, + pretty_name in dotlrn_communities.pretty_name%TYPE, + pretty_plural in dotlrn_community_types.pretty_name%TYPE default null, + description in dotlrn_community_types.description%TYPE, + package_id in dotlrn_community_types.package_id%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, creation_user in acs_objects.creation_user%TYPE default null, creation_ip in acs_objects.creation_ip%TYPE default null, - context_id in acs_objects.context_id%TYPE default null + context_id in acs_objects.context_id%TYPE default null ) return dotlrn_classes.class_key%TYPE; procedure delete ( - class_key in dotlrn_classes.class_key%TYPE + class_key in dotlrn_classes.class_key%TYPE ); end; @@ -67,32 +88,32 @@ create or replace package body dotlrn_class is function new ( - class_key in dotlrn_classes.class_key%TYPE, - pretty_name in dotlrn_communities.pretty_name%TYPE, - pretty_plural in dotlrn_community_types.pretty_name%TYPE default null, - description in dotlrn_community_types.description%TYPE, - package_id in dotlrn_community_types.package_id%TYPE default null, + class_key in dotlrn_classes.class_key%TYPE, + pretty_name in dotlrn_communities.pretty_name%TYPE, + pretty_plural in dotlrn_community_types.pretty_name%TYPE default null, + description in dotlrn_community_types.description%TYPE, + package_id in dotlrn_community_types.package_id%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, creation_user in acs_objects.creation_user%TYPE default null, creation_ip in acs_objects.creation_ip%TYPE default null, - context_id in acs_objects.context_id%TYPE default null + context_id in acs_objects.context_id%TYPE default null ) return dotlrn_classes.class_key%TYPE is v_class_key dotlrn_classes.class_key%TYPE; begin v_class_key := dotlrn_community_type.new ( - community_type => class_key, - parent_type => 'dotlrn_class', - pretty_name => pretty_name, - pretty_plural => pretty_plural, - description => description, - package_id => package_id, - creation_date => creation_date, - creation_user => creation_user, - creation_ip => creation_ip, - context_id => context_id + community_type => class_key, + parent_type => 'dotlrn_class', + pretty_name => pretty_name, + pretty_plural => pretty_plural, + description => description, + package_id => package_id, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id ); insert into dotlrn_classes @@ -102,7 +123,7 @@ end; procedure delete ( - class_key in dotlrn_classes.class_key%TYPE + class_key in dotlrn_classes.class_key%TYPE ) is begin @@ -119,26 +140,27 @@ create or replace package dotlrn_class_instance is function new ( - class_instance_id in dotlrn_class_instances.class_instance_id%TYPE default null, - class_key in dotlrn_class_instances.class_key%TYPE, - year in dotlrn_class_instances.year%TYPE, - term in dotlrn_class_instances.term%TYPE, - community_key in dotlrn_communities.community_key%TYPE, - pretty_name in dotlrn_communities.pretty_name%TYPE, - description in dotlrn_communities.description%TYPE, - package_id in dotlrn_communities.package_id%TYPE default null, - portal_id in dotlrn_communities.portal_id%TYPE default null, - portal_template_id in dotlrn_communities.portal_template_id%TYPE default null, - creation_date in acs_objects.creation_date%TYPE - default sysdate, - creation_user in acs_objects.creation_user%TYPE - default null, - creation_ip in acs_objects.creation_ip%TYPE default null, - context_id in acs_objects.context_id%TYPE default null + class_instance_id in dotlrn_class_instances.class_instance_id%TYPE default null, + class_key in dotlrn_class_instances.class_key%TYPE, + year in dotlrn_class_instances.year%TYPE, + term in dotlrn_class_instances.term%TYPE, + community_key in dotlrn_communities.community_key%TYPE, + pretty_name in dotlrn_communities.pretty_name%TYPE, + description in dotlrn_communities.description%TYPE, + package_id in dotlrn_communities.package_id%TYPE default null, + portal_id in dotlrn_communities.portal_id%TYPE default null, + portal_template_id in dotlrn_communities.portal_template_id%TYPE default null, + join_policy in groups.join_policy%TYPE default null, + creation_date in acs_objects.creation_date%TYPE + default sysdate, + creation_user in acs_objects.creation_user%TYPE + default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null ) return dotlrn_class_instances.class_instance_id%TYPE; procedure delete ( - class_instance_id in dotlrn_class_instances.class_instance_id%TYPE + class_instance_id in dotlrn_class_instances.class_instance_id%TYPE ); end; / @@ -148,51 +170,53 @@ create or replace package body dotlrn_class_instance is function new ( - class_instance_id in dotlrn_class_instances.class_instance_id%TYPE default null, - class_key in dotlrn_class_instances.class_key%TYPE, - year in dotlrn_class_instances.year%TYPE, - term in dotlrn_class_instances.term%TYPE, - community_key in dotlrn_communities.community_key%TYPE, - pretty_name in dotlrn_communities.pretty_name%TYPE, - description in dotlrn_communities.description%TYPE, - package_id in dotlrn_communities.package_id%TYPE default null, - portal_id in dotlrn_communities.portal_id%TYPE default null, - portal_template_id in dotlrn_communities.portal_template_id%TYPE default null, - creation_date in acs_objects.creation_date%TYPE - default sysdate, - creation_user in acs_objects.creation_user%TYPE - default null, - creation_ip in acs_objects.creation_ip%TYPE default null, - context_id in acs_objects.context_id%TYPE default null + class_instance_id in dotlrn_class_instances.class_instance_id%TYPE default null, + class_key in dotlrn_class_instances.class_key%TYPE, + year in dotlrn_class_instances.year%TYPE, + term in dotlrn_class_instances.term%TYPE, + community_key in dotlrn_communities.community_key%TYPE, + pretty_name in dotlrn_communities.pretty_name%TYPE, + description in dotlrn_communities.description%TYPE, + package_id in dotlrn_communities.package_id%TYPE default null, + portal_id in dotlrn_communities.portal_id%TYPE default null, + portal_template_id in dotlrn_communities.portal_template_id%TYPE default null, + join_policy in groups.join_policy%TYPE default null, + creation_date in acs_objects.creation_date%TYPE + default sysdate, + creation_user in acs_objects.creation_user%TYPE + default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null ) return dotlrn_class_instances.class_instance_id%TYPE is v_class_instance_id dotlrn_class_instances.class_instance_id%TYPE; begin v_class_instance_id := dotlrn_community.new ( - community_id => class_instance_id, - community_type => class_key, - community_key => community_key, - pretty_name => pretty_name, - description => description, - package_id => package_id, - portal_id => portal_id, - portal_template_id => portal_template_id, - creation_date => creation_date, - creation_user => creation_user, - creation_ip => creation_ip, - context_id => context_id + community_id => class_instance_id, + community_type => class_key, + community_key => community_key, + pretty_name => pretty_name, + description => description, + package_id => package_id, + portal_id => portal_id, + portal_template_id => portal_template_id, + join_policy => join_policy, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id ); insert into dotlrn_class_instances (class_instance_id, class_key, year, term) values (v_class_instance_id, class_key, year, term); - + return v_class_instance_id; end; procedure delete ( - class_instance_id in dotlrn_class_instances.class_instance_id%TYPE + class_instance_id in dotlrn_class_instances.class_instance_id%TYPE ) is begin @@ -201,8 +225,6 @@ dotlrn_community.delete(community_id => class_instance_id); end; - end; / show errors - Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-clubs-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-clubs-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/oracle/dotlrn-clubs-create.sql 6 Dec 2001 20:50:51 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-clubs-create.sql 11 Dec 2001 00:45:15 -0000 1.3 @@ -27,6 +27,7 @@ package_id in dotlrn_communities.package_id%TYPE default null, portal_id in dotlrn_communities.portal_id%TYPE default null, portal_template_id in dotlrn_communities.portal_template_id%TYPE default null, + join_policy in groups.join_policy%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, creation_user in acs_objects.creation_user%TYPE default null, creation_ip in acs_objects.creation_ip%TYPE default null, @@ -50,6 +51,7 @@ package_id in dotlrn_communities.package_id%TYPE default null, portal_id in dotlrn_communities.portal_id%TYPE default null, portal_template_id in dotlrn_communities.portal_template_id%TYPE default null, + join_policy in groups.join_policy%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, creation_user in acs_objects.creation_user%TYPE default null, creation_ip in acs_objects.creation_ip%TYPE default null, @@ -67,6 +69,7 @@ package_id => package_id, portal_id => portal_id, portal_template_id => portal_template_id, + join_policy => join_policy, creation_date => creation_date, creation_user => creation_user, creation_ip => creation_ip, Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-communities-create.sql,v diff -u -r1.14 -r1.15 --- openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql 8 Dec 2001 01:22:40 -0000 1.14 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql 11 Dec 2001 00:45:15 -0000 1.15 @@ -45,7 +45,7 @@ ); -- active communities -create view dotlrn_active_comms +create or replace view dotlrn_active_comms as select dotlrn_communities.*, join_policy @@ -55,7 +55,7 @@ and (active_end_date is null or active_end_date > sysdate) and dotlrn_communities.community_id = groups.group_id; -create view dotlrn_active_not_closed_comms +create or replace view dotlrn_active_not_closed_comms as select dotlrn_communities.*, join_policy @@ -194,6 +194,7 @@ portal_id in dotlrn_communities.portal_id%TYPE default null, portal_template_id in dotlrn_communities.portal_template_id%TYPE default null, package_id in dotlrn_communities.package_id%TYPE default null, + join_policy in groups.join_policy%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, creation_user in acs_objects.creation_user%TYPE @@ -237,6 +238,7 @@ portal_id in dotlrn_communities.portal_id%TYPE default null, portal_template_id in dotlrn_communities.portal_template_id%TYPE default null, package_id in dotlrn_communities.package_id%TYPE default null, + join_policy in groups.join_policy%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, creation_user in acs_objects.creation_user%TYPE @@ -253,16 +255,15 @@ creation_date => creation_date, creation_user => creation_user, creation_ip => creation_ip, - group_name => community_key + group_name => community_key, + join_policy => join_policy ); insert into dotlrn_communities (community_id, community_type, community_key, pretty_name, description, package_id, portal_id, portal_template_id) values (c_id, community_type, community_key, pretty_name, description, package_id, portal_id, portal_template_id); - - return c_id; end; @@ -311,5 +312,3 @@ end; / show errors - - 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.17 -r1.18 --- openacs-4/packages/dotlrn/tcl/class-procs.tcl 8 Dec 2001 01:22:40 -0000 1.17 +++ openacs-4/packages/dotlrn/tcl/class-procs.tcl 11 Dec 2001 00:45:15 -0000 1.18 @@ -8,12 +8,12 @@ # ad_library { - + Procs to manage DOTLRN Classes - + @author ben@openforce.net @creation-date 2001-08-18 - + } namespace eval dotlrn_class { @@ -92,9 +92,9 @@ ad_proc -public new_instance { {-description ""} {-class_type:required} - {-class_name:required} {-term:required} {-year:required} + {-join_policy "needs approval"} } { Creates a new instance of a class for a particular term and year, and returns the class instance key. @@ -108,14 +108,17 @@ ns_set put $extra_vars year $year ns_set put $extra_vars term $term ns_set put $extra_vars class_key $class_type - + ns_set put $extra_vars join_policy $join_policy + + set pretty_name "[dotlrn_community::get_community_type_name $class_type]; $term $year" + # Create the community return [dotlrn_community::new \ -description $description \ -community_type $class_type \ -object_type [community_type] \ -community_key $community_key \ - -pretty_name $class_name \ + -pretty_name $pretty_name \ -extra_vars $extra_vars] } @@ -145,4 +148,12 @@ dotlrn_community::add_user_to_community -rel_type $rel_type -extra_vars $extra_vars -community_id $community_id -user_id $user_id } } + + ad_proc -public pretty_name { + {-class_key:required} + } { + gets the pretty name for a particular class + } { + return [db_string select_class_pretty_name {} -default ""] + } } Index: openacs-4/packages/dotlrn/tcl/class-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/class-procs.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn/tcl/class-procs.xql 30 Nov 2001 03:41:17 -0000 1.4 +++ openacs-4/packages/dotlrn/tcl/class-procs.xql 11 Dec 2001 00:45:15 -0000 1.5 @@ -1,18 +1,21 @@ + + + insert + into dotlrn_classes (class_key) + values (:class_key) + + - - -insert into dotlrn_classes (class_key) values (:class_key) - - - - - -select node_id from site_nodes where object_id= (select package_id from dotlrn_classes_full where class_key=:class_type) - - - - + + + select node_id + from site_nodes + where object_id = (select package_id + from dotlrn_classes_full + where class_key = :class_type) + + Index: openacs-4/packages/dotlrn/tcl/club-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/club-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/tcl/club-procs.tcl 8 Dec 2001 01:22:40 -0000 1.3 +++ openacs-4/packages/dotlrn/tcl/club-procs.tcl 11 Dec 2001 00:45:15 -0000 1.4 @@ -51,15 +51,20 @@ {-key:required} {-pretty_name:required} {-description:required} + {-join_policy "open"} } { creates a new club and returns the club key } { + set extra_vars [ns_set create] + ns_set put $extra_vars join_policy $join_policy + return [dotlrn_community::new \ -community_type [community_type] \ -object_type [community_type] \ -community_key $key \ -pretty_name $pretty_name \ - -description $description] + -description $description \ + -extra_vars $extra_vars] } ad_proc -public available_roles {} { 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 -r1.39 -r1.40 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 8 Dec 2001 01:22:40 -0000 1.39 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 11 Dec 2001 00:45:15 -0000 1.40 @@ -16,7 +16,7 @@ @author ben@openforce.net @author arjun@openforce.net @creation-date 2001-09-28 - @cvs-id $Id$ + @version $Id$ } Index: openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl 8 Dec 2001 01:22:40 -0000 1.9 +++ openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl 11 Dec 2001 00:45:15 -0000 1.10 @@ -8,7 +8,7 @@ @creation-date November 4 2001 @author ben@openforce.net - @cvs-id $Id$ + @version $Id$ } Index: openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/site-nodes-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 8 Dec 2001 01:22:40 -0000 1.1 +++ openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 11 Dec 2001 00:45:15 -0000 1.2 @@ -3,7 +3,7 @@ @author yon@openforce.net @creation-date 2001-12-07 - @cvs-id $Id$ + @version $Id$ } namespace eval site_nodes { Index: openacs-4/packages/dotlrn/www/communities.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/communities.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/communities.adp 8 Dec 2001 01:23:46 -0000 1.1 +++ openacs-4/packages/dotlrn/www/communities.adp 11 Dec 2001 00:45:15 -0000 1.2 @@ -21,6 +21,3 @@ - -
Currently, there are no active communities.
-
Index: openacs-4/packages/dotlrn/www/communities.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/communities.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/communities.tcl 8 Dec 2001 01:23:46 -0000 1.1 +++ openacs-4/packages/dotlrn/www/communities.tcl 11 Dec 2001 00:45:15 -0000 1.2 @@ -3,7 +3,7 @@ ad_page_contract { @author yon (yon@milliped.com) @creation-date Dec 07, 2001 - @cvs-id $Id$ + @version $Id$ } -query { } -properties { communities:multirow Index: openacs-4/packages/dotlrn/www/community-type.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-type.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/community-type.adp 11 Dec 2001 00:45:15 -0000 1.1 @@ -0,0 +1,23 @@ + +@context_bar@ +dotLRN: @pretty_name@ + +

+ +
+ @description@ +
+ +

+ +
+ +
+ +

+ +
+ +
+ +

Index: openacs-4/packages/dotlrn/www/community-type.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-type.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/community-type.tcl 11 Dec 2001 00:45:15 -0000 1.1 @@ -0,0 +1,27 @@ +ad_page_contract { + Displays a community type + + @author Ben Adida (ben@openforce.net) + @author yon (yon@openforce.net) + @creation-date 2001-10-04 +} -query { +} -properties { +} + +# Check that this is a community type +if {[ad_parameter community_type_level_p] != 1} { + ad_returnredirect "./" + ad_script_abort +} + +set user_id [ad_conn user_id] + +# What community type are we at? +set community_type [dotlrn_community::get_community_type] + +# Load some community type info +db_1row select_community_type_info {} + +set context_bar {View} + +ad_return_template Index: openacs-4/packages/dotlrn/www/community-type.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-type.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/community-type.xql 11 Dec 2001 00:45:15 -0000 1.1 @@ -0,0 +1,13 @@ + + + + + + select pretty_name, + description, + supertype + from dotlrn_community_types + where community_type = :community_type + + + Index: openacs-4/packages/dotlrn/www/community-types.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-types.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/community-types.adp 8 Dec 2001 01:23:46 -0000 1.1 +++ openacs-4/packages/dotlrn/www/community-types.adp 11 Dec 2001 00:45:15 -0000 1.2 @@ -8,6 +8,3 @@ - -
Currently, there are no active community types.
-
Index: openacs-4/packages/dotlrn/www/community-types.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-types.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/community-types.tcl 8 Dec 2001 01:23:46 -0000 1.1 +++ openacs-4/packages/dotlrn/www/community-types.tcl 11 Dec 2001 00:45:15 -0000 1.2 @@ -3,7 +3,7 @@ ad_page_contract { @author yon (yon@milliped.com) @creation-date Dec 07, 2001 - @cvs-id $Id$ + @version $Id$ } -query { } -properties { community_types:multirow Index: openacs-4/packages/dotlrn/www/community.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/community.adp 11 Dec 2001 00:45:15 -0000 1.1 @@ -0,0 +1,11 @@ + +@context_bar@ +dotLRN Community: @pretty_name@ + +You are registered! You may deregister if you'd like. +

+Configure this page. +Admin this community. +

+ +@rendered_page@ Index: openacs-4/packages/dotlrn/www/community.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/community.tcl 11 Dec 2001 00:45:15 -0000 1.1 @@ -0,0 +1,53 @@ + +ad_page_contract { + Displays a community + + @author Ben Adida (ben@openforce.net) + @creation-date 2001-10-04 +} { +} + +ns_log Notice "BEN TEST!" + + +# Check that this is a community type +if {[ad_parameter community_level_p] != 1} { + ns_returnredirect "./" + return +} + +set user_id [ad_conn user_id] + +# What community type are we at? +set community_id [dotlrn_community::get_community_id] + +# Get basic information +db_1row select_community_info {} + +# Check that this user is a member +if {![dotlrn_community::member_p $community_id $user_id]} { + set context_bar [list "Not a member"] + + set portal_id [dotlrn_community::get_community_non_members_portal_id $community_id] + + # Possible that there is no portal page for non-members + if {! [empty_string_p $portal_id]} { + set rendered_page [dotlrn::render_page $portal_id] + } else { + set rendered_page "" + } + + ad_return_template one-community-not-member + return +} else { + # Pull out the NPP page ID and render it! + set portal_id [dotlrn_community::get_portal_id $community_id $user_id] + + set rendered_page [dotlrn::render_page $portal_id] + + set context_bar {View} + + set admin_p [dotlrn::user_can_admin_community_p $community_id] + + ad_return_template +} Index: openacs-4/packages/dotlrn/www/community.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/community.xql 11 Dec 2001 00:45:15 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + +select pretty_name from dotlrn_communities where community_id = :community_id + + + + Index: openacs-4/packages/dotlrn/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/index.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/dotlrn/www/index.tcl 11 Dec 2001 00:27:59 -0000 1.14 +++ openacs-4/packages/dotlrn/www/index.tcl 11 Dec 2001 00:45:15 -0000 1.15 @@ -3,6 +3,7 @@ @author Ben Adida (ben@openforce.net) @creation-date 2001-08-20 + @version $Id$ } { } Index: openacs-4/packages/dotlrn/www/one-community-portal-template-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/one-community-portal-template-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/one-community-portal-template-2.tcl 28 Nov 2001 20:45:05 -0000 1.1 +++ openacs-4/packages/dotlrn/www/one-community-portal-template-2.tcl 11 Dec 2001 00:45:15 -0000 1.2 @@ -3,7 +3,7 @@ Form target for the Configuration page for an instance's portal template @author Arjun Sanyal (arjun@openforce.net) - @cvs-id $Id$ + @version $Id$ } { } set form [ns_getform] Index: openacs-4/packages/dotlrn/www/one-community-portal-template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/one-community-portal-template.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/one-community-portal-template.tcl 10 Dec 2001 18:40:02 -0000 1.2 +++ openacs-4/packages/dotlrn/www/one-community-portal-template.tcl 11 Dec 2001 00:45:15 -0000 1.3 @@ -3,7 +3,7 @@ Configuration page for an instance's portal template @author Arjun Sanyal (arjun@openforce.net) - @cvs-id $Id$ + @version $Id$ } { portal_id:naturalnum,notnull return_url:notnull Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/test.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/dotlrn/www/admin/class-instance-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class-instance-new.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/admin/class-instance-new.tcl 10 Dec 2001 22:48:57 -0000 1.5 +++ openacs-4/packages/dotlrn/www/admin/class-instance-new.tcl 11 Dec 2001 00:45:16 -0000 1.6 @@ -23,13 +23,16 @@ element create add_class_instance class_key \ -label "Class Key" -value $class_key -datatype text -widget hidden +element create add_class_instance join_policy \ + -label "Join Policy" -datatype text -widget select -options {{Open open} {"Needs Approval" "needs approval"} {Closed closed}} + element create add_class_instance referer \ -label "Referer" -value $referer -datatype text -widget hidden if {[form is_valid add_class_instance]} { - template::form get_values add_class_instance class_key year term description referer + template::form get_values add_class_instance class_key year term description join_policy referer - set class_instance_id [dotlrn_class::new_instance -description $description -class_type $class_key -term $term -year $year] + set class_instance_id [dotlrn_class::new_instance -description $description -class_type $class_key -term $term -year $year -join_policy $join_policy] if {[empty_string_p $referer]} { set referer "one-class?class_key=$class_key" Index: openacs-4/packages/dotlrn/www/admin/club-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/club-new.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/admin/club-new.tcl 10 Dec 2001 22:48:57 -0000 1.2 +++ openacs-4/packages/dotlrn/www/admin/club-new.tcl 11 Dec 2001 00:45:16 -0000 1.3 @@ -21,13 +21,16 @@ element create add_club description \ -label "Charter" -datatype text -widget textarea -html {rows 5 cols 60 wrap soft} +element create add_club join_policy \ + -label "Join Policy" -datatype text -widget select -options {{Open open} {"Needs Approval" "needs approval"} {Closed closed}} + element create add_club referer \ -label "Referer" -value $referer -datatype text -widget hidden if {[form is_valid add_club]} { - form get_values add_club club_key name description referer + form get_values add_club club_key name description join_policy referer - set key [dotlrn_club::new -description $description -key $club_key -pretty_name $name] + set key [dotlrn_club::new -description $description -key $club_key -pretty_name $name -join_policy $join_policy] if {[empty_string_p $referer]} { set referer "clubs"