oracle
postgresql
Ben Adida
Notification Management
- 2002-08-19
+ 2003-02-17
-
+
@@ -36,6 +37,7 @@
+
@@ -52,6 +54,7 @@
+
@@ -69,6 +72,8 @@
+
+
@@ -80,6 +85,7 @@
+
@@ -100,10 +106,12 @@
+
+
-
+
Index: openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql,v
diff -u -r1.8.2.2 -r1.8.2.3
--- openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql 1 Feb 2003 00:14:25 -0000 1.8.2.2
+++ openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql 5 Mar 2003 15:02:57 -0000 1.8.2.3
@@ -67,19 +67,23 @@
-- what's allowed for a given notification type?
create table notification_types_intervals (
type_id constraint notif_type_int_type_id_fk
- references notification_types (type_id),
+ references notification_types (type_id)
+ on delete cascade,
interval_id constraint notif_type_int_int_id_fk
- references notification_intervals (interval_id),
+ references notification_intervals (interval_id)
+ on delete cascade,
constraint notif_type_int_pk
primary key (type_id, interval_id)
);
-- allowed delivery methods
create table notification_types_del_methods (
type_id constraint notif_type_del_type_id_fk
- references notification_types (type_id),
+ references notification_types (type_id)
+ on delete cascade,
delivery_method_id constraint notif_type_del_meth_id_fk
- references notification_delivery_methods (delivery_method_id),
+ references notification_delivery_methods (delivery_method_id)
+ on delete cascade,
constraint notif_type_deliv_pk
primary key (type_id, delivery_method_id)
);
@@ -91,7 +95,8 @@
constraint notif_request_id_pk
primary key,
type_id constraint notif_request_type_id_fk
- references notification_types (type_id),
+ references notification_types (type_id)
+ on delete cascade,
user_id constraint notif_request_user_id_fk
references users (user_id)
on delete cascade,
@@ -117,7 +122,11 @@
format varchar(100)
default 'text'
constraint notif_request_format_ch
- check (format in ('text', 'html'))
+ check (format in ('text', 'html')),
+ dynamic_p char(1)
+ default 'f'
+ constraint notif_request_dynamic_ch
+ check (dynamic_p in ('t', 'f'))
);
create index notification_requests_t_o_idx on notification_requests(type_id, object_id);
Index: openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql,v
diff -u -r1.6.2.1 -r1.6.2.2
--- openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql 26 Feb 2003 02:26:42 -0000 1.6.2.1
+++ openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql 5 Mar 2003 15:02:57 -0000 1.6.2.2
@@ -230,6 +230,7 @@
interval_id in notification_requests.interval_id%TYPE,
delivery_method_id in notification_requests.delivery_method_id%TYPE,
format in notification_requests.format%TYPE,
+ dynamic_p in notification_requests.dynamic_p%TYPE,
creation_date in acs_objects.creation_date%TYPE default sysdate,
creation_user in acs_objects.creation_user%TYPE,
creation_ip in acs_objects.creation_ip%TYPE,
@@ -247,7 +248,6 @@
/
show errors
-
create or replace package body notification_request
as
function new (
@@ -259,6 +259,7 @@
interval_id in notification_requests.interval_id%TYPE,
delivery_method_id in notification_requests.delivery_method_id%TYPE,
format in notification_requests.format%TYPE,
+ dynamic_p in notification_requests.dynamic_p%TYPE,
creation_date in acs_objects.creation_date%TYPE default sysdate,
creation_user in acs_objects.creation_user%TYPE,
creation_ip in acs_objects.creation_ip%TYPE,
@@ -277,8 +278,8 @@
);
insert into notification_requests
- (request_id, type_id, user_id, object_id, interval_id, delivery_method_id, format) values
- (v_request_id, type_id, user_id, object_id, interval_id, delivery_method_id, format);
+ (request_id, type_id, user_id, object_id, interval_id, delivery_method_id, format, dynamic_p) values
+ (v_request_id, type_id, user_id, object_id, interval_id, delivery_method_id, format, dynamic_p);
return v_request_id;
end new;
@@ -317,6 +318,8 @@
+
+
-- the notifications package
create or replace package notification
as
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-4.6.1-4.6.2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql,v
diff -u -r1.7.2.3 -r1.7.2.4
--- openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql 2 Mar 2003 22:49:26 -0000 1.7.2.3
+++ openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql 5 Mar 2003 15:03:35 -0000 1.7.2.4
@@ -133,7 +133,8 @@
format varchar(100)
default 'text'
constraint notif_request_format_ch
- check (format in ('text', 'html'))
+ check (format in ('text', 'html')),
+ dynamic_p bool default 'f'
);
create index notification_requests_t_o_idx on notification_requests(type_id, object_id);
Index: openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql,v
diff -u -r1.8.2.3 -r1.8.2.4
--- openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql 2 Mar 2003 22:49:26 -0000 1.8.2.3
+++ openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql 5 Mar 2003 15:03:35 -0000 1.8.2.4
@@ -101,9 +101,6 @@
-- Notification Types Package
select define_function_args ('notification_type__new','type_id,sc_impl_id,short_name,pretty_name,description,creation_date,creation_user,creation_ip,context_id');
-select define_function_args ('notification_type__delete','type_id');
-
-
-- implementation
create function notification_type__new (integer,integer,varchar,varchar,varchar,timestamptz,integer,varchar,integer)
@@ -148,10 +145,24 @@
end;
' language 'plpgsql';
-select define_function_args ('notification_request__new','request_id,object_type;notification_request,type_id,user_id,object_id,interval_id,delivery_method_id,format,creation_date,creation_user,creation_ip,context_id');
+select define_function_args ('notification_request__new','request_id,object_type;notification_request,type_id,user_id,object_id,interval_id,delivery_method_id,format,dynamic_p;f,creation_date,creation_user,creation_ip,context_id');
-create function notification_request__new (integer,varchar,integer,integer,integer,integer,integer,varchar,timestamptz,integer,varchar,integer)
-returns integer as '
+create function notification_request__new (
+ integer, -- request_id
+ varchar, -- object_type
+ integer, -- type_id
+ integer, -- user_id
+ integer, -- object_id
+ integer, -- interval_id
+ integer, -- delivery_method_id
+ varchar, -- format
+ bool, -- dynamic_p
+ timestamptz, -- creation_date
+ integer, -- creation_user
+ varchar, -- creation_ip
+ integer -- context_id
+) returns integer as '
+
DECLARE
p_request_id alias for $1;
p_object_type alias for $2;
@@ -161,10 +172,11 @@
p_interval_id alias for $6;
p_delivery_method_id alias for $7;
p_format alias for $8;
- p_creation_date alias for $9;
- p_creation_user alias for $10;
- p_creation_ip alias for $11;
- p_context_id alias for $12;
+ p_dynamic_p alias for $9;
+ p_creation_date alias for $10;
+ p_creation_user alias for $11;
+ p_creation_ip alias for $12;
+ p_context_id alias for $13;
v_request_id integer;
BEGIN
v_request_id:= acs_object__new (
@@ -176,8 +188,8 @@
p_context_id);
insert into notification_requests
- (request_id, type_id, user_id, object_id, interval_id, delivery_method_id, format) values
- (v_request_id, p_type_id, p_user_id, p_object_id, p_interval_id, p_delivery_method_id, p_format);
+ (request_id, type_id, user_id, object_id, interval_id, delivery_method_id, format, dynamic_p) values
+ (v_request_id, p_type_id, p_user_id, p_object_id, p_interval_id, p_delivery_method_id, p_format, p_dynamic_p);
return v_request_id;
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-4.6.1-4.6.2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/notifications/tcl/notification-display-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-display-procs.tcl,v
diff -u -r1.4.2.3 -r1.4.2.4
--- openacs-4/packages/notifications/tcl/notification-display-procs.tcl 20 Jan 2003 14:49:45 -0000 1.4.2.3
+++ openacs-4/packages/notifications/tcl/notification-display-procs.tcl 5 Mar 2003 15:04:04 -0000 1.4.2.4
@@ -23,6 +23,11 @@
Produce a widget for requesting notifications of a given type. If the notifications package has not been
mounted then return the empty string.
} {
+ # Check that we're mounted
+ if { [empty_string_p [apm_package_url_from_key [notification::package_key]]] } {
+ return {}
+ }
+
if {[empty_string_p $user_id]} {
set user_id [ad_conn user_id]
}
Index: openacs-4/packages/notifications/tcl/notification-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-procs.tcl,v
diff -u -r1.3.2.2 -r1.3.2.3
--- openacs-4/packages/notifications/tcl/notification-procs.tcl 6 Dec 2002 21:04:19 -0000 1.3.2.2
+++ openacs-4/packages/notifications/tcl/notification-procs.tcl 5 Mar 2003 15:04:04 -0000 1.3.2.3
@@ -77,17 +77,228 @@
{-notif_subject ""}
{-notif_text ""}
{-notif_html ""}
+ {-subset {}}
+ {-already_notified {}}
+ {-action_id {}}
+ {-force:boolean}
+ {-default_request_data {}}
+ {-return_notified:boolean}
} {
- create a new notification if any notification requests exist for the object and type
+ Create a new notification if any notification requests exist for the object and type.
+
+
+
+ The normal function is to send one notification per notification_request that match this notification.
+ However, by supplying one or more of the parameters below, it's possible to notify only a subset of
+ those people who have requested notification.
+
+
+
+ This is useful in two situations. One is when you have multiple notification types that cover the
+ same event, for example notification for an entire forum, and for a single thread within that forum.
+ In this situation, you typically want people to recieve only one notification per event (per delivery
+ method and interval). The 'already_notified' and 'return_notified' switches help you do this.
+
+
+
+ Another situation is when your relevant audience really depends on something dynamic in your application,
+ such as who's assigned to a certain action in a workflow, or if you want to offer a 'notify me of all activity
+ in all forum threads that I've posted to'. In this case, the notification type would be 'my_threads' or similar.
+ But when you notify, you only want to notify the users who've requested this notification, and who have posted
+ to this thread. Thus, you'll need to pass in a list of user_id's of the users who posted to the current thread
+ in the 'subset' parameter, and only those who have both a request and are in the subset list will get notified.
+
+
+
+ A variation on this is when you want people to get notified, even if they didn't request notification. This is
+ what the -force flag does, it causes all users in the subset to get notified, whether or not they have a
+ notification request.
+
+
+
+ In this case, the request will use the interval, delivery method, and format as specified in the
+ 'default_request_data' parameter. If such a parameter is not specified, default values of 'instant',
+ 'email', and 'text' will be used. The value to 'default_request_data' should be an array list with entries
+ interval_id, delivery_method_id, and format.
+
+
+
+ In any situation where you're doing dynamic notifications, you must supply the ID of an ACS object which is
+ specific to the underlying event in the 'action_id' parameter. This is required for the interal functioning of
+ dynamic recipient groups. Typically this would be the ID of a forums posting, a workflow log entry, or a
+ web log entry.
+
+
+
+ @param already_notified A list of 'user_id interval_id delivery_method_id' of users
+ already notified of this action. This is used in conjunction with the 'return_notification'
+ boolean flag, which causes this proc to return a similar list of users notified by this call.
+ This is used to ensure that a user is never notified twice in the same way for the same action,
+ which could otherwise happen if you have, for example, notification requests for both an entire
+ forum and a particular thread.
+
+ @param return_notified. Set this flag if you want the proc to return a list of users notified
+ by this call. The output can then be fed to the next call to this proc. Don't set this flag if you
+ don't intend to use the result, as it requires an extra query to get.
+
+ @param subset A list of user_id's of a subset of users who should be notified. Only those who have a
+ notification request for this object, and who are in the subset list will get notified. Unless you specifiy the
+ -force flag, in which case everybody in the subset list will get notified, whether they requested the notification
+ or not. In this case, the 'default_request_data' will be used for these new requests.
+
+ @param force See the 'subset' parameter.
+
+ @param default_request_data An array list with entries interval_id, delivery_method_id, and format, used to initialize
+ new requests caused by the combination of the 'subset' and the 'force' parameters.
+
+ @param action_id If you're supplying either the 'subset' or the 'already_notified' parameter, you
+ must also supply the action_id parameter. The action_id parameter should be the object ID of an ACS Object,
+ and should be specific to the underlying event.
+
+ @author Ben Adida
+ @author Lars Pind
} {
- if { [notification::request::request_exists -object_id $object_id -type_id $type_id] } {
- # Set up the vars
- set extra_vars [ns_set create]
- oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {notification_id type_id object_id response_id notif_subject notif_text notif_html}
+ set requests_p [notification::request::request_exists -object_id $object_id -type_id $type_id]
+
+ # We're only going to do anything if there are people who have requests,
+ # or if we have a non-empty subset and a force flag.
+
+ set subset_arg_p [expr [llength $subset] > 0]
+ set already_notified_arg_p [expr [llength $already_notified] > 0]
- # Create the request
- package_instantiate_object -extra_vars $extra_vars notification
+ if { ($subset_arg_p || $already_notified_arg_p) && [empty_string_p $action_id] } {
+ error "You must supply an action_id if you have a subset or already_notified list"
}
+
+ # This will store the list of user_id,interval_id,delivery_method_id of notifications sent
+ set notified_list {}
+
+ if { $requests_p || ($subset_arg_p && $force_p) } {
+ if { $subset_arg_p || $already_notified_arg_p } {
+ # This is going to be a non-standard notification with a dynamic group of recipients
+
+ # Variables:
+ #
+ # default_request_data: default request, if the -force switch makes us sign people up automatically
+ # array get list of interval_id, delivery_method_id, format
+ #
+ # default_request: same, but as an array
+ #
+ # request: array, keyed by (user_id interval_id delivery_method_id) which holds
+ # the dynamic requests which we'll need to create
+ #
+ # already_notified: list of "user_id interval_id delivery_method_id" of people already notified
+ # who shouldn't be notified again
+ #
+ # already_notified_p: Above as an array for quick lookup, so we don't have to do a sequential scan
+ # on the list above to find out if a given (user_id interval_id delivery_method_id)
+ # has already been notified
+ #
+
+ if { [empty_string_p $default_request_data] } {
+ set default_request_data [list \
+ interval_id [get_interval_id -name "instant"] \
+ delivery_method_id [get_delivery_method_id -name "email"] \
+ format "text"]
+ }
+ array set default_request $default_request_data
+
+ array set request [list]
+
+ # Start with the existing requests for the original object_id
+ db_foreach select_notification_requests {} -column_array row {
+ set "request(${row(user_id)} ${row(interval_id)} ${row(delivery_method_id)})" $row(format)
+ }
+
+ # Restructure already_notified as an array for quick lookups
+ foreach entry $already_notified {
+ set already_notified_p($entry) 1
+ }
+
+ if { $subset_arg_p } {
+
+ # Restructure subset as an array for quick lookups
+ foreach user_id $subset {
+ set subset_member_p($user_id) 1
+ }
+
+ # Delete request that shouldn't be there
+ foreach entry [array names request] {
+ # if not in subset, delete
+ # if in already_notified, delete
+
+ set user_id [lindex $entry 0]
+
+ if { ![info exists subset_member_p($user_id)] || [info exists already_notified_p($entry)] } {
+ array unset request $entry
+ }
+ }
+
+ if { $force_p } {
+ # Add requests that should be forced
+ foreach user_id $subset {
+ if { [llength [array get request "$user_id,*"]] == 0 } {
+ set entry "$user_id $default_request(interval_id) $default_request(delivery_method_id)"
+ set request($entry) $default_request(format)
+ }
+ }
+ }
+ } else {
+ # Get rid of users who are on the already notified list
+ foreach entry $already_notified {
+ # If user has already received a notification with the same
+ # interval and delivery method, don't send again
+ if { [info exists request($entry)] } {
+ array unset request $entry
+ }
+ }
+ }
+
+ if { $return_notified_p } {
+ set notified_list [array names request]
+ }
+ } else {
+ # Normal notification
+ if { $return_notified_p } {
+ set notified_list [db_list_of_lists select_notified {}]
+ }
+ }
+
+ # Actually carry out inserting the notification
+ db_transaction {
+ if { $subset_arg_p || $already_notified_arg_p } {
+ foreach entry [array names request] {
+
+ set user_id [lindex $entry 0]
+ set interval_id [lindex $entry 1]
+ set delivery_method_id [lindex $entry 2]
+ set format $request($entry)
+
+ notification::request::new \
+ -type_id $type_id \
+ -user_id $user_id \
+ -object_id $action_id \
+ -interval_id $interval_id \
+ -delivery_method_id $delivery_method_id \
+ -format $format \
+ -dynamic_p "t"
+ }
+ }
+
+ # The notification below should be for the action_id object, not for the default object_id
+ set object_id $action_id
+
+ # Set up the vars
+ set extra_vars [ns_set create]
+ oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {notification_id type_id object_id response_id notif_subject notif_text notif_html}
+
+ # Create the notification
+ package_instantiate_object -extra_vars $extra_vars notification
+ }
+ }
+
+ # This var will only be set if we were asked to return the list of user_ids notified
+ return $notified_list
}
ad_proc -public delete {
Index: openacs-4/packages/notifications/tcl/notification-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-procs.xql,v
diff -u -r1.6 -r1.6.2.1
--- openacs-4/packages/notifications/tcl/notification-procs.xql 1 Aug 2002 12:56:16 -0000 1.6
+++ openacs-4/packages/notifications/tcl/notification-procs.xql 5 Mar 2003 15:04:04 -0000 1.6.2.1
@@ -52,6 +52,26 @@
+
+
+ select user_id, interval_id, delivery_method_id, format
+ from notification_requests
+ where type_id = :type_id
+ and object_id = :object_id
+
+
+
+
+
+ select user_id,
+ interval_id,
+ delivery_method_id
+ from notification_requests
+ where type_id = :type_id
+ and object_id = :object_id
+
+
+
delete
Index: openacs-4/packages/notifications/tcl/notification-request-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-request-procs.tcl,v
diff -u -r1.3.2.2 -r1.3.2.3
--- openacs-4/packages/notifications/tcl/notification-request-procs.tcl 6 Dec 2002 21:04:19 -0000 1.3.2.2
+++ openacs-4/packages/notifications/tcl/notification-request-procs.tcl 5 Mar 2003 15:04:04 -0000 1.3.2.3
@@ -22,6 +22,7 @@
{-interval_id:required}
{-delivery_method_id:required}
{-format "text"}
+ {-dynamic_p "f"}
} {
create a new request for a given user, notification type, object, interval and delivery method.
} {
@@ -30,7 +31,7 @@
if {[empty_string_p $request_id]} {
# Set up the vars
set extra_vars [ns_set create]
- oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {request_id type_id user_id object_id interval_id delivery_method_id format}
+ oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {request_id type_id user_id object_id interval_id delivery_method_id format dynamic_p}
# Create the request
set request_id [package_instantiate_object -extra_vars $extra_vars notification_request]
Index: openacs-4/packages/notifications/tcl/notification-type-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-type-procs.tcl,v
diff -u -r1.3.2.1 -r1.3.2.2
--- openacs-4/packages/notifications/tcl/notification-type-procs.tcl 30 Oct 2002 21:12:05 -0000 1.3.2.1
+++ openacs-4/packages/notifications/tcl/notification-type-procs.tcl 5 Mar 2003 15:04:04 -0000 1.3.2.2
@@ -44,18 +44,27 @@
} {
return the notification type ID given a short name. Short names are unique but not primary keys.
} {
+ return [util_memoize [list notification::type::get_type_id_not_cached $short_name]]
+ }
+
+ ad_proc -public get_type_id_not_cached {
+ short_name
+ } {
+ return the notification type ID given a short name. Short names are unique but not primary keys.
+ } {
return [db_string select_type_id {} -default {}]
}
ad_proc -public delete {
{-short_name:required}
} {
- remove a notification type. This is very rare (and thus not even implemented right now).
+ Remove a notification type. This is very rare.
} {
set type_id [get_type_id -short_name $short_name]
-
- # do the delete
- # FIXME: implement
+
+ db_exec_plsql delete_notification_type {}
+
+ util_memoize_flush [list notification::type::get_type_id_not_cached $short_name]
}
ad_proc -public get {
Index: openacs-4/packages/notifications/tcl/notification-type-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-type-procs.xql,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/notifications/tcl/notification-type-procs.xql 29 Jun 2002 00:21:11 -0000 1.3
+++ openacs-4/packages/notifications/tcl/notification-type-procs.xql 5 Mar 2003 15:04:04 -0000 1.3.2.1
@@ -10,7 +10,7 @@
-
+
select type_id
from notification_types
Index: openacs-4/packages/notifications/tcl/sweep-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs.tcl,v
diff -u -r1.9.2.2 -r1.9.2.3
--- openacs-4/packages/notifications/tcl/sweep-procs.tcl 6 Dec 2002 21:04:19 -0000 1.9.2.2
+++ openacs-4/packages/notifications/tcl/sweep-procs.tcl 5 Mar 2003 15:04:04 -0000 1.9.2.3
@@ -10,7 +10,7 @@
namespace eval notification::sweep {
- ad_proc -public schedule_all {} {
+ ad_proc -deprecated -warn -public schedule_all {} {
This schedules all the notification procs.
DEPRECATED.
} {
@@ -19,14 +19,18 @@
ad_proc -public cleanup_notifications {} {
Clean up the notifications that have been sent out (DRB: inefficiently...).
} {
- # Get the list of the ones to kill
+ # LARS:
+ # Also sweep the dynamic notification requests that have been sent out
+ db_dml delete_dynamic_requests {}
+ # Get the list of the ones to kill
set notification_id_list [db_list select_notification_ids {}]
# Kill them
foreach notification_id $notification_id_list {
notification::delete -notification_id $notification_id
}
+
}
ad_proc -public sweep_notifications {
@@ -75,8 +79,11 @@
if {![empty_string_p $batched_content]} {
ns_log Debug "NOTIF-BATCHED: content to send!"
db_transaction {
- ns_log Debug "NOTIF-BATCHED: sending content"
- notification::delivery::send -to_user_id $prev_user_id \
+ ns_log Notice "NOTIF-BATCHED: sending content"
+ # System name is used in the subject
+ set system_name [ad_system_name]
+ notification::delivery::send \
+ -to_user_id $prev_user_id \
-notification_type_id $prev_type_id \
-subject "\[[ad_system_name] - Batched Notification\]" \
-content $batched_content \
@@ -120,7 +127,8 @@
foreach notif $notifications {
db_transaction {
# Send it
- notification::delivery::send -to_user_id [ns_set get $notif user_id] \
+ notification::delivery::send \
+ -to_user_id [ns_set get $notif user_id] \
-notification_type_id [ns_set get $notif type_id] \
-subject [ns_set get $notif notif_subject] \
-content [ns_set get $notif notif_text] \
Index: openacs-4/packages/notifications/www/manage-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/Attic/manage-oracle.xql,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/packages/notifications/www/manage-oracle.xql 24 Jan 2003 01:55:45 -0000 1.1.2.2
+++ openacs-4/packages/notifications/www/manage-oracle.xql 5 Mar 2003 15:04:17 -0000 1.1.2.3
@@ -19,6 +19,7 @@
object_id
from notification_requests
where user_id = :user_id
+ and dynamic_p = 'f'
Index: openacs-4/packages/notifications/www/manage-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/Attic/manage-postgresql.xql,v
diff -u -r1.1.2.3 -r1.1.2.4
--- openacs-4/packages/notifications/www/manage-postgresql.xql 24 Jan 2003 01:55:45 -0000 1.1.2.3
+++ openacs-4/packages/notifications/www/manage-postgresql.xql 5 Mar 2003 15:04:17 -0000 1.1.2.4
@@ -19,6 +19,7 @@
object_id
from notification_requests
where user_id = :user_id
+ and dynamic_p = 'f'
Index: openacs-4/packages/notifications/www/manage.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/manage.adp,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/packages/notifications/www/manage.adp 24 Jan 2003 01:55:45 -0000 1.1.2.2
+++ openacs-4/packages/notifications/www/manage.adp 5 Mar 2003 15:04:17 -0000 1.1.2.3
@@ -2,30 +2,33 @@
Manage Notifications
@context@
-