def createOrganizationChoices(data):
  """Creates a list of organizations for user.

  Only organizations within the program are returned.

  Args:
    data: RequestData for the request.

  Returns:
    A list of tuples of choices, formatted as (org key name, org name).
  """
  organization_query = gciorganization_logic.queryForProgramAndStatus(
      program=data.program.key(), status='active')

  return organization_query.fetch(limit=None)
Exemple #2
0
def createOrganizationChoices(data):
    """Creates a list of organizations for user.

  Only organizations within the program are returned.

  Args:
    data: RequestData for the request.

  Returns:
    A list of tuples of choices, formatted as (org key name, org name).
  """
    organization_query = gciorganization_logic.queryForProgramAndStatus(
        program=data.program.key(), status='active')

    return organization_query.fetch(limit=None)
Exemple #3
0
 def _getQuery(self):
   """Returns Query object to fetch entities for the list.
   """
   return org_logic.queryForProgramAndStatus(
       self.data.program, ['new', 'active'])
 def _getQuery(self):
     """Returns Query object to fetch entities for the list.
 """
     return org_logic.queryForProgramAndStatus(self.data.program,
                                               ['new', 'active'])