def gene_hours_sexto_s(semester, horario: list): files: list = buscar_mater_por_semester(semester) fileshor: list = buscar_hora_inicio_fin() auxlist: list = [] print("entro aquii") print(files) print(fileshor) l = 0 aux: str = "" for file in files: print("paso estooo") if l < 2: update_b_ma1(file[2], 1) print("entroo primera vez") elif 2 <= l < 4: update_b_ma1(file[2], 2) elif 4 >= l: update_b_ma1(file[2], 3) print(file[2], " esto es aux") print(file[6], "esto es el bloque") print(file) # el if es para coger los valores intercalados if (l % 2) == 0: if l < 4: aux = (files[l + 1])[2] else: aux = file[2] num: int = int(file[7]) print("numero", num) number: int = int(num / 4) print("number", number) i = 0 while i < number: auxlist.append(fileshor[0] + " " + file[2] + "\n" + fileshor[1] + " " + aux) auxlist.append(file[6]) horario.append(auxlist) auxlist = [] if aux == file[2]: i = i + 2 else: i = i + 1 aux = "" l = l + 1 print("horario final:") print(horario) return horario
def gene_hours_tercer_s(semester, horario: list): files: list = buscar_mater_por_semester(semester) fileshor: list = buscar_hora_inicio_fin() auxlist: list = [] print("entro aquii") print(files) print(fileshor) l = 0 aux: str = "" for file in files: # el if es para coger los valores intercalados if (l % 2) == 0: if l < 3: aux = (files[l + 1])[2] else: aux = file[2] num: int = int(file[7]) print("numero", num) number: int = int(num / 4) print("number", number) i = 0 while i < number: if i < number / 2: auxlist.append(fileshor[0] + " " + file[2] + "\n" + fileshor[1] + " " + aux) auxlist.append(1) horario.append(auxlist) auxlist = [] else: aux = (files[l + 2])[2] print("este es el segunndo aux", aux) auxlist.append(fileshor[0] + " " + file[2] + "\n" + fileshor[1] + " " + aux) auxlist.append(2) horario.append(auxlist) auxlist = [] if aux == file[2]: i = i + 2 else: i = i + 1 return horario print("horario final:") print(horario) return horario
def gene_hours_cuarto_s(semester, horario: list): files: list = buscar_mater_por_semester(semester) fileshor: list = buscar_hora_inicio_fin() auxlist: list = [] print("entro aquii") print(files) print(fileshor) l = 0 aux: str = "" for file in files: if l <= 2: update_b_ma1(file[2], 1) print("entroo primera vez") elif 2 < l < 4: update_b_ma1(file[2], 2) elif l >= 4: update_b_ma1(file[2], 3) num: int = int(file[7]) print("numero", num) number: int = int(num / 4) if num == 12 or num == 16: aux = (files[0])[2] k = 0 while k < number: print("entro condi", file[2]) auxlist.append(fileshor[0] + " " + aux + "\n" + fileshor[1] + " " + file[2]) auxlist.append(file[6]) horario.append(auxlist) auxlist = [] k = k + 1 elif num == 8: auxlist.append(fileshor[0] + " " + file[2] + "\n" + fileshor[1] + " " + file[2]) auxlist.append(file[6]) horario.append(auxlist) auxlist = [] aux = "" l = l + 1 print("horario final:") print(horario) return horario
def obtener_datos_profe(semester: int, ciudad: str): auxx: list = [] files: list = buscar_mater_por_semester(semester) print("materiaas segun el seemestreprofe", files) print("ciudad : ", ciudad) aux2: list = [] for f in files: auxx.append(f[1]) auxx.append(f[2]) auxx.append(f[5]) print(f[2], " : nombre materia") profe: list = search_docent_matter(f[2], ciudad) print(profe, " este profe persis") if profe is not None: auxx.append(profe[1]) auxx.append(profe[5]) aux2.append(auxx) auxx = [] print("tabla completa", aux2) return aux2
def gene_hours_primer_s(semester, horario: list): files: list = buscar_mater_por_semester(semester) fileshor: list = buscar_hora_inicio_fin() auxlist: list = [] print("entro aquii") print(files) print(fileshor) l = 0 aux: str = "" for file in files: if l <= 2: update_b_ma1(file[2], 1) elif 2 < l <= 4: update_b_ma1(file[2], 2) elif l > 4: update_b_ma1(file[2], 3) print(file[2], " esto es aux") print(file[6], "esto es el bloque") if file[2] == "Metodologia Educacion a Distancia": num: int = int(file[7]) number: int = int(num / 4) i = 0 while i <= number: if i + 1 == number: auxlist.append(fileshor[0] + " " + file[2]) auxlist.append(file[6]) horario.insert(1, auxlist) auxlist = [] else: auxlist.append(fileshor[0] + " " + file[2] + "\t" + fileshor[1] + " " + file[2]) auxlist.append(file[6]) horario.insert(0, auxlist) auxlist = [] print("este") print(horario) i = i + 2 else: # el if es para coger los valores intercalados if (l % 2) != 0: if l < 5: aux = (files[l + 1])[2] else: aux = file[2] num: int = int(file[7]) print("numero", num) number: int = int(num / 4) print("number", number) i = 0 while i < number: auxlist.append(fileshor[0] + " " + file[2] + "\n" + fileshor[1] + " " + aux) auxlist.append(file[6]) horario.append(auxlist) auxlist = [] if aux == file[2]: i = i + 2 else: i = i + 1 aux = "" l = l + 1 print("horario final:") print(horario) return horario