Index: openacs-4/packages/evaluation-portlet/lib/evaluations-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/lib/evaluations-chunk.tcl,v
diff -u -r1.18 -r1.18.4.1
--- openacs-4/packages/evaluation-portlet/lib/evaluations-chunk.tcl 13 Jul 2009 12:59:59 -0000 1.18
+++ openacs-4/packages/evaluation-portlet/lib/evaluations-chunk.tcl 19 Aug 2014 17:30:25 -0000 1.18.4.1
@@ -160,7 +160,7 @@
set evaluations_orderby [template::list::orderby_clause -orderby -name grade_tasks_${grade_id}]
-if { [string equal $evaluations_orderby ""] } {
+if {$evaluations_orderby eq ""} {
set evaluations_orderby " order by task_name asc"
}
@@ -172,11 +172,11 @@
} else {
set task_url [export_vars -base "${base_url}admin/evaluations/student-list" { grade_id task_id return_url }]
}
- set category_weight [expr $category_weight + $task_weight]
+ set category_weight [expr {$category_weight + $task_weight}]
set grade_url [export_vars -base "${base_url}admin/evaluations/student-list" { grade_id task_id return_url }]
- set max_weight [format %0.2f [expr $max_weight + $task_weight]]
+ set max_weight [format %0.2f [expr {$max_weight + $task_weight}]]
set task_weight [format %0.2f $task_weight]
- set max_grade [expr $max_grade + $perfect_score]
+ set max_grade [expr {$max_grade + $perfect_score}]
set max_grade_label "$max_grade pts."
set solution_label "[_ evaluation-portlet.weight_possible_of_grade_] $low_name )"
@@ -212,7 +212,7 @@
set grade_url [export_vars -base "${base_url}admin/evaluations/student-list" { grade_id task_id return_url }]
if { [db_0or1row get_evaluation_info { *SQL* }] } {
- if { ![empty_string_p $comments] } {
+ if { $comments ne "" } {
set comments "[_ evaluation-portlet.View_comments_]"
set comments_url "[export_vars -base "${base_url}evaluation-view" { evaluation_id return_url }]"
} else {
@@ -223,18 +223,18 @@
set over_weight ""
- if { [string eq $show_student_p "t"] } {
- if { ![empty_string_p $grade] } {
+ if {$show_student_p == "t"} {
+ if { $grade ne "" } {
set grade [lc_numeric $grade]
set over_weight "[lc_numeric $task_grade]/"
if { $simple_p } {
set task_grade [format %0.2f [expr ($grade*$perfect_score/100.0)]]
}
- set total_grade [expr $total_grade + $task_grade]
+ set total_grade [expr {$total_grade + $task_grade}]
if { $simple_p } {
- set max_grade [expr $task_grade + $max_grade]
+ set max_grade [expr {$task_grade + $max_grade}]
} else {
- set max_grade [expr $task_weight + $max_grade]
+ set max_grade [expr {$task_weight + $max_grade}]
}
} else {
set grade "[_ evaluation-portlet.Not_evaluated_]"
@@ -259,7 +259,7 @@
if { [db_0or1row get_answer_info { *SQL* }] } {
set submitted_date $creation_date
# working with answer stuff (if it has a file/url attached)
- if { [string eq $answer_title "link"] } {
+ if {$answer_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
array set community_info [site_node::get -url "[dotlrn_community::get_community_url [dotlrn_community::get_community_id]][evaluation::package_key]"]
@@ -274,7 +274,7 @@
set answer "[_ evaluation-portlet.View_my_answer_]"
}
- 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 ""
set answer_url ""
set grade "[_ evaluation-portlet.No_group_for_task_]"
@@ -283,12 +283,12 @@
set answer_url ""
set answer ""
}
- set max_weight [expr $max_weight + $perfect_score]
+ set max_weight [expr {$max_weight + $perfect_score}]
set max_grade_label "$max_grade pts."
set max_weight_label "$max_weight %"
- if { [empty_string_p $submitted_date]} {
+ if { $submitted_date eq ""} {
- 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 submitted_date "[_ evaluation-portlet.submit_answer_]"
@@ -299,7 +299,7 @@
set submitted_date_mode display
set submitted_date_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 submitted_date "[_ evaluation-portlet.lt_submit_answer_style_f]"
set submitted_date_mode edit
@@ -310,14 +310,14 @@
set submitted_date_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 submitted_date "[_ evaluation-portlet.No_group_for_task_]"
set submitted_date_url ""
}
}
} else {
set submitted_date_url "[export_vars -base "${base_url}answer-view" { grade_id task_id return_url answer_mode {answer_id}}]"
- 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 submitted_date "[_ evaluation-portlet.No_group_for_task_]"
set submitted_date_url ""