Index: openacs-4/packages/evaluation-portlet/lib/tasks-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/lib/tasks-chunk.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/evaluation-portlet/lib/tasks-chunk.tcl 9 Nov 2008 23:29:25 -0000 1.16 +++ openacs-4/packages/evaluation-portlet/lib/tasks-chunk.tcl 27 Oct 2014 16:41:28 -0000 1.17 @@ -5,7 +5,7 @@ } set package_id [ad_conn package_id] -set user_id [ad_verify_and_get_user_id] +set user_id [ad_conn user_id] set admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege admin] db_1row grade_names { *SQL* } @@ -88,7 +88,7 @@ set assignments_orderby [template::list::orderby_clause -orderby -name tasks_${grade_id}] -if {[string equal $assignments_orderby ""]} { +if {$assignments_orderby eq ""} { set assignments_orderby " order by task_name asc" } @@ -99,10 +99,10 @@ set due_date_pretty [lc_time_fmt $due_date_ansi "%q %X"] # working with task stuff (if it has a file/url attached) - if { [empty_string_p $task_data] } { + if { $task_data eq "" } { set task_url "[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]" set task_name "[_ evaluation-portlet.task_name_No_data_]" - } elseif { [string eq $task_title "link"] } { + } elseif {$task_title eq "link"} { # there is a bug in the template::list, if the url does not has a http://, ftp://, the url is not absolute, # so we have to deal with this case @@ -129,7 +129,7 @@ set solution "[_ evaluation-portlet.Upload_Solution_]" } - if { ![string eq $number_of_members 1] } { + if { $number_of_members ne "1" } { set groups_admin_url "[export_vars -base "${base_url}admin/groups/one-task" { grade_id task_id }]" set groups_admin "[_ evaluation-portlet.Groups_Admin_]" } @@ -141,10 +141,10 @@ set answer_mode display set due_date_pretty [lc_time_fmt $due_date_ansi "%q %r"] # working with task stuff (if it has a file/url attached) - if { [empty_string_p $task_data] } { + if { $task_data eq "" } { set task_url "[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]" set task_name "[_ evaluation-portlet.task_name_No_data_]" - } elseif { [string eq $task_title "link"] } { + } elseif {$task_title eq "link"} { # there is a bug in the template::list, if the url does not has a http://, ftp://, the url is not absolute, # so we have to deal with this case @@ -161,7 +161,7 @@ set task_name "$task_name ([lc_numeric $content_length] Kb - ${pretty_mime_type})" } - if { [string eq $online_p "t"] } { + if {$online_p == "t"} { if { [db_string compare_due_date { *SQL* } -default 0] } { if { ![db_0or1row answer_info { *SQL* }] } { set answer "[_ evaluation-portlet.submit_answer_]" @@ -172,7 +172,7 @@ set answer_mode display set answer_url "[export_vars -base "${base_url}answer-add-edit" { grade_id task_id answer_id return_url answer_mode }]" } - } elseif { [string eq $late_submit_p "t"] } { + } elseif {$late_submit_p == "t"} { if { ![db_0or1row answer_info { *SQL* }] } { set answer "[_ evaluation-portlet.lt_submit_answer_style_f]" set answer_mode edit @@ -183,7 +183,7 @@ set answer_url "[export_vars -base "${base_url}answer-add-edit" { grade_id task_id answer_id return_url answer_mode }]" } } - if { $number_of_members > 1 && [string eq [db_string get_group_id { *SQL* }] 0] } { + if { $number_of_members > 1 && [string equal [db_string get_group_id { *SQL* }] "0"] } { set answer "[_ evaluation-portlet.No_group_for_task_]" set answer_url "" }