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.1 -r1.2
--- openacs-4/packages/evaluation-portlet/lib/evaluations-chunk.tcl 31 May 2004 23:43:09 -0000 1.1
+++ openacs-4/packages/evaluation-portlet/lib/evaluations-chunk.tcl 10 Jun 2004 22:00:22 -0000 1.2
@@ -13,40 +13,40 @@
db_1row get_grade_info { *SQL* }
set elements [list task_name \
- [list label "Name" \
- link_url_col task_url \
- orderby_asc {task_name asc} \
- orderby_desc {task_name desc}] \
- ]
+ [list label "[_ evaluation-portlet.Name_]" \
+ link_url_col task_url \
+ orderby_asc {task_name asc} \
+ orderby_desc {task_name desc}] \
+ ]
if { $admin_p } {
#admin
lappend elements task_weight \
- [list label "Weight" \
+ [list label "[_ evaluation-portlet.Weight_]" \
display_template {
@grade_tasks_admin.task_weight@% } \
orderby_asc {task_weight asc} \
orderby_desc {task_weight desc}]
set multirow_name grade_tasks_admin
- set actions [list "Edit grades distribution of $grade_plural_name" [export_vars -base "${base_url}evaluation/admin/grades/distribution-edit" { grade_id }]]
+ set actions [list "[_ evaluation-portlet.lt_Edit_grades_distribut]" [export_vars -base "${base_url}evaluation/admin/grades/distribution-edit" { grade_id }]]
} else {
#student
lappend elements grade \
- [list label "Grade over 100" \
+ [list label "[_ evaluation-portlet.Grade_over_100_]" \
display_template { @grade_tasks.grade@ } \
orderby_asc {grade asc} \
orderby_desc {grade desc}]
lappend elements comments \
- [list label "Comments" \
+ [list label "[_ evaluation-portlet.Comments_]" \
link_url_col comments_url \
- link_html { title "View evaluation comments" }]
+ link_html { title "[_ evaluation-portlet.lt_View_evaluation_comme]" }]
lappend elements task_weight \
- [list label "Net Value" \
+ [list label "[_ evaluation-portlet.Net_Value_]" \
display_template { @grade_tasks.task_weight@ } \
orderby_asc {task_weight asc} \
orderby_desc {task_weight desc}]
lappend elements answer \
[list label "" \
link_url_col answer_url \
- link_html { title "View my answer" }]
+ link_html { title "[_ evaluation-portlet.View_my_answer_]" }]
set multirow_name grade_tasks
set actions ""
}
@@ -77,60 +77,59 @@
db_multirow -extend { task_url } grade_tasks_admin get_tasks_admin { *SQL* } {
set task_url [export_vars -base "${base_url}evaluation/admin/evaluations/student-list" { task_id grade_id }]
set category_weight [expr $category_weight + $task_weight]
+ set task_weight [format %.2f [lc_numeric $task_weight]]
}
} else {
db_multirow -extend { comments comments_url answer answer_url } grade_tasks get_grade_tasks { *SQL* } {
if { ![empty_string_p $comments] } {
- set comments "View comments"
+ set comments "[_ evaluation-portlet.View_comments_]"
set comments_url evaluation_view
}
set over_weight ""
if { ![empty_string_p $show_student_p] && $show_student_p } {
if { ![empty_string_p $grade] } {
- set grade [format %.2f $grade]
- set over_weight "[format %.2f $task_grade]/"
+ set grade [format %.2f [lc_numeric $grade]]
+ set over_weight "[format %.2f [lc_numeric $task_grade]]/"
set total_grade [expr $total_grade + $task_grade]
} else {
- set grade "Not evaluated"
+ set grade "[_ evaluation-portlet.Not_evaluated_]"
}
set max_grade [expr $task_weight + $max_grade]
} else {
- set grade "Not available"
+ set grade "[_ evaluation-portlet.Not_available_]"
}
- set task_weight "${over_weight}[format %.2f $task_weight]"
+ set task_weight "${over_weight}[format %.2f [lc_numeric $task_weight]]"
# working with answer stuff (if it has a file/url attached)
if { [empty_string_p $answer_data] } {
set answer_url ""
set answer ""
} elseif { [regexp "http://" $answer_data] } {
set answer_url "[export_vars -base "$answer_data" { }]"
- set answer "View my answer"
+ set answer "[_ evaluation-portlet.View_my_answer_]"
} else {
# we assume it's a file
- set answer_url "[export_vars -base "${base_url}evaluation/view/$answer_title" { }]"
- set answer "View my answer"
+ set answer_url "[export_vars -base "${base_url}evaluation/view/$answer_title" { {revision_id $answer_id} }]"
+ set answer "[_ evaluation-portlet.View_my_answer_]"
}
if { $number_of_members > 1 && [string eq [db_string get_group_id { *SQL* }] 0] } {
set answer ""
set answer_url ""
- set grade "No group for task"
+ set grade "[_ evaluation-portlet.No_group_for_task_]"
}
}
}
if { $admin_p } {
- set bottom_line "Weight used in ${grade_plural_name}: ${category_weight}% (over 100% of $grade_plural_name)
- $grade_plural_name represents ${grade_weight}% of the 100% of the class"
+ set bottom_line "[_ evaluation-portlet.lt_smallWeight_used_in_g]"
} else {
- set bottom_line "Total points in this category: ${total_grade}/${max_grade}
- This grade category represents the ${grade_weight}% of the 100% of the class"
+ set bottom_line "[_ evaluation-portlet.lt_smallTotal_points_in_]"
}