def submit_batch_completion(self, user, course_key, blocks):
        """
        Performs a batch insertion of completion objects.

        Parameters:
            * user (django.contrib.auth.models.User): The user for whom the
              completions are being submitted.
            * course_key (opaque_keys.edx.keys.CourseKey): The course in
              which the submitted blocks are found.
            * blocks: A list of tuples of UsageKey to float completion values.
              (float in range [0.0, 1.0]): The fractional completion
              value of the block (0.0 = incomplete, 1.0 = complete).

        Return Value:
            Dict of (BlockCompletion, bool): A dictionary with a
            BlockCompletion object key and a value of bool. The boolean value
            indicates whether the object was newly created by this call.

        Raises:

            ValueError:
                If the wrong type is passed for one of the parameters.

            django.core.exceptions.ValidationError:
                If a float is passed that is not between 0.0 and 1.0.

            django.db.DatabaseError:
                If there was a problem getting, creating, or updating the
                BlockCompletion record in the database.
        """
        block_completions = {}
        for block, completion in blocks:
            (block_completion, is_new) = self.submit_completion(user, course_key, block, completion)
            block_completions[block_completion] = is_new
        return block_completions
Performs a batch insertion of completion objects.

        Parameters:
            * user (django.contrib.auth.models.User): The user for whom the
              completions are being submitted.
            * course_key (opaque_keys.edx.keys.CourseKey): The course in
              which the submitted blocks are found.
            * blocks: A list of tuples of UsageKey to float completion values.
              (float in range [0.0, 1.0]): The fractional completion
              value of the block (0.0 = incomplete, 1.0 = complete).

        Return Value:
            Dict of (BlockCompletion, bool): A dictionary with a
            BlockCompletion object key and a value of bool. The boolean value
            indicates whether the object was newly created by this call.

        Raises:

            ValueError:
                If the wrong type is passed for one of the parameters.

            django.core.exceptions.ValidationError:
                If a float is passed that is not between 0.0 and 1.0.

            django.db.DatabaseError:
                If there was a problem getting, creating, or updating the
                BlockCompletion record in the database.