| @communities.pretty_name@ |
- (register)
+ ()
- (deregister)
+ ()
|
Index: openacs-4/packages/dotlrn/www/communities.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/communities.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/www/communities.tcl 11 Dec 2001 00:45:15 -0000 1.2
+++ openacs-4/packages/dotlrn/www/communities.tcl 10 Jan 2002 19:30:18 -0000 1.3
@@ -5,6 +5,7 @@
@creation-date Dec 07, 2001
@version $Id$
} -query {
+ {referer "./"}
} -properties {
communities:multirow
}
Index: openacs-4/packages/dotlrn/www/community-applet-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-applet-add.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/www/community-applet-add.tcl 10 Jan 2002 00:11:38 -0000 1.3
+++ openacs-4/packages/dotlrn/www/community-applet-add.tcl 10 Jan 2002 19:30:18 -0000 1.4
@@ -1,23 +1,24 @@
-
ad_page_contract {
Add an applet to a community
@author Ben Adida (ben@openforce.net)
+ @author yon (yon@openforce.net)
@creation-date 2001-10-08
-} {
+ @version $Id$
+} -query {
applet_key
+ {referer "one-community-admin"}
}
set community_id [dotlrn_community::get_community_id]
# Check access
if {![dotlrn_community::admin_access_p $community_id]} {
- ns_returnredirect /
- return
+ ad_returnredirect /
+ ad_script_abort
}
# Add the applet
dotlrn_community::add_applet_to_community $community_id $applet_key
-# Get back to where you once belonged
-ns_returnredirect community-applets?community_id=$community_id
+ad_returnredirect $referer
Index: openacs-4/packages/dotlrn/www/community-applets.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-applets.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/www/community-applets.adp 28 Nov 2001 00:11:48 -0000 1.2
+++ openacs-4/packages/dotlrn/www/community-applets.adp 10 Jan 2002 19:30:18 -0000 1.3
@@ -1,22 +1,25 @@
-
-@context_bar@
-dotLRN Community Admin: @pretty_name@
-
-Here you can do all sorts of administrative stuff.
-
-
-
+
Active Applets
-
-- @active_applets.applet_pretty_name@ - (cannot be removed yet)
+
+
- @active_applets.applet_pretty_name@ - (cannot be removed)
+
-
+
+
+
Applets to Add
-
-- @all_applets.applet_pretty_name@ - [add]
+
+
-
+ @all_applets.applet_pretty_name@ - [
+
+ add
+
+ ]
+
+
Index: openacs-4/packages/dotlrn/www/community-applets.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-applets.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/dotlrn/www/community-applets.tcl 10 Jan 2002 00:11:38 -0000 1.4
+++ openacs-4/packages/dotlrn/www/community-applets.tcl 10 Jan 2002 19:30:18 -0000 1.5
@@ -1,20 +1,18 @@
-
-
ad_page_contract {
Community Applets
@author Ben Adida (ben@openforce.net)
+ @author yon (yon@openforce.net)
@creation-date 2001-10-05
-} {
+ @version $Id$
+} -query {
+} -properties {
}
set community_id [dotlrn_community::get_community_id]
set user_id [ad_conn user_id]
-# Load some community type info
-db_1row select_community_info {}
-
# Get active applets
set list_of_active_applets [dotlrn_community::list_applets -community_id $community_id]
@@ -24,7 +22,6 @@
template::multirow append active_applets $applet_key [dotlrn_community::applet_call $applet_key GetPrettyName]
}
-
# List all applets
set list_of_applets [dotlrn_community::list_applets]
@@ -36,6 +33,4 @@
}
}
-set context_bar {{one-community-admin Admin} Applets}
-
ad_return_template
Index: openacs-4/packages/dotlrn/www/community-deregister.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-deregister.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn/www/community-deregister.tcl 9 Oct 2001 15:02:49 -0000 1.1
+++ openacs-4/packages/dotlrn/www/community-deregister.tcl 10 Jan 2002 19:30:18 -0000 1.2
@@ -1,17 +1,23 @@
-
ad_page_contract {
deregister
@author Ben Adida (ben@openforce.net)
+ @author yon (yon@openforce.net)
@creation-date 2001-10-06
-} {
+ @version $Id$
+} -query {
+ {referer "./"}
+ {community_id ""}
}
ad_maybe_redirect_for_registration
set user_id [ad_conn user_id]
-set community_id [dotlrn_community::get_community_id]
+if {[empty_string_p $community_id]} {
+ set community_id [dotlrn_community::get_community_id]
+}
+
dotlrn_community::remove_user $community_id $user_id
-ns_returnredirect ./
+ns_returnredirect $referer
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.3 -r1.4
--- openacs-4/packages/dotlrn/www/community-register.tcl 8 Dec 2001 01:22:40 -0000 1.3
+++ openacs-4/packages/dotlrn/www/community-register.tcl 10 Jan 2002 19:30:18 -0000 1.4
@@ -2,15 +2,22 @@
register
@author Ben Adida (ben@openforce.net)
+ @author yon (yon@openforce.net)
@creation-date 2001-10-06
-} {
+ @version $Id$
+} -query {
+ {referer "./"}
+ {community_id ""}
}
ad_maybe_redirect_for_registration
set user_id [ad_conn user_id]
-set community_id [dotlrn_community::get_community_id]
+if {[empty_string_p $community_id]} {
+ set community_id [dotlrn_community::get_community_id]
+}
+
dotlrn_community::add_user $community_id $user_id
-ad_returnredirect ./
+ad_returnredirect $referer
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.2 -r1.3
--- openacs-4/packages/dotlrn/www/community-types.adp 11 Dec 2001 00:45:15 -0000 1.2
+++ openacs-4/packages/dotlrn/www/community-types.adp 10 Jan 2002 19:30:18 -0000 1.3
@@ -1,5 +1,5 @@
- Community Types
+ Community Types@title@
Index: openacs-4/packages/dotlrn/www/community-user-add-2.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-user-add-2.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/www/community-user-add-2.adp 28 Nov 2001 00:11:48 -0000 1.3
+++ openacs-4/packages/dotlrn/www/community-user-add-2.adp 10 Jan 2002 19:30:18 -0000 1.4
@@ -3,14 +3,13 @@
You're adding @first_names@ @last_name@ (@email@):
-
Index: openacs-4/packages/dotlrn/www/community-user-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-user-add-2.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/dotlrn/www/community-user-add-2.tcl 11 Dec 2001 00:27:59 -0000 1.4
+++ openacs-4/packages/dotlrn/www/community-user-add-2.tcl 10 Jan 2002 19:30:18 -0000 1.5
@@ -1,11 +1,14 @@
-
ad_page_contract {
Search for a new user for dotLRN
@author Ben Adida (ben@openforce.net)
+ @author yon (yon@openforce.net)
@creation-date 2001-11-04
-} {
+ @version $Id$
+} -query {
user_id
+} -properties {
+ roles:multirow
}
set community_id [dotlrn_community::get_community_id]
@@ -19,7 +22,8 @@
template::multirow create roles rel_type pretty_name
foreach rel_type $rel_types {
- template::multirow append roles [lindex $rel_type 0] [lindex $rel_type 1]
+ ns_log notice "XXX: $rel_type [dotlrn_community::get_role_pretty_name_from_rel_type -rel_type $rel_type]"
+ template::multirow append roles $rel_type [dotlrn_community::get_role_pretty_name_from_rel_type -rel_type $rel_type]
}
ad_return_template
Index: openacs-4/packages/dotlrn/www/community-user-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-user-add.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/dotlrn/www/community-user-add.adp 29 Nov 2001 06:05:37 -0000 1.4
+++ openacs-4/packages/dotlrn/www/community-user-add.adp 10 Jan 2002 19:30:18 -0000 1.5
@@ -5,9 +5,6 @@
The results of your search are:
-
-
-
Index: openacs-4/packages/dotlrn/www/community-user-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-user-add.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/www/community-user-add.tcl 29 Nov 2001 06:05:37 -0000 1.3
+++ openacs-4/packages/dotlrn/www/community-user-add.tcl 10 Jan 2002 19:30:18 -0000 1.4
@@ -1,10 +1,11 @@
-
ad_page_contract {
Search for a new user for dotLRN
@author Ben Adida (ben@openforce.net)
+ @author yon (yon@openforce.net)
@creation-date 2001-11-04
-} {
+ @version $Id$
+} -query {
search_text
}
@@ -14,4 +15,5 @@
db_multirow users select_users {}
set context_bar {{one-community-admin Admin} "New User"}
+
ad_return_template
Index: openacs-4/packages/dotlrn/www/community-user-add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-user-add.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/www/community-user-add.xql 11 Dec 2001 00:27:59 -0000 1.3
+++ openacs-4/packages/dotlrn/www/community-user-add.xql 10 Jan 2002 19:30:18 -0000 1.4
@@ -1,11 +1,18 @@
-
-
-
-select user_id, first_names, last_name, email from dotlrn_users where lower(last_name) like lower('%' || :search_text || '%') or lower(email) like lower('%' || :search_text || '%') and user_id not in (select user_id from dotlrn_member_rels_full where community_id= :community_id)
-
-
-
+
+
+ select user_id,
+ first_names,
+ last_name,
+ email
+ from dotlrn_users
+ where lower(last_name) like lower('%' || :search_text || '%')
+ or lower(email) like lower('%' || :search_text || '%')
+ and user_id not in (select user_id
+ from dotlrn_member_rels_full
+ where community_id = :community_id)
+
+
Index: openacs-4/packages/dotlrn/www/community-users.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-users.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/community-users.adp 10 Jan 2002 19:30:18 -0000 1.1
@@ -0,0 +1,17 @@
+Users
+
Index: openacs-4/packages/dotlrn/www/community-users.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-users.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/community-users.tcl 10 Jan 2002 19:30:18 -0000 1.1
@@ -0,0 +1,25 @@
+# dotlrn/www/community-users.tcl
+
+ad_page_contract {
+ @author yon (yon@milliped.com)
+ @creation-date Jan 08, 2002
+ @version $Id: community-users.tcl,v 1.1 2002/01/10 19:30:18 yon Exp $
+} -query {
+} -properties {
+}
+
+set community_id [dotlrn_community::get_community_id]
+
+# Permissions
+dotlrn::require_user_admin_community $community_id
+
+# Get all users for this community, including role
+set list_of_users [dotlrn_community::list_users $community_id]
+
+template::multirow create users rel_id rel_type user_id first_names last_name email
+
+foreach user $list_of_users {
+ template::multirow append users [lindex $user 0] [dotlrn_community::get_role_pretty_name_from_rel_type -rel_type [lindex $user 1]] [lindex $user 2] [lindex $user 3] [lindex $user 4] [lindex $user 5]
+}
+
+ad_return_template
Index: openacs-4/packages/dotlrn/www/community.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn/www/community.adp 11 Dec 2001 00:45:15 -0000 1.1
+++ openacs-4/packages/dotlrn/www/community.adp 10 Jan 2002 19:30:18 -0000 1.2
@@ -2,7 +2,7 @@
@context_bar@
dotLRN Community: @pretty_name@
-You are registered! You may deregister if you'd like.
+You are registered! You may drop membership if you'd like.
Configure this page.
Admin this community.
Index: openacs-4/packages/dotlrn/www/deregister.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/deregister.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/deregister.adp 10 Jan 2002 19:30:18 -0000 1.1
@@ -0,0 +1 @@
+ leave@label@
Index: openacs-4/packages/dotlrn/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/index.adp,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/dotlrn/www/index.adp 17 Dec 2001 23:02:56 -0000 1.11
+++ openacs-4/packages/dotlrn/www/index.adp 10 Jan 2002 19:30:18 -0000 1.12
@@ -1,12 +1,16 @@
dotLRN
+[
+
+ customize
- Visit dotLRN Administration.
+ |
+ dotLRN Admin
+
+]
-Configure this page.
+
-
-
@rendered_page@
Index: openacs-4/packages/dotlrn/www/one-community-admin-users.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-admin-users.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn/www/one-community-admin-users.tcl 7 Nov 2001 22:22:56 -0000 1.1
+++ openacs-4/packages/dotlrn/www/one-community-admin-users.tcl 10 Jan 2002 19:30:18 -0000 1.2
@@ -1,5 +1,3 @@
-
-
ad_page_contract {
Admin the admin users of a community
Index: openacs-4/packages/dotlrn/www/one-community-admin.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-admin.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/dotlrn/www/one-community-admin.adp 6 Dec 2001 21:12:23 -0000 1.6
+++ openacs-4/packages/dotlrn/www/one-community-admin.adp 10 Jan 2002 19:30:18 -0000 1.7
@@ -1,22 +1,18 @@
-dotLRN Community Admin
+Admin
@context_bar@
-Applets
-manage applets
-
+
+
-Users
-
-
-- @users.last_name@, @users.first_names@ (@users.email@), @users.rel_type@
-
-
+
+
-
-
-
-Portal Template
-manage the portal template
+
+ Portal Template
+
+ manage the portal template
+
+
Index: openacs-4/packages/dotlrn/www/one-community-admin.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-admin.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/dotlrn/www/one-community-admin.tcl 28 Nov 2001 00:11:48 -0000 1.6
+++ openacs-4/packages/dotlrn/www/one-community-admin.tcl 10 Jan 2002 19:30:18 -0000 1.7
@@ -1,18 +1,19 @@
-
ad_page_contract {
Displays single dotLRN community page for admin
@author Ben Adida (ben@openforce.net)
+ @author yon (yon@openforce.net)
@creation-date 2001-11-27
-} {
+ @version $Id$
+} -query {
+} -properties {
}
set community_id [dotlrn_community::get_community_id]
# Permissions
dotlrn::require_user_admin_community $community_id
-# Get information about that class
db_1row select_community_info {}
# Get all users for this community, including role
Index: openacs-4/packages/dotlrn/www/one-community-admin.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-admin.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/www/one-community-admin.xql 27 Nov 2001 23:32:03 -0000 1.3
+++ openacs-4/packages/dotlrn/www/one-community-admin.xql 10 Jan 2002 19:30:18 -0000 1.4
@@ -1,11 +1,14 @@
-
-
-
-select community_type, pretty_name, description, portal_template_id from dotlrn_communities where community_id= :community_id
-
-
-
+
+
+ select community_type,
+ pretty_name,
+ description,
+ portal_template_id
+ from dotlrn_communities
+ where community_id = :community_id
+
+
Index: openacs-4/packages/dotlrn/www/one-community-not-member.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/one-community-not-member.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/www/one-community-not-member.adp 9 Nov 2001 15:24:57 -0000 1.3
+++ openacs-4/packages/dotlrn/www/one-community-not-member.adp 10 Jan 2002 19:30:18 -0000 1.4
@@ -1,9 +1,13 @@
@context_bar@
-dotLRN Community: @pretty_name@
+@pretty_name@
-You are not a member of this community. Would you like to register?
+[
+
+
+
+]
-
+
@rendered_page@
Index: openacs-4/packages/dotlrn/www/one-community-type.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-type.adp,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/dotlrn/www/one-community-type.adp 8 Dec 2001 01:22:40 -0000 1.12
+++ openacs-4/packages/dotlrn/www/one-community-type.adp 10 Jan 2002 19:30:18 -0000 1.13
@@ -1,6 +1,6 @@
@context_bar@
-dotLRN: @pretty_name@
+@title@
@@ -11,13 +11,11 @@
-
+
-
+
-
-
Index: openacs-4/packages/dotlrn/www/one-community-type.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-type.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/dotlrn/www/one-community-type.tcl 8 Dec 2001 01:22:40 -0000 1.8
+++ openacs-4/packages/dotlrn/www/one-community-type.tcl 10 Jan 2002 19:30:18 -0000 1.9
@@ -4,8 +4,18 @@
@author Ben Adida (ben@openforce.net)
@author yon (yon@openforce.net)
@creation-date 2001-10-04
+ @version $Id$
} -query {
} -properties {
+ context_bar:onevalue
+ pretty_name:onevalue
+ description:onevalue
+ supertype:onevalue
+ community_type:onevalue
+ ancestor_type:onevalue
+ community_type_title:onevalue
+ communities_title:onevalue
+ title:onevalue
}
# Check that this is a community type
@@ -16,12 +26,31 @@
set user_id [ad_conn user_id]
+set context_bar {View}
+
# What community type are we at?
set community_type [dotlrn_community::get_community_type]
+set ancestor_type [dotlrn_community::get_toplevel_community_type -community_type $community_type]
# Load some community type info
db_1row select_community_type_info {}
-set context_bar {View}
+if {[string equal ${community_type} "dotlrn_class_instance"] != 0} {
+ set community_type_title "Classes"
+ set communities_title "Class Instances"
+ set title "Classes"
+} elseif {[string equal ${community_type} "dotlrn_club"] != 0} {
+ set community_type_title "Clubs"
+ set communities_title "Clubs"
+ set title "Clubs"
+} elseif {[string equal ${ancestor_type} "dotlrn_class_instance"] != 0} {
+ set community_type_title "Classes"
+ set communities_title "Class Instances"
+ set title $pretty_name
+} else {
+ set community_type_title "Community Types"
+ set communities_title "Communities"
+ set title "Community Type"
+}
ad_return_template
Index: openacs-4/packages/dotlrn/www/one-community-type.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-type.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn/www/one-community-type.xql 6 Oct 2001 18:24:42 -0000 1.1
+++ openacs-4/packages/dotlrn/www/one-community-type.xql 10 Jan 2002 19:30:18 -0000 1.2
@@ -1,11 +1,13 @@
-
-
-
-select pretty_name, description, supertype from dotlrn_community_types where community_type= :community_type
-
-
-
+
+
+ select pretty_name,
+ description,
+ supertype
+ from dotlrn_community_types
+ where community_type = :community_type
+
+
Index: openacs-4/packages/dotlrn/www/one-community.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/dotlrn/www/one-community.adp 28 Nov 2001 00:11:48 -0000 1.6
+++ openacs-4/packages/dotlrn/www/one-community.adp 10 Jan 2002 19:30:18 -0000 1.7
@@ -1,11 +1,19 @@
@context_bar@
-dotLRN Community: @pretty_name@
+@pretty_name@
-You are registered! You may deregister if you'd like.
-
-Configure this page.
-Admin this community.
-
+[
+
+
+ |
+ customize
+
+ |
+ admin
+
+
+]
+
+
@rendered_page@
Index: openacs-4/packages/dotlrn/www/one-community.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community.tcl,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/dotlrn/www/one-community.tcl 17 Dec 2001 23:02:56 -0000 1.11
+++ openacs-4/packages/dotlrn/www/one-community.tcl 10 Jan 2002 19:30:18 -0000 1.12
@@ -2,14 +2,17 @@
Displays a community
@author Ben Adida (ben@openforce.net)
+ @author yon (yon@openforce.net)
@creation-date 2001-10-04
-} {
+ @version $Id$
+} -query {
+} -properties {
}
# Check that this is a community type
if {[ad_parameter community_level_p] != 1} {
ns_returnredirect "./"
- return
+ ad_script_abort
}
set user_id [ad_conn user_id]
Index: openacs-4/packages/dotlrn/www/one-community.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/one-community.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn/www/one-community.xql 7 Oct 2001 19:21:08 -0000 1.1
+++ openacs-4/packages/dotlrn/www/one-community.xql 10 Jan 2002 19:30:18 -0000 1.2
@@ -1,11 +1,11 @@
-
-
-
-select pretty_name from dotlrn_communities where community_id = :community_id
-
-
-
+
+
+ select pretty_name
+ from dotlrn_communities
+ where community_id = :community_id
+
+
Index: openacs-4/packages/dotlrn/www/register.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/register.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn/www/register.adp 10 Jan 2002 19:30:18 -0000 1.1
@@ -0,0 +1 @@
+ join@label@
Index: openacs-4/packages/dotlrn/www/student-list.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/student-list.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/www/student-list.adp 9 Nov 2001 03:56:43 -0000 1.2
+++ openacs-4/packages/dotlrn/www/student-list.adp 10 Jan 2002 19:30:18 -0000 1.3
@@ -2,7 +2,7 @@
@pretty_name@ - Student List
-
-- @students.last_name@, @students.first_names@ (@students.email@), @students.role@
+
+
- @students.last_name@, @students.first_names@ (@students.email@), @students.role@
Index: openacs-4/packages/dotlrn/www/student-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/student-list.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/www/student-list.tcl 9 Nov 2001 03:56:43 -0000 1.3
+++ openacs-4/packages/dotlrn/www/student-list.tcl 10 Jan 2002 19:30:18 -0000 1.4
@@ -1,4 +1,3 @@
-
ad_page_contract {
Displays a community student list
@@ -26,7 +25,7 @@
template::multirow create students user_id first_names last_name email role
foreach student $list_of_students {
- template::multirow append students [lindex $student 2] [lindex $student 3] [lindex $student 4] [lindex $student 5] [dotlrn_community::get_pretty_rel_type [lindex $student 1]]
+ template::multirow append students [lindex $student 2] [lindex $student 3] [lindex $student 4] [lindex $student 5] [dotlrn_community::get_role_pretty_name_from_rel_type -rel_type [lindex $student 1]]
}
ad_return_template
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.7 -r1.8
--- openacs-4/packages/dotlrn/www/admin/class-instance-new.tcl 17 Dec 2001 23:02:56 -0000 1.7
+++ openacs-4/packages/dotlrn/www/admin/class-instance-new.tcl 10 Jan 2002 19:30:18 -0000 1.8
@@ -14,6 +14,9 @@
element create add_class_instance term \
-label "Term" -datatype integer -widget select -options [db_list_of_lists select_terms_for_select_widget {}]
+element create add_class_instance name \
+ -label "Name" -datatype text -widget text -html {size 50} -optional
+
element create add_class_instance description \
-label "Description" -datatype text -widget textarea -html {rows 5 cols 60 wrap soft} -optional
@@ -27,9 +30,15 @@
-label "Referer" -value $referer -datatype text -widget hidden
if {[form is_valid add_class_instance]} {
- template::form get_values add_class_instance term description join_policy class_key referer
+ template::form get_values add_class_instance class_key term name description join_policy referer
- set class_instance_id [dotlrn_class::new_instance -description $description -class_type $class_key -term_id $term -join_policy $join_policy]
+ set class_instance_id [dotlrn_class::new_instance \
+ -class_type $class_key \
+ -term_id $term \
+ -pretty_name $name \
+ -description $description \
+ -join_policy $join_policy \
+ ]
if {[empty_string_p $referer]} {
set referer "one-class?class_key=$class_key"
Index: openacs-4/packages/dotlrn/www/admin/class-new.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class-new.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/www/admin/class-new.tcl 10 Dec 2001 22:48:57 -0000 1.3
+++ openacs-4/packages/dotlrn/www/admin/class-new.tcl 10 Jan 2002 19:30:18 -0000 1.4
@@ -6,7 +6,7 @@
@creation-date 2001-08-20
@version $Id$
} -query {
- {referer ""}
+ {referer "classes"}
}
form create add_class
@@ -28,10 +28,6 @@
set class_key [dotlrn_class::new -class_key $class_key -pretty_name $name -description $description]
- if {[empty_string_p $referer]} {
- set referer "classes"
- }
-
ad_returnredirect $referer
ad_script_abort
}
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.3 -r1.4
--- openacs-4/packages/dotlrn/www/admin/club-new.tcl 11 Dec 2001 00:45:16 -0000 1.3
+++ openacs-4/packages/dotlrn/www/admin/club-new.tcl 10 Jan 2002 19:30:18 -0000 1.4
@@ -5,7 +5,7 @@
@creation-date 2001-12-03
@version $Id$
} -query {
- {referer ""}
+ {referer "clubs"}
} -properties {
context_bar:onevalue
}
@@ -32,10 +32,6 @@
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"
- }
-
ad_returnredirect $referer
ad_script_abort
}
Index: openacs-4/packages/dotlrn/www/admin/one-class.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/one-class.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/dotlrn/www/admin/one-class.adp 17 Dec 2001 23:02:56 -0000 1.6
+++ openacs-4/packages/dotlrn/www/admin/one-class.adp 10 Jan 2002 19:30:18 -0000 1.7
@@ -1,5 +1,5 @@
-@pretty_name@ (@class_key@)
+@pretty_name@
@context_bar@
Index: openacs-4/packages/dotlrn/www/admin/term-new.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/term-new.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn/www/admin/term-new.tcl 17 Dec 2001 23:02:56 -0000 1.1
+++ openacs-4/packages/dotlrn/www/admin/term-new.tcl 10 Jan 2002 19:30:18 -0000 1.2
@@ -5,7 +5,7 @@
@creation-date 2001-12-13
@version $Id$
} -query {
- {referer ""}
+ {referer "terms"}
} -properties {
context_bar:onevalue
}
@@ -32,10 +32,6 @@
dotlrn_term::new -term_name $term_name -term_year $term_year -start_date $start_date -end_date $end_date
- if {[empty_string_p $referer]} {
- set referer "terms"
- }
-
ad_returnredirect $referer
ad_script_abort
}
Index: openacs-4/packages/dotlrn/www/admin/user-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-edit.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/www/admin/user-edit.adp 11 Dec 2001 16:14:13 -0000 1.2
+++ openacs-4/packages/dotlrn/www/admin/user-edit.adp 10 Jan 2002 19:30:18 -0000 1.3
@@ -6,6 +6,3 @@
-
-
-
Index: openacs-4/packages/dotlrn/www/admin/user-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-edit.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/www/admin/user-edit.tcl 17 Dec 2001 23:02:56 -0000 1.2
+++ openacs-4/packages/dotlrn/www/admin/user-edit.tcl 10 Jan 2002 19:30:18 -0000 1.3
@@ -3,7 +3,9 @@
Edit a User
@author Ben Adida (ben@openforce.net)
+ @author yon (yon@openforce.net)
@creation-date 2001-12-10
+ @version $Id$
} {
user_id
}
@@ -38,7 +40,11 @@
if {[form is_valid verif_edit_user]} {
template::form get_values verif_edit_user user_id type_id rel_type read_private_data_p
- set rel_id [db_string select_rel_id "select rel_id from dotlrn_users where user_id=:user_id"]
+ set rel_id [db_string select_rel_id {
+ select rel_id
+ from dotlrn_users
+ where user_id = :user_id
+ }]
db_transaction {
# remove the user
@@ -61,10 +67,25 @@
# Do something
set new_rel_type $rel_type
- db_1row select_limited_user_info "select first_names,last_name,object_type as old_rel_type from dotlrn_users, acs_objects where dotlrn_users.user_id= :user_id and dotlrn_users.rel_id= acs_objects.object_id"
- set old_rel_type [db_string select_rel_type "select 'dotlrn_full_user_rel' from dual where exists (select 1 from dotlrn_full_users where user_id=:user_id)" -default "dotlrn_user_rel"]
+ db_1row select_limited_user_info {
+ select first_names,
+ last_name,
+ object_type as old_rel_type
+ from dotlrn_users,
+ acs_objects
+ where dotlrn_users.user_id = :user_id
+ and dotlrn_users.rel_id = acs_objects.object_id
+ }
+ set old_rel_type [db_string select_rel_type {
+ select 'dotlrn_full_user_rel'
+ from dual
+ where exists (select 1
+ from dotlrn_full_users
+ where user_id = :user_id)
+ } -default "dotlrn_user_rel"]
+
if {$new_rel_type == $old_rel_type} {
# Simply update things
db_transaction {
Index: openacs-4/packages/dotlrn/www/admin/users.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/dotlrn/www/admin/users.xql 10 Dec 2001 23:58:31 -0000 1.4
+++ openacs-4/packages/dotlrn/www/admin/users.xql 10 Jan 2002 19:30:18 -0000 1.5
@@ -1,11 +1,17 @@
-
-
-
-select first_names, last_name, email, type, case when theme_id is NULL then 1 else 0 end as limited_access_p, acs_permission__permission_p(:dotlrn_package_id, user_id, 'read_private_data') as read_private_data_p from dotlrn_users left join dotlrn_full_user_rels on dotlrn_users.rel_id= dotlrn_full_user_rels.rel_id order by last_name
-
-
-
+
+
+ select first_names,
+ last_name,
+ email,
+ type,
+ case when theme_id is null then 1 else 0 end as limited_access_p,
+ acs_permission__permission_p(:dotlrn_package_id, user_id, 'read_private_data') as read_private_data_p
+ from dotlrn_users
+ left join dotlrn_full_user_rels on dotlrn_users.rel_id = dotlrn_full_user_rels.rel_id
+ order by last_name
+
+
|