# HG changeset patch # User Lennard de Rijk # Date 1240002883 0 # Node ID 95ac403c6dd456b8a3278fee1bdebb301eb875e8 # Parent efa28a1ccf767ec999d4599ff8a20e3983e6c78b Renamed stepsize to step_size in Student Proposal Logic. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r efa28a1ccf76 -r 95ac403c6dd4 app/soc/logic/models/student_proposal.py --- a/app/soc/logic/models/student_proposal.py Fri Apr 17 20:26:37 2009 +0000 +++ b/app/soc/logic/models/student_proposal.py Fri Apr 17 21:14:43 2009 +0000 @@ -64,13 +64,13 @@ return ranker - def getProposalsToBeAcceptedForOrg(self, org_entity, stepsize=25): + def getProposalsToBeAcceptedForOrg(self, org_entity, step_size=25): """Returns all StudentProposals which will be accepted into the program for the given organization. params: org_entity: the Organization for which the proposals should be checked - stepsize: optional parameter to specify the ammount of Student Proposals + step_size: optional parameter to specify the amount of Student Proposals that should be retrieved per roundtrip to the datastore returns: @@ -105,7 +105,7 @@ # retrieve as many additional proposals as needed in case the top # N do not have a mentor assigned while len(proposals) < slots_left_to_assign: - new_proposals = query.fetch(stepsize, offset=offset) + new_proposals = query.fetch(step_size, offset=offset) if not new_proposals: # we ran out of proposals` @@ -113,7 +113,7 @@ new_proposals = [i for i in new_proposals if i.mentor] proposals += new_proposals - offset += stepsize + offset += step_size # cut off any superfluous proposals return proposals[:slots_left_to_assign]