Index: openacs-4/packages/dotlrn-homework/dotlrn-homework.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/dotlrn-homework.info,v diff -u -r1.4.2.2 -r1.4.2.3 --- openacs-4/packages/dotlrn-homework/dotlrn-homework.info 10 Mar 2004 10:36:26 -0000 1.4.2.2 +++ openacs-4/packages/dotlrn-homework/dotlrn-homework.info 3 Apr 2004 02:22:28 -0000 1.4.2.3 @@ -7,7 +7,7 @@ f f - + Don Baccus Provides a homework assignment dropboxes for dotLRN classes. 2004-03-10 Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-homework/sql/oracle/upgrade-2.0.2-2.0.3.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-homework/sql/oracle/upgrade-2.0.2-2.0.3.sql~'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn-homework/sql/postgres/upgrade-2.0.2-2.0.3.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/dotlrn-homework/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/tcl/apm-callback-procs.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/dotlrn-homework/tcl/apm-callback-procs.tcl 29 Aug 2003 09:01:45 -0000 1.4 +++ openacs-4/packages/dotlrn-homework/tcl/apm-callback-procs.tcl 3 Apr 2004 02:22:28 -0000 1.4.2.1 @@ -20,6 +20,14 @@ } { db_transaction { + + # Define homework_correction relation + db_dml create_relation { + insert into cr_type_relations + (content_type,target_type,relation_tag) + values ('file_storage_object','file_storage_object','homework_correction') + } + # Define notifications for homework and correction file uploads set impl_id \ @@ -164,5 +172,13 @@ acs_sc::impl::delete -contract_name dotlrn_applet -impl_name dotlrn_homework_applet portal::datasource::delete -name dotlrn_homework_portlet portal::datasource::delete -name dotlrn_homework_admin_portlet + + db_dml delete_relation { + delete from cr_type_relations + where content_type = 'file-storage-object' and + target_type = 'file-storage-object' and + relation_tag = 'homework_correction' + } + } } Index: openacs-4/packages/dotlrn-homework/www/file-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/file-add.tcl,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/dotlrn-homework/www/file-add.tcl 26 Nov 2003 11:34:09 -0000 1.2.2.1 +++ openacs-4/packages/dotlrn-homework/www/file-add.tcl 3 Apr 2004 02:22:29 -0000 1.2.2.2 @@ -36,8 +36,8 @@ ad_form -name homework_form -html { enctype multipart/form-data } -export { return_url folder_id homework_file_id } -form { file_id:key - {upload_file:file {label "[_ dotlrn-homework.lt_version_filename]"}} - {-section "[_ dotlrn-homework.lt_use_browse]

 "} + {upload_file:file {label "[_ dotlrn-homework.lt_version_filename]"} + } } if { $homework_file_id == 0 } { Index: openacs-4/packages/dotlrn-homework/www/file-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/file-oracle.xql,v diff -u -r1.1.1.1 -r1.1.1.1.6.1 --- openacs-4/packages/dotlrn-homework/www/file-oracle.xql 17 Feb 2003 20:56:17 -0000 1.1.1.1 +++ openacs-4/packages/dotlrn-homework/www/file-oracle.xql 3 Apr 2004 02:22:29 -0000 1.1.1.1.6.1 @@ -8,7 +8,7 @@ select person.name(o.creation_user) as owner, i.name, acs_permission.permission_p(:file_id, :user_id, 'write') as write_file_p, - acs_permission.permission_p(:file_id, :user_id, 'delete') as delete_file_p, + acs_permission.permission_p(:file_id, :user_id, 'delete') as delete_p, decode(cir.item_id, null, 'f', 't') as correction_file_p from acs_objects o, cr_revisions r, cr_items i, cr_item_rels cir where o.object_id = :file_id Index: openacs-4/packages/dotlrn-homework/www/file-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/file-postgresql.xql,v diff -u -r1.1.1.1 -r1.1.1.1.4.1 --- openacs-4/packages/dotlrn-homework/www/file-postgresql.xql 17 Feb 2003 20:56:17 -0000 1.1.1.1 +++ openacs-4/packages/dotlrn-homework/www/file-postgresql.xql 3 Apr 2004 02:22:29 -0000 1.1.1.1.4.1 @@ -7,9 +7,11 @@ select person__name(o.creation_user) as owner, - i.name as title, - r.title as name, - acs_permission__permission_p(:file_id,:user_id,'write') as write_p + i.name, + r.title, + acs_permission__permission_p(:file_id,:user_id,'write') as write_file_p, + acs_permission__permission_p(:file_id,:user_id,'delete') as delete_p, + i.item_id as correction_file_p from acs_objects o, cr_revisions r, cr_items i where o.object_id = :file_id and i.item_id = o.object_id @@ -26,7 +28,8 @@ r.mime_type as type, to_char(o.last_modified,'YYYY-MM-DD HH24:MI') as last_modified, r.description, - r.content_length as content_size + r.content_length as content_size, + acs_permission__permission_p(:file_id,:user_id,'delete') as delete_p from acs_objects o, cr_revisions r, cr_items i where o.object_id = r.revision_id and r.item_id = i.item_id Index: openacs-4/packages/dotlrn-homework/www/file.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/file.adp,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/dotlrn-homework/www/file.adp 3 Apr 2004 00:22:06 -0000 1.2.2.1 +++ openacs-4/packages/dotlrn-homework/www/file.adp 3 Apr 2004 02:22:29 -0000 1.2.2.2 @@ -15,7 +15,7 @@ | #dotlrn-homework.Move# - + | #dotlrn-homework.lt_Delete_this_file_incl# ]

Index: openacs-4/packages/dotlrn-homework/www/version-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/version-add.adp,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/dotlrn-homework/www/version-add.adp 30 Oct 2003 12:21:44 -0000 1.2 +++ openacs-4/packages/dotlrn-homework/www/version-add.adp 3 Apr 2004 02:22:29 -0000 1.2.2.1 @@ -2,5 +2,7 @@ #dotlrn-homework.lt_Upload_New_Version_of# @context_bar@ +#dotlrn-homework.lt_use_browse#

  + Index: openacs-4/packages/dotlrn-homework/www/version-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/version-add.tcl,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/dotlrn-homework/www/version-add.tcl 26 Nov 2003 11:34:09 -0000 1.2.2.1 +++ openacs-4/packages/dotlrn-homework/www/version-add.tcl 3 Apr 2004 02:22:29 -0000 1.2.2.2 @@ -30,7 +30,6 @@ ad_form -name homework_form -html { enctype multipart/form-data } -export { return_url name folder_id } -form { file_id:key {upload_file:file {label "[_ dotlrn-homework.lt_version_filename]"}} - {-section "[_ dotlrn-homework.lt_use_browse]

 "} {description:text(textarea),optional {label "[_ dotlrn-homework.lt_version_notes]"} {html {rows 5 cols 50 wrap physical}}} } -edit_request {