예제 #1
0
 def getListData(self):
   idx = lists.getListIndex(self.request)
   if idx == 0:
     fields = {'scope': self.data.program,
               'status': ['new', 'active', 'inactive']}
     response_builder = lists.QueryContentResponseBuilder(
         self.request, self._list_config, org_logic, fields)
     return response_builder.build()
   else:
     return None
예제 #2
0
    def getListData(self):
        """Returns the list data as requested by the current request.

    If the lists as requested is not supported by this component None is
    returned.
    """
        idx = lists.getListIndex(self.request)
        if idx == 3:
            fields = {'program': self.data.program}
            response_builder = lists.QueryContentResponseBuilder(
                self.request, self._list_config, ps_logic, fields)
            return response_builder.build()
        else:
            return None
예제 #3
0
 def getListData(self):
     idx = lists.getListIndex(self.request)
     if idx == self.idx:
         if self.for_admin:
             fields = {'group': self.data.org_admin_for}
         else:
             fields = {'user': self.data.user}
         response_builder = lists.QueryContentResponseBuilder(
             self.request,
             self._list_config,
             request_logic,
             fields,
             prefetch=['user', 'group'])
         return response_builder.build()
     else:
         return None
예제 #4
0
  def getListData(self):
    """Returns the list data as requested by the current request.

    If the lists as requested is not supported by this component None is
    returned.
    """
    idx = lists.getListIndex(self.request)
    if idx == 0:
      fields = {'scope': self.data.organization,
                'status': 'accepted'}
      response_builder = lists.QueryContentResponseBuilder(
          self.request, self._list_config, sp_logic,
          fields, prefetch=['student'])
      return response_builder.build()
    else:
      return None
예제 #5
0
    def getListData(self):
        """Returns the list data as requested by the current request.

    If the lists as requested is not supported by this component None is
    returned.
    """
        idx = lists.getListIndex(self.request)
        if idx == 0:
            fields = {
                'survey': self.org_app_survey,
                'main_admin': self.data.user
            }
            response_builder = lists.QueryContentResponseBuilder(
                self.request, self._list_config,
                org_app_logic.getRecordLogic(), fields)
            return response_builder.build()
        else:
            return None
예제 #6
0
    def getListData(self):
        """Returns the list data as requested by the current request.

    If the lists as requested is not supported by this component None is
    returned.
    """
        idx = lists.getListIndex(self.request)
        if idx == 2:
            fields = {
                'program': self.data.program,
                'student': self.data.profile
            }
            prefetch = ['scope']
            response_builder = lists.QueryContentResponseBuilder(
                self.request,
                self._list_config,
                project_logic,
                fields,
                prefetch=prefetch)
            return response_builder.build()
        else:
            return None