[Mpuls-commits] r504 - in waska/trunk: . waskaweb/lib waskaweb/templates/casemanagement/evaluation
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri May 8 15:05:49 CEST 2009
Author: torsten
Date: 2009-05-08 15:05:46 +0200 (Fri, 08 May 2009)
New Revision: 504
Modified:
waska/trunk/ChangeLog.txt
waska/trunk/waskaweb/lib/evaluation.py
waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako
Log:
Added category "unknown" to eval "Verweildauer"
Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt 2009-05-08 07:57:17 UTC (rev 503)
+++ waska/trunk/ChangeLog.txt 2009-05-08 13:05:46 UTC (rev 504)
@@ -1,5 +1,11 @@
2009-05-08 Torsten Irlaender <torsten.irlaender at intevation.de>
+
+ * waskaweb/lib/evaluation.py,
+ waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:
+ Added category "unknown" to eval "Verweildauer"
+2009-05-08 Torsten Irlaender <torsten.irlaender at intevation.de>
+
Small fix in evaluation
* waskaweb/lib/evaluation_new.py: Fixed calulation of "unknown" (no
Modified: waska/trunk/waskaweb/lib/evaluation.py
===================================================================
--- waska/trunk/waskaweb/lib/evaluation.py 2009-05-08 07:57:17 UTC (rev 503)
+++ waska/trunk/waskaweb/lib/evaluation.py 2009-05-08 13:05:46 UTC (rev 504)
@@ -680,7 +680,7 @@
# KA
row[7] = r[4]
row[8] = "%s" % h.formatNumber(float(r[4])/float(divisor)*100)
- if r[2] > 0 or r[1] > 0 or r[3] > 0:
+ if r[2] > 0 or r[1] > 0 or r[3] > 0 or r[4]:
result.append(row)
return result
@@ -689,9 +689,9 @@
p = self.perform()
f.write(u"#%s (Auswertung: Jugendliche im CM)\r\n" % _('cm_eval_length_cm'))
- f.write("Monat;Anzahl Abgeschlossen;Prozent Abgeschlossen, Anzahl Abgebrochen, Prozent Abgebrochen\r\n")
+ f.write("Monat;Anzahl Abgeschlossen;Prozent Abgeschlossen;Anzahl vorzeitig Abgeschlossen; Pronzent vorzeitig Abgeschlossen;Anzahl Abgebrochen;Prozent Abgebrochen;Anzahl keine Angabe;Prozent keine Angabe\r\n")
for v in p:
- f.write(u"%s;%s;%s%%;%s;%s%%\r\n" % (v[0], v[1], v[2], v[3], v[4]))
+ f.write(u"%s;%s;%s%%;%s;%s%%;%s;%s%%;%s;%s%%\r\n" % (v[0], v[1], v[5], v[6], v[2], v[3], v[4], v[7], v[8]))
class Evaluation_13(Evaluation):
"""Durchschnitt Verweildauer im CM"""
@@ -709,9 +709,12 @@
anz_abg = 0
months_vz = 0
anz_vz = 0
+ months_ka = 0
+ anz_ka = 0
avg_month_abr = "-/-"
avg_month_abg = "-/-"
avg_month_vz = "-/-"
+ avg_month_ka = "-/-"
for r in eval_10:
try:
@@ -721,6 +724,8 @@
anz_abg += int(r[1])
months_vz += int(r[0]) * int(r[5])
anz_vz += int(r[5])
+ months_ka += int(r[0]) * int(r[7])
+ anz_ka += int(r[7])
except:
pass
if anz_abr > 0:
@@ -729,17 +734,19 @@
avg_month_abg = "%s" % h.formatNumber(float(months_abg) / float(anz_abg))
if anz_vz > 0:
avg_month_vz = "%s" % h.formatNumber(float(months_vz) / float(anz_vz))
+ if anz_ka > 0:
+ avg_month_ka = "%s" % h.formatNumber(float(months_ka) / float(anz_ka))
- result = [avg_month_abg, anz_abg, avg_month_vz, anz_vz, avg_month_abr, anz_abr]
+ result = [avg_month_abg, anz_abg, avg_month_vz, anz_vz, avg_month_abr, anz_abr, avg_month_ka, anz_ka]
return result
def doExport(self, f):
p = self.perform()
f.write(u"#%s (Auswertung: Jugendliche im CM)\r\n" % _('cm_eval_avg_length_cm'))
- f.write("Durchschnitt Monat Abgeschlossen;Durchschnitt Monat vorzeitig Abgeschlossen;Durchschnitt Monat Abgebrochen\r\n")
+ f.write("Durchschnitt Monat Abgeschlossen;Durchschnitt Monat vorzeitig Abgeschlossen;Durchschnitt Monat Abgebrochen;Durchschnitt Monat keine Angabe\r\n")
for v in [p]:
- f.write(u"%s;%s;%s\r\n" % (v[0], v[2], v[4]))
+ f.write(u"%s;%s;%s;%s\r\n" % (v[0], v[2], v[4], v[6]))
class Evaluation_11(Evaluation):
"""Schulabschluss beim Zugang (alle)"""
Modified: waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako
===================================================================
--- waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako 2009-05-08 07:57:17 UTC (rev 503)
+++ waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako 2009-05-08 13:05:46 UTC (rev 504)
@@ -20,6 +20,7 @@
<th class="table_header_h table_width_mid_l">${_('cm_eval_table_completed')}</th>
<th class="table_header_h table_width_mid_l">${_('cm_eval_table_early_completed')}</th>
<th class="table_header_h table_width_mid_l">${_('cm_eval_table_aborted')}</th>
+ <th class="table_header_h table_width_mid_l">${_('keine Angabe')}</th>
</tr>
<% idset = 0 %>
% for r in c.eval_10:
@@ -29,6 +30,7 @@
<td>${r[1]| F.NA, h} (${r[2]| F.NA, h}%)</td>
<td>${r[5]| F.NA, h} (${r[6]| F.NA, h}%)</td>
<td>${r[3]| F.NA, h} (${r[4]| F.NA, h}%)</td>
+ <td>${r[7]| F.NA, h} (${r[8]| F.NA, h}%)</td>
</tr>
<% idset = 1 %>
% else:
@@ -37,6 +39,7 @@
<td class="table_row_v_12">${r[1]| F.NA, h} (${r[2]| F.NA, h}%)</td>
<td class="table_row_v_12">${r[5]| F.NA, h} (${r[6]| F.NA, h}%)</td>
<td class="table_row_v_12">${r[3]| F.NA, h} (${r[4]| F.NA, h}%)</td>
+ <td class="table_row_v_12">${r[7]| F.NA, h} (${r[8]| F.NA, h}%)</td>
</tr>
<% idset = 0 %>
% endif
@@ -49,6 +52,7 @@
<th class="table_header_h table_width_mid_l">${_('cm_eval_table_completed')}</th>
<th class="table_header_h table_width_mid_l">${_('cm_eval_table_early_completed')}</th>
<th class="table_header_h table_width_mid_l">${_('cm_eval_table_aborted')}</th>
+ <th class="table_header_h table_width_mid_l">${_('keine Angabe')}</th>
</tr>
<% idset = 0 %>
% for r in [c.eval_13]:
@@ -57,6 +61,7 @@
<td>${r[0]| F.NA, h}</td>
<td>${r[2]| F.NA, h}</td>
<td>${r[4]| F.NA, h}</td>
+ <td>${r[6]| F.NA, h}</td>
</tr>
<% idset = 1 %>
% else:
@@ -64,6 +69,7 @@
<td class="table_row_v_12">${r[0]| F.NA, h}</td>
<td class="table_row_v_12">${r[2]| F.NA, h}</td>
<td class="table_row_v_12">${r[4]| F.NA, h}</td>
+ <td class="table_row_v_12">${r[6]| F.NA, h}</td>
</tr>
<% idset = 0 %>
% endif
More information about the Mpuls-commits
mailing list