Changeset 1002
- Timestamp:
- 6 Dec 2006, 18:08:45 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/ScratchCards.py
r978 r1002 136 136 } for p in pins_cat.searchResults(prefix_batch = "%s%d" 137 137 % (doc.prefix,doc.batch_no), 138 ) if not p.student]139 used = [{'pin': p.pin,140 'serial': p.serial,141 'student': p.student,142 } for p in pins_cat.searchResults(prefix_batch = "%s%d"143 % (doc.prefix,doc.batch_no),144 ) if p.student]145 if len (unused) <= max_pins:146 return unused,used147 return unused [:max_pins],used138 )[-max_pins:] if not p.student] 139 ## used = [{'pin': p.pin, 140 ## 'serial': p.serial, 141 ## 'student': p.student, 142 ## } for p in pins_cat.searchResults(prefix_batch = "%s%d" 143 ## % (doc.prefix,doc.batch_no), 144 ## ) if p.student] 145 ## if len (unused) <= max_pins: 146 ## return unused,used 147 return unused 148 148 149 149 InitializeClass(ScratchCardBatch) -
WAeUP_SRP/trunk/profiles/default/layouts.xml
r916 r1002 13 13 <object name="student" meta_type="CPS Layout"/> 14 14 <object name="scratch_card_batch" meta_type="CPS Layout"/> 15 <object name="scratch_card_search" meta_type="CPS Layout"/> 15 16 <object name="student_study_course" meta_type="CPS Layout"/> 16 17 <object name="student_accommodation" meta_type="CPS Layout"/> -
WAeUP_SRP/trunk/profiles/default/vocabularies.xml
r933 r1002 21 21 <object name="pin_prefixes" meta_type="CPS Vocabulary"/> 22 22 <object name="student_search_mode" meta_type="CPS Vocabulary"/> 23 <object name="scratch_card_search_mode" meta_type="CPS Vocabulary"/> 23 24 <object name="student_status_voc" meta_type="CPS Vocabulary"/> 24 25 <object name="searchable_student_states" meta_type="CPS Vocabulary"/> -
WAeUP_SRP/trunk/skins/waeup_pins/batch_view.pt
r999 r1002 1 <metal:html tal:define="info context/getBatchInfo; 1 <metal:html tal:define="info options/info; 2 rendered options/rendered; 2 3 mtool here/portal_membership; 3 4 member mtool/getAuthenticatedMember; 4 5 "> 5 6 6 <metal:body use-macro="here/main_template/macros/master"> 7 7 <metal:block fill-slot="header"> … … 29 29 <h3>Unused</h3> 30 30 <table> 31 <tr tal:repeat="pin info/unused">31 <tr tal:repeat="pin python: info['unused'][:2]"> 32 32 <td width="50px"> <span tal:content="pin/serial" />: </td> 33 33 <td tal:content="pin/pin" /> … … 35 35 </table> 36 36 </span> 37 <span tal:replace="structure rendered" /> 37 38 38 <h3> Used</h3>39 <h3>Results</h3> 39 40 <table> 40 41 <tr tal:repeat="pin info/used"> 41 42 <td width="50px"> <span tal:content="pin/serial" />: </td> 42 43 <td tal:content="pin/pin" /> 44 <td tal:content="pin/student_id" /> 43 45 <td> 44 46 <a tal:condition="pin/student_url" href="" tal:content="pin/student" -
WAeUP_SRP/trunk/skins/waeup_pins/getBatchInfo.py
r845 r1002 25 25 info['unused'],used = batch.getContent().getUnusedPins() 26 26 l = [] 27 students_rpath = context.portal_catalog(meta_type = "StudentsFolder")[-1].relative_path 28 students_url = "%s/%s" % ( context.portal_url(),students_rpath)27 p_url = context.portal_url 28 students_url = "%s/%s" % (p_url,"students") 29 29 30 30 for item in used: … … 32 32 if len(sno)==10: 33 33 #if bd.prefix == "APP": 34 res = context.portal_catalog(SearchableText=sno,portal_type='StudentApplication') 34 #res = context.portal_catalog(SearchableText=sno,portal_type='StudentApplication') 35 res = context.students_catalog(jamb_reg_no=sno) 35 36 if len(res) > 0: 36 item['student_url'] = "%s/%s" % (context.portal_url(),res[0].relative_path) 37 item['student_url'] = "%s/%s" % (context.portal_url(),res[0].id) 38 item['student_id'] = res[0].id 37 39 else: 38 40 item['student_url'] = None 39 41 else: 40 42 item['student_url'] = '%s/%s' % (students_url,item['student']) 43 item['student_id'] = student 41 44 info['used'] = used 42 45 return info -
WAeUP_SRP/trunk/skins/waeup_pins/pins_view.pt
r1001 r1002 10 10 <tr tal:repeat="batch batches"> 11 11 <td><a href="batch" 12 tal:attributes="href string:${batch/getPath} "12 tal:attributes="href string:${batch/getPath}/search_pins" 13 13 tal:content="batch/Title"></a></td> 14 14 </tr>
Note: See TracChangeset for help on using the changeset viewer.