| |
|
1 |
<?xml version="1.0"?> |
| |
|
2 |
|
| |
|
3 |
<queryset> |
| |
|
4 |
|
| |
|
5 |
<fullquery name="get_grades"> |
| |
|
6 |
<querytext> |
| |
|
7 |
|
| |
|
8 |
select eg.grade_plural_name, |
| |
|
9 |
eg.grade_id, |
| |
|
10 |
eg.grade_item_id |
| |
|
11 |
from evaluation_grades eg, acs_objects ao |
| |
|
12 |
where exists (select 1 from cr_items |
| |
|
13 |
where live_revision = eg.grade_id) |
| |
|
14 |
and eg.grade_item_id = ao.object_id |
| |
|
15 |
and ao.context_id in ([join $list_of_package_ids ,]) |
| |
|
16 |
order by grade_plural_name desc |
| |
|
17 |
|
| |
|
18 |
</querytext> |
| |
|
19 |
</fullquery> |
| |
|
20 |
|
| |
|
21 |
<fullquery name="max_possible_grade"> |
| |
|
22 |
<querytext> |
| |
|
23 |
|
| |
|
24 |
select sum(round(et.weight*eg.weight/100,2)) |
| |
|
25 |
from evaluation_tasks et, |
| |
|
26 |
evaluation_grades eg, |
| |
|
27 |
cr_items cri1, |
| |
|
28 |
cr_items cri2, |
| |
|
29 |
acs_objects ao |
| |
|
30 |
where et.grade_item_id = eg.grade_item_id |
| |
|
31 |
and cri1.live_revision = eg.grade_id |
| |
|
32 |
and cri2.live_revision = et.task_id |
| |
|
33 |
and et.requires_grade_p = 't' |
| |
|
34 |
and ao.object_id = eg.grade_item_id |
| |
|
35 |
and ao.context_id = :package_id |
| |
|
36 |
|
| |
|
37 |
</querytext> |
| |
|
38 |
</fullquery> |
| |
|
39 |
|
| |
|
40 |
</queryset> |