Ignore:
Timestamp:
31 Aug 2006, 10:37:54 (18 years ago)
Author:
joachim
Message:

add student_study_level,
adopted result_import
results import now is broken because of missing wf_state.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Academics.py

    r440 r454  
    456456###)
    457457
     458class StudyLevel(CPSDocument): ###(
     459    """
     460    WAeUP StudyLevel containing the courses and students
     461    """
     462    meta_type = 'StudyLevel'
     463    portal_type = meta_type
     464    security = ClassSecurityInfo()
     465
     466    security.declareProtected(View,"Title")
     467    def Title(self):
     468        """compose title"""
     469        return "Level %s" % self.aq_parent.getId()
     470   
     471
     472InitializeClass(StudyLevel)
     473
     474def addStudyLevel(container, id, REQUEST=None, **kw):
     475    """Add a StudyLevel."""
     476    ob = StudyLevel(id, **kw)
     477    return CPSBase_adder(container, ob, REQUEST=REQUEST)
     478
     479###)
     480
    458481class CertificateCourse(CPSDocument): ###(
    459482    """
     
    476499        """compose title"""
    477500        ce = self.getCourseEntry(self.id.upper())
     501        #print self.id, self.aq_parent.id
    478502        if ce:
    479503            return "%s" % ce.Title
     
    610634###)
    611635
    612 class CourseTicket(CPSDocument): ###(
    613     """
    614     WAeUP CourseTicket
    615     """
    616     meta_type = 'CourseTicket'
    617     portal_type = meta_type
    618     security = ClassSecurityInfo()
    619     def getCourseEntry(self,cid):
    620         res = self.portal_catalog({'meta_type': "Course",
    621                                            'id': cid})
    622         if res:
    623             return res[-1]
    624         else:
    625             return None
    626 
    627     security.declareProtected(View,"Title")
    628     def Title(self):
    629         """compose title"""
    630         ce = self.getCourseEntry(self.id.upper())
    631         if ce:
    632             return "%s" % ce.Title
    633         return "No such course"
    634 
    635 InitializeClass(CourseTicket)
    636 
    637 def addCourseTicket(container, id, REQUEST=None, **kw):
    638     """Add a CourseTicket."""
    639     ob = CourseTicket(id, **kw)
    640     return CPSBase_adder(container, ob, REQUEST=REQUEST)
    641 ###)
    642 
     636
Note: See TracChangeset for help on using the changeset viewer.