Index: openacs-4/packages/evaluation/www/admin/grades/distribution-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/distribution-edit.tcl,v diff -u -r1.7.2.1 -r1.7.2.2 --- openacs-4/packages/evaluation/www/admin/grades/distribution-edit.tcl 17 Nov 2004 23:58:23 -0000 1.7.2.1 +++ openacs-4/packages/evaluation/www/admin/grades/distribution-edit.tcl 8 Jun 2005 22:07:46 -0000 1.7.2.2 @@ -6,37 +6,57 @@ @author jopez@galileo.edu @creation-date Mar 2004 @cvs-id $Id$ + } { grade_id:integer,notnull } set user_id [ad_conn user_id] +set simple_p [parameter::get -parameter "SimpleVersion"] set page_title "[_ evaluation.lt_Assignment_Types_Dist]" set context [list [list "grades" "[_ evaluation.Assignment_Types_]"] "[_ evaluation.lt_Assignment_Types_Dist]"] - +set class "list" +if { $simple_p } { +set class "pbs_list" +} db_1row grade_info { *SQL* } - set elements [list task_name \ - [list label "[_ evaluation.Name_]" \ + [list label "[_ evaluation.name]" \ + display_template {@grades.task_name@}\ orderby_asc {task_name asc} \ orderby_desc {task_name desc}] \ task_weight \ - [list label "[_ evaluation.lt_Weight_over_grade_wei]" \ - display_template { % } \ + [list label "[_ evaluation.lt_Weight_over_grade]" \ + display_template {
} \ aggregate sum \ - aggregate_label { Total } + aggregate_label { [_ evaluation.total]} ] \ + relative_weight \ + [list label "[_ evaluation.rel_weight]" \ + display_template {
@grades.relative_weight@
} \ + aggregate sum \ + ]\ requires_grade \ - [list label "[_ evaluation.Requires_Grade_]" \ + [list label "[_ evaluation.requires_grade]" \ display_template { [_ evaluation.Yes_] [_ evaluation.No_] } \ ] \ - ] - + + ] + + +# points \ + [list label "Weight over Total" \ + display_template { } \ + aggregate sum \ + aggregate_label { Total } ] + template::list::create \ -name grades \ -multirow grades \ -key task_id \ + -main_class $class \ + -sub_class narrow\ -filters { grade_id {} } \ -elements $elements @@ -49,7 +69,8 @@ db_multirow -extend { radio_yes_checked radio_no_checked } grades get_grade_tasks { *SQL* } { - set task_weight [lc_numeric %.2f $task_weight] + set task_weight [format %0.2f $task_weight] + if { [string eq $requires_grade_p "t"] } { set radio_yes_checked "checked" set radio_no_checked ""