- Timestamp:
- 2 Nov 2006, 10:56:46 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r775 r780 334 334 app.getContent().edit(mapping=da) 335 335 app.manage_setLocalRoles(sid, ['Owner',]) 336 #wftool.doActionFor(app,'close') 336 337 dp_fields = ( 337 338 'pume_eng_score', … … 343 344 pume = student.pume 344 345 pume.getContent().edit(mapping=dp) 345 wftool.doActionFor(pume,'close',dest_container=app)346 #wftool.doActionFor(pume,'close') 346 347 pume.manage_setLocalRoles(sid, ['Owner',]) 347 348 student.getContent().createSubObjects() 348 349 if dp['pume_tot_score']>49: 349 wftool.doActionFor(student,'pume_pass' ,dest_container=student)350 wftool.doActionFor(student,'pume_pass') 350 351 else: 351 wftool.doActionFor(student,'pume_fail' ,dest_container=student)352 wftool.doActionFor(student,'pume_fail') 352 353 if len(no_import) > 1: 353 354 open("%s/import/%s_not_imported.csv" % (i_home,name),"w").write( -
WAeUP_SRP/trunk/WAeUPTables.py
r710 r780 21 21 from Globals import InitializeClass 22 22 from Products.ZCatalog.ZCatalog import ZCatalog 23 from AccessControl import ClassSecurityInfo 24 from Products.CMFCore.permissions import ModifyPortalContent 25 26 import DateTime 27 import csv,re 28 import logging 29 import Globals 30 p_home = Globals.package_home(globals()) 31 i_home = Globals.INSTANCE_HOME 23 32 24 33 from interfaces import IWAeUPTable … … 37 46 38 47 implements(IWAeUPTable) 48 security = ClassSecurityInfo() 39 49 40 50 def addRecord(self, **data): … … 71 81 self.catalog_object(dict2ob(record_data), uid) 72 82 83 security.declareProtected(ModifyPortalContent,"exportAllRecords") 84 def exportAllRecords(self): 85 "export a WAeUPTable" 86 #import pdb;pdb.set_trace() 87 fields = [field for field in self.schema()] 88 format = ','.join(['"%%(%s)s"' % fn for fn in fields]) 89 csv = [] 90 csv.append(','.join(['"%s"' % fn for fn in fields])) 91 for uid in self._catalog.uids: 92 records = self.searchResults({"%s" % self.key : uid}) 93 if len(records) > 1: 94 # Can not happen, but anyway... 95 raise ValueError("More than one record with uid %s" % uid) 96 if len(records) == 0: 97 raise KeyError("No record for uid %s" % uid) 98 rec = records[0] 99 csv.append(format % rec) 100 current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S") 101 open("%s/import/%s-%s.csv" % (i_home,self.getId(),current),"w+").write('\n'.join(csv)) 102 103 73 104 class AccommodationTable(WAeUPTable): 74 105 -
WAeUP_SRP/trunk/Widgets.py
r777 r780 304 304 if s is None: 305 305 err = 'No Student with JAMB-Reg-No %s' % (value) 306 s_id = s.getId() 307 datastructure['s_id'] = s_id 306 else: 307 s_id = s.getId() 308 datastructure['s_id'] = s_id 308 309 if err: 309 310 datastructure.setError(widget_id, err) -
WAeUP_SRP/trunk/profiles/default/actionicons.xml
r766 r780 238 238 title="Logout" priority="1" 239 239 icon_expr="actionicon_logout.png"/> 240 <action-icon category="student" action_id=" apply_admission"241 title=" Apply for PUME" priority="2"240 <action-icon category="student" action_id="display_pume_result" 241 title="Display PUME Result" priority="2" 242 242 icon_expr="bell.png"/> 243 243 <action-icon category="student" action_id="request_clearance" -
WAeUP_SRP/trunk/profiles/default/actions.xml
r766 r780 132 132 <action title=" " action_id="dummy2" category="object" condition_expr="" 133 133 url_expr="" visible="True"/> 134 <action title=" Apply for PUME" action_id="apply_admission"134 <action title="View PUME-Results" action_id="display_pume_result" 135 135 category="student" condition_expr="not:member" 136 url_expr="string:${portal_url}/ apply_admission"136 url_expr="string:${portal_url}/display_pume_result" 137 137 visible="True"> 138 138 <permission>View</permission> -
WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml
r770 r780 33 33 </permission-map> 34 34 <permission-map name="View" acquired="True"> 35 <permission-role>Anonymous</permission-role> 35 36 </permission-map> 36 37 <permission-map name="WAeUPModify own content" -
WAeUP_SRP/trunk/skins/waeup_student/pume_anon_slip.pt
r779 r780 3 3 <metal:body use-macro="here/main_template/macros/master"> 4 4 <metal:main fill-slot="main"> 5 <h3>PUME Result Slip</h3> 5 <h3>PUME Results of <span tal:content="app_doc/jamb_firstname" /> 6 <span tal:content="app_doc/jamb_lastname" /></h3> 7 6 8 <br /> 7 9 <span tal:omit-tag=""
Note: See TracChangeset for help on using the changeset viewer.