
    Develop a function for a learning management system that arranges student performance data by sorting their assessment matrices based on their total achievement scores, where each row contains individual scores for quizzes, assignments, and participation. This sorting will enable the system to group students with similar performance levels together and facilitate appropriate content recommendations. The function should maintain the relationship between each student's score set while organizing the entire matrix in ascending order based on row totals.
    

    
def sort_matrix(M):
    """
    Develop a function for a learning management system that arranges student performance data by sorting their assessment matrices based on their total achievement scores, where each row contains individual scores for quizzes, assignments, and participation. This sorting will enable the system to group students with similar performance levels together and facilitate appropriate content recommendations. The function should maintain the relationship between each student's score set while organizing the entire matrix in ascending order based on row totals.
    

    """
def sort_matrix(M):
    """
    Develop a function for a learning management system that arranges student performance data by sorting their assessment matrices based on their total achievement scores, where each row contains individual scores for quizzes, assignments, and participation. This sorting will enable the system to group students with similar performance levels together and facilitate appropriate content recommendations. The function should maintain the relationship between each student's score set while organizing the entire matrix in ascending order based on row totals.
    

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