Ignore:
Timestamp:
19 Mar 2007, 21:45:44 (18 years ago)
Author:
joachim
Message:

merged changes from trunk to joachim-event-branch

Location:
WAeUP_SRP/branches/joachim-event-branch/skins
Files:
5 deleted
65 edited
9 copied

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_accommodation/allocate_reserved_bed.py

    r1477 r1596  
    1313acco_cat = context.portal_accommodation
    1414import logging
    15 logger = logging.getLogger('Accommodation.AllocateReservedBed')
     15logger = logging.getLogger('Skins.allocate_reserved_bed')
    1616
    1717#change = REQUEST.has_key("allocate_and_change")
     
    7373    if allocate or change:
    7474        if already and not change:
    75             psm = "Student %s already reserved bed %s" % (sid, already[0].bed)
     75            psm = "Student %s has already reserved bed %s" % (sid, already[0].bed)
    7676            break
    7777        if not bed_brain.bed_type.endswith("reserved"):
    78             psm = "Not a reserved bed: %s" % bid
     78            psm = "%s is not a reserved bed" % bid
    7979            break
    8080        if bed_brain.student and not change:
     
    8888            acco_doc = getattr(student_obj, acco_id).getContent()
    8989            if acco_doc.bed == bid:
    90                 psm = "Student %s has already booked (paid) bed %s" % (sid, bid)
     90                psm = "Student %s has already booked (and paid) bed %s" % (sid, bid)
    9191                break
    9292        if not already:
     
    9494            break
    9595        if not bed_brain.bed_type.endswith("reserved"):
    96             psm = "Not a reserved bed: %s" % bid
     96            psm = "%s is not a reserved bed" % bid
    9797            break
    9898        if not bed_brain.student:
     
    118118        acco_doc = getattr(student_obj, acco_id).getContent()
    119119        acco_doc.edit(mapping={'bed': bid})
    120     logger.info('"%s","booked reserved bed %s for","%s"' % (member,bid,sid))
     120    logger.info('%s booked reserved bed %s for %s' % (member,bid,sid))
    121121    psm = "Bed %s reserved for %s %s" % (bid,sid,student.name)
    122122elif release:
     
    130130    if modify:
    131131        acco_cat.modifyRecord(bed=bid,student='')
    132         logger.info('"%s","cancelled reservation %s by","%s"' % (member,bid,sid))
     132        logger.info('%s released bed %s booked by %s' % (member,bid,sid))
    133133        psm = "%s removed from %s" % (student.name,bid)
    134134    else:
    135         psm = "%s removing failed from %s" % (student.name,bid)
     135        psm = "Removing of %s from bed %s failed" % (student.name,bid)
    136136
    137137mode = 'view'
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_accommodation/change_bed.py

    r1452 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('Student.Accommodation.change_bed')
     15logger = logging.getLogger('Skins.change_bed')
    1616
    1717request = context.REQUEST
     
    3131
    3232if student_id is not None:
    33     logger.info('"%s", "requests bed_change for", "%s"' % (member_id,student_id))
     33    logger.info('%s requests bed change for %s' % (member_id,student_id))
    3434    info = context.getAccommodationInfo(student_id)
    3535    res = beds(student=student_id)
    3636    if len(res) == 0:
    37         logger.info('"%s", "no bed found"' % (student_id))
    38         redirect("%s/%s" % (students.absolute_url(),student_id))
     37        logger.info('No bed found for %s' % (student_id))
     38        return redirect("%s/%s" % (students.absolute_url(),student_id))
    3939    allocated_bed = res[0]
    4040    status = info['student_status']
    4141    student = student_id
    4242    if allocated_bed.bed_type == status:
    43         logger.info('"%s", "correct bed allocated","%s"' % (student_id,status))
    44         redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
    45     logger.info('"%s", "change bed", "%s/%s"' % (student_id,allocated_bed.bed_type,status))
     43        logger.info('Status %s of %s has not changed' % (status,student_id))
     44        return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
     45    logger.info('Bed status %s of %s has changed to %s' % (allocated_bed.bed_type,student_id,status))
    4646    beds.modifyRecord(bed=allocated_bed.bed,student='')
     47    logger.info('Bed %s released' % (allocated_bed.bed))
    4748    code,bed = beds.searchAndReserveBed(student_id,status)
    4849    if code > 0:
     
    5657        acco_doc = info['acco_doc']
    5758        acco_doc.edit(mapping=d)
     59        logger.info('Bed %s allocated to %s' % (bed,student_id))
    5860        return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
    5961    student_obj = getattr(students,student_id)
     
    6264        acco_doc = getattr(student_obj, acco_id).getContent()
    6365        if acco_doc.bed == bed:
    64             acco_doc.edit(mapping={'bed':"-- cancelled by %s --" % member})
    65     logger.info('"%s", "new bed allocation failed","%s"' % (student_id,code))
    66     logger.info('"%s","cancelled booking of bed %s by %s"' % (member,bed,sid))
     66            acco_doc.edit(mapping={'bed':"-- cancelled by officer due to failed bed change request --"})
     67    logger.info('New bed allocation for %s failed, code = %s' % (student_id,code))
     68    logger.info('%s cancelled booking of bed %s by %s' % (member,bed,student_id))
    6769    redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
    6870
     
    9597        d['acco_maint_fee'] = acco_info.get('maintenance_fee')
    9698        acco_doc.edit(mapping=d)
    97         list.append("Student %s new bed %s assigned code = %s" % (student,
    98                                                               bed,
     99        list.append("New bed %s allocated to %s, code = %s" % (bed,
     100                                                              student,
    99101                                                              code))
    100102return "\r".join(list)
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_accommodation/getAccoHallInfo.py

    r1445 r1596  
    5959    d['student'] = st
    6060    d['student_url'] ='%s/%s' % (students_url,st)
    61     bed = context.formatBed(sbrain.bed).split('/')
     61    bed = context.getFormattedBed(sbrain.bed).split('/')
    6262    d['bed'] = " / ".join(bed[1:])
    6363    erg = context.students_catalog(id = st)
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_accommodation/hall_delete.py

    r805 r1596  
    1 ## Script (Python) "folder_delete"
     1## Script (Python) "hall_delete"
    22##bind container=container
    33##bind context=context
     
    1212FIXME: add docstring.
    1313"""
     14
     15import logging
     16logger = logging.getLogger('Skins.hall_delete')
     17member_id = str(context.portal_membership.getAuthenticatedMember())
    1418
    1519from Products.CMFCore.utils import getToolByName
     
    4145    here.manage_delObjects(ids)
    4246    message = 'portal_status_message=hall(s) %s with %s beds deleted' % (" ".join(halls),len(urls))
     47    logger.info('%s deletes hall(s) %s with %s beds' % (member_id," ".join(halls),len(urls)))
    4348else:
    4449    message = 'portal_status_message=psm_select_at_least_one_document'
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_accommodation/release_bed.py

    r1536 r1596  
    1 ## Script (Python) "change_bed"
     1## Script (Python) "release_bed"
    22##bind container=container
    33##bind context=context
     
    1313"""
    1414import logging
    15 logger = logging.getLogger('Student.Accommodation.release_bed')
     15logger = logging.getLogger('Skins.release_bed')
    1616
    1717request = context.REQUEST
     
    3636#set_trace()
    3737if student_id is not None:
    38     logger.info('"%s", "requests bed_release for", "%s"' % (member_id,student_id))
     38    logger.info('%s requests bed_release for %s' % (member_id,student_id))
    3939    res = acco_cat(student=student_id)
    4040    if len(res) == 0:
    41         logger.info('"%s", "no bed found"' % (student_id))
     41        logger.info('no bed of %s found' % (student_id))
    4242        redirect("%s/%s" % (students.absolute_url(),student_id))
    4343    allocated_bed = res[0]
     
    4545    acco_doc = context.getContent()
    4646    acco_doc.edit(mapping={'bed':"-- cancelled by section officer --"})
    47     logger.info('"%s", "released bed of", "%s"' % (member_id,student_id))
     47    logger.info('%s released bed of %s' % (member_id,student_id))
    4848    redirect("%s" % (context.absolute_url()))
    4949
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_accommodation/reserve_accommodation.py

    r1412 r1596  
    1212
    1313import logging
    14 logger = logging.getLogger('Student.Accommodation.Reserve')
     14logger = logging.getLogger('Skins.reserve_accommodation')
    1515
    1616#if info is None:
     
    1919if info is None:
    2020    member_id = str(context.portal_membership.getAuthenticatedMember())
    21     logger.info('"%s","tried to reserve accommodation"' % (member_id))
     21    logger.info('%s tried to reserve accommodation' % (member_id))
    2222    return context.REQUEST.RESPONSE.redirect("%s/srp_invalid_access" % context.portal_url())
    2323
     
    5555if psm == 'invalid' or info['error'] is not None:
    5656    member_id = str(context.portal_membership.getAuthenticatedMember())
    57     logger.info('"%s", %s' % (member_id,info['error'] ))
     57    logger.info('%s, %s' % (member_id,info['error'] ))
    5858    if psm == 'invalid':
    5959        psm = "Please correct your input."
     
    9494                                     )
    9595        else:
    96             bed = already[0].bed 
     96            bed = already[0].bed
    9797        student.invokeFactory('StudentAccommodation',acco_id)
    9898        acco = getattr(student,acco_id)
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_custom/logged_in.py

    r1489 r1596  
    2121current = DateTime.DateTime()
    2222import logging
    23 logger = logging.getLogger('Member.Login')
     23logger = logging.getLogger('Skins.logged_in')
    2424
    2525
     
    7171        student_per = getattr(student,'personal',None)
    7272        p_review_state = wftool.getInfoFor(student_per,'review_state',None)
    73         logger.info('"%s", "logged in", "review_state %s"' % (member,s_review_state))
     73        logger.info('%s logged in, review_state %s' % (member,s_review_state))
    7474        app_doc = student_app.getContent()
    7575        #from Products.zdb import set_trace;set_trace()
    7676        if load_passport and 'passport' not in app_doc.objectIds():
    7777            msg = context.waeup_tool.loadStudentFoto(student)
    78             logger.info('"%s", "%s"' % (member,msg))
     78            logger.info('%s, %s' % (member,msg))
    7979        if s_review_state in ("student_created","admitted") and\
    8080                             a_review_state == 'created' :
     
    134134            redirect_url = "%s/student_index" % student.absolute_url()
    135135    else:
    136         logger.info('"%s", "logged in"' % (member))
     136        logger.info('%s logged in' % (member))
    137137        redirect_url = portal.absolute_url()
    138138#Anonymous
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_custom/logout.py

    r1082 r1596  
    1010# notify the event service that the user has logged out
    1111import logging
    12 logger = logging.getLogger('Member.Logout')
     12logger = logging.getLogger('Skins.logout')
    1313user = context.portal_membership.getAuthenticatedMember()
    1414if user:
     
    1616    evtool = getPublicEventService(context)
    1717    evtool.notifyEvent('user_logout', user, {})
    18     logger.info('"%s", "logged out"' % (user))
     18    logger.info('%s logged out' % (user))
    1919
    2020REQUEST = context.REQUEST
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_default/isCourseAdviser.py

    r1558 r1596  
    1 ## Script (Python) "isClearanceOfficer"
     1## Script (Python) "isCourseAdviser"
    22##bind container=container
    33##bind context=context
     
    99##
    1010# $Id: isClearanceOfficer.py 1087 2006-12-18 22:13:31Z joachim $
    11 
    12 #from Products.zdb import set_trace
    13 #set_trace()
    1411if context.isStudent():
    1512    return False
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_default/waeup_edit.py

    r1558 r1596  
    1717from Products.CPSDocument.utils import getFormUidUrlArg
    1818
     19import logging
     20logger = logging.getLogger('Skins.waeup_edit')
     21
     22mtool = context.portal_membership
     23member = mtool.getAuthenticatedMember()
     24
    1925# Check flexible controls
    2026#context.editLayouts(REQUEST=REQUEST)
     
    2531if context.portal_type == "StudentStudyCourse":
    2632    if len(context.objectIds()) > 0:
    27         psm = 'Edit of StudyCourse is only possible if there are no levels'
     33        psm = 'Edit of StudentStudyCourse is only possible if there are no levels inside!'
    2834        args = getFormUidUrlArg(REQUEST)
    2935        args['portal_status_message'] = psm
     
    5864                                                  department = c_path[-3],
    5965                                                  )
     66            logger.info('%s edited %s (%s) of %s' % (member,context.id,course,student_id))
     67
    6068    elif context.portal_type == "StudentApplication":
    6169        entry_mode = ds.get('entry_mode')
     
    6472                                              entry_mode = entry_mode,
    6573                                             )
     74        logger.info('%s edited %s of %s' % (member,context.id,student_id))
    6675    elif context.portal_type == "StudentClearance":
    6776        matric_no = ds.get('matric_no')
     
    7079                                              matric_no = matric_no,
    7180                                             )
     81        logger.info('%s edited %s of %s' % (member,context.id,student_id))                                             
    7282    elif context.portal_type in ("StudentPersonal",):
    7383        name = "%(firstname)s %(middlename)s %(lastname)s" % ds
     
    8191        #if ds.get('sex'):
    8292        #    jamb_sex = 'F'
    83         # originally imported data must be kept; app_doc should not be changed here 
     93        # originally imported data must be kept; app_doc should not be changed here
    8494        #app_doc.edit(mapping={'jamb_lastname': name,
    8595        #                      'jamb_sex': jamb_sex
     
    91101                                              sex = ds.get('sex'),
    92102                                             )
     103        logger.info('%s edited %s of %s' % (member,context.id,student_id))
    93104    elif context.portal_type == "Course":
    94105        dd = {}
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_epayment/approve_epayment.py

    r1427 r1596  
    1 ## Script (Python) "epayment_cb"
     1## Script (Python) "approve_epayment"
    22##bind container=container
    33##bind context=context
     
    1010# $Id: aprove_epayment.py 1425 2007-02-15 17:52:01Z joachim $
    1111"""
    12 payment callback
    1312"""
    1413import logging
    15 logger = logging.getLogger('EPayment.Approve')
     14logger = logging.getLogger('Skins.approve_epayment')
    1615import DateTime
    1716if context.portal_membership.isAnonymousUser():
     
    4241if doc.type_description.startswith('School Fee'):
    4342    wftool.doActionFor(student,'pay_school_fee')
    44 logger.info('"%s", "approved epayment for","%s""' % (member,student_id))
     43logger.info('%s approves epayment for %s' % (member,student_id))
    4544wftool.doActionFor(context,'close')
    4645return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_epayment/epayment_cb.py

    r1367 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('EPayment.CallBack')
     15logger = logging.getLogger('Skins.epayment_cb')
    1616import DateTime
    1717if context.portal_membership.isAnonymousUser():
     
    4343if  resp == '00':
    4444    wftool.doActionFor(student,'pay_school_fee')
    45     logger.info('"%s", "received valid callback"' % student_id)
     45    logger.info('%s received valid callback' % student_id)
    4646
    4747elif len(resp) < 3:
    48     logger.info('"%s", "received no callback"' % student_id)
     48    logger.info('%s received no callback' % student_id)
    4949else:
    50     logger.info('"%s", "received unsuccessfull callback"' % student_id)
     50    logger.info('%s received unsuccessfull callback' % student_id)
    5151wftool.doActionFor(context,'close')
    5252
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_epayment/getPaymentsFolderInfo.py

    r1431 r1596  
    1 ## Script (Python) "getPaymentsInfo"
     1## Script (Python) "getPaymentsFolderInfo"
    22##bind container=container
    33##bind context=context
     
    1212Info for the PaymentsFolder
    1313"""
    14 import logging
    15 logger = logging.getLogger('EPayment.Info')
     14#import logging
     15#logger = logging.getLogger('Skins.getPaymentsFolderInfo')
     16
    1617import DateTime
    1718request = context.REQUEST
     
    5758        row['confirmed'] = 'unsuccessful'
    5859    payments.append(row)
    59    
     60
    6061
    6162info['payments'] = payments
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_epayment/pay_by_sc.py

    r1390 r1596  
    1414import logging
    1515from urllib import urlencode
    16 logger = logging.getLogger('EPayment.PayBySC')
     16logger = logging.getLogger('Skins.pay_by_sc')
    1717import DateTime
    1818
     
    8585    wftool.doActionFor(payment,'close')
    8686    wftool.doActionFor(student,'pay_school_fee')
    87     logger.info('"%s", "paid school fee by scratch card"' % student_id)
     87    logger.info('%s paid school fee by scratch card' % student_id)
    8888else:
    89     logger.info('"%s", "repeatedly paid school fee by scratch card"' % student_id)
     89    logger.info('%s repeatedly paid school fee by scratch card' % student_id)
    9090url = "%s/payments" % (student.absolute_url())
    9191request.RESPONSE.redirect(url)
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_epayment/pay_online.py

    r1365 r1596  
    1414from urllib import urlencode
    1515import logging
    16 logger = logging.getLogger('EPayment.PayOnline')
     16logger = logging.getLogger('Skins.pay_online')
    1717import DateTime
    1818
     
    9191info['callback_url'] = "%s/payments/%s/epayment_cb" % (student.absolute_url(),p_id)
    9292
    93 logger.info('"%(student_id)s","%(type_description)s", "%(amount)s N"' % info)
     93logger.info('%(student_id)s initiated online school fee payment' % info)
    9494payment_fields = (('x_SiteID','site_id'),
    9595                  ('x_Redirect_url','callback_url'),
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_epayment/simulate_callback.py

    r1427 r1596  
    55return html renderer + psm
    66"""
    7 import DateTime,logging
     7import DateTime
    88current = DateTime.DateTime()
    99pr = context.portal_registration
    10 logger = logging.getLogger('EPayment.Simulate')
    1110validate = REQUEST.has_key("cpsdocument_edit_button")
     11
     12import logging
     13logger = logging.getLogger('Skins.simulate_callback')
    1214
    1315args = {}
     
    1820args['x_ApprAmt'] = REQUEST.get('x_amt')
    1921
     22
     23student_id = context.getStudentId()
     24logger.info('%s received simulated callback' % student_id)
     25
    2026from urllib import urlencode
    2127#url = "%s/epayment_cb/?%s" % (context.absolute_url(),urlencode(args))
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_pins/disable_pins.py

    r1540 r1596  
    1515current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
    1616import logging
    17 logger = logging.getLogger('Pin.Disable')
     17logger = logging.getLogger('Skins.disable_pins')
    1818
    1919request = REQUEST
     
    3939            }
    4040    pincat.modifyRecord(**dict)
    41     logger.info('"%s","disabled pin","%s"' % (member,uid))
     41    logger.info('%s disabled pin %s' % (member,uid))
    4242return request.RESPONSE.redirect("%s/campus/pins/search_pins" % context.portal_url())
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_pins/enable_pins.py

    r1082 r1596  
    1515current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
    1616import logging
    17 logger = logging.getLogger('Pin.Enable')
     17logger = logging.getLogger('Skins.enable_pins')
    1818
    1919request = REQUEST
     
    4242            }
    4343    pincat.modifyRecord(**dict)
    44     logger.info('"%s","enabled pin","%s"' % (member,pid))
     44    logger.info('%s enabled pin %s' % (member,uid))
    4545return request.RESPONSE.redirect("%s/campus/pins/search_pins" % context.portal_url())
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/add_course_result.py

    r1520 r1596  
    1212add a StudentCourseResult object
    1313"""
     14
     15import logging
     16logger = logging.getLogger('Skins.add_course_result')
     17
    1418from urllib import urlencode
    1519try:
     
    2327aq_portal = context.portal_catalog.evalAdvancedQuery
    2428course_id = request.get('course_id')
     29
     30mtool = context.portal_membership
     31member = mtool.getAuthenticatedMember()
     32
     33
    2534d = context.getCourseInfo(course_id)
    2635args = {}
     
    2837while True:
    2938    if d['title'] == 'unknown':
    30         err = "No such course"
     39        err = "No such course!"
     40        logger.info('%s tried to add StudentCourseResult object %s for non-existing course' % (member,course_id))
    3141        break
    3242    if context.hasObject(course_id):
    33         err = "Course already exists"
     43        err = "Course already exists!"
     44        logger.info('%s tried to add StudentCourseResult object %s which is already in course list' % (member,course_id))
    3445        break
    3546    if context.hasObject("%s_co" % course_id):
    36         err = "Course already exists as carryover course"
     47        err = "Course already exists as carryover course!"
     48        logger.info('%s tried to add StudentCourseResult object %s which already exists as carryover course' % (member,course_id))
    3749        break
    3850    break
     
    4052if err:
    4153    args['course_id'] = course_id
    42     args['error'] = err
     54    #args['error'] = err
     55    args['portal_status_message'] = err
    4356    url = "%s?%s" % (context.absolute_url(),urlencode(args))
    4457    return request.RESPONSE.redirect(url)
     58
     59   
    4560cr_id = context.invokeFactory('StudentCourseResult',course_id)
    4661#set_trace()
     
    5065context.portal_workflow.doActionFor(cr,'close')
    5166args['course_id'] = course_id
     67
     68logger.info('%s added StudentCourseResult object %s' % (member,course_id))   
     69
    5270from urllib import urlencode
    5371url = "%s?%s" % (context.absolute_url(),urlencode(args))
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/add_student.py

    r1422 r1596  
    1313acco_cat = context.portal_accommodation
    1414import logging
    15 logger = logging.getLogger('Student.Add')
     15logger = logging.getLogger('Skins.add_student')
    1616
    1717validate = REQUEST.has_key("cpsdocument_edit_button") and\
     
    6767student_rec = context.getFormattedStudentEntry(context.students_catalog(id = sid)[0])
    6868psm = "Student record with Id %s and Password %s has been created." % (sid,password)
    69 logger.info('"%s","created student","%s"' % (member,sid))
     69logger.info('%s created student %s' % (member,sid))
    7070return context.add_student_form(rendered = rendered,
    7171                                 #psm = "%s, %s" % (psm,ds),
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/application_edit.py

    r1343 r1596  
    1616current = DateTime.DateTime()
    1717import logging
    18 logger = logging.getLogger('Student.Application.Edit')
     18logger = logging.getLogger('Skins.application_edit')
    1919
    2020# Until ajax posts directly to its own script...
     
    3030
    3131if info is None:
    32     logger.info('"anonymous access","%s"' % REQUEST.get('URL0'))
     32    logger.info('Anonymous user tried to access %s"' % REQUEST.get('URL0'))
    3333    return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    3434
     
    5656    elif cpsdocument_edit_and_view_button:
    5757        if 1: ## app_doc.passport is not None:
    58             logger.info('"%s", "proceeded to start clearance"' % (info['id']))
     58            logger.info('%s proceeded to start clearance' % (info['id']))
    5959            action = "/start_clearance"
    6060            base_url = student.absolute_url()
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/change_password.py

    r1527 r1596  
    1414current = DateTime.DateTime()
    1515#pr = context.portal_registration
    16 logger = logging.getLogger('Student.change_password')
     16logger = logging.getLogger('Skins.change_password')
    1717validate = request.has_key("change_password")
    1818students_dir = context.portal_directories.students
     
    2424requested_id = context.getStudentId()
    2525if requested_id and not context.isStaff() and member_id != requested_id:
    26     logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
     26    logger.info('%s tried to access %s' % (member_id,requested_id))
    2727    return None
    2828elif context.isStaff():
     
    7474args['__ac_name'] = student_id
    7575args['__ac_password'] = password
     76logger.info('%s changed password from %s to %s' % (member_id,old_password,password))
    7677from urllib import urlencode
    7778url = "%s/logged_in?%s" % (context.absolute_url(),urlencode(args))
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/clearance_edit.py

    r1217 r1596  
    1616current = DateTime.DateTime()
    1717import logging
    18 logger = logging.getLogger('Student.Clearance.Edit')
     18logger = logging.getLogger('Skins.clearance_edit')
    1919request = REQUEST
    2020
     
    7070    if cpsdocument_edit_button or result_edit_button:
    7171        psm = "Content changed!"
    72         logger.info('"%s","edited clearance of","%s"' % (member_id,student_id ))
     72        logger.info('%s edited clearance of %s' % (member_id,student_id ))
    7373        if clear_doc.clr_ac_pin == "":
    7474            res = context.portal_pins(student=member_id)
     
    9292                    missing = True
    9393            if missing:
    94                 logger.info('"%s","requested clearance with documents missing"' % (student_id))
     94                logger.info('%s requested clearance with documents missing' % (student_id))
    9595                psm = "You have not uploaded all necessary documents to request clearance!"
    9696            else:
    97                 logger.info('"%s","requested clearance"' % (student_id))
     97                logger.info('%s requested clearance' % (student_id))
    9898                info['clear_doc'].edit(mapping = {'request_date': current,})
    9999                wftool.doActionFor(info['clear'],'close')
     
    103103                    action = "/clearance_view"
    104104        elif acknowledge and info['review_state'] != "clearance_pin_entered":
    105             logger.info('"%s","repeatedly requested clearance"' % (student_id))
     105            logger.info('%s repeatedly requested clearance' % (student_id))
    106106            psm = "You have already requested clearance!"
    107107        else:
    108108            psm = "You must tick the acknowledgement check box before submission!"
    109109    elif clear_and_validate_button and info['review_state'] == "clearance_requested":
    110         logger.info('"%s","cleared","%s"' % (member_id,student_id ))
     110        logger.info('%s cleared %s' % (member_id,student_id ))
    111111        #from Products.zdb import set_trace
    112112        #set_trace()
     
    117117        psm = "This student is already cleared!"
    118118    elif reject_clearance_button:
    119         logger.info('"%s","rejected clearance for","%s"' % (member_id,student_id ))
     119        logger.info('%s rejected clearance for %s' % (member_id,student_id ))
    120120        wftool.doActionFor(info['clear'],'open')
    121121        wftool.doActionFor(info['student'],'reject_clearance')
    122122        action = "/contact_student_form"
    123123        psm = "Student's clearance request has been rejected! Please fill and submit the form below!"
     124        subject = "Clearance request rejected"
     125        args['subject'] = subject
     126        args['continue'] = 'external_clearance_edit_form'
    124127else:
    125128    psm = "Please correct your errors!"
     
    128131args['portal_status_message'] = psm
    129132url = clear.absolute_url() + action + '?' + urlencode(args)
    130 REQUEST.RESPONSE.redirect(url)
     133return REQUEST.RESPONSE.redirect(url)
    131134
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/clearance_slip.pt

    r1156 r1596  
    1 <metal:html tal:define="info context/getClearanceInfo">
    2   <metal:body use-macro="here/main_template/macros/master">
    3     <metal:main fill-slot="main">
     1<metal:body use-macro="here/main_template/macros/master">
     2    <metal:main fill-slot="main"
     3                 tal:define="info context/getClearanceInfo">
    44      <span tal:condition="not: info">
    55        <span tal:content="here/illegal_view" />
     
    6666      </span>
    6767    </metal:main>
    68   </metal:body>
    69 </metal:html>
     68</metal:body>
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/contact_student_form.pt

    r1455 r1596  
     1<metal:block define-macro="contact_student_form">
    12<metal:body use-macro="here/main_template/macros/master">
    23    <metal:main fill-slot="main"
    34                tal:define="member python:context.portal_membership.getAuthenticatedMember();
    45                        info context/getStudentBaseInfo;
     6                        subject python:context.REQUEST.get('subject');
     7                        continue python:context.REQUEST.get('continue')
    58                        ">
    69      <span tal:condition="not: info">
     
    811      </span>                       
    912   
    10       <span tal:condition="info">
     13      <span tal:condition="python: info and subject">
    1114      <h3>Contact Student</h3>
    1215      <br />
     
    2326      <input type="hidden" name="student_email" type="text" id="student_email"
    2427             tal:attributes="value info/student/email"/>                   
    25 
     28      <input type="hidden" name="probtype" type="text" id="probtype"
     29             tal:attributes="value subject"/>     
     30             
    2631      <table width="100%" border="0" cellspacing="5" cellpadding="0">
    2732        <tr>
     
    4247        </tr>
    4348        <tr>
    44           <td>
    45              <strong>Type of Rejection: </strong>
     49          <td valign="top">
     50             <strong>Reason of Notification: </strong>
    4651          </td>
    47           <td>
    48               <select name="probtype" class="boxgreen" id="probtype">
    49                 <option>Clearance request rejected</option>
    50               </select>       
     52          <td valign="bottom">
     53             <span tal:content="subject" />
    5154          </td>
    5255        </tr>       
     
    6770      </span>
    6871      <form action="." method="post" class="group">
    69             <input type="submit" name="external_clearance_edit_form:method"
     72            <input type="submit" name="."
     73                       tal:attributes="name string:${continue}:method"
    7074                       class="context" value="Continue" />
    7175      </form>     
     
    7377    </metal:main>
    7478</metal:body>
     79</metal:block>
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/course_registration_slip.pt

    r1516 r1596  
    1 <metal:html tal:define="info context/getStudyLevelInfo;
     1<metal:body use-macro="here/main_template/macros/master">
     2    <metal:main fill-slot="main"
     3                tal:define="info context/getStudyLevelInfo;
    24                  is_so context/isSectionOfficer;
    35                  is_ca info/is_ca;
    46                  show_check_boxes info/show_check_boxes;
    5                   is_student info/is_student;
    6                   status_info info/status_info;
    7                   review_state info/review_state;
    8                   view_only info/view_only">
    9   <metal:body use-macro="here/main_template/macros/master">
    10     <metal:main fill-slot="main">
     7                  validated python:context.getStudentReviewState() in ('courses_validated',);
     8                              is_student info/is_student;
     9                          status_info info/status_info;
     10                          review_state info/review_state;
     11                          view_only info/view_only">
    1112      <span tal:condition="not: info">
    1213        <span tal:content="here/illegal_view" />
     
    1415      <span tal:condition="info">
    1516      <h3>Course Registration Slip</h3>
     17     
    1618      <br />
    17       <table width="" cellpadding="2" cellspacing="0">
     19     
     20      <div tal:condition="validated">
     21        - validated by Course Adviser -
     22      </div>
     23      <div tal:condition="not: validated">
     24        - not yet validated by Course Adviser -
     25      </div>
     26     
     27      <br />
     28      <span tal:omit-tag=""
     29            tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
     30            layout_mode='view_info',
     31            layout_id='student_application_fe')"
     32            />           
     33
     34      <table  cellpadding="2" cellspacing="0">
    1835          <tr>
    19             <td valign="top"><span class="dlabel">Name</span>:
    20             </td>
    21             <td>
    22               <span tal:content="info/student/name" />
    23             </td>     
    24           </tr>
    25           <tr>
    26             <td valign="top"><span class="dlabel">Student Id</span>:
    27             </td>
    28             <td>
    29               <span tal:content="info/student/id" />
    30             </td>     
    31           </tr>
    32           <tr>
    33             <td valign="top"><span class="dlabel">Matriculation No</span>:
    34             </td>
    35             <td>
    36               <span tal:content="info/student/matric_no" />
    37             </td>     
    38           </tr>
    39           <tr>
    40             <td valign="top"><span class="dlabel">Faculty Id</span>:
     36            <td valign="top" width="180px"><span class="dlabel">Faculty Id</span>:
    4137            </td>
    4238            <td>
     
    111107       </span>             
    112108    </metal:main>
    113   </metal:body>
    114 </metal:html>
     109</metal:body>
    115110 
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/create_level.py

    r1558 r1596  
    2121response = request.RESPONSE
    2222redirect = response.redirect
    23 logger = logging.getLogger('Student.create_level')
     23logger = logging.getLogger('Skins.create_level')
    2424mtool = context.portal_membership
    2525member = mtool.getAuthenticatedMember()
     
    3030cert_id = student.course
    3131current_level = student.level
    32 in_progress =  session.get('in_progress','finished')
    33 if in_progress == 'finished':
     32in_progress =  request.get('in_progress','not started')
     33
     34if context.hasObject(current_level):
     35    response.redirect("%s/%s" % (context.absolute_url(),current_level))
     36    return
     37
     38if in_progress in ('not started','started'):
    3439    session.set('in_progress','started')
    35     view = context.in_progress_view(refresh=3,page='%s/study_level_view' % current_level)
     40    view = context.in_progress_view(refresh=3,page='create_level?in_progress=started')
    3641    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
    3742    response.setHeader('Content-length','%d' % (len(view)))
     
    3944    response.write(view)
    4045    response.write('')
    41 elif in_progress == 'started':
    42     return
     46    if in_progress == 'started':
     47        return
     48   
    4349
    44 if context.hasObject(current_level):
    45     return
    46     level = getattr(context,current_level)
    47     return response.redirect("%s" % level.absolute_url())
    48    
    4950context.invokeFactory('StudentStudyLevel',"%s" % current_level)
    5051level = getattr(context,"%s" % current_level)
     
    6364        c_res = aq_courses(query)
    6465        if not c_res:
    65             logger.info('"%s","%s course not found in courses catalog"' % (student.id,co.CosCode))
     66            logger.info('%s", course %s not found in courses_catalog' % (student.id,co.CosCode))
    6667            continue
    6768        course_cat_entry = c_res[0]
     
    7374                score = int(co.Score)
    7475            except:
    75                 logger.info('"%s"," course %s invalid score %s"' % (student.id,
     76                logger.info('%s, course %s has invalid score %s"' % (student.id,
    7677                                                                    co.CosCode,
    7778                                                                    co.Score))
    7879                continue
    79             if int(c_res[0].passmark) <= score: 
     80            if int(c_res[0].passmark) <= score:
    8081                continue
    8182            carry_over = True
     
    105106        d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
    106107        course_result.getContent().edit(mapping=d)
    107 session.set('in_progress','finished')
    108108return
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getAccommodationInfo.py

    r1474 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('Student.Accommodation.Info')
     15logger = logging.getLogger('Skins.getAccommodationInfo')
    1616import DateTime
    1717
     
    2929    requested_id = context.getStudentId()
    3030    if requested_id and not context.isStaff() and member_id != requested_id:
    31         logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
     31        logger.info('%s tried to access %s' % (member_id,requested_id))
    3232        return None
    3333    elif context.isStaff():
     
    3737res = context.students_catalog(id=student_id)
    3838if len(res) != 1:
    39     logger.info('"%s","not found in students_catalog"')
     39    logger.info('%s not found in students_catalog' % student_id)
    4040    return None
    4141
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getApplicationInfo.py

    r1435 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('Student.Application.Info')
     15logger = logging.getLogger('Skins.getApplicationInfo')
    1616
    1717request = context.REQUEST
     
    2828requested_id = context.getStudentId()
    2929if requested_id and not context.isStaff() and member_id != requested_id:
    30     logger.info('"%s", "accessed application object of", "%s"' % (member_id,requested_id))
     30    logger.info('%s tried to access application object of %s' % (member_id,requested_id))
    3131    student_id = requested_id
     32    return None
    3233elif context.isStaff():
    3334    student_id = requested_id
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getClearanceInfo.py

    r1162 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('Student.Clearance.Info')
     15logger = logging.getLogger('Skins.getClearanceInfo')
    1616from DateTime import DateTime
    1717
     
    3030requested_id = context.getStudentId()
    3131if requested_id and not context.isStaff() and member_id != requested_id:
    32     logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
     32    logger.info('%s tried to access %s' % (member_id,requested_id))
    3333    return None
    3434elif context.isStaff():
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getMemberInfo.py

    r1541 r1596  
    2828requested_id = context.getStudentId()
    2929if requested_id and not context.isStaff() and member_id != requested_id:
    30     logger.info('"%s", "accessed personal object of", "%s"' % (member_id,requested_id))
     30    logger.info('%s tried to access personal object of %s' % (member_id,requested_id))
    3131    student_id = requested_id
     32    return None
    3233elif context.isStaff():
    3334    student_id = requested_id
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getNewStudentStatistics.py

    r1530 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('Student.Statistics')
     15logger = logging.getLogger('Skins.getNewStudentStatistics')
    1616
    1717try:
     
    2121except:
    2222    evalAdvancedQuery = None
    23 logger.info('"%s","invoked new statistics"' % context.portal_membership.getAuthenticatedMember())
     23logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
    2424l = []
    2525if not context.isStaff():
     
    108108    if total:
    109109        dep['cleared_and_validated_percent'] = "%.0f" % round(cav*100/total)
    110        
     110
    111111    ora = len([s for s in fac_ids if s in or_ids])
    112112    dep['objection_raised'] = ora
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getPersonalInfo.py

    r1203 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('Student.Personal.Info')
     15logger = logging.getLogger('Skins.getPersonalInfo')
    1616
    1717request = context.REQUEST
     
    2828requested_id = context.getStudentId()
    2929if requested_id and not context.isStaff() and member_id != requested_id:
    30     logger.info('"%s", "accessed personal object of", "%s"' % (member_id,requested_id))
     30    logger.info('%s tried to access personal object of %s' % (member_id,requested_id))
    3131    student_id = requested_id
     32    return None
    3233elif context.isStaff():
    3334    student_id = requested_id
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getRegStatistics.py

    r1530 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('Student.Statistics')
     15logger = logging.getLogger('Skins.getRegStatistics')
    1616
    1717try:
     
    2121except:
    2222    evalAdvancedQuery = None
    23 logger.info('"%s","invoked reg statistics"' % context.portal_membership.getAuthenticatedMember())
     23logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
    2424l = []
    2525if not context.isStaff():
     
    8181    if total:
    8282        dep['courses_registered_percent'] = "%.0f" % round(creg*100/total)
    83        
     83
    8484    cval = len([s for s in fac_ids if s in cval_ids])
    8585    dep['courses_validated'] = cval
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getRetStudentStatistics.py

    r1558 r1596  
    2121except:
    2222    evalAdvancedQuery = None
    23 logger.info('%s invoked returning statistics' % context.portal_membership.getAuthenticatedMember())
     23logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember())
    2424l = []
    2525if not context.isStaff():
     
    5959    sum_ret += ret
    6060    sum_sfp += sfp
    61        
     61
    6262    l.append(dep)
    6363
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getSchoolFeePrefix.py

    r1364 r1596  
    1 ## Script (Python) "getMaintenancePrefix"
     1## Script (Python) "getSchoolFeePrefix"
    22##bind container=container
    33##bind context=context
     
    1616    return None
    1717
    18 import logging   
    19 logger = logging.getLogger('EPayment.getSchoolFeePrefix')   
     18import logging
     19logger = logging.getLogger('Skins.getSchoolFeePrefix')
    2020
    2121student_id = context.getStudentId()
     
    2424                                     id = sbrain.course)
    2525if not res:
    26     logger.info('"%s","certificate not found", "%s"' % (student_id,course))
     26    logger.info('%s, certificate %s not found' % (student_id,course))
    2727    prefix = "--"
    2828else:
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getSessionResults.py

    r1543 r1596  
    2727if requested_id and not context.isStaff() and member_id != requested_id:
    2828    import logging
    29     logger = logging.getLogger('Student.SessionResults.Info')
    30     logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
     29    logger = logging.getLogger('Skins.getSessionResults')
     30    logger.info('%s tried to access %s' % (member_id,requested_id))
    3131    return None
    3232elif context.isStaff():
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getStudentBaseInfo.py

    r1369 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('Student.Base.Info')
     15logger = logging.getLogger('Skins.getStudentBaseInfo')
    1616from DateTime import DateTime
    1717
     
    2929requested_id = context.getStudentId()
    3030if requested_id and not context.isStaff() and member_id != requested_id:
    31     logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
     31    logger.info('%s tried to access %s' % (member_id,requested_id))
    3232    return None
    3333elif context.isStaff():
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getStudentFolderInfo.py

    r1472 r1596  
    1 ## Script (Python) "getStudentInfo"
     1## Script (Python) "getStudentFolderInfo"
    22##bind container=container
    33##bind context=context
     
    2121
    2222import logging
    23 logger = logging.getLogger('Student.Info')
     23logger = logging.getLogger('Skins.getStudentFolderInfo')
    2424
    2525
     
    3838        break
    3939    if member_id != requested_id:
    40         logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
     40        logger.info('%s tried to access %s' % (member_id,requested_id))
    4141        student_id = member_id
    4242        mtool.assertViewable(context)
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getStudentInfo.py

    r1286 r1596  
    2121
    2222import logging
    23 logger = logging.getLogger('Student.Info')
     23logger = logging.getLogger('Skins.getStudentInfo')
    2424
    2525
     
    4242            break
    4343        if member_id != requested_id:
    44             logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
     44            logger.info('%s tried to access %s' % (member_id,requested_id))
    4545            student_id = member_id
    4646            mtool.assertViewable(context)
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getStudyCourseInfo.py

    r1537 r1596  
    5252levels = context.objectIds()
    5353review_state = wftool.getInfoFor(context,'review_state',None)
    54 if review_state != 'content_addable':
     54student_review_state = context.getStudentReviewState()
     55if review_state != 'content_addable' and student_review_state == 'school_fee_paid': #and context.isStudent():
    5556    wftool.doActionFor(context,'close_for_edit')
    56 student_review_state = context.getStudentReviewState()
    5757may_register = (student_review_state in ('school_fee_paid',)) and\
    5858               current_level not in levels and\
    5959               (sbrain.verdict in ('A','B') or sbrain.jamb_reg_no.startswith('6'))
    60                
     60
    6161levels.sort()
    6262info['create_level'] = None
     
    7272info['items'] = items
    7373
    74 try: 
     74try:
    7575    info['verdict'] = context.portal_vocabularies.verdicts.get(info['doc'].current_verdict).upper()
    7676except:
    77     info['verdict'] = course.current_verdict 
     77    info['verdict'] = course.current_verdict
    7878
    7979return info
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getStudyLevelInfo.py

    r1515 r1596  
    6161info['review_state'] = review_state = context.getStudentReviewState()
    6262info['view_only'] =  review_state != "school_fee_paid"
    63 info['show_check_boxes'] =  (is_ca and review_state in ('courses_registered',)) or\
     63info['show_check_boxes'] =  (is_ca and review_state in ('school_fee_paid',)) or\
    6464                            (is_student and context.getStudentReviewState() == "school_fee_paid") or\
    6565                            (is_so)
     
    108108normal.sort(cmp_semester)
    109109info['normal'] = normal
     110
     111students_object = context.portal_url.getPortalObject().campus.students
     112student = getattr(students_object, student_id)
     113info['app'] = student.application
     114info['app_doc'] = student.application.getContent()
     115
    110116return info
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getTransferInfo.py

    r1368 r1596  
    1 ## Script (Python) "getClearanceInfo"
     1## Script (Python) "getTransferInfo"
    22##bind container=container
    33##bind context=context
     
    1313"""
    1414import logging
    15 logger = logging.getLogger('Student.Transfer.Info')
     15logger = logging.getLogger('Skins.getTransferInfo')
    1616from DateTime import DateTime
    1717
     
    2929requested_id = context.getStudentId()
    3030if requested_id and not context.isStaff() and member_id != requested_id:
    31     logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
     31    logger.info('%s tried to access %s' % (member_id,requested_id))
    3232    return None
    3333elif context.isStaff():
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/layout_application_view_info.pt

    r1435 r1596  
    55              dm options/datastructure/getDataModel;
    66              widgets python:context.getRenderedWidgets(layout);
    7               fields python:('jamb_reg_no','app_email','app_mobile')"
     7              info context/getStudentBaseInfo;"
    88              >
    99 
     
    2020          </td>
    2121          <td>
    22             <span tal:content="python:context.getStudentBaseInfo()['student']['name']" />
     22            <span tal:content="info/student/name" />
    2323          </td>     
    2424        </tr>
     
    2727          </td>
    2828          <td>
    29             <span tal:content="python:context.getStudentBaseInfo()['student']['sex']" />
     29            <span tal:content="info/student/sex" />
    3030          </td>     
    3131        </tr>         
     
    3434          </td>
    3535          <td>
    36             <span tal:content="python:context.getStudentBaseInfo()['id']" />
     36            <span tal:content="info/id" />
    3737          </td>     
    3838        </tr>
    39 
    40         <tr tal:repeat="field fields">
    41           <tal:block tal:define="cell python: widgets[field]">
    42             <tal:block define="widget cell/widget">
    43               <div tal:attributes="class cell/widget_css_class|string:label;
    44               id python:widget.getHtmlWidgetId()+'_widget';"
    45               >
    46                 <td >
    47                   <span class="dlabel"
    48                         tal:condition="widget/label"
    49                         tal:content="widget/label">label</span>:
    50                 </td>
    51                 <td>
    52                   <span tal:replace="structure cell/widget_rendered" />
    53                 </td>
    54               </div>
    55             </tal:block>
    56           </tal:block>
    57         </tr>
     39        <tr valign="top">
     40          <td><span class="dlabel">Matriculation No</span>:
     41          </td>
     42          <td>
     43            <span tal:content="info/student/matric_no" />
     44          </td>     
     45        </tr>       
     46        <tr valign="top">
     47          <td><span class="dlabel">JAMB Registration No</span>:
     48          </td>
     49          <td>
     50            <span tal:content="info/student/jamb_reg_no" />
     51          </td>     
     52        </tr>   
     53        <tr valign="top">
     54          <td><span class="dlabel">Email</span>:
     55          </td>
     56          <td>
     57            <span tal:content="info/student/email" />
     58          </td>     
     59        </tr>         
     60        <tr valign="top">
     61          <td><span class="dlabel">Phone</span>:
     62          </td>
     63          <td>
     64            <span tal:content="info/student/phone" />
     65          </td>     
     66        </tr>         
     67        <tr valign="top">
     68          <td><span class="dlabel">Level</span>:
     69          </td>
     70          <td>
     71            <span tal:content="info/student/level" />
     72          </td>     
     73        </tr>           
    5874      </table>
    5975       
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/mail2student.py

    r909 r1596  
    3737     co_name,
    3838     co_email,
    39      student_email, 
     39     student_email,
    4040     co_email,
    4141     'henrik@waeup.org',
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/personal_edit.py

    r1457 r1596  
    1616current = DateTime.DateTime()
    1717import logging
    18 logger = logging.getLogger('Student.Personal.Edit')
     18logger = logging.getLogger('Skins.personal_edit')
    1919
    2020info = context.getPersonalInfo()
    2121
    2222if info is None:
    23     logger.info('"anonymous access","%s"' % REQUEST.get('URL0'))
     23    logger.info('Anonymous user tried to access %s' % REQUEST.get('URL0'))
    2424    return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    2525
     
    5353                                              sex = ds.get('sex'),
    5454                                             )
    55         logger.info('"%s", "edited personal data"' % (info['id']))
     55        logger.info('%s edited personal data' % (info['id']))
    5656        #action = ""
    5757        #base_url = student.absolute_url()
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/raise_objection.py

    r1161 r1596  
    1414import DateTime
    1515import logging
    16 logger = logging.getLogger('Student.Objection')
     16logger = logging.getLogger('Skins.raise_objection')
    1717
    1818wf = context.portal_workflow
    1919info = context.getApplicationInfo()
    2020if not info:
    21     logger.info('"%s", "tried to access", "%s"' % (context.portal_membership.getAuthenticatedMember(),context.getStudentId()))
     21    logger.info('%s tried to access %s' % (context.portal_membership.getAuthenticatedMember(),context.getStudentId()))
    2222    return context.admission_form()
    2323current = DateTime.DateTime()
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/refresh_level.py

    r1510 r1596  
    1616aq_courses = context.courses_catalog.evalAdvancedQuery
    1717
     18import logging
     19logger = logging.getLogger('Skins.refresh_level')
     20
    1821current = DateTime.DateTime()
    1922request = context.REQUEST
     
    2124response = request.RESPONSE
    2225redirect = response.redirect
    23 logger = logging.getLogger('Student.create_level')
     26logger = logging.getLogger('Skins.refresh_level')
    2427mtool = context.portal_membership
    2528member = mtool.getAuthenticatedMember()
     
    5154        c_res = aq_courses(query)
    5255        if not c_res:
    53             logger.info('"%s","%s course not found in courses catalog"' % (student.id,co.CosCode))
     56            logger.info('%s, course %s not found in courses_catalog' % (student.id,co.CosCode))
    5457            continue
    5558        course_cat_entry = c_res[0]
     
    6063                score = int(co.Score)
    6164            except:
    62                 logger.info('"%s"," course %s invalid score %s"' % (student.id,
     65                logger.info('%s, course %s has invalid score %s' % (student.id,
    6366                                                                    co.CosCode,
    6467                                                                    co.Score))
    6568                continue
    66             if int(c_res[0].passmark) <= score: 
     69            if int(c_res[0].passmark) <= score:
    6770                continue
    6871            carry_over = True
     
    9699            course_result.getContent().edit(mapping=d)
    97100session.set('in_progress','finished')
     101logger.info('%s updated course list' % member)
    98102return
    99103return response.redirect("%s" % level.absolute_url())
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/register_courses.py

    r1513 r1596  
    1 ## Script (Python) "getStudyCourseInfo"
     1## Script (Python) "register_courses"
    22##bind container=container
    33##bind context=context
     
    1212close the Students StudyLevel
    1313"""
     14from Products.CMFCore.WorkflowCore import WorkflowException
    1415try:
    1516    from Products.zdb import set_trace
     
    2324member_id = str(member)
    2425import logging
    25 logger = logging.getLogger('Student.register_courses')
     26logger = logging.getLogger('Skins.register_courses')
    2627
    2728wftool = context.portal_workflow
    28 wftool.doActionFor(context,'close')
    2929students_folder = context.portal_url.getPortalObject().campus.students
    30 student = getattr(students_folder,context.getStudentId())
    31 wftool.doActionFor(student,'register_courses')
    32 logger.info('"%s","courses registered"' % student.getId())
     30student_id = context.getStudentId()
     31student = getattr(students_folder,student_id)
     32try:
     33    wftool.doActionFor(context,'close')
     34except WorkflowException,E:
     35    logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id))
     36    return request.RESPONSE.redirect("%s" % context.absolute_url())
     37try:
     38    wftool.doActionFor(student,'register_courses')
     39except WorkflowException,E:
     40    logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id))
     41    return request.RESPONSE.redirect("%s" % context.absolute_url())
     42logger.info('%s registered course list for %s' % (member_id,student_id))
    3343return request.RESPONSE.redirect("%s" % context.absolute_url())
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/reject_courses.py

    r1515 r1596  
    1 ## Script (Python) "getStudyCourseInfo"
     1## Script (Python) "reject_courses"
    22##bind container=container
    33##bind context=context
     
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=student=None
     7##parameters=REQUEST, student=None, action_after_reject=None, action_after_validate=None
    88##title=
    99##
     
    1717    def set_trace():
    1818        pass
    19 
     19from urllib import urlencode
    2020request = context.REQUEST
    2121mtool = context.portal_membership
     
    2323member_id = str(member)
    2424import logging
    25 logger = logging.getLogger('Student.reject_courses')
     25logger = logging.getLogger('Skins.reject_courses')
    2626
    2727wftool = context.portal_workflow
     
    3131student = getattr(students_folder,context.getStudentId())
    3232wftool.doActionFor(student,'reject_courses')
    33 logger.info('"%s","rejects course list for","%s"' % (member,student.getId()))
    34 return request.RESPONSE.redirect("%s" % context.absolute_url())
     33logger.info('%s rejected course list of %s' % (member,student.getId()))
     34
     35args = {}
     36
     37psm = "Student's course list has been rejected! Please fill and submit the form below!"
     38subject = "Course list rejected"
     39args['subject'] = subject
     40args['continue'] = action_after_validate
     41args['portal_status_message'] = psm
     42url = context.absolute_url() + '/' + action_after_reject + '?' + urlencode(args)
     43return REQUEST.RESPONSE.redirect(url)
     44
     45#return request.RESPONSE.redirect("%s" % context.absolute_url())
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/request_transfer.py

    r1378 r1596  
    1414import logging
    1515from urllib import urlencode
    16 logger = logging.getLogger('Student.Transfer.Request')
     16logger = logging.getLogger('Skins_request_transfer')
    1717import DateTime
    1818lt = context.portal_layouts
     
    2828requested_id = context.getStudentId()
    2929if requested_id and not context.isStaff() and member_id != requested_id:
    30     logger.info('"%s", "accessed application object of", "%s"' % (member_id,requested_id))
     30    logger.info('%s tried to access object of %s' % (member_id,requested_id))
    3131    student_id = requested_id
     32    return None
    3233elif context.isStaff():
    3334    student_id = requested_id
     
    5051
    5152if paid:
    52     logger.info('"%s", "opened (paid) request transfer form of", "%s"' % (member_id,student_id))
     53    logger.info('%s opened (paid) request transfer form of %s' % (member_id,student_id))
    5354    return context.request_transfer_form(rendered = None,
    5455                                 psm = None,
     
    9192    payments = getattr(student,'payments')
    9293#from Products.zdb import set_trace; set_trace()
     94
     95logger.info('%s paid transfer form for %s' % (member_id,student_id))
    9396info = {}
    9497order_id = ds.get('pin_n')
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/search_students.py

    r1558 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('Search.Timer')
     15logger = logging.getLogger('Skins.search_students')
    1616from DateTime import DateTime
    1717#
     
    8282                 In('localUsersWithRoles', ("user:%s" % member,))
    8383        res = evalAdvancedQuery(query)
     84        logger.info('ClearanceOfficer %s initiated student_search' % member)
    8485        faculties = []
    8586        if res:
     
    107108                 In('localUsersWithRoles', ("user:%s" % member,))
    108109        res = evalAdvancedQuery(query)
     110        logger.info('CourseAdviser %s initiated student_search' % member)
    109111        certificate_level = []
    110112        if res:
     
    168170        students_folder = context.portal_url.getPortalObject().campus.students
    169171        if hasattr(students_folder,term.strip()):
     172            logger.info('%s searches for student with id %s' % (member,term))
    170173            request.RESPONSE.redirect("%s/%s" % (students_folder.absolute_url(),term))
    171174        return context.search_students_form(rendered = rend,
     
    176179    elif what == "department":
    177180        res = context.students_catalog(department=term.strip())
     181        logger.info('%s searches for student in department %s' % (member,term))
    178182        search_set = [r.id for r in res]
    179183    elif what == "matric_no":
    180184        res = context.students_catalog(matric_no=term.strip())
     185        logger.info('%s searches for student with matric_no %s' % (member,term))
    181186        search_set = [r.id for r in res]
    182187    elif what == "jamb_reg_no":
     
    184189        st_u = "%s" % term.strip().upper()
    185190        res = aq_students(In('jamb_reg_no',(st_l,st_u)))
     191        logger.info('%s searches for student with jamb_reg_no %s' % (member,term))
    186192        search_set = [r.id for r in res]
    187193    elif what == "name":
    188194        pt = ('StudentPersonal')
    189195        query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip())
     196        logger.info('%s searches for student with name %s' % (member,term))
    190197        res = evalAdvancedQuery(query)
    191198        if res:
     
    201208    query = Eq('review_state',state)
    202209    review_res = evalAdvancedQuery(query)
     210
     211    logger.info('%s searches for students in review_state %s' % (member,state))
     212
    203213    if with_timer:
    204214        end = DateTime().timeTime()
     
    288298                             allowed = allowed,
    289299                             co_view = co_view,
     300                             ca_view = ca_view
    290301                             )
    291302return context.search_students_form(rendered = rend,
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/search_students_form.pt

    r1558 r1596  
    11<metal:body use-macro="here/main_template/macros/master">
    2     <metal:block fill-slot="header"
    3                  tal:define="creation creation|nothing;
    4                  edition edition|nothing;
    5                  metadata metadata|nothing"
    6                  >
    7     </metal:block>
    8    
    92    <metal:main fill-slot="main"
    103            tal:define="rendered options/rendered;
     
    125            students options/students;
    136            info options/info|nothing;
    14             is_so context/isSectionOfficer;           
     7            is_so context/isSectionOfficer;
    158            allowed options/allowed|nothing"
    169            >
     
    3023      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
    3124      <span tal:condition="is_so">
     25         <nobr><a href="view_logs">View Log Files</a>
     26         &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
    3227         <nobr><a href="add_student">Add Student Record</a>       
    3328         &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
     
    3530      </span>
    3631      </strong>
     32   
     33             
    3734        <h3> Search Student Section</h3><br />
    3835          You are logged in as member <span tal:replace="info/member|nothing" />
     
    4340          <span tal:condition="info/departments|nothing" tal:omit-tag="">
    4441            and <span tal:repeat="department info/departments|nothing" tal:content="department"/></span>.
    45           <span tal:condition="info/certificate_level|nothing" tal:omit-tag="">
    46             who is CourseAdviser for
    47             <span tal:repeat="cl info/certificate_level" tal:content="cl" />
    48           </span>
    4942          <br /><br />
    5043        <span tal:replace="structure rendered" />
     
    9689                         onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')"
    9790                         >[view and change state]</a></td>
    98                     <td tal:condition="options/co_view|nothing"><span tal:replace="student/review_state|nothing" /></td>   
     91                    <td tal:condition="options/ca_view|nothing">
     92                      <a href="id"
     93                         tal:attributes="href string:${context/portal_url}/campus/students/${student/id}/study_course/study_course/${student/level}/external_study_level_view"
     94                         target="edit"
     95                         onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')"
     96                         >[view and validate course list]</a></td>
    9997                  </tr>
    10098                </span>
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/set_access_data.py

    r1267 r1596  
    88current = DateTime.DateTime()
    99pr = context.portal_registration
    10 logger = logging.getLogger('Student.SetAccessData')
     10logger = logging.getLogger('Skins.set_access_data')
    1111validate = REQUEST.has_key("cpsdocument_edit_button")
    1212
    1313if matric_no is None:
    14     logger.info('"No matric_no in request"')
     14    logger.info('No matric_no in request')
    1515    return REQUEST.RESPONSE.redirect("%s" % context.portal_url())
    1616lt = context.portal_layouts
     
    2121    sid = st_res[0].id
    2222else:
    23     logger.info('"%s","Studentobject does not exist"' % matric_no)
     23    logger.info('Student object with matric_no does not exist' % matric_no)
    2424res,psm,ds = lt.renderLayout(layout_id= 'student_session_results_search',
    2525                      schema_id= 'student_returning',
     
    5353        #psm = "You are already registered please log in with your UserId %s" % sid
    5454        psm = ""
    55         logger.info('"%s","repeatedly tried to set password"' % sid)
     55        logger.info('%s repeatedly tried to set password' % sid)
    5656    except:
    5757        psm = "The system encountered an error. Please try again."
    58         logger.info('"%s","set_access error","%s"' % (sid,password))
     58        logger.info('%s, makeStudentMember error, password = %s' % (sid,password))
    5959if psm != '':
    6060    return context.set_access_data_form(rendered = res,
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/start_clearance.py

    r1364 r1596  
    88pr = context.portal_registration
    99import logging
    10 logger = logging.getLogger('Student.Clearance.Start')
     10logger = logging.getLogger('Skins.start_clearance')
    1111
    1212#type_name = 'Student'
     
    2323if info is None:
    2424    member_id = str(context.portal_membership.getAuthenticatedMember())
    25     logger.info('"%s","tried to start clearance for", "%s"' % (member_id,request.get('PATH_INFO').split('/')[-2]))
     25    logger.info('%s tried to start clearance for %s' % (member_id,request.get('PATH_INFO').split('/')[-2]))
    2626    return redirect("%s/srp_invalid_access" % context.portal_url())
    2727app_doc = info['app_doc']
     
    5555    psm = "You have already entered a clearance pin!"
    5656    error = True
    57     logger.info('"%s", "tried to start clearance though already started"' % (info['id']))
     57    logger.info('%s tried to start clearance though already started' % (info['id']))
    5858elif psm == 'invalid':
    5959    psm = "Please correct your input!"
    6060    error = True
    61     logger.info('"%s","entered wrong clearance pin"' % (info['id']))
     61    logger.info('%s entered wrong clearance pin' % (info['id']))
    6262elif app_doc.passport is None:
    6363    #psm = "You must upload your passport picture before you can start the registration process!"
    6464    #error = True
    65     logger.info('"%s", "started clearance without passport picture"' % (info['id']))
     65    logger.info('%s started clearance without passport picture' % (info['id']))
    6666if error:
    6767    return context.clearance_pin_form(rendered = res,
     
    7474session.set("clicked","clicked")
    7575pin = str(ds.get('clr_ac_pin'))
    76 logger.info('"%s", "started clearance with pin", "%s"' % (info['id'],pin))
     76logger.info('%s started clearance with pin %s' % (info['id'],pin))
    7777wf.doActionFor(info['student'],'enter_clearance_pin')
    7878wf.doActionFor(info['clear'],'open')
     
    8989
    9090if info['penalty']:
    91     logger.info('"%s","started late clearance"' % (info['id']))
     91    logger.info('%s started late clearance' % (info['id']))
    9292
    9393return redirect("%s/clearance_edit_form" % info['clear'].absolute_url())
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/statistics_ret_view.pt

    r1558 r1596  
    5959        <br />
    6060        <table>
    61         <tr><td>RET:</td> <td>Returning students who only logged in</td></tr>
    62         <tr><td>SFP:</td> <td>Returning students who paid their school fee</td></tr>
     61        <tr><td>RET:</td> <td>Returning students who have logged in</td></tr>
     62        <tr><td>SFP:</td> <td>Returning students who already paid their school fee</td></tr>
    6363        </table>       
    6464      </span>
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/students_index.py

    r1558 r1596  
    2525if "ClearanceOfficers" in member.getGroups() or\
    2626   "CourseAdvisers" in member.getGroups():
    27     return redirect("%s/search_students" % context.portal_url())
     27    return redirect("%s/campus/students/search_students" % context.portal_url())
    2828if context.isSectionOfficer():
    29     return redirect("%s/search_students" % context.portal_url())
     29    return redirect("%s/campus/students/search_students" % context.portal_url())
    3030if context.isStudent():
    3131    id = str(member)
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/study_level_view.pt

    r1558 r1596  
    66                 global is_ca info/is_ca;
    77                 global show_check_boxes info/show_check_boxes;
    8                  global is_student info/is_student;
    9                  global status_info info/status_info;
    10                  global review_state info/review_state;
    11                  global view_only info/view_only">
     8                             global is_student info/is_student;
     9                             global status_info info/status_info;
     10                             global review_state info/review_state;
     11                             global view_only info/view_only">
    1212      <a href=""
    1313         tal:attributes="href string:${here/academicsParent}">
     
    101101            <td align="left" valign="top" rowspan="3"></td>
    102102            <td align="left" valign="top">
    103                 <input type="submit" name="course_result_delete:method" value="Delete selected"
     103                <input type="submit" name="delete_course_result:method" value="Delete selected"
    104104                       class="destructive" i18n:attributes="value"
    105105                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
     
    127127                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    128128                       />
    129                 <input type="submit" name="course_result_delete:method" value="Delete selected"
     129                <input type="submit" name="delete_course_result:method" value="Delete selected"
    130130                       class="destructive" i18n:attributes="value"
    131131                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    132                        ('really delete checked courses', )"
     132                       ('Do you really want to delete the courses selected?', )"
    133133                       />
    134134                <input
     
    159159                       />
    160160                <input tal:condition="python: review_state == 'school_fee_paid'"
    161                        type="submit" name="course_result_delete:method" value="Delete selected"
     161                       type="submit" name="delete_course_result:method" value="Delete selected"
    162162                       class="destructive" i18n:attributes="value"
    163163                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
     
    174174                <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
    175175                       class="context" value="Reject" />
     176                       
     177                <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
     178                       tal:attributes="value string:/study_level_view"/>                         
     179                <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
     180                       tal:attributes="value string:/contact_student_form"/>   
     181                                             
    176182
    177183            </td>
     
    188194            <td><input type="text" name="course_id"
    189195                       tal:attributes="value request/course_id|nothing"/></td>
    190             <td tal:condition="request/error|nothing"
    191                 tal:content="request/error" />
    192196            <td colspan="2">
    193197              <input type="submit" name="add"
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/validate_courses.py

    r1513 r1596  
    1 ## Script (Python) "getStudyCourseInfo"
     1## Script (Python) "validate_courses"
    22##bind container=container
    33##bind context=context
     
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=student=None
     7##parameters=student=None, action_after_reject=None, action_after_validate=None
    88##title=
    99##
     
    2323member_id = str(member)
    2424import logging
    25 logger = logging.getLogger('Student.validate_courses')
     25logger = logging.getLogger('Skins.validate_courses')
    2626
    2727wftool = context.portal_workflow
     
    2929student = getattr(students_folder,context.getStudentId())
    3030wftool.doActionFor(student,'validate_courses')
    31 logger.info('"%s","validated courses for","%s"' % (member,student.getId()))
    32 return request.RESPONSE.redirect("%s" % context.absolute_url())
     31logger.info('%s validated course list of %s' % (member,student.getId()))
     32
     33psm = 'portal_status_message=Course list validated!'
     34url = context.absolute_url() + '/' + action_after_validate +  '?' + psm
     35return request.RESPONSE.redirect(url)
     36
     37
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_utilities/createReturningStudent.py

    r1413 r1596  
    1717students_folder = context.portal_url.getPortalObject().campus.students
    1818import logging
    19 logger = logging.getLogger('createReturningStudent')
     19logger = logging.getLogger('Skins.createReturningStudent')
    2020
    2121if not matric_no:
     
    3030    student_brain = res[0]
    3131    sid,jamb_reg_no = context.waeup_tool.createOne(students_folder,student_brain,'?')
    32     logger.info('"%s","Created Student","%s", "%s" ' % (member,sid,matric_no))
     32    logger.info('%s creates student %s %s' % (member,sid,matric_no))
    3333    return "Student MatricNo %s, StudentId %s (JAMBRegNo %s) created" % (matric_no,sid,jamb_reg_no)
    3434
     
    3636count = 1
    3737total = 0
    38 logger.info('"%s","Create Students start"' % (member))
     38logger.info('%s started createReturningStudent"' % (member))
    3939letters = ('ABCDEFGHKLMNPQRSTUVWXYZ')
    4040lc = 0
     
    4242    res = context.students_catalog(matric_no = matric_no)
    4343    if len(res) == 1:
    44         #logger.info('"Student already exists","%s"' % (matric_no))
    4544        continue
    4645    elif len(res) > 1:
    47         logger.info('"Student with multiple entries","%s","%s" ' % (matric_no,len(res)))
     46        logger.info('Student %s with multiple entries (%s)' % (matric_no,len(res)))
     47        # fix at the beginning
    4848        ids = [r.id for r in res if not r.id.startswith('A')]
    49         #from Products.zdb import set_trace;set_trace()
    5049        for id in ids:
    5150            context.students_catalog.deleteRecord(id)
    5251        students_folder.manage_delObjects(ids)
    53         logger.info('"deleted students","%s" ' % " ".join(ids))
     52        logger.info('Student objects deleted: %s' % " ".join(ids))
    5453        continue
    5554    student = context.returning_import(matric_no=matric_no)[0]
     
    5958        lc = 0
    6059    context.waeup_tool.createOne(students_folder,student,letter)
    61     logger.info('"Student created","%s"' % (matric_no))
     60    logger.info('Student created: %s' % (matric_no))
    6261    count += 1
    6362    if count > 10:
    64         logger.info('"%s","Committed Students","%s", "%s" ' % (member,count,total))
     63        logger.info('%s committed students %s, %s' % (member,count,total))
    6564        total += count
    6665        count = 1
    67 logger.info('"%s","Create Students finish","%s"' % (member,total))
     66logger.info('createReturningStudent finished (%s)' % (total))
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_utilities/deleteStudentByMatricNo.py

    r1400 r1596  
    1 ## Script (Python) "search_pins"
     1## Script (Python) "deleteStudentByMatricNo"
    22##bind container=container
    33##bind context=context
     
    1212"""
    1313import logging
    14 logger = logging.getLogger('DeleteStudentByMatricNo')
     14logger = logging.getLogger('Skins.deleteStudentByMatricNo')
    1515
    1616request = REQUEST
     
    2626if str(member) not in ('admin','joachim') or matric_no is None:
    2727    return
    28    
    29    
    30 # remove from students_catalog   
     28
     29
     30# remove from students_catalog
    3131
    3232res = st_cat(matric_no=matric_no)
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_utilities/fixLevelForNewStudents.py

    r1491 r1596  
    1 ## Script (Python) "search_pins"
     1## Script (Python) "fixLevelForNewStudents"
    22##bind container=container
    33##bind context=context
     
    2323setheader = request.RESPONSE.setHeader
    2424import logging
    25 logger = logging.getLogger('fixLevelForNewStudents')
     25logger = logging.getLogger('Skins.fixLevelForNewStudents')
    2626
    2727def rwrite(s):
     
    5353count_full = 0
    5454commit_count = 0
    55 logger.info("started for %s students" % len(res))
     55logger.info("Started for %s students" % len(res))
    5656to_change = {}
    5757for sbrain in res:
     
    9292    if commit_count > 1000:
    9393        context.waeup_tool.doCommit()
    94         logger.info("committing %s transactions total %s" % (commit_count,count))
     94        logger.info("Committing %s transactions, total %s" % (commit_count,count))
    9595        commit_count = 0
    9696    rwrite("%s: %s %s %s <br />" % (count,sbrain.id,entry_mode,level))
     
    9898    students_cat.modifyRecord(**to_change[entry])
    9999rwrite("finished")
    100 logger.info("finished  %s students" % count)
     100logger.info("Finished  %s students" % count)
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_utilities/reindexCoursesCatalog.py

    r1499 r1596  
    1 ## Script (Python) "search_pins"
     1## Script (Python) "reindexCourseCatalog"
    22##bind container=container
    33##bind context=context
     
    2323setheader = request.RESPONSE.setHeader
    2424import logging
    25 logger = logging.getLogger('reindexCourseCatalog')
     25logger = logging.getLogger('Skins.reindexCourseCatalog')
    2626
    2727def rwrite(s):
     
    5151count_full = 0
    5252commit_count = 0
    53 logger.info("reindexing of courses_catalog started for %s courses" % len(courses))
     53logger.info("Reindexing of courses_catalog started for %s courses" % len(courses))
    5454for course_brain in courses:
    5555    course_doc = course_brain.getObject().getContent()
     
    7272    if commit_count > 1000:
    7373        context.waeup_tool.doCommit()
    74         logger.info("committing %s transactions total %s" % (commit_count,count))
     74        logger.info("Committing %s transactions, total %s" % (commit_count,count))
    7575        rwrite("%s: committed %s <br />" % (count,commit_count))
    7676        commit_count = 0
    7777rwrite("finished")
    78 logger.info("finished  reindexing %s courses" % count)
     78logger.info("Reindexing finished (%s courses)" % count)
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_utilities/removeResults2.py

    r1508 r1596  
    1 ## Script (Python) "search_pins"
     1## Script (Python) "removeResults2"
    22##bind container=container
    33##bind context=context
     
    1313"""
    1414import logging
    15 logger = logging.getLogger('removeResults2')
     15logger = logging.getLogger('Skins.removeResults2')
    1616
    1717request = REQUEST
     
    4343        to_del.append(r.key)
    4444        rwrite(r.matric_no + " " + r.Level +"  " + r.CosCode + "<br />")
    45 logger.info('"%s", "start to delete %s results"' % (member,len(to_del)))
     45logger.info('%s starts to delete %s results' % (member,len(to_del)))
    4646for uid in to_del:
    4747    rcat.deleteRecord(uid)
    48 logger.info('"%s", "finished with deletion of %s results"' % (member,len(to_del)))
     48logger.info('%s finished deletion of %s results' % (member,len(to_del)))
    4949rwrite("Done")
    5050
  • WAeUP_SRP/branches/joachim-event-branch/skins/waeup_utilities/unpay.py

    r1352 r1596  
    1313"""
    1414import logging
    15 logger = logging.getLogger('EPayment.Unpay')
     15logger = logging.getLogger('Skins.unpay')
    1616import DateTime
     17
     18pm = context.portal_membership
     19member = pm.getAuthenticatedMember()
    1720
    1821request = context.REQUEST
     
    2730#wftool.doActionFor(student,'return')
    2831wftool.doActionFor(student,'clear_and_validate')
    29 logger.info('"%s", "reset to state returning"' % student_id)
     32logger.info('%s resets %s to state returning' % (member,student_id))
    3033
    3134return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
Note: See TracChangeset for help on using the changeset viewer.