utils/file-tester/lms_file_tester/validators/directory_validation.py
def validate_assignment_directory_structure(
    input_directory: str, section_id: Union[str, int], assignment_id: Union[str, int]
) -> List[str]:
    """
    Validates that an Assignments directory contains the submissions directory.

    Parameters
    ----------
    input_directory: str
        Base / parent directory containing files created by an LMS extractor.
    section_id: int
        Section identifier.

    Returns
    -------
    List[str]
        List containing detailed error messages, if any.
    """

    base_dir = os.path.split(dr.get_assignments_directory(input_directory, section_id))[0]

    is_missing = _check_for_directory(base_dir)
    if is_missing:
        return [is_missing]

    is_missing = _check_for_directory(
        dr.get_submissions_directory(input_directory, section_id, assignment_id)
    )
    if is_missing:
        return [is_missing]

    return list()

    Validates that an Assignments directory contains the submissions directory.

    Parameters
    ----------
    input_directory: str
        Base / parent directory containing files created by an LMS extractor.
    section_id: int
        Section identifier.

    Returns
    -------
    List[str]
        List containing detailed error messages, if any.
    
Validates that an Assignments directory contains the submissions directory.
Parameters

str
Base / parent directory containing files created by an LMS extractor.
section_id: int
Section identifier.

Returns

List[str]
List containing detailed error messages, if any.
Validates that an Assignments directory contains the submissions directory . Parameters str Base / parent directory containing files created by an LMS extractor . section_id : int Section identifier . Returns List [ str ] List containing detailed error messages if any .
def validate_assignment_directory_structure(
    input_directory: str, section_id: Union[str, int], assignment_id: Union[str, int]
) -> List[str]:
    base_dir = os.path.split(dr.get_assignments_directory(input_directory, section_id))[0]
    is_missing = _check_for_directory(base_dir)
    if is_missing:
        return [is_missing]
    is_missing = _check_for_directory(
        dr.get_submissions_directory(input_directory, section_id, assignment_id)
    )
    if is_missing:
        return [is_missing]
    return list()
def validate_assignment_directory_structure ( input_directory : str , section_id : Union [ str , int ] , assignment_id : Union [ str , int ] ) -> List [ str ] : base_dir = os . path . split ( dr . get_assignments_directory ( input_directory , section_id ) ) [ 0 ] is_missing = _check_for_directory ( base_dir ) if is_missing : return [ is_missing ] is_missing = _check_for_directory ( dr . get_submissions_directory ( input_directory , section_id , assignment_id ) ) if is_missing : return [ is_missing ] return list ( )
Validates that an Assignments directory contains the submissions directory.
Validates that an Assignments directory contains the submissions directory .
"""
    Validates that an Assignments directory contains the submissions directory.

    Parameters
    ----------
    input_directory: str
        Base / parent directory containing files created by an LMS extractor.
    section_id: int
        Section identifier.

    Returns
    -------
    List[str]
        List containing detailed error messages, if any.
    """
input_directory
str
section_id
Union[str, int]
assignment_id
Union[str, int]