Index: openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info,v
diff -u -r1.31 -r1.32
--- openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info 1 Sep 2005 06:54:14 -0000 1.31
+++ openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info 1 Sep 2005 12:23:21 -0000 1.32
@@ -7,15 +7,15 @@
f
t
-
+
Roel Canicula
Package to tie the dotLRN, Ecommerce, Assessments and dotLRN Catalog packages together
2005-08-10
Solution Grove
Package to tie the dotLRN, Ecommerce, Assessments and dotLRN Catalog packages together. Initially intended for the MOS and MGH projects, the goal is to create a reusable module for similar projects.
0
-
+
Index: openacs-4/packages/dotlrn-ecommerce/catalog/dotlrn-ecommerce.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/catalog/dotlrn-ecommerce.en_US.ISO-8859-1.xml,v
diff -u -r1.41 -r1.42
--- openacs-4/packages/dotlrn-ecommerce/catalog/dotlrn-ecommerce.en_US.ISO-8859-1.xml 22 Aug 2005 17:48:09 -0000 1.41
+++ openacs-4/packages/dotlrn-ecommerce/catalog/dotlrn-ecommerce.en_US.ISO-8859-1.xml 1 Sep 2005 12:23:21 -0000 1.42
@@ -1,5 +1,5 @@
-
+
Action
Add Course
@@ -255,7 +255,9 @@
Recipients
Register
Register for this Course
+ Registered By Admin
Registration
+ Regsitered By Admin
Reject
Reject application
Reject waiver of prerequisite
Index: openacs-4/packages/dotlrn-ecommerce/sql/postgresql/dotlrn-ecommerce-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/sql/postgresql/dotlrn-ecommerce-create.sql,v
diff -u -r1.21 -r1.22
--- openacs-4/packages/dotlrn-ecommerce/sql/postgresql/dotlrn-ecommerce-create.sql 20 Aug 2005 18:27:54 -0000 1.21
+++ openacs-4/packages/dotlrn-ecommerce/sql/postgresql/dotlrn-ecommerce-create.sql 1 Sep 2005 12:23:21 -0000 1.22
@@ -59,7 +59,8 @@
item_id integer references ec_items on delete cascade not null,
-- Can be a user or group
patron_id integer references users(user_id) on delete cascade not null,
- participant_id integer references parties(party_id) on delete cascade not null
+ participant_id integer references parties(party_id) on delete cascade not null,
+ checked_out_by integer references users(user_id) on delete cascade not null
);
create table dotlrn_ecommerce_transactions (
@@ -96,7 +97,7 @@
-- Invoice payment method
create table dotlrn_ecommerce_transaction_invoice_payments (
order_id integer references ec_orders on delete cascade not null,
- method text check (method in ('cc', 'internal_account', 'check', 'cash', 'invoice', 'scholarship')) not null,
+ method text check (method in ('cc', 'internal_account', 'check', 'cash', 'invoice', 'scholarship', 'lockbox')) not null,
internal_account text,
amount float not null,
payment_date timestamp default current_timestamp not null
Index: openacs-4/packages/dotlrn-ecommerce/sql/postgresql/upgrade/upgrade-0.1d12-0.1d13.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/sql/postgresql/upgrade/upgrade-0.1d12-0.1d13.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-ecommerce/sql/postgresql/upgrade/upgrade-0.1d12-0.1d13.sql 1 Sep 2005 12:23:21 -0000 1.1
@@ -0,0 +1,11 @@
+--
+-- packages/dotlrn-ecommerce/sql/postgresql/upgrade/upgrade-0.1d11-0.1d12.sql
+--
+-- @author Roel Canicula (roelmc@pldtdsl.net)
+-- @creation-date 2005-09-01
+-- @arch-tag: e5415c17-2f53-4260-944d-8845077301b8
+-- @cvs-id $Id: upgrade-0.1d12-0.1d13.sql,v 1.1 2005/09/01 12:23:21 roelc Exp $
+--
+
+alter table dotlrn_ecommerce_orders add checked_out_by integer;
+alter table dotlrn_ecommerce_orders add constraint "$4" foreign key (checked_out_by) references users(user_id) on delete cascade;
Index: openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl,v
diff -u -r1.19 -r1.20
--- openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl 30 Aug 2005 17:42:44 -0000 1.19
+++ openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl 1 Sep 2005 12:23:21 -0000 1.20
@@ -157,14 +157,6 @@
0 \
number
}
- 0.1d10 0.1d11 {
- apm_parameter_register \
- CustomParticipantFields \
- "Custom fields used in participant registration." \
- dotlrn-ecommerce \
- "" \
- string
- }
}
}
Index: openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl,v
diff -u -r1.20 -r1.21
--- openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl 22 Aug 2005 23:15:00 -0000 1.20
+++ openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl 1 Sep 2005 12:23:21 -0000 1.21
@@ -27,13 +27,13 @@
}
db_foreach items_in_order {
- select i.product_id, o.patron_id as saved_patron_id, o.participant_id, t.method, v.maxparticipants
+ select i.product_id, o.patron_id as saved_patron_id, o.participant_id, t.method, v.maxparticipants, i.item_id
from dotlrn_ecommerce_orders o, ec_items i left join dotlrn_ecommerce_transactions t
on (i.order_id = t.order_id), ec_custom_product_field_values v
where i.item_id = o.item_id
and i.product_id = v.product_id
and i.order_id = :order_id
- group by i.product_id, o.patron_id, o.participant_id, t.method, v.maxparticipants
+ group by i.product_id, o.patron_id, o.participant_id, t.method, v.maxparticipants, i.item_id
} {
if { [empty_string_p $participant_id] } {
if { [exists_and_not_null user_id] } {
@@ -174,6 +174,14 @@
dotlrn_ecommerce::section::flush_cache $section_id
}
}
+
+ # Set checkout for order
+ db_dml checkout_user {
+ update dotlrn_ecommerce_orders
+ set checked_out_by = :patron_id
+ where item_id = :item_id
+ }
+
}
# DEDS
Index: openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/index.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/index.tcl 22 Aug 2005 17:45:13 -0000 1.14
+++ openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/index.tcl 1 Sep 2005 12:23:21 -0000 1.15
@@ -128,6 +128,18 @@
}
}
+ checked_out_by {
+ label "[_ dotlrn-ecommerce.Registered_By_Admin]"
+ display_template {
+
+ [_ dotlrn-ecommerce.No]
+
+
+ [_ dotlrn-ecommerce.Yes]
+
+ }
+ html { align center }
+ }
refund {
display_template {
@@ -226,6 +238,10 @@
label "[_ dotlrn-ecommerce.Balance]"
orderby balance
}
+ checked_out_by {
+ label "[_ dotlrn-ecommerce.Regsitered_By_Admin]"
+ orderby checked_out_by_admin_p
+ }
}
db_multirow -extend { order_url section_url pretty_total pretty_balance person_url pretty_refund pretty_actual_total refund_url participant_url participant_type } orders orders [subst {
@@ -269,8 +285,10 @@
u.first_names||' '||u.last_name as purchaser,
- i.item_id, deo.participant_id, case when ao.object_type = 'group' then acs_group__name(deo.participant_id) else person__name(deo.participant_id) end as participant_name
+ i.item_id, deo.participant_id, case when ao.object_type = 'group' then acs_group__name(deo.participant_id) else person__name(deo.participant_id) end as participant_name,
+ deo.checked_out_by, u.user_id as purchaser_id, (deo.checked_out_by != u.user_id) as checked_out_by_admin_p
+
from ec_orders o
join ec_items i using (order_id)
join ec_products p using (product_id)