Index: openacs-4/packages/evaluation/lib/tasks-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/tasks-chunk.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/evaluation/lib/tasks-chunk.tcl 10 Jun 2004 21:08:52 -0000 1.4 +++ openacs-4/packages/evaluation/lib/tasks-chunk.tcl 7 Jul 2004 17:26:44 -0000 1.5 @@ -102,7 +102,14 @@ if { [empty_string_p $task_data] } { set task_url "[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]" set task_name "$task_name (No data)" - } elseif { [regexp "http://" $task_data] } { + } elseif { [empty_string_p $content_length] } { + + # 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 + array set community_info [site_node::get -url "[dotlrn_community::get_community_url [dotlrn_community::get_community_id]][evaluation::package_key]"] + if { ![regexp ([join [split [parameter::get -parameter urlProtocols -package_id $community_info(package_id)] ","] "|"]) "$task_data"] } { + set task_data "http://$task_data" + } set task_url "[export_vars -base "$task_data" { }]" set task_name "$task_name (URL)" } else { @@ -139,7 +146,14 @@ if { [empty_string_p $task_data] } { set task_url "[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]" set task_name "$task_name [_ evaluation.No_data_]" - } elseif { [regexp "http://" $task_data] } { + } elseif { [empty_string_p $content_length] } { + + # 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 + array set community_info [site_node::get -url "[dotlrn_community::get_community_url [dotlrn_community::get_community_id]][evaluation::package_key]"] + if { ![regexp ([join [split [parameter::get -parameter urlProtocols -package_id $community_info(package_id)] ","] "|"]) "$task_data"] } { + set task_data "http://$task_data" + } set task_url "[export_vars -base "$task_data" { }]" set task_name "$task_name [_ evaluation.URL_]" } else {