src/canvas-extractor/tests/data_generation/submissions.py
def load_submissions(assignment: Assignment, submissions: List[Dict]) -> List[Submission]:
    """
    Load a list of submissions for an assignment via the Canvas API.

    Parameters
    ----------
    assignment: Assignment
        An Assignment SDK object
    submissions: List[Dict]
        A list of JSON-like submission object in a form suitable for submission to the
        Canvas submission creation endpoint.

    Returns
    -------
    List[Submission]
        A list of Canvas SDK Submission objects representing the created submissions
    """
    logger.info("Creating %s submissions via Canvas API", len(submissions))

    result: List[Submission] = []
    for submission in submissions:
        result.append(
            assignment.submit(submission)
        )

    logger.info("Successfully created %s submissions", len(submissions))

    return result

    Load a list of submissions for an assignment via the Canvas API.

    Parameters
    ----------
    assignment: Assignment
        An Assignment SDK object
    submissions: List[Dict]
        A list of JSON-like submission object in a form suitable for submission to the
        Canvas submission creation endpoint.

    Returns
    -------
    List[Submission]
        A list of Canvas SDK Submission objects representing the created submissions
    
Load a list of submissions for an assignment via the Canvas API.
Parameters

Assignment
An Assignment SDK object
submissions: List[Dict]
A list of JSON-like submission object in a form suitable for submission to the
Canvas submission creation endpoint.

Returns

List[Submission]
A list of Canvas SDK Submission objects representing the created submissions
Load a list of submissions for an assignment via the Canvas API . Parameters Assignment An Assignment SDK object submissions : List [ Dict ] A list of JSON - like submission object in a form suitable for submission to the Canvas submission creation endpoint . Returns List [ Submission ] A list of Canvas SDK Submission objects representing the created submissions
def load_submissions(assignment: Assignment, submissions: List[Dict]) -> List[Submission]:
    logger.info("Creating %s submissions via Canvas API", len(submissions))
    result: List[Submission] = []
    for submission in submissions:
        result.append(
            assignment.submit(submission)
        )
    logger.info("Successfully created %s submissions", len(submissions))
    return result
def load_submissions ( assignment : Assignment , submissions : List [ Dict ] ) -> List [ Submission ] : logger . info ( "Creating %s submissions via Canvas API" , len ( submissions ) ) result : List [ Submission ] = [ ] for submission in submissions : result . append ( assignment . submit ( submission ) ) logger . info ( "Successfully created %s submissions" , len ( submissions ) ) return result
Load a list of submissions for an assignment via the Canvas API.
Load a list of submissions for an assignment via the Canvas API .
"""
    Load a list of submissions for an assignment via the Canvas API.

    Parameters
    ----------
    assignment: Assignment
        An Assignment SDK object
    submissions: List[Dict]
        A list of JSON-like submission object in a form suitable for submission to the
        Canvas submission creation endpoint.

    Returns
    -------
    List[Submission]
        A list of Canvas SDK Submission objects representing the created submissions
    """
assignment
Assignment
submissions
List[Dict]