Renamed stepsize to step_size in Student Proposal Logic.
authorLennard de Rijk <ljvderijk@gmail.com>
Fri, 17 Apr 2009 21:14:43 +0000
changeset 2198 95ac403c6dd4
parent 2197 efa28a1ccf76
child 2199 9e22f90ec781
Renamed stepsize to step_size in Student Proposal Logic. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
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]