Index: openacs-4/packages/evaluation/lib/evaluations-chunk.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/evaluations-chunk.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/evaluation/lib/evaluations-chunk.adp 31 May 2004 17:04:57 -0000 1.2
+++ openacs-4/packages/evaluation/lib/evaluations-chunk.adp 11 Sep 2004 00:49:20 -0000 1.3
@@ -1,4 +1,4 @@
-
+
@bottom_line;noquote@
-
+
Index: openacs-4/packages/evaluation/lib/evaluations-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/evaluations-chunk.tcl,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/evaluation/lib/evaluations-chunk.tcl 10 Sep 2004 19:16:28 -0000 1.12
+++ openacs-4/packages/evaluation/lib/evaluations-chunk.tcl 11 Sep 2004 00:49:20 -0000 1.13
@@ -101,16 +101,15 @@
set over_weight ""
if { ![empty_string_p $show_student_p] && $show_student_p } {
-
+
+ set max_grade [expr $task_weight + $max_grade]
if { ![empty_string_p $grade] } {
set grade [lc_numeric $grade]
set over_weight "[lc_numeric $task_grade]/"
set total_grade [expr $total_grade + $task_grade]
} else {
set grade "[_ evaluation-portlet.Not_evaluated_]"
}
-
- set max_grade [expr $task_weight + $max_grade]
set task_weight "${over_weight}[lc_numeric $task_weight]"
} else {
@@ -119,8 +118,8 @@
}
} else {
set grade "[_ evaluation-portlet.Not_evaluated_]"
- set grade "[_ evaluation-portlet.Not_available_]"
- set task_weight "[_ evaluation-portlet.Not_available_]"
+ set max_grade [expr $task_weight + $max_grade]
+ set task_weight "[_ evaluation-portlet.Not_evaluated_]"
}
Index: openacs-4/packages/evaluation/lib/tasks-chunk.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/tasks-chunk.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation/lib/tasks-chunk.adp 28 Apr 2004 11:06:40 -0000 1.1
+++ openacs-4/packages/evaluation/lib/tasks-chunk.adp 11 Sep 2004 00:49:20 -0000 1.2
@@ -1,3 +1,3 @@
-
+
Index: openacs-4/packages/evaluation/www/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/index-postgresql.xql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/evaluation/www/index-postgresql.xql 10 Sep 2004 19:16:30 -0000 1.6
+++ openacs-4/packages/evaluation/www/index-postgresql.xql 11 Sep 2004 00:49:21 -0000 1.7
@@ -21,7 +21,7 @@
- select coalesce(sum((ese.grade*et.weight*eg.weight)/10000),0) as grade
+ select coalesce(sum(round((ese.grade*et.weight*eg.weight)/10000,2)),0) as grade
from evaluation_grades eg, evaluation_tasks et, evaluation_student_evals ese, acs_objects ao, cr_items cri1, cr_items cri2, cr_items cri3
where et.task_item_id = ese.task_item_id
and et.grade_item_id = eg.grade_item_id
@@ -55,5 +55,24 @@
+
+
+
+ select sum(round(et.weight*eg.weight/100,2))
+ from evaluation_tasks et,
+ evaluation_grades eg,
+ cr_items cri1,
+ cr_items cri2,
+ acs_objects ao
+ where et.grade_item_id = eg.grade_item_id
+ and cri1.live_revision = eg.grade_id
+ and cri2.live_revision = et.task_id
+ and et.requires_grade_p = 't'
+ and ao.object_id = eg.grade_item_id
+ and ao.context_id = :package_id
+
+
+
+
Index: openacs-4/packages/evaluation/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/index.adp,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/evaluation/www/index.adp 10 Sep 2004 19:16:30 -0000 1.9
+++ openacs-4/packages/evaluation/www/index.adp 11 Sep 2004 00:49:21 -0000 1.10
@@ -15,6 +15,7 @@
@grades.grade_plural_name;noquote@
+
@@ -28,10 +29,11 @@
@grades.grade_plural_name;noquote@
+
-
#evaluation.lt_Your_total_grade_in_t# @total_class_grade@
+
#evaluation.lt_Your_total_grade_in_t# @total_class_grade@/@max_possible_grade@
Index: openacs-4/packages/evaluation/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/index.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/evaluation/www/index.tcl 10 Sep 2004 19:16:30 -0000 1.7
+++ openacs-4/packages/evaluation/www/index.tcl 11 Sep 2004 00:49:21 -0000 1.8
@@ -24,7 +24,8 @@
}
-set total_class_grade [format %.2f [lc_numeric [db_string get_total_grade { *SQL* }]]]
+set total_class_grade [lc_numeric [db_string get_total_grade { *SQL* }]]
+set max_possible_grade [lc_numeric [db_string max_possible_grade { *SQL* }]]
set notification_chunk [notification::display::request_widget \
-type one_assignment_notif \
Index: openacs-4/packages/evaluation/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/index.adp,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/evaluation/www/admin/index.adp 10 Sep 2004 19:16:30 -0000 1.10
+++ openacs-4/packages/evaluation/www/admin/index.adp 11 Sep 2004 00:49:21 -0000 1.11
@@ -19,6 +19,7 @@
@grades.grade_plural_name;noquote@
+
@@ -33,6 +34,7 @@
@grades.grade_plural_name;noquote@
+
Index: openacs-4/packages/evaluation/www/admin/grades/student-grades-report-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/student-grades-report-postgresql.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/evaluation/www/admin/grades/student-grades-report-postgresql.xql 10 Sep 2004 19:16:32 -0000 1.3
+++ openacs-4/packages/evaluation/www/admin/grades/student-grades-report-postgresql.xql 11 Sep 2004 00:49:21 -0000 1.4
@@ -29,6 +29,25 @@
+
+
+
+ select sum(et.weight*eg.weight/100)
+ from evaluation_tasks et,
+ evaluation_grades eg,
+ cr_items cri1,
+ cr_items cri2,
+ acs_objects ao
+ where et.grade_item_id = eg.grade_item_id
+ and cri1.live_revision = eg.grade_id
+ and cri2.live_revision = et.task_id
+ and et.requires_grade_p = 't'
+ and ao.object_id = eg.grade_item_id
+ and ao.context_id = :package_id
+
+
+
+
Index: openacs-4/packages/evaluation/www/admin/grades/student-grades-report.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/student-grades-report.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/evaluation/www/admin/grades/student-grades-report.tcl 10 Sep 2004 19:16:32 -0000 1.3
+++ openacs-4/packages/evaluation/www/admin/grades/student-grades-report.tcl 11 Sep 2004 00:49:21 -0000 1.4
@@ -29,19 +29,6 @@
}
set total_class_grade [format %.2f [lc_numeric [db_string get_total_grade { *SQL* }]]]
-set max_possible_grade [format %.2f [lc_numeric [db_string max_possible_grade {
- select sum(et.weight*eg.weight/100)
- from evaluation_tasks et,
- evaluation_grades eg,
- cr_items cri1,
- cr_items cri2,
- acs_objects ao
- where et.grade_item_id = eg.grade_item_id
- and cri1.live_revision = eg.grade_id
- and cri2.live_revision = et.task_id
- and et.requires_grade_p = 't'
- and ao.object_id = eg.grade_item_id
- and ao.context_id = :package_id
-}]]]
+set max_possible_grade [format %.2f [lc_numeric [db_string max_possible_grade { *SQL* }]]]
ad_return_template