Changeset 1997 for WAeUP_SRP/branches/joachim-azax-branch/Students.py
- Timestamp:
- 8 Jul 2007, 09:16:21 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/branches/joachim-azax-branch/Students.py
r1970 r1997 17 17 from Products.WAeUP_SRP.Academics import makeCertificateCode 18 18 from Products.AdvancedQuery import Eq, Between, Le,In 19 from Products.azax import AzaxBaseView 19 20 import DateTime 20 21 import logging … … 1479 1480 ###) 1480 1481 1481 class StudentStudyLevel(CPSDocument ): ###(1482 class StudentStudyLevel(CPSDocument,AzaxBaseView): ###( 1482 1483 """ 1483 1484 WAeUP Student container for the various student data … … 1491 1492 """compose title""" 1492 1493 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() 1493 1513 1494 1514 def create_course_results(self,cert_id,current_level): ###(
Note: See TracChangeset for help on using the changeset viewer.