
    Develop a function that ranks students in a learning system by arranging their assessment scores (represented as a matrix where each row contains a student's scores across different learning modules) in ascending order based on their total achievement. This sorting mechanism will help determine appropriate difficulty levels for each student in the adaptive learning platform.
    

    
def sort_matrix(M):
    """
    Develop a function that ranks students in a learning system by arranging their assessment scores (represented as a matrix where each row contains a student's scores across different learning modules) in ascending order based on their total achievement. This sorting mechanism will help determine appropriate difficulty levels for each student in the adaptive learning platform.
    

    """
def sort_matrix(M):
    """
    Develop a function that ranks students in a learning system by arranging their assessment scores (represented as a matrix where each row contains a student's scores across different learning modules) in ascending order based on their total achievement. This sorting mechanism will help determine appropriate difficulty levels for each student in the adaptive learning platform.
    

    """
    result = sorted(M, key=sum)
    return result