Ignore:
Timestamp:
8 Jul 2007, 09:16:21 (17 years ago)
Author:
joachim
Message:

starting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/branches/joachim-azax-branch/Students.py

    r1970 r1997  
    1717from Products.WAeUP_SRP.Academics import makeCertificateCode
    1818from Products.AdvancedQuery import Eq, Between, Le,In
     19from Products.azax import AzaxBaseView
    1920import DateTime
    2021import logging
     
    14791480###)
    14801481
    1481 class StudentStudyLevel(CPSDocument): ###(
     1482class StudentStudyLevel(CPSDocument,AzaxBaseView): ###(
    14821483    """
    14831484    WAeUP Student container for the various student data
     
    14911492        """compose title"""
    14921493        return "Level %s" % self.aq_parent.getId()
     1494
     1495    def getCorrespondingSelect(self, value):
     1496        """ returns select content """
     1497        import pdb;pdb.set_trace()
     1498        mapping = {}
     1499        mapping['']=[]
     1500        mapping['animals']=['dog', 'cat', 'cow']
     1501        mapping['machines']=['computer', 'car', 'airplane']
     1502        # XXX Note that originally we just used replaceInnerHTML to just put
     1503        # the options inside the select, however this is principally broken
     1504        # on IE due to an IE bug. Microsoft has confirmed the bug but is not
     1505        # giving information on whether it has or it will ever be fixed.
     1506        # For further info, see http://support.microsoft.com/default.aspx?scid=kb;en-us;276228
     1507        # The current solution, replace the outer node, works solidly.
     1508        result = ['<select id="second">']
     1509        result.extend(['<option>%s</option>' % item for item in mapping[value]])
     1510        result.append('</select>')
     1511        self.getCommandSet('core').replaceHTML('select#second', ' '.join(result))
     1512        return self.render()
    14931513
    14941514    def create_course_results(self,cert_id,current_level): ###(
Note: See TracChangeset for help on using the changeset viewer.