Ignore:
Timestamp:
17 Mar 2007, 15:25:56 (18 years ago)
Author:
Henrik Bettermann
Message:

new logging format Part 4 (rest)

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
1 added
1 deleted
32 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py

    r1520 r1571  
    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/trunk/skins/waeup_student/add_student.py

    r1422 r1571  
    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/trunk/skins/waeup_student/application_edit.py

    r1343 r1571  
    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/trunk/skins/waeup_student/change_password.py

    r1527 r1571  
    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/trunk/skins/waeup_student/clearance_edit.py

    r1217 r1571  
    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')
  • WAeUP_SRP/trunk/skins/waeup_student/create_level.py

    r1552 r1571  
    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()
     
    4646    level = getattr(context,current_level)
    4747    return response.redirect("%s" % level.absolute_url())
    48    
     48
    4949context.invokeFactory('StudentStudyLevel',"%s" % current_level)
    5050level = getattr(context,"%s" % current_level)
     
    6363        c_res = aq_courses(query)
    6464        if not c_res:
    65             logger.info('"%s","%s course not found in courses catalog"' % (student.id,co.CosCode))
     65            logger.info('%s", course %s not found in courses_catalog' % (student.id,co.CosCode))
    6666            continue
    6767        course_cat_entry = c_res[0]
     
    7373                score = int(co.Score)
    7474            except:
    75                 logger.info('"%s"," course %s invalid score %s"' % (student.id,
     75                logger.info('%s, course %s has invalid score %s"' % (student.id,
    7676                                                                    co.CosCode,
    7777                                                                    co.Score))
    7878                continue
    79             if int(c_res[0].passmark) <= score: 
     79            if int(c_res[0].passmark) <= score:
    8080                continue
    8181            carry_over = True
  • WAeUP_SRP/trunk/skins/waeup_student/getAccommodationInfo.py

    r1474 r1571  
    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/trunk/skins/waeup_student/getApplicationInfo.py

    r1435 r1571  
    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/trunk/skins/waeup_student/getClearanceInfo.py

    r1162 r1571  
    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/trunk/skins/waeup_student/getMemberInfo.py

    r1541 r1571  
    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/trunk/skins/waeup_student/getNewStudentStatistics.py

    r1530 r1571  
    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/trunk/skins/waeup_student/getPersonalInfo.py

    r1203 r1571  
    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/trunk/skins/waeup_student/getRegStatistics.py

    r1530 r1571  
    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/trunk/skins/waeup_student/getRetStudentStatistics.py

    r1551 r1571  
    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/trunk/skins/waeup_student/getSchoolFeePrefix.py

    r1364 r1571  
    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/trunk/skins/waeup_student/getSessionResults.py

    r1543 r1571  
    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/trunk/skins/waeup_student/getStudentBaseInfo.py

    r1369 r1571  
    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/trunk/skins/waeup_student/getStudentFolderInfo.py

    r1472 r1571  
    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/trunk/skins/waeup_student/getStudentInfo.py

    r1286 r1571  
    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/trunk/skins/waeup_student/getStudyCourseInfo.py

    r1565 r1571  
    5353review_state = wftool.getInfoFor(context,'review_state',None)
    5454student_review_state = context.getStudentReviewState()
    55 if review_state != 'content_addable' and context.isStudent() and student_review_state = 'school_fee_paid':
     55if review_state != 'content_addable' and student_review_state == 'school_fee_paid': #and context.isStudent():
    5656    wftool.doActionFor(context,'close_for_edit')
    5757may_register = (student_review_state in ('school_fee_paid',)) and\
  • WAeUP_SRP/trunk/skins/waeup_student/getTransferInfo.py

    r1368 r1571  
    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/trunk/skins/waeup_student/personal_edit.py

    r1457 r1571  
    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/trunk/skins/waeup_student/raise_objection.py

    r1161 r1571  
    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/trunk/skins/waeup_student/refresh_level.py

    r1510 r1571  
    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/trunk/skins/waeup_student/register_courses.py

    r1513 r1571  
    1 ## Script (Python) "getStudyCourseInfo"
     1## Script (Python) "register_courses"
    22##bind container=container
    33##bind context=context
     
    2323member_id = str(member)
    2424import logging
    25 logger = logging.getLogger('Student.register_courses')
     25logger = logging.getLogger('Skins.register_courses')
    2626
    2727wftool = context.portal_workflow
     
    3030student = getattr(students_folder,context.getStudentId())
    3131wftool.doActionFor(student,'register_courses')
    32 logger.info('"%s","courses registered"' % student.getId())
     32logger.info('%s registered course list' % student.getId())
    3333return request.RESPONSE.redirect("%s" % context.absolute_url())
  • WAeUP_SRP/trunk/skins/waeup_student/reject_courses.py

    r1515 r1571  
    1 ## Script (Python) "getStudyCourseInfo"
     1## Script (Python) "reject_courses"
    22##bind container=container
    33##bind context=context
     
    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()))
     33logger.info('%s rejected course list of %s' % (member,student.getId()))
    3434return request.RESPONSE.redirect("%s" % context.absolute_url())
  • WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py

    r1378 r1571  
    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/trunk/skins/waeup_student/search_students.py

    r1557 r1571  
    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()
  • WAeUP_SRP/trunk/skins/waeup_student/set_access_data.py

    r1267 r1571  
    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
     
    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/trunk/skins/waeup_student/start_clearance.py

    r1364 r1571  
    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/trunk/skins/waeup_student/study_level_view.pt

    r1562 r1571  
    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\')' %
     
    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\')' %
     
    188188            <td><input type="text" name="course_id"
    189189                       tal:attributes="value request/course_id|nothing"/></td>
    190             <td tal:condition="request/error|nothing"
    191                 tal:content="request/error" />
    192190            <td colspan="2">
    193191              <input type="submit" name="add"
  • WAeUP_SRP/trunk/skins/waeup_student/validate_courses.py

    r1513 r1571  
    1 ## Script (Python) "getStudyCourseInfo"
     1## Script (Python) "validate_courses"
    22##bind container=container
    33##bind context=context
     
    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()))
     31logger.info('%s validated course list for %s' % (member,student.getId()))
    3232return request.RESPONSE.redirect("%s" % context.absolute_url())
Note: See TracChangeset for help on using the changeset viewer.