Index: WAeUP_SRP/trunk/Students.py
===================================================================
--- WAeUP_SRP/trunk/Students.py	(revision 2124)
+++ WAeUP_SRP/trunk/Students.py	(revision 2125)
@@ -16,4 +16,5 @@
 from Products.CPSCore.CPSMembershipTool import CPSUnrestrictedUser
 from Products.WAeUP_SRP.Academics import makeCertificateCode
+
 from Products.AdvancedQuery import Eq, Between, Le,In
 import DateTime
@@ -97,12 +98,13 @@
 ###)
 
-def formatLGA(lga):
-    if lga.find('_') > -1:
-        lgadic = lga.split('_')
-        return lgadic[0].upper(),lgadic[1].upper()
-    if lga.find('/') > -1:
-        lgadic = lga.split('/')
-        return lgadic[0].upper(),lgadic[1].upper()
-    return "",lga
+def formatLGA(lga,voc=None):
+    if voc is not None:
+        if voc.has_key(lga):
+            state,lga = voc[lga].split(' / ')
+        elif lga.find(' / ') > -1:
+            state,lga = lga.split(' / ')
+        else:
+            state,lga = "",lga
+    return state.upper(),lga.upper()
 
 class StudentsFolder(CPSDocument): ###(
@@ -999,5 +1001,5 @@
                 continue
             if with_lga:
-                d['state'],d['lga'] = formatLGA(d['lga'])
+                d['state'],d['lga'] = formatLGA(d['lga'],voc = self.portal_vocabularies.local_gov_areas)
             lines.append(format % d)
             total += 1
@@ -1061,5 +1063,5 @@
             not_all = False
             d = self.getFormattedStudentEntry(student)
-            d['state'],d['lga'] = formatLGA(d['lga'])
+            d['state'],d['lga'] = formatLGA(d['lga'],voc = self.portal_vocabularies.local_gov_areas)
             lines.append(format % d)
             total += 1
