Index: openacs-4/packages/dotlrn-forums/dotlrn-forums.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/dotlrn-forums.info,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-forums/dotlrn-forums.info 30 May 2002 06:28:03 -0000 1.1
+++ openacs-4/packages/dotlrn-forums/dotlrn-forums.info 6 Jun 2002 03:43:55 -0000 1.2
@@ -15,13 +15,17 @@
Ben Adida
-
+
+
+
+
+
Index: openacs-4/packages/dotlrn-forums/www/user-history-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/www/Attic/user-history-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-forums/www/user-history-oracle.xql 6 Jun 2002 03:43:55 -0000 1.1
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ select forums_messages.message_id,
+ forums_messages.subject,
+ to_char(forums_messages.posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date,
+ forums_forums.forum_id,
+ forums_forums.name as forum_name,
+ (select site_node.url(node_id) from site_nodes where object_id= forums_forums.package_id) as url,
+ package_id
+ from forums_messages,
+ forums_forums
+ where forums_messages.user_id = :user_id
+ and forums_messages.forum_id = forums_forums.forum_id
+ and forums_forums.package_id in $package_id_list_sql
+ $sql_order_by
+
+
+
+
Index: openacs-4/packages/dotlrn-forums/www/user-history.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/www/Attic/user-history.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-forums/www/user-history.adp 6 Jun 2002 03:43:55 -0000 1.1
@@ -0,0 +1,104 @@
+
+Forums: Posting history for @user.full_name@
+@context_bar@
+
+
+ Posting history for
+
+ <%
+ if {![permission::permission_p -object_id [acs_magic_object security_context_root] -privilege admin]} {
+ adp_puts [acs_community_member_link -user_id $user(user_id)]
+ } else {
+ adp_puts [acs_community_member_admin_link -user_id $user(user_id)]
+ }
+ %>
+
+
+
+
+
+@dimensional_chunk@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= $community_names($messages(package_id)) %>: @messages.forum_name@
|
+
+
+
+ Subject |
+ Posted |
+
+
+
+
+
+
+
+
+
+
+
+ @messages.subject@ |
+ @messages.posting_date@ |
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-forums/www/user-history.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/www/Attic/user-history.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-forums/www/user-history.tcl 6 Jun 2002 03:43:55 -0000 1.1
@@ -0,0 +1,70 @@
+ad_page_contract {
+
+ Posting History for a User across communities
+
+ @author Ben Adida (ben@openforce)
+ @creation-date 2002-05-29
+ @version $Id: user-history.tcl,v 1.1 2002/06/06 03:43:55 ben Exp $
+
+} {
+ user_id:integer,notnull
+ {view "date"}
+}
+
+# The biggest issue here is finding all the package IDs
+# that are to be looked at for user history
+set package_user_id $user_id
+set applet_key [dotlrn_forums::applet_key]
+
+# Load up packages and community names
+set user_package_id_list [list]
+db_foreach select_user_package_id_list {} {
+ lappend user_package_id_list $package_id
+ set community_names($package_id) $community_pretty_name
+}
+
+if {[dotlrn::admin_p]} {
+ # If an admin, that's the package ID list
+ set package_id_list $user_package_id_list
+} else {
+ # If not an admin, we find the communities that the browsing
+ # user is a member of
+ set package_user_id [ad_conn user_id]
+
+ set browser_package_id_list [list]
+ db_foreach select_user_package_id_list {} {
+ lappend browser_package_id_list $package_id
+ }
+
+ # We merge the lists
+ set package_id_list [list]
+ foreach pack_id $user_package_id_list {
+ if {[lsearch -exact $browser_package_id_list $pack_id] > -1} {
+ lappend package_id_list $pack_id
+ }
+ }
+}
+
+set package_id_list_sql "([join $package_id_list ","])"
+
+# choosing the view
+set dimensional_list {
+ {
+ view "View:" date {
+ {date "by Date" { order by date desc } }
+ {forum "by Forum" { order by forums_forums.name, date desc } }
+ }
+ }
+}
+
+set sql_order_by [ad_dimensional_sql $dimensional_list]
+
+# Select the postings
+db_multirow messages select_messages {}
+
+# Get user information
+oacs::user::get -user_id $user_id -array user
+
+set dimensional_chunk [ad_dimensional $dimensional_list]
+set context_bar {{Posting History}}
+ad_return_template
Index: openacs-4/packages/dotlrn-forums/www/user-history.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/www/Attic/user-history.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-forums/www/user-history.xql 6 Jun 2002 03:43:55 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+select dotlrn_community_applets.package_id,
+dotlrn_communities.pretty_name as community_pretty_name
+from
+dotlrn_member_rels_full, dotlrn_community_applets, dotlrn_communities
+where
+dotlrn_community_applets.community_id = dotlrn_member_rels_full.community_id
+and dotlrn_communities.community_id= dotlrn_community_applets.community_id
+and applet_id= (select applet_id from dotlrn_applets
+ where applet_key= :applet_key)
+and user_id= :package_user_id
+
+
+
+