Changeset 5607 for WAeUP_SRP


Ignore:
Timestamp:
7 Dec 2010, 13:58:37 (14 years ago)
Author:
Henrik Bettermann
Message:

refresh_certificate_info.py: Simplify reindexing.

getInterswitchParams.py: Include 100 level fresh students.

Location:
WAeUP_SRP/trunk/skins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_futminna/getInterswitchParams.py

    r5606 r5607  
    3535    d['type_description'] = 'Hostel Maintenance Fee'
    3636    d['pay_item_name'] = "FUT Minna %(type_description)s" % d
    37     if student_record.level  in ('200','300','400','500') and student_record.faculty in ('EET','SET','AAT','ICT','EMT'):
     37    if student_record.level  in ('100','200','300','400','500') and student_record.faculty in ('EET','SET','AAT','ICT','EMT'):
    3838        d['amount'] = 9000
    3939    else:
  • WAeUP_SRP/trunk/skins/waeup_utilities/refresh_certificate_info.py

    r1253 r5607  
    99
    1010course = request.get('certid')
    11 res = context.portal_catalog(portal_type='Certificate',id = course)
     11res = context.certificates_catalog(code = course)
    1212if not res:
    1313    return "Certificate %s not found"
    14 c_brain = res[0]
    15 c_path = c_brain.getPath().split('/')
    16 faculty = c_path[-4]
    17 department = c_path[-3]
     14faculty = res[0].faculty
     15department = res[0].department
    1816s_cat = context.students_catalog
    1917s_res = s_cat(course = certid)
     
    2624for student_id in [st.id  for st in s_res]:
    2725    s_cat.modifyRecord(id = student_id,
    28                        course = course,
    2926                       faculty = faculty,
    3027                       department = department,
    3128                       )
    32     refreshed.append("Record %s refreshed" % student_id)
     29    refreshed.append("Record %s refreshed, faculty = %s, department = %s" % (student_id,faculty,department))
    3330return '\r'.join(refreshed)
Note: See TracChangeset for help on using the changeset viewer.