[Mpuls-commits] r192 - in waska/trunk: . waskaweb/i18n/de/LC_MESSAGES waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Sep 24 17:41:02 CEST 2008
Author: torsten
Date: 2008-09-24 17:41:01 +0200 (Wed, 24 Sep 2008)
New Revision: 192
Modified:
waska/trunk/ChangeLog.txt
waska/trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
waska/trunk/waskaweb/lib/evaluation.py
Log:
Fixed small error on esf-stammblatt evaluation and set version to 1.4.1rc
Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt 2008-09-24 13:19:36 UTC (rev 191)
+++ waska/trunk/ChangeLog.txt 2008-09-24 15:41:01 UTC (rev 192)
@@ -18,6 +18,12 @@
templates/casemanagement/evaluation/evaluation_result_2.mako:
Implemented missing subevalutions and finished export.
+ Fixed small error on esf-stammblatt evaluation and set version to
+ 1.4.1 rc1
+
+ * i18n/de/LC_MESSAGES/waskaweb.po: Versionstring change
+ * lib/evaluation.py: Fix calculation of percents
+
2008-09-23 Torsten Irlaender <torsten.irlaender at intevation.de>
Added two new evaluations
Modified: waska/trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
===================================================================
--- waska/trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po 2008-09-24 13:19:36 UTC (rev 191)
+++ waska/trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po 2008-09-24 15:41:01 UTC (rev 192)
@@ -552,7 +552,7 @@
#: waskaweb/templates/main.mako:197
msgid "footer_version"
-msgstr "22.09.2008 | Version 1.4.0"
+msgstr "24.09.2008 | Version 1.4.1 rc1"
#: waskaweb/templates/main_login.mako:38
msgid "main_login_bmf_phrase"
Modified: waska/trunk/waskaweb/lib/evaluation.py
===================================================================
--- waska/trunk/waskaweb/lib/evaluation.py 2008-09-24 13:19:36 UTC (rev 191)
+++ waska/trunk/waskaweb/lib/evaluation.py 2008-09-24 15:41:01 UTC (rev 192)
@@ -78,6 +78,7 @@
finally:
db.recycleConnection(conn, c1)
except:
+ traceback.print_exc(file=sys.stderr)
print >> sys.stderr, "Error! Could not get connection in evaluation"
def getTotal(self):
@@ -99,7 +100,7 @@
form_defaults = session.get('CASE_OVERVIEW_SEARCHOPTIONS') or {}
search_options = parseSearchOptions(form_defaults)
search_str = ";".join(search_options)
- search, options, states, bad_types, phaseslist = dummy_search._parse_search_str(search_str)
+ search, options, states, bad_types, phaseslist, fields = dummy_search._parse_search_str(search_str)
gender = options.get('gender') and "m.geschlecht = %s" % options.get('gender') or "TRUE"
@@ -169,6 +170,7 @@
self.ber_percent = "%s" % h.formatNumber(
float(self.total_valid_beratung)/float(divisor)*100)
except:
+ traceback.print_exc(file=sys.stderr)
print >> sys.stderr, "No results for eval 1"
self.percent = 0;
return (self.total_valid, self.total_valid_beratung, self.ber_percent, self.total_valid_cm, self.cm_percent)
@@ -1006,11 +1008,11 @@
# Anzahl aller gemeldeten Arbeitlosen
self.sql_gesamt = """select count(arbeitslosigkeit_1) from master_tbl_eval_incm_view where arbeitslosigkeit_1= 1 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
# Anzahl davon ALG1 Empfänger
- self.sql_alg1 = """select count(bezug_alg1) from (select bezug_alg1, id from master_tbl_eval_incm_view where arbeitslosigkeit_1 = 1) arbeitslos where bezug_alg1 = 1 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
+ self.sql_alg1 = """select count(bezug_alg1) from (select bezug_alg1, id, fkz from master_tbl_eval_incm_view where arbeitslosigkeit_1 = 1) arbeitslos where bezug_alg1 = 1 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
# Anzahl davon ALG2 Empfänger
- self.sql_alg2 = """select count(bezug_alg2) from (select bezug_alg2, id from master_tbl_eval_incm_view where arbeitslosigkeit_1 = 1) arbeitslos where bezug_alg2 = 1 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
+ self.sql_alg2 = """select count(bezug_alg2) from (select bezug_alg2, id, fkz from master_tbl_eval_incm_view where arbeitslosigkeit_1 = 1) arbeitslos where bezug_alg2 = 1 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
# Anzahl davon Langezeitarbeitslose
- self.sql_lza = """select count(dauer_nach_letzter_beschaeftigung) from (select dauer_nach_letzter_beschaeftigung, id from master_tbl_eval_incm_view where arbeitslosigkeit_1 = 1) arbeitslos where dauer_nach_letzter_beschaeftigung >= 12 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
+ self.sql_lza = """select count(dauer_nach_letzter_beschaeftigung) from (select dauer_nach_letzter_beschaeftigung, id, fkz from master_tbl_eval_incm_view where arbeitslosigkeit_1 = 1) arbeitslos where dauer_nach_letzter_beschaeftigung >= 12 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
def perform(self):
@@ -1072,7 +1074,7 @@
# Anzahl aller Nicht-Erwerbspersonen
self.sql_gesamt = """select count(id) from master_tbl_eval_incm_view where arbeitslosigkeit_1 = 0 and erwerbstaetigkeit_job = 0 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
# Davon befinden sich in einer schulischen Ausbildung
- self.sql_inschule = """select count(bei_eintritt_ist_der_jugendliche) from (select bei_eintritt_ist_der_jugendliche, id from master_tbl_eval_incm_view where arbeitslosigkeit_1 = 0 and erwerbstaetigkeit_job = 0) erwerbslos where bei_eintritt_ist_der_jugendliche = 0 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
+ self.sql_inschule = """select count(bei_eintritt_ist_der_jugendliche) from (select bei_eintritt_ist_der_jugendliche, id, fkz from master_tbl_eval_incm_view where arbeitslosigkeit_1 = 0 and erwerbstaetigkeit_job = 0) erwerbslos where bei_eintritt_ist_der_jugendliche = 0 AND (%s)""" % self.where_clause(self.compressed_ids, "id")
def perform(self):
# result [gesamt_anz, gesamt_proz, schule_anz, schule_proz]
@@ -1088,12 +1090,12 @@
cur.execute(self.sql_gesamt)
row = cur.fetchone()
result['gesamt'][0] = row[0]
- result['gesamt'][1] = h.formatNumber(float(row[0] / divisor*100))
+ result['gesamt'][1] = h.formatNumber(float(row[0]) / divisor*100)
cur.execute(self.sql_inschule)
row = cur.fetchone()
result['schule'][0] = row[0]
- result['schule'][1] = h.formatNumber(float(row[0] / divisor*100))
+ result['schule'][1] = h.formatNumber(float(row[0]) / divisor*100)
return result
except StandardError, e:
traceback.print_exc(file=sys.stderr)
@@ -1140,9 +1142,9 @@
# eintritte nach alter aufgeschluesselt
result['eintritte_alter'] = result_eval_alter
# migrationshintergrund
- migration = self.migration.perform()
+ migration = self.migration.perform()
result['migrationshintergrund'][0] = migration[0][0]
- result['migrationshintergrund'][1] = h.formatNumber(float(migration[0][0]/ divisor*100))
+ result['migrationshintergrund'][1] = h.formatNumber(float(result['migrationshintergrund'][0])/ divisor*100)
# arbeitslos
result['arbeitslos'] = self.arbeitslos.perform()
# nichterwerb
@@ -1156,22 +1158,22 @@
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))
+ 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))
+ result['abschluss']['kein'][1] = h.formatNumber(float(result['abschluss']['kein'][0])/ divisor*100)
# Austritte
austritte = self.austritte.perform()
result['austritte'][2] = austritte[3]
- result['austritte'][3] = h.formatNumber(float(result['austritte'][2]/ divisor*100))
+ 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'][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'][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))
+ result['austritte'][1] = h.formatNumber(float(result['austritte'][0])/ divisor*100)
return result
except StandardError, e:
More information about the Mpuls-commits
mailing list