Index: openacs-4/packages/dotlrn-homework/www/file-copy-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/file-copy-2.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn-homework/www/file-copy-2.tcl 30 Oct 2003 12:21:44 -0000 1.2 +++ openacs-4/packages/dotlrn-homework/www/file-copy-2.tcl 27 Oct 2014 16:41:20 -0000 1.3 @@ -9,13 +9,13 @@ parent_id:integer,notnull } -validate { valid_file -requires {file_id} { - if ![fs_file_p $file_id] { + if {![fs_file_p $file_id]} { ad_complain "[_ dotlrn-homework.lt_specified_file]" } } valid_folder -requires {parent_id} { - if ![fs_folder_p $parent_id] { + if {![fs_folder_p $parent_id]} { ad_complain "[_ dotlrn-homework.lt_spec_parent]" } } @@ -24,8 +24,8 @@ # check for read permission on the file and write permission on the # target folder -ad_require_permission $file_id read -ad_require_permission $parent_id write +permission::require_permission -object_id $file_id -privilege read +permission::require_permission -object_id $parent_id -privilege write set user_id [ad_conn user_id] set ip_address [ad_conn peeraddr] @@ -55,7 +55,7 @@ permission::grant -party_id $user_id -object_id $new_homework_id -privilege read # Copy the comment/correction file if any - if { ![string equal $correction_file_id ""] } { + if { $correction_file_id ne "" } { set new_correction_revision_id [db_exec_plsql correction_file_copy {}]