Index: openacs-4/packages/dotlrn/dotlrn.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn/dotlrn.info 7 Nov 2001 20:20:55 -0000 1.8 +++ openacs-4/packages/dotlrn/dotlrn.info 7 Nov 2001 22:22:09 -0000 1.9 @@ -61,6 +61,8 @@ + + @@ -70,6 +72,10 @@ + + + + @@ -81,10 +87,9 @@ + + - - - Index: openacs-4/packages/dotlrn/tcl/class-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/class-procs-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/tcl/class-procs-oracle.xql 8 Oct 2001 21:39:05 -0000 1.1 +++ openacs-4/packages/dotlrn/tcl/class-procs-oracle.xql 7 Nov 2001 22:22:09 -0000 1.2 @@ -38,4 +38,5 @@ + 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.7 -r1.8 --- openacs-4/packages/dotlrn/tcl/class-procs.tcl 8 Oct 2001 21:38:37 -0000 1.7 +++ openacs-4/packages/dotlrn/tcl/class-procs.tcl 7 Nov 2001 22:22:09 -0000 1.8 @@ -83,8 +83,9 @@ set community_id [db_exec_plsql create_class_instance {}] # Set up the node - # set parent_node_id [db_string select_parent_node_id {}] - set parent_node_id [ad_conn -get node_id] + # set parent_node_id [ad_conn -get node_id] + # THIS IS WRONG: the parent_node_id is the node of the class_type + set parent_node_id [db_string select_parent_node_id {}] # Instantiate the right package at that site node, probably portals set package_id [site_node_mount_application -return "package_id" $parent_node_id $short_name [one_class_package_key] $short_name] 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.2 -r1.3 --- openacs-4/packages/dotlrn/tcl/class-procs.xql 3 Oct 2001 01:56:56 -0000 1.2 +++ openacs-4/packages/dotlrn/tcl/class-procs.xql 7 Nov 2001 22:22:09 -0000 1.3 @@ -2,25 +2,11 @@ - - -insert into dotlrn_classes (class_key) values (:class_group_type_key) - - - -select node_id from dotlrn_classes where class_key=:class_name +select node_id from site_nodes where object_id= (select package_id from dotlrn_classes_full where class_key=:class_type) - - -insert into dotlrn_class_instances - (class_instance_id, class_key) -values - (:community_id, :short_name) - - 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.14 -r1.15 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 7 Nov 2001 20:20:56 -0000 1.14 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 7 Nov 2001 22:22:09 -0000 1.15 @@ -123,8 +123,8 @@ } ad_proc -public add_user { + {-rel_type "dotlrn_member_rel"} community_id - rel_type user_id } { Assigns a user to a particular role for that class. Roles in DOTLRN can be student, prof, ta, admin @@ -135,6 +135,7 @@ # Create the form with the page_id set vars(page_id) $page_id + template::form::create add_member_form template::form::set_values add_member_form vars Index: openacs-4/packages/dotlrn/tcl/community-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 7 Nov 2001 20:20:56 -0000 1.6 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 7 Nov 2001 22:22:09 -0000 1.7 @@ -35,40 +35,25 @@ -select rel_id, users.user_id, first_names, last_name, email from registered_users users, dotlrn_member_rels_full where community_id= :community_id and users.user_id = dotlrn_member_rels_full.user_id +select rel_id, rel_type, users.user_id, first_names, last_name, email from registered_users users, dotlrn_member_rels_full where community_id= :community_id and users.user_id = dotlrn_member_rels_full.user_id order by rel_type -select count(*) from dotlrn_community_memberships where community_id= :community_id and user_id= :user_id +select count(*) from dotlrn_member_rels_full where community_id= :community_id and user_id= :user_id - - -insert into dotlrn_community_memberships -(rel_id, community_id, user_id, page_id) -values -(:rel_id, :community_id, :user_id, :page_id) - - - -select rel_id, page_id from dotlrn_community_memberships where community_id= :community_id and user_id= :user_id +select rel_id, page_id from dotlrn_member_rels_full where community_id= :community_id and user_id= :user_id - - -delete from dotlrn_community_memberships where rel_id=:rel_id - - - -select page_id from dotlrn_community_memberships where community_id= :community_id and user_id= :user_id +select page_id from dotlrn_member_rels_full where community_id= :community_id and user_id= :user_id @@ -87,10 +72,10 @@ select dotlrn_communities.community_id as community_id, community_type, pretty_name, description, package_id -from dotlrn_communities, dotlrn_community_memberships +from dotlrn_communities, dotlrn_member_rels_full where community_type= :community_type and user_id= :user_id -and dotlrn_communities.community_id = dotlrn_community_memberships.community_id +and dotlrn_communities.community_id = dotlrn_member_rels_full.community_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.3 -r1.4 --- openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl 7 Nov 2001 20:20:56 -0000 1.3 +++ openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl 7 Nov 2001 22:22:09 -0000 1.4 @@ -60,24 +60,19 @@ # This is not templated. OH NO. I am a horrible, horrible, little man. (ben) - set return_html "
    \n" - ns_log Notice "DOTLRN - UL" + set return_html " +
      +
    • subscribe to a new class" set communities [dotlrn_community::get_all_communities_by_user $user_id] - # set communities "" - ns_log Notice "DOTLRN COMMUNITIES - $communities" - foreach community $communities { - ns_log Notice "DOTLRN - LI" set url [lindex $community 1]/[lindex $community 2] set pretty_name [lindex $community 3] append return_html "
    • $pretty_name\n" } - ns_log Notice "DOTLRN - /UL" - append return_html "
    " # return it all Index: openacs-4/packages/dotlrn/www/community-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-register.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/community-register.tcl 7 Oct 2001 19:21:08 -0000 1.1 +++ openacs-4/packages/dotlrn/www/community-register.tcl 7 Nov 2001 22:22:10 -0000 1.2 @@ -12,6 +12,6 @@ set user_id [ad_conn user_id] set community_id [dotlrn_community::get_community_id] -dotlrn_community::add_user $community_id student_rel $user_id +dotlrn_community::add_user -rel_type dotlrn_student_rel $community_id $user_id ns_returnredirect ./ Index: openacs-4/packages/dotlrn/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/index.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn/www/index.tcl 6 Nov 2001 21:46:51 -0000 1.7 +++ openacs-4/packages/dotlrn/www/index.tcl 7 Nov 2001 22:22:10 -0000 1.8 @@ -5,8 +5,6 @@ @author Ben Adida (ben@openforce.net) @creation-date 2001-08-20 } { -} -properties { - classes:multirow } # Check if this is a community type level thing