Changeset 16812 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 16 Feb 2022, 15:50:47 (3 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r16671 r16812 3694 3694 3695 3695 def _searchCatalog(self, session, level): 3696 if level not in (10, 999, None):3696 if level not in (10, 999, 1000, None): 3697 3697 start_level = 100 * (level // 100) 3698 3698 end_level = start_level + 90 … … 3745 3745 3746 3746 def _searchCatalog(self, session, level): 3747 if level not in (10, 999, None):3747 if level not in (10, 999, 1000, None): 3748 3748 start_level = 100 * (level // 100) 3749 3749 end_level = start_level + 90 … … 3774 3774 3775 3775 def _searchCatalog(self, session, level): 3776 if level not in (10, 999, None):3776 if level not in (10, 999, 1000, None): 3777 3777 start_level = 100 * (level // 100) 3778 3778 end_level = start_level + 90 -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r16679 r16812 81 81 for ticket in level_obj.values(): 82 82 if ct_level not in ('all', None): 83 if level_obj.level in (10, 999, None) \83 if level_obj.level in (10, 999, 1000, None) \ 84 84 and int(ct_level) != level_obj.level: 85 85 continue … … 100 100 continue 101 101 if level not in ('all', None): 102 if level_obj.level in (10, 999, None) \102 if level_obj.level in (10, 999, 1000, None) \ 103 103 and int(level) != level_obj.level: 104 104 continue … … 130 130 # continue 131 131 if level not in ('all', None): 132 if level_obj.level in (10, 999, None) \132 if level_obj.level in (10, 999, 1000, None) \ 133 133 and int(level) != level_obj.level: 134 134 continue -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r16012 r16812 794 794 errs, inv_errs, conv_dict = self.processor.checkConversion( 795 795 dict(reg_number='1', level='1000')) 796 self.assertEqual(len(errs),0) 797 errs, inv_errs, conv_dict = self.processor.checkConversion( 798 dict(reg_number='1', level='1100')) 796 799 self.assertEqual(len(errs),1) 797 800 self.assertTrue(('level', u'Invalid value') in errs) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r16800 r16812 1570 1570 'entry_session,current_level,current_session,' 1571 1571 '0,10,100,110,120,200,210,220,300,310,320,400,410,420,500,' 1572 '510,520,600,610,620,700,710,720,800,810,820,900,910,920,999 \r\n'1572 '510,520,600,610,620,700,710,720,800,810,820,900,910,920,999,1000\r\n' 1573 1573 'A111111,created,CERT1,NA,NA,0,2010,200,2012,,,2012' 1574 ',,,,,,,,,,,,,,,,,,,,,,,,,,, \r\n',1574 ',,,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n', 1575 1575 result 1576 1576 ) … … 1586 1586 'entry_session,current_level,current_session,' 1587 1587 '0,10,100,110,120,200,210,220,300,310,320,400,410,420,500,' 1588 '510,520,600,610,620,700,710,720,800,810,820,900,910,920,999 \r\n'1588 '510,520,600,610,620,700,710,720,800,810,820,900,910,920,999,1000\r\n' 1589 1589 'A111111,created,CERT1,NA,NA,0,2010,200,2012,,,2012' 1590 ',,,,,,,,,,,,,,,,,,,,,,,,,,, \r\n',1590 ',,,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n', 1591 1591 result 1592 1592 ) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_vocabularies.py
r15446 r16812 31 31 100, 110, 120, 200, 210, 220, 300, 310, 320, 400, 410, 420, 32 32 500, 510, 520, 600, 610, 620, 700, 710, 720, 800, 810, 820, 33 900, 910, 920, 999, ])33 900, 910, 920, 999, 1000,]) 34 34 # edge-case: level 10 35 35 self.assertEqual( -
main/waeup.kofa/trunk/src/waeup/kofa/students/vocabularies.py
r15203 r16812 49 49 if 999 in (start_level, end_level): 50 50 return [999] 51 if 1000 in (start_level, end_level): 52 return [1000] 51 53 levels = [10,] + [ 52 54 level for level in range(100,1000,10) if level % 100 < 30] 53 55 if start_level is None and end_level is None: 54 return levels + [999 ]56 return levels + [999, 1000] 55 57 if start_level == 10 == end_level: 56 58 return [10,] … … 105 107 return _('Error: wrong level id ${value}', 106 108 mapping={'value': value}) 109 if value == 0: 110 return _('Level Zero') 107 111 if value == 999: 108 112 return course_levels.by_value[999].title 109 if value == 0: 110 return _('Level Zero') 113 if 1000 in (start_level, end_level): 114 if value != 1000: 115 return _('Error: wrong level id ${value}', 116 mapping={'value': value}) 117 if value == 1000: 118 return course_levels.by_value[1000].title 111 119 if start_level == 10 and end_level == 10 and value != 10: 112 120 return _('Error: level id ${value} out of range',
Note: See TracChangeset for help on using the changeset viewer.