Index: openacs-4/packages/evaluation/tcl/evaluation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/tcl/evaluation-procs.tcl,v diff -u -N -r1.40 -r1.40.6.1 --- openacs-4/packages/evaluation/tcl/evaluation-procs.tcl 14 Mar 2008 16:11:33 -0000 1.40 +++ openacs-4/packages/evaluation/tcl/evaluation-procs.tcl 19 Aug 2014 07:35:54 -0000 1.40.6.1 @@ -26,7 +26,7 @@ handles assignments and evaluations. } { - if {[exists_and_not_null object_id]} { + if {([info exists object_id] && $object_id ne "")} { return "[ad_url][apm_package_url_from_id $object_id]" } @@ -60,12 +60,12 @@ set output "= [lindex $interval_def 1] } { + if { [expr {$day + $i}] >= [lindex $interval_def 1] } { incr month 1 set day 1 } @@ -362,10 +362,10 @@ db_1row from_task_info { *SQL* } - if { [empty_string_p $creation_user] } { + if { $creation_user eq "" } { set creation_user [ad_conn user_id] } - if { [empty_string_p $creation_ip] } { + if { $creation_ip eq "" } { set creation_ip [ad_conn peeraddr] } @@ -453,18 +453,18 @@ @description Description of the task @storage_type File or text, depending on what are we going to store } { - if { [empty_string_p $creation_user] } { + if { $creation_user eq "" } { set creation_user [ad_conn user_id] } - if { [empty_string_p $creation_ip] } { + if { $creation_ip eq "" } { set creation_ip [ad_conn peeraddr] } - if {[empty_string_p $package_id]} { + if {$package_id eq ""} { set package_id [ad_conn package_id] } set folder_id [content::item::get_id -item_path "${content_type}_${package_id}" -resolve_index f] - if { [empty_string_p $item_name] } { + if { $item_name eq "" } { set item_name "${item_id}_${title}" } @@ -531,10 +531,10 @@ } { - if { [empty_string_p $creation_user] } { + if { $creation_user eq "" } { set creation_user [ad_conn user_id] } - if { [empty_string_p $creation_ip] } { + if { $creation_ip eq "" } { set creation_ip [ad_conn peeraddr] } @@ -544,11 +544,11 @@ set revision_id [db_nextval acs_object_id_seq] - if { [empty_string_p $publish_date] } { + if { $publish_date eq "" } { set publish_date [db_string get_date { *SQL* }] } - if { [empty_string_p $creation_date] } { + if { $creation_date eq "" } { set creation_date [db_string get_date { *SQL* }] } @@ -614,10 +614,10 @@ @param party_id Group or user_id thaw owns the anser } { - if { [empty_string_p $creation_user] } { + if { $creation_user eq "" } { set creation_user [ad_conn user_id] } - if { [empty_string_p $creation_ip] } { + if { $creation_ip eq "" } { set creation_ip [ad_conn peeraddr] } @@ -627,11 +627,11 @@ set revision_id [db_nextval acs_object_id_seq] - if { [empty_string_p $publish_date] } { + if { $publish_date eq "" } { set publish_date [db_string get_date { *SQL* }] } - if { [empty_string_p $creation_date] } { + if { $creation_date eq "" } { set creation_date [db_string get_date { *SQL* }] } if { $new_item_p && ![db_string double_click { *SQL* }] } { @@ -701,10 +701,10 @@ @param mime_type Mime type of the evaluation. } { - if { [empty_string_p $creation_user] } { + if { $creation_user eq "" } { set creation_user [ad_conn user_id] } - if { [empty_string_p $creation_ip] } { + if { $creation_ip eq "" } { set creation_ip [ad_conn peeraddr] } @@ -714,11 +714,11 @@ set revision_id [db_nextval acs_object_id_seq] - if { [empty_string_p $publish_date] } { + if { $publish_date eq "" } { set publish_date [db_string get_date { *SQL* }] } - if { [empty_string_p $creation_date] } { + if { $creation_date eq "" } { set creation_date [db_string get_date { *SQL* }] } @@ -774,17 +774,17 @@ } { - if { [empty_string_p $creation_user] } { + if { $creation_user eq "" } { set creation_user [ad_conn user_id] } - if { [empty_string_p $creation_ip] } { + if { $creation_ip eq "" } { set creation_ip [ad_conn peeraddr] } - if { [empty_string_p $context] } { + if { $context eq "" } { set context [ad_conn package_id] } - if { [empty_string_p $creation_date] } { + if { $creation_date eq "" } { set creation_date [db_string get_date { *SQL* }] } @@ -848,10 +848,10 @@ } { - if { [empty_string_p $creation_user] } { + if { $creation_user eq "" } { set creation_user [ad_conn user_id] } - if { [empty_string_p $creation_ip] } { + if { $creation_ip eq "" } { set creation_ip [ad_conn peeraddr] } set package_id [ad_conn package_id] @@ -860,11 +860,11 @@ set revision_id [db_nextval acs_object_id_seq] - if { [empty_string_p $publish_date] } { + if { $publish_date eq "" } { set publish_date [db_string get_date { *SQL* }] } - if { [empty_string_p $creation_date] } { + if { $creation_date eq "" } { set creation_date [db_string get_date { *SQL* }] } @@ -922,7 +922,7 @@ # the task is individual set community_id [dotlrn_community::get_community_id] - if { [empty_string_p $community_id] } { + if { $community_id eq "" } { set sql_query [db_map sql_query_individual] } else { set sql_query [db_map sql_qyery_comm_ind] @@ -935,7 +935,7 @@ } db_foreach parties_with_to_grade { *SQL* } { - if { ![empty_string_p $grade] } { + if { $grade ne "" } { set grade [lc_numeric $grade] } lappend csv_content "\n$party_id" @@ -1085,13 +1085,13 @@ file mkdir $dir db_foreach get_answers_for_task { *SQL* } { - if { [string eq $storage_type "lob"] || [string eq $storage_type "file"] } { + if { $storage_type eq "lob" || $storage_type eq "file" } { # it is a file regsub -all {[<>:\"|/@\\\#%&+\\ ,]} $party_name {_} file_name append file_name [file extension $answer_title] - if { [string eq $storage_type "file"] } { + if {$storage_type eq "file"} { # its a file file copy -- "[cr_fs_path $cr_path]${cr_file_name}" [file join ${dir} ${file_name}]