Index: openacs-4/packages/dotlrn-homework/www/dotlrn-homework-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/dotlrn-homework-portlet.tcl,v diff -u -r1.2 -r1.2.12.1 --- openacs-4/packages/dotlrn-homework/www/dotlrn-homework-portlet.tcl 13 Jan 2005 13:57:29 -0000 1.2 +++ openacs-4/packages/dotlrn-homework/www/dotlrn-homework-portlet.tcl 18 Aug 2014 21:53:42 -0000 1.2.12.1 @@ -51,7 +51,7 @@ # student's files set max_level $min_level } else { - set max_level [expr $min_level + 1] + set max_level [expr {$min_level + 1}] } ad_return_template 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.5 -r1.5.6.1 --- openacs-4/packages/dotlrn-homework/www/file-add.tcl 7 Oct 2007 22:36:58 -0000 1.5 +++ openacs-4/packages/dotlrn-homework/www/file-add.tcl 18 Aug 2014 21:53:42 -0000 1.5.6.1 @@ -11,7 +11,7 @@ {homework_file_id:naturalnum,notnull 0} } -validate { valid_folder -requires {folder_id:integer} { - if ![fs_folder_p $folder_id] { + if {![fs_folder_p $folder_id]} { ad_complain "[_ dotlrn-homework.lt_spec_parent]" } } 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 -r1.2 -r1.2.18.1 --- 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 18 Aug 2014 21:53:42 -0000 1.2.18.1 @@ -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]" } } @@ -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 {}] Index: openacs-4/packages/dotlrn-homework/www/file-copy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/file-copy.tcl,v diff -u -r1.3 -r1.3.12.1 --- openacs-4/packages/dotlrn-homework/www/file-copy.tcl 20 Apr 2004 21:13:31 -0000 1.3 +++ openacs-4/packages/dotlrn-homework/www/file-copy.tcl 18 Aug 2014 21:53:42 -0000 1.3.12.1 @@ -8,7 +8,7 @@ file_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]" } } Index: openacs-4/packages/dotlrn-homework/www/file-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/file-delete.tcl,v diff -u -r1.4 -r1.4.12.1 --- openacs-4/packages/dotlrn-homework/www/file-delete.tcl 13 Jan 2005 13:57:29 -0000 1.4 +++ openacs-4/packages/dotlrn-homework/www/file-delete.tcl 18 Aug 2014 21:53:42 -0000 1.4.12.1 @@ -9,7 +9,7 @@ {confirmed_p "f"} } -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]" } } @@ -35,7 +35,7 @@ where item_id = :file_id and acs_permission.permission_p(revision_id,:user_id,'delete') = 'f'"] 0 f t] -if {[string equal $confirmed_p "t"] && [string equal $blocked_p "f"] } { +if {$confirmed_p == "t" && $blocked_p == "f" } { # they confirmed that they want to delete the file db_1row parent_id "select parent_id from cr_items where item_id = :file_id" Index: openacs-4/packages/dotlrn-homework/www/file-move-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/file-move-2.tcl,v diff -u -r1.3 -r1.3.12.1 --- openacs-4/packages/dotlrn-homework/www/file-move-2.tcl 13 Jan 2005 13:57:29 -0000 1.3 +++ openacs-4/packages/dotlrn-homework/www/file-move-2.tcl 18 Aug 2014 21:53:42 -0000 1.3.12.1 @@ -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]" } } @@ -36,7 +36,7 @@ db_exec_plsql file_move {} db_dml context_update {} - if { ![string equal $correction_file_id ""] } { + if { $correction_file_id ne "" } { db_exec_plsql correction_file_move {} db_dml correction_context_update {} } Index: openacs-4/packages/dotlrn-homework/www/file-move.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/file-move.tcl,v diff -u -r1.2 -r1.2.18.1 --- openacs-4/packages/dotlrn-homework/www/file-move.tcl 30 Oct 2003 12:21:44 -0000 1.2 +++ openacs-4/packages/dotlrn-homework/www/file-move.tcl 18 Aug 2014 21:53:43 -0000 1.2.18.1 @@ -10,7 +10,7 @@ name: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]" } } Index: openacs-4/packages/dotlrn-homework/www/file.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/file.tcl,v diff -u -r1.4 -r1.4.12.1 --- openacs-4/packages/dotlrn-homework/www/file.tcl 13 Jan 2005 13:57:29 -0000 1.4 +++ openacs-4/packages/dotlrn-homework/www/file.tcl 18 Aug 2014 21:53:43 -0000 1.4.12.1 @@ -15,7 +15,7 @@ {show_all_versions_p "f"} } -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]" } } @@ -53,7 +53,7 @@ # idea so I'm not putting out a link to it. As of July Sloan agrees. set copy_url "file-copy?[export_vars {file_id name}]" -if {[string equal $show_all_versions_p "t"]} { +if {$show_all_versions_p == "t"} { set show_versions [db_map show_all_versions] } else { set show_versions [db_map show_live_version] Index: openacs-4/packages/dotlrn-homework/www/folder-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/folder-chunk.tcl,v diff -u -r1.4 -r1.4.12.1 --- openacs-4/packages/dotlrn-homework/www/folder-chunk.tcl 13 Jan 2005 13:57:29 -0000 1.4 +++ openacs-4/packages/dotlrn-homework/www/folder-chunk.tcl 18 Aug 2014 21:53:43 -0000 1.4.12.1 @@ -63,10 +63,10 @@ #AG: In Oracle this query is a seemingly nonsensical "select 2 from dual". #The problem is, the db logic in PG is completely different and requires a query. #To avoid propagating these differences up to Tcl we use a query in Oracle too. -if {![exists_and_not_null min_level]} { +if {(![info exists min_level] || $min_level eq "")} { set min_level [db_string select_default_min_level {}] } -if {![exists_and_not_null max_level]} { +if {(![info exists max_level] || $max_level eq "")} { set max_level $min_level } @@ -78,7 +78,7 @@ folders select_folder_contents {} { regsub -all " " $spaces {\ \ } spaces - if { [string equal $content_type "content_folder"] } { + if {$content_type eq "content_folder"} { set contents_url "${url}folder-contents?[export_vars {{folder_id $object_id} return_url}]" } else { @@ -97,7 +97,7 @@ set download_url "${file_storage_url}/download/[ns_urlencode $name]?[export_vars {version_id}]" # Admin and students can read correction files but only an admin can add one ... - if { ![string equal $homework_file_id ""] } { + if { $homework_file_id ne "" } { set view_correction_details_url "${url}file?[export_vars {folder_id {file_id $homework_file_id} {show_all_versions_p "t"}}]" } elseif { $admin_p } { set upload_correction_url \ Index: openacs-4/packages/dotlrn-homework/www/folder-contents.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/folder-contents.tcl,v diff -u -r1.4 -r1.4.12.1 --- openacs-4/packages/dotlrn-homework/www/folder-contents.tcl 13 Jan 2005 13:57:29 -0000 1.4 +++ openacs-4/packages/dotlrn-homework/www/folder-contents.tcl 18 Aug 2014 21:53:43 -0000 1.4.12.1 @@ -10,7 +10,7 @@ {max_level:integer ""} } -validate { valid_folder -requires {folder_id:integer} { - if ![fs_folder_p $folder_id] { + if {![fs_folder_p $folder_id]} { ad_complain "[_ dotlrn-homework.lt_spec_parent]" } } Index: openacs-4/packages/dotlrn-homework/www/folder-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/folder-create.tcl,v diff -u -r1.3 -r1.3.12.1 --- openacs-4/packages/dotlrn-homework/www/folder-create.tcl 20 Apr 2004 21:13:31 -0000 1.3 +++ openacs-4/packages/dotlrn-homework/www/folder-create.tcl 18 Aug 2014 21:53:43 -0000 1.3.12.1 @@ -10,7 +10,7 @@ return_url:notnull } -validate { valid_folder -requires {parent_id:integer} { - if ![fs_folder_p $parent_id] { + if {![fs_folder_p $parent_id]} { ad_complain [_ dotlrn-homework.lt_spec_parent] } } Index: openacs-4/packages/dotlrn-homework/www/folder-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/folder-delete.tcl,v diff -u -r1.3 -r1.3.12.1 --- openacs-4/packages/dotlrn-homework/www/folder-delete.tcl 20 Apr 2004 21:13:31 -0000 1.3 +++ openacs-4/packages/dotlrn-homework/www/folder-delete.tcl 18 Aug 2014 21:53:43 -0000 1.3.12.1 @@ -11,7 +11,7 @@ {confirmed_p "f"} } -validate { valid_folder -requires {folder_id:integer} { - if ![fs_folder_p $folder_id] { + if {![fs_folder_p $folder_id]} { ad_complain "[_ dotlrn-homework.lt_spec_folder]" } } @@ -31,7 +31,7 @@ ad_require_permission $folder_id delete -if { [string equal $confirmed_p "t"] } { +if {$confirmed_p == "t"} { # they have confirmed that they want to delete the folder db_1row parent_id {} db_exec_plsql folder_delete {} Index: openacs-4/packages/dotlrn-homework/www/toggle-homework-alert.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/toggle-homework-alert.tcl,v diff -u -r1.3 -r1.3.18.1 --- openacs-4/packages/dotlrn-homework/www/toggle-homework-alert.tcl 30 Oct 2003 12:21:44 -0000 1.3 +++ openacs-4/packages/dotlrn-homework/www/toggle-homework-alert.tcl 18 Aug 2014 21:53:43 -0000 1.3.18.1 @@ -16,7 +16,7 @@ return_url:notnull } -validate { valid_folder -requires {folder_id:integer} { - if ![fs_folder_p $folder_id] { + if {![fs_folder_p $folder_id]} { ad_complain "[_ dotlrn-homework.lt_spec_parent]" } } 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.4 -r1.4.6.1 --- openacs-4/packages/dotlrn-homework/www/version-add.tcl 7 Oct 2007 22:36:58 -0000 1.4 +++ openacs-4/packages/dotlrn-homework/www/version-add.tcl 18 Aug 2014 21:53:43 -0000 1.4.6.1 @@ -11,7 +11,7 @@ return_url:notnull } -validate { valid_folder -requires {folder_id:integer} { - if ![fs_folder_p $folder_id] { + if {![fs_folder_p $folder_id]} { ad_complain "[_ dotlrn-homework.lt_spec_parent]" } } Index: openacs-4/packages/dotlrn-homework/www/version-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/version-delete.tcl,v diff -u -r1.4 -r1.4.12.1 --- openacs-4/packages/dotlrn-homework/www/version-delete.tcl 13 Jan 2005 13:57:29 -0000 1.4 +++ openacs-4/packages/dotlrn-homework/www/version-delete.tcl 18 Aug 2014 21:53:43 -0000 1.4.12.1 @@ -9,7 +9,7 @@ {confirmed_p "f"} } -validate { valid_version -requires {version_id} { - if ![fs_version_p $version_id] { + if {![fs_version_p $version_id]} { ad_complain "[_ dotlrn-homework.lt_spec_version]" } } @@ -29,7 +29,7 @@ from cr_revisions where revision_id = :version_id" -if {[string equal $confirmed_p "t"]} { +if {$confirmed_p == "t"} { # they have confirmed that they want to delete the version db_transaction { Index: openacs-4/packages/dotlrn-homework/www/admin/upload-size-limit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/www/admin/upload-size-limit.tcl,v diff -u -r1.3 -r1.3.6.1 --- openacs-4/packages/dotlrn-homework/www/admin/upload-size-limit.tcl 15 May 2007 20:14:30 -0000 1.3 +++ openacs-4/packages/dotlrn-homework/www/admin/upload-size-limit.tcl 18 Aug 2014 21:53:43 -0000 1.3.6.1 @@ -12,7 +12,7 @@ } set max_size [ns_config "ns/server/[ns_info server]/module/nssock" maxinput] -if { [string equal $max_size ""] } { +if {$max_size eq ""} { set max_size 0 } @@ -32,7 +32,7 @@ } -on_submit { parameter::set_value -parameter "MaximumFileSize" -value $new_size - if {![empty_string_p $return_url]} { + if {$return_url ne ""} { ad_returnredirect $return_url } }