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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.