def get_activities_by_ids(self, activity_ids=None):
if activity_ids is None:<EOL><INDENT>raise NullArgument()<EOL><DEDENT>activities = []<EOL>for i in activity_ids:<EOL><INDENT>activity = None<EOL>url_path = construct_url('<STR_LIT>',<EOL>bank_id=self._catalog_idstr,<EOL>act_id=i)<EOL>try:<EOL><INDENT>activity = self._get_request(url_path)<EOL><DEDENT>except (NotFound, OperationFailed):<EOL><INDENT>if self._activity_view == PLENARY:<EOL><INDENT>raise<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>if activity:<EOL><INDENT>if not (self._activity_view == COMPARATIVE and<EOL>activity in activities):<EOL><INDENT>activities.append(activity)<EOL><DEDENT><DEDENT><DEDENT>return objects.ActivityList(activities)<EOL>
Gets an ActivityList corresponding to the given IdList.
        In plenary mode, the returned list contains all of the
        activities specified in the Id list, in the order of the list,
        including duplicates, or an error results if an Id in the
        supplied list is not found or inaccessible. Otherwise,
        inaccessible Activities may be omitted from the list and may
        present the elements in any order including returning a unique
        set.
        arg:    activityIds (osid.id.IdList): the list of Ids to
                retrieve
        return: (osid.learning.ActivityList) - the returned Activity
                list
        raise:  NotFound - an Id was not found
        raise:  NullArgument - activityIds is null
        raise:  OperationFailed - unable to complete request
        raise:  PermissionDenied - authorization failure
        compliance: mandatory - This method must be implemented.