src/canvas-extractor/tests/data_generation/assignments.py
def load_assignments(course: Course, assignments: List[Dict]) -> List[Assignment]:
    """
    Load a list of assignments via the Canvas API.

    Parameters
    ----------
    course: Course
        A Course SDK object
    assignments: List[Dict]
        A list of JSON-like assignment objects in a form suitable for submission to the
        Canvas assignment creation endpoint.

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

    result: List[Assignment] = []
    for assignment in assignments:
        result.append(course.create_assignment(assignment))

    logger.info("Successfully created %s assignments", len(assignments))
    return result

    Load a list of assignments via the Canvas API.

    Parameters
    ----------
    course: Course
        A Course SDK object
    assignments: List[Dict]
        A list of JSON-like assignment objects in a form suitable for submission to the
        Canvas assignment creation endpoint.

    Returns
    -------
    List[Assignment]
        A list of Canvas SDK Assignment objects representing the created assignments
    
Load a list of assignments via the Canvas API.
Parameters

Course
A Course SDK object
assignments: List[Dict]
A list of JSON-like assignment objects in a form suitable for submission to the
Canvas assignment creation endpoint.

Returns

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

    Parameters
    ----------
    course: Course
        A Course SDK object
    assignments: List[Dict]
        A list of JSON-like assignment objects in a form suitable for submission to the
        Canvas assignment creation endpoint.

    Returns
    -------
    List[Assignment]
        A list of Canvas SDK Assignment objects representing the created assignments
    """
course
Course
assignments
List[Dict]