[Mpuls-commits] r191 - in waska/trunk: . waskaweb/controllers waskaweb/i18n waskaweb/i18n/de/LC_MESSAGES waskaweb/lib waskaweb/templates/casemanagement/evaluation
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Sep 24 15:19:37 CEST 2008
Author: torsten
Date: 2008-09-24 15:19:36 +0200 (Wed, 24 Sep 2008)
New Revision: 191
Modified:
waska/trunk/ChangeLog.txt
waska/trunk/waskaweb/controllers/evaluate.py
waska/trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
waska/trunk/waskaweb/i18n/waskaweb.pot
waska/trunk/waskaweb/lib/evaluation.py
waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako
waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako
Log:
Implemented evalaution "esf-stammblatt"
Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt 2008-09-24 08:08:00 UTC (rev 190)
+++ waska/trunk/ChangeLog.txt 2008-09-24 13:19:36 UTC (rev 191)
@@ -8,6 +8,16 @@
New evaluations are currentely commented out, as they need some
work.
+ Implemented evalaution "esf-stammblatt"
+
+ * i18n/waskaweb.pot,
+ i18n/de/LC_MESSAGES/waskaweb.po,
+ controllers/evaluate.py,
+ lib/evaluation.py,
+ templates/casemanagement/evaluation/evaluation_navigation.mako,
+ templates/casemanagement/evaluation/evaluation_result_2.mako:
+ Implemented missing subevalutions and finished export.
+
2008-09-23 Torsten Irlaender <torsten.irlaender at intevation.de>
Added two new evaluations
Modified: waska/trunk/waskaweb/controllers/evaluate.py
===================================================================
--- waska/trunk/waskaweb/controllers/evaluate.py 2008-09-24 08:08:00 UTC (rev 190)
+++ waska/trunk/waskaweb/controllers/evaluate.py 2008-09-24 13:19:36 UTC (rev 191)
@@ -204,8 +204,8 @@
e20 = Evaluation_20(self._getCompressedIds(reset))
c.eval_20 = e20.perform()
# ESF-Stammblatt
- #e21 = Evaluation_21(self._getCompressedIds(reset))
- #c.eval_21 = e21.perform()
+ e21 = Evaluation_21(self._getCompressedIds(reset))
+ c.eval_21 = e21.perform()
page = render('casemanagement/evaluation/evaluation_result_2.mako')
elif id == '3':
# Vermittlung
Modified: waska/trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
===================================================================
--- waska/trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po 2008-09-24 08:08:00 UTC (rev 190)
+++ waska/trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po 2008-09-24 13:19:36 UTC (rev 191)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: waskaweb 0.0.0\n"
"Report-Msgid-Bugs-To: EMAIL at ADDRESS\n"
-"POT-Creation-Date: 2008-09-22 17:49+0200\n"
+"POT-Creation-Date: 2008-09-24 14:51+0200\n"
"PO-Revision-Date: 2007-10-14 20:33+0200\n"
"Last-Translator: Torsten Irländer<torsten.irlaender at intevation.de>\n"
"Language-Team: de <LL at li.org>\n"
@@ -272,8 +272,26 @@
msgid "cm_eval_header_avg_effort2"
msgstr "Durchschnittliche Dauer der Tätigkeiten"
-#: waskaweb/lib/evaluation.py:1057 waskaweb/lib/evaluation.py:1100
-msgid "cm_eval_header_enemployed"
+#: waskaweb/lib/evaluation.py:1061
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:47
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:202
+msgid "cm_eval_summary_header_19"
+msgstr "2.5. Gemeldete Arbeitslose"
+
+#: waskaweb/lib/evaluation.py:1107
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:48
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:238
+msgid "cm_eval_summary_header_20"
+msgstr "2.6. Angaben zu Nicht-Erwerbspersonen"
+
+#: waskaweb/lib/evaluation.py:1181
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:49
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:262
+msgid "cm_eval_summary_header_21"
+msgstr "2.7. ESF-Stammblatt"
+
+#: waskaweb/lib/evaluation.py:1239
+msgid "cm_eval_summary_header_23"
msgstr ""
#: waskaweb/lib/renderer.py:251
@@ -2134,37 +2152,27 @@
msgid "cm_eval_summary_header_3"
msgstr "2.1. Verweildauer im CM"
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:47
-#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:202
-msgid "cm_eval_summary_header_19"
-msgstr "2.5. Gemeldete Arbeitslose"
-
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:48
-#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:238
-msgid "cm_eval_summary_header_20"
-msgstr "2.6. Angaben zu Nicht-Erwerbspersonen"
-
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:50
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:51
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:10
msgid "eval_group_header_finished"
msgstr "3. Auswertungen über Jugendliche, die das CM abgeschlossen haben"
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:52
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:53
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:15
msgid "cm_eval_summary_header_7"
msgstr "3.1. Vermittlung"
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:54
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:55
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:78
msgid "cm_eval_summary_header_15"
msgstr "3.2. Zeitaufwände"
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:58
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:59
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_0.mako:10
msgid "eval_group_header_finished2"
msgstr "4. Auswertung über abgeschlossene Beratungsfälle"
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:60
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:61
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_0.mako:15
msgid "cm_eval_summary_header_14"
msgstr "4.1. Zeitaufwände"
@@ -2198,6 +2206,7 @@
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:199
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:235
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:259
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:264
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:45
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:75
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:81
@@ -2220,6 +2229,7 @@
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:199
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:235
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:259
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:264
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:45
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:75
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:81
@@ -2356,6 +2366,8 @@
msgstr "Alter"
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:143
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:205
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:241
msgid "cm_eval_table_category"
msgstr "Kategorie"
@@ -2372,8 +2384,6 @@
msgstr "Keine Angabe"
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:173
-#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:205
-#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:241
msgid "cm_eval_table_offer"
msgstr "Angebot"
Modified: waska/trunk/waskaweb/i18n/waskaweb.pot
===================================================================
--- waska/trunk/waskaweb/i18n/waskaweb.pot 2008-09-24 08:08:00 UTC (rev 190)
+++ waska/trunk/waskaweb/i18n/waskaweb.pot 2008-09-24 13:19:36 UTC (rev 191)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: waskaweb 0.0.0\n"
"Report-Msgid-Bugs-To: EMAIL at ADDRESS\n"
-"POT-Creation-Date: 2008-09-22 17:49+0200\n"
+"POT-Creation-Date: 2008-09-24 14:51+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -243,10 +243,28 @@
msgid "cm_eval_header_avg_effort2"
msgstr ""
-#: waskaweb/lib/evaluation.py:1057 waskaweb/lib/evaluation.py:1100
-msgid "cm_eval_header_enemployed"
+#: waskaweb/lib/evaluation.py:1061
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:47
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:202
+msgid "cm_eval_summary_header_19"
msgstr ""
+#: waskaweb/lib/evaluation.py:1107
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:48
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:238
+msgid "cm_eval_summary_header_20"
+msgstr ""
+
+#: waskaweb/lib/evaluation.py:1181
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:49
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:262
+msgid "cm_eval_summary_header_21"
+msgstr ""
+
+#: waskaweb/lib/evaluation.py:1239
+msgid "cm_eval_summary_header_23"
+msgstr ""
+
#: waskaweb/lib/renderer.py:251
msgid "cm_rg_aid_overview_table_institution"
msgstr ""
@@ -2080,37 +2098,27 @@
msgid "cm_eval_summary_header_3"
msgstr ""
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:47
-#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:202
-msgid "cm_eval_summary_header_19"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:48
-#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:238
-msgid "cm_eval_summary_header_20"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:50
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:51
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:10
msgid "eval_group_header_finished"
msgstr ""
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:52
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:53
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:15
msgid "cm_eval_summary_header_7"
msgstr ""
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:54
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:55
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:78
msgid "cm_eval_summary_header_15"
msgstr ""
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:58
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:59
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_0.mako:10
msgid "eval_group_header_finished2"
msgstr ""
-#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:60
+#: waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako:61
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_0.mako:15
msgid "cm_eval_summary_header_14"
msgstr ""
@@ -2141,6 +2149,7 @@
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:199
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:235
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:259
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:264
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:45
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:75
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:81
@@ -2163,6 +2172,7 @@
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:199
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:235
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:259
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:264
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:45
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:75
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_3.mako:81
@@ -2290,6 +2300,8 @@
msgstr ""
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:143
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:205
+#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:241
msgid "cm_eval_table_category"
msgstr ""
@@ -2306,8 +2318,6 @@
msgstr ""
#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:173
-#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:205
-#: waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako:241
msgid "cm_eval_table_offer"
msgstr ""
Modified: waska/trunk/waskaweb/lib/evaluation.py
===================================================================
--- waska/trunk/waskaweb/lib/evaluation.py 2008-09-24 08:08:00 UTC (rev 190)
+++ waska/trunk/waskaweb/lib/evaluation.py 2008-09-24 13:19:36 UTC (rev 191)
@@ -737,19 +737,19 @@
f.write(u"%s;%s;%s\r\n" % (v[0], v[2], v[4]))
class Evaluation_11(Evaluation):
- """Schulabschluss beim Zugang"""
+ """Schulabschluss beim Zugang (alle)"""
def __init__(self, compressed_ids):
Evaluation.__init__(self, compressed_ids)
-
+ self.view = 'master_tbl_eval_total_view'
def perform(self):
result = {}
sql = """select t.id, count(m.schulabschluss_1), t.value
- from master_tbl_eval_total_view m
+ from %s m
right join schulabschluss_1_tbl t
on m.schulabschluss_1 = t.id
WHERE %s
group by t.id, t.value having t.id is not null
- order by t.id asc""" % self.where_clause(self.compressed_ids, "m.id")
+ order by t.id asc""" % (self.view, self.where_clause(self.compressed_ids, "m.id"))
try:
conn, c1 = None, None
try:
@@ -1119,46 +1119,130 @@
self.arbeitslos = Evaluation_19(compressed_ids)
self.nichterwerb = Evaluation_20(compressed_ids)
self.migration = Evaluation_3(compressed_ids)
- self.abschluss = Evaluation_11(compressed_ids)
+ self.abschluss = Evaluation_22(compressed_ids)
+ self.ohneabschluss = Evaluation_23(compressed_ids)
# Anzahl aller Nicht-Erwerbspersonen
def perform(self):
# result [gesamt_anz, gesamt_proz, schule_anz, schule_proz]
- result = {'eintritte':[0,0],'eintritte_alter':[], 'migrationshintergrund': [0,0], 'arbeitslos':{}, 'nichterwerb': {}, 'austritte': [0,0,0,0] }
+ result = {'eintritte':[0,0],'eintritte_alter':[], 'migrationshintergrund': [0,0], 'arbeitslos':{}, 'nichterwerb': {}, 'austritte': [0,0,0,0,0,0,0,0], 'abschluss': {} }
+
+ if self.total_valid_cm == 0: divisor = 1
+ else: divisor = self.total_valid_cm
+
try:
# eintritte gesammt
result_eval_alter = self.eval_alter.perform()
for cat in result_eval_alter:
result['eintritte'][0] += cat[1]
+ result['eintritte'][1] = h.formatNumber(float(result['eintritte'][0] / divisor*100))
# eintritte nach alter aufgeschluesselt
result['eintritte_alter'] = result_eval_alter
# migrationshintergrund
migration = self.migration.perform()
result['migrationshintergrund'][0] = migration[0][0]
+ result['migrationshintergrund'][1] = h.formatNumber(float(migration[0][0]/ divisor*100))
# arbeitslos
result['arbeitslos'] = self.arbeitslos.perform()
# nichterwerb
result['nichterwerb'] = self.nichterwerb.perform()
+
+ # schulabschluss
+ result['abschluss']['kein'] = [0,0]
+ result['abschluss']['hauptreal'] = [0,0]
+
+ schule = self.abschluss.perform()
+ for id, v in schule.iteritems():
+ if id in [3,4,5,9,10]:
+ result['abschluss']['hauptreal'][0] += v[1]
+ result['abschluss']['hauptreal'][1] = h.formatNumber(float(result['abschluss']['hauptreal'][0]/ divisor*100))
+
+ ohneabschluss = self.ohneabschluss.perform()
+ result['abschluss']['kein'][0] = ohneabschluss[0]
+ result['abschluss']['kein'][1] = h.formatNumber(float(result['abschluss']['kein'][0]/ divisor*100))
+
# Austritte
austritte = self.austritte.perform()
- result['austritte'][1] = austritte[1]
result['austritte'][2] = austritte[3]
- result['austritte'][3] = austritte[5]
+ result['austritte'][3] = h.formatNumber(float(result['austritte'][2]/ divisor*100))
+ result['austritte'][4] = austritte[1]
+ result['austritte'][5] = h.formatNumber(float(result['austritte'][4]/ divisor*100))
+ result['austritte'][6] = austritte[5]
+ result['austritte'][7] = h.formatNumber(float(result['austritte'][6]/ divisor*100))
result['austritte'][0] = austritte[1]+austritte[3]+austritte[5]
+ result['austritte'][1] = h.formatNumber(float(result['austritte'][0]/ divisor*100))
return result
except StandardError, e:
traceback.print_exc(file=sys.stderr)
print >> sys.stderr, "No results for eval 21"
+
def doExport(self, f):
p = self.perform()
f.write(u"#%s (Auswertung: Jugendliche im CM)\r\n" % _('cm_eval_summary_header_21'))
f.write("Kategorie;Anzahl;Prozent\r\n")
- for l in [p]:
- for k, v in l.iteritems():
- f.write(u"%s;%s;%s;\r\n" % (k, v[0], v[1]))
+ f.write(u"%s;%s;%s;\r\n" % ('Eintritte gesamt', p['eintritte'][0], p['eintritte'][1]))
+ f.write(u"%s;;;\r\n" % ('Eintritte nach Alter'))
+ for a in p['eintritte_alter']:
+ f.write(u" %s;%s;%s;\r\n" % (a[0], a[1], a[2]))
+ f.write(u"%s;%s;%s;\r\n" % ('Migrationshintergrund', p['migrationshintergrund'][0], p['migrationshintergrund'][1]))
+ f.write(u"%s;%s;%s;\r\n" % ('Arbeitslos gemeldet', p['arbeitslos']['gesamt'][0], p['arbeitslos']['gesamt'][1]))
+ f.write(u" %s;%s;%s;\r\n" % ('davon langzeitarbeitslos', p['arbeitslos']['lza'][0], p['arbeitslos']['lza'][1]))
+ f.write(u" %s;%s;%s;\r\n" % ('davon aus Regelkreis SGBII', p['arbeitslos']['gesamt'][0], p['arbeitslos']['alg1'][1]))
+ f.write(u" %s;%s;%s;\r\n" % ('davon aus Regelkreis SGBIII', p['arbeitslos']['gesamt'][0], p['arbeitslos']['alg2'][1]))
+ f.write(u"%s;%s;%s;\r\n" % (u'Nicht-Erwerbstätig', p['nichterwerb']['gesamt'][0], p['nichterwerb']['gesamt'][1]))
+ f.write(u" %s;%s;%s;\r\n" % (u'davon in schulischer Ausbildung', p['nichterwerb']['schule'][0], p['nichterwerb']['gesamt'][1]))
+ f.write(u"%s;%s;%s;\r\n" % (u'Ohne Abschluss', p['abschluss']['kein'][0], p['abschluss']['kein'][1]))
+ f.write(u"%s;%s;%s;\r\n" % (u'Ausschließlich Hauptschulabschluss, Realschulabschluss BVJ oder BGJ', p['abschluss']['hauptreal'][0], p['abschluss']['hauptreal'][1]))
+ f.write(u"%s;%s;%s;\r\n" % (u'Vorhabenaustritte', p['austritte'][0], p['austritte'][1]))
+ f.write(u"%s;%s;%s;\r\n" % (u'Reguläre Austritte', p['austritte'][2], p['austritte'][3]))
+ f.write(u"%s;%s;%s;\r\n" % (u'Vorzeitige Austritte', p['austritte'][4], p['austritte'][5]))
+ f.write(u"%s;%s;%s;\r\n" % (u'Abbrüche', p['austritte'][6], p['austritte'][7]))
+
+class Evaluation_22(Evaluation_11):
+ """Schulabschluss beim Zugang (cm)"""
+ def __init__(self, compressed_ids):
+ Evaluation_11.__init__(self, compressed_ids)
+ self.view = 'master_tbl_eval_incm_view'
+
+class Evaluation_23(Evaluation):
+ """Anzahl Jugendlicher ohne Abschluss Zugang (cm)"""
+ def __init__(self, compressed_ids):
+ Evaluation.__init__(self, compressed_ids)
+ # Anzahl ohne Abschluss
+ self.sql = """select count(id) from master_tbl_eval_incm_view where abschluss_betriebliche_ausbildung = 0 and abschluss_ausserbetriebliche_ausbildung = 0 and schulabschluss_1 = 1 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
+
+ def perform(self):
+ result = [0,0]
+ try:
+ try:
+ conn = db.getConnection()
+ cur = conn.cursor()
+
+ if self.total_valid_cm == 0: divisor = 1
+ else: divisor = self.total_valid_cm
+
+ cur.execute(self.sql)
+ row = cur.fetchone()
+ result[0] = row[0]
+ result[1] = h.formatNumber(float(row[0] / divisor*100))
+ return result
+ except StandardError, e:
+ traceback.print_exc(file=sys.stderr)
+ print >> sys.stderr, "No results for eval 23"
+ finally:
+ db.recycleConnection(conn, cur)
+
+ def doExport(self, f):
+ p = self.perform()
+
+ f.write(u"#%s (Auswertung: Jugendliche im CM)\r\n" % _('cm_eval_summary_header_23'))
+ f.write("Anzahl;Prozent\r\n")
+ f.write(u"%s;%s\r\n" % (p[0], p[1]))
+
+
# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
Modified: waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako
===================================================================
--- waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako 2008-09-24 08:08:00 UTC (rev 190)
+++ waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_navigation.mako 2008-09-24 13:19:36 UTC (rev 191)
@@ -46,6 +46,7 @@
<li><a href="${h.url_for(controller="/evaluate", action="evaluate", id=2)}#eval_6">${_('cm_eval_summary_header_6')}</a></li>
<li><a href="${h.url_for(controller="/evaluate", action="evaluate", id=2)}#eval_19">${_('cm_eval_summary_header_19')}</a></li>
<li><a href="${h.url_for(controller="/evaluate", action="evaluate", id=2)}#eval_20">${_('cm_eval_summary_header_20')}</a></li>
+ <li><a href="${h.url_for(controller="/evaluate", action="evaluate", id=2)}#eval_21">${_('cm_eval_summary_header_21')}</a></li>
</ul>
<h2>${_('eval_group_header_finished')}</h2>
<ul>
Modified: waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako
===================================================================
--- waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako 2008-09-24 08:08:00 UTC (rev 190)
+++ waska/trunk/waskaweb/templates/casemanagement/evaluation/evaluation_result_2.mako 2008-09-24 13:19:36 UTC (rev 191)
@@ -258,6 +258,8 @@
</table>
<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_20/auswertung_2_6.csv">${_('cm_eval_table_export_analysis')}</a>
</div>
-##<div class="evaluation even-row">
-## <%include file="/casemanagement/evaluation/evaluation_esfstammblatt.mako"/>
-##</div>
+<div class="evaluation even-row">
+<h3><a name="eval_21">${_('cm_eval_summary_header_21')}</a></h3>
+ <%include file="/casemanagement/evaluation/evaluation_esfstammblatt.mako"/>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_21/auswertung_2_7.csv">${_('cm_eval_table_export_analysis')}</a>
+</div>
More information about the Mpuls-commits
mailing list