Changeset 9795 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 10 Dec 2012, 06:46:32 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r9771 r9795 674 674 # Add log message to payments.log 675 675 self.context.logger.info( 676 '%s,%s,%s,%s,%s,,,,,, ,,,,,,' % (676 '%s,%s,%s,%s,%s,,,,,,' % ( 677 677 applicant.applicant_id, 678 678 self.context.p_id, self.context.p_category, -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r9771 r9795 815 815 logcontent = open(logfile).read() 816 816 self.assertTrue( 817 '"zope.mgr",%s,%s,application,200.0,AP,,,,,, ,,,,,,\n'817 '"zope.mgr",%s,%s,application,200.0,AP,,,,,,\n' 818 818 % (self.applicant.applicant_id, payment.p_id) 819 819 in logcontent) -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9779 r9795 204 204 form = self.request.form 205 205 self.hitlist = [] 206 if 'searchterm' in form and form['searchterm']: 206 if form.get('searchtype', None) == 'suspended': 207 self.searchtype = form['searchtype'] 208 self.searchterm = None 209 elif 'searchterm' in form and form['searchterm']: 207 210 self.searchterm = form['searchterm'] 208 211 self.searchtype = form['searchtype'] … … 244 247 form = self.request.form 245 248 self.hitlist = [] 246 if 'searchterm' in form and form['searchterm']: 249 if form.get('searchtype', None) == 'suspended': 250 self.searchtype = form['searchtype'] 251 self.searchterm = None 252 elif 'searchterm' in form and form['searchterm']: 247 253 self.searchterm = form['searchterm'] 248 254 self.searchtype = form['searchtype'] -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/containermanagepage.pt
r7811 r9795 13 13 <option i18n:translate="" value="depcode">in department</option> 14 14 <option i18n:translate="" value="current_mode">in study mode</option> 15 <option i18n:translate="" value="suspended"> 16 with deactivated account (search term omitted) 17 </option> 15 18 </select> 16 19 -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/containerpage.pt
r7811 r9795 13 13 <option i18n:translate="" value="depcode">in department</option> 14 14 <option i18n:translate="" value="current_mode">in study mode</option> 15 <option i18n:translate="" value="suspended"> 16 with deactivated account (search term omitted) 17 </option> 15 18 </select> 16 19 -
main/waeup.kofa/trunk/src/waeup/kofa/students/catalog.py
r9786 r9795 80 80 results = Query().searchResults( 81 81 Text(('students_catalog', searchtype), query)) 82 elif searchtype == 'suspended': 83 # 'suspended' is not indexed 84 cat = queryUtility(ICatalog, name='students_catalog') 85 all = cat.searchResults(student_id=(None, None)) 86 for student in all: 87 if student.suspended: 88 hitlist.append(StudentQueryResultItem(student, view=view)) 89 return hitlist 82 90 else: 83 91 # Temporary solution to display all students added -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9770 r9795 368 368 self.assertTrue('Anna Tester' in self.browser.contents) 369 369 # The old searchterm will be used again 370 self.browser.getControl("Search").click() 371 self.assertTrue('Anna Tester' in self.browser.contents) 372 373 # We can find suspended students 374 self.student.suspended = True 375 notify(grok.ObjectModifiedEvent(self.student)) 376 self.browser.open(self.manage_container_path) 377 self.browser.getControl(name="searchtype").value = ['suspended'] 378 self.browser.getControl("Search").click() 379 self.assertTrue('Anna Tester' in self.browser.contents) 380 self.browser.open(self.container_path) 381 self.browser.getControl(name="searchtype").value = ['suspended'] 370 382 self.browser.getControl("Search").click() 371 383 self.assertTrue('Anna Tester' in self.browser.contents) … … 845 857 logcontent = open(logfile).read() 846 858 self.assertTrue( 847 '"zope.mgr",K1000000,%s,schoolfee,40000.0,AP,,,,,, ,,,,,,\n' % value859 '"zope.mgr",K1000000,%s,schoolfee,40000.0,AP,,,,,,\n' % value 848 860 in logcontent) 849 861
Note: See TracChangeset for help on using the changeset viewer.