Changeset 2033 for WAeUP_SRP/trunk


Ignore:
Timestamp:
18 Jul 2007, 13:44:13 (17 years ago)
Author:
joachim
Message:

add course too registered_courses only for current_level

Location:
WAeUP_SRP/trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTables.py

    r1986 r2033  
    550550            if event_type not in ("sys_add_object","sys_del_object"):
    551551                return
     552            #import pdb;pdb.set_trace()
     553            level_session = getattr(object.aq_parent.getContent(),'session','unknown')
     554            if level_session not in (self.getSessionId()[-2:],'2006/2007'):
     555                return
    552556            course_id = object.getId()
    553557            if course_id.endswith('_co'):
     
    559563            student_rec = res[0]
    560564            registered_courses = getattr(student_rec,'registered_courses',[])
    561             #import pdb;pdb.set_trace()
    562565            try:
    563566                x = course_id in registered_courses
  • WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py

    r1971 r2033  
    6969cr.getContent().edit(mapping=d)
    7070#context.portal_workflow.doActionFor(cr,'close')
    71 args['course_id'] = course_id
     71#args['course_id'] = course_id
    7272
    73 logger.info('%s added StudentCourseResult object %s for %s' % (member,course_id,context.getStudentId()))
     73logger.info('%s added StudentCourseResult object %s at level %s for %s' % (member,
     74                                                                           course_id,
     75                                                                           context.getId(),
     76                                                                           context.getStudentId()))
    7477
    7578psm = "You successfully added course %s!" % course_id
  • WAeUP_SRP/trunk/skins/waeup_student/create_level.py

    r2031 r2033  
    130130        course_result = getattr(level,cr_id)
    131131        context.portal_workflow.doActionFor(course_result,'open')
    132         d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
     132        #d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
     133        d['core_or_elective'] = True
    133134        course_result.getContent().edit(mapping=d)
    134135        context.waeup_tool.doCommit()
  • WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py

    r2031 r2033  
    112112        d = context.getCourseInfo(id)
    113113        d['id'] = id
    114         coe = obj.getContent().core_or_elective
     114        coe = getattr(obj.getContent(),'core_or_elective',True)
    115115        d['coe'] = 'Core'
    116116        try:
Note: See TracChangeset for help on using the changeset viewer.