def getClassAttendance(moduleCode):
    """
    Will take in the module code and use the code to open the file of the specified module and read it to created
    the list of names, presents, absents and excuses. To be return for future use
    :param moduleCode:
    :return: (list)
    """
    classData = open(f"{moduleCode}.txt", 'r')
    studentNameList = []
    presentList = []
    absentList = []
    excuseList = []

    while True:
        line = classData.readline().strip()
        if line == "":
            break
        lineData = line.split(',')
        studentNameList.append(lineData[0])
        presentList.append(int(lineData[1]))
        absentList.append(int(lineData[2]))
        excuseList.append(int(lineData[3]))

    classData.close()

    #    print(presentList)
    #    print(absentList)
    #    print(excuseList)

    return studentNameList, presentList, absentList, excuseList