def replymsg(driver, data): num = numbers.normalize(data[0]) main(num) bkd.mail( kelas.getEmailDosen(kelas.getKodeDosen(num)), f'yooo watsapppp mennnnn {config.bot_name} kirim file BERITA ACARA PITAK nihhhh', f'cek cek dulu ya filenya.....', bkd.getFilePath(kelas.getEmailDosen(kelas.getKodeDosen(num)), 'beritaacarapitak')) msgreply = f"Sampun yo.. coba cek emailnyaa yaaa yang {kelas.getEmailDosen(kelas.getKodeDosen(num))}" return msgreply
def replymsg(driver, data): ssl._create_default_https_context = ssl._create_unverified_context num = numbers.normalize(data[0]) tipe_bimbingan = cek_bimbingan_dosen.cekTipeBimbingan(data[3]) main(num, tipe_bimbingan) bkd.mail( kelas.getEmailDosen(kelas.getKodeDosen(num)), f'yooo watsapppp mennnnn {config.bot_name} kirim file BERITA ACARA PITAK nihhhh', f'cek cek dulu ya filenya.....', bkd.getFilePath(kelas.getEmailDosen(kelas.getKodeDosen(num)), 'beritaacarapitak', kelas.getTahunID())) msgreply = f"Sampun yo.. coba cek emailnyaa yaaa yang {kelas.getEmailDosen(kelas.getKodeDosen(num))}" return msgreply
def mainPages(kode_dosen, prodi_id, nama_dosen, km_npm, nama_prodi, tipe_kelas, catatan, group_name, jmlPesertaPerwalian): checkDir() namaFile = f"surat_perwalian/SURAT-PERWALIAN-{kode_dosen}-{kelas.getTahunID()}-{prodi_id}-{tipe_kelas}-{kelas.getEmailDosen(kode_dosen)}.pdf" # check dir qrcode checkDirQrcode() # generate dosen barcode link = makeLinkVerifiy(kode_dosen) makeQrcodeLinkVerifySign(link, 'dosen', kode_dosen) # generate km barcode link = makeLinkVerifiy(km_npm) makeQrcodeLinkVerifySign(link, 'km', kode_dosen) # generate kaprodi barcode # kaprodinipycode = bkd.getNipyKaProdi(prodi_id) # kaprodiDosenID = bkd.getDosenIDfromNIPY(kaprodinipycode) # link = makeLinkVerifiy(kaprodiDosenID) # makeQrcodeLinkVerifySign(link, 'kaprodi', kode_dosen) # generate deputi barcode # deputinipycode = bkd.getNipyDeputi(9) # deputiDosenID = bkd.getDosenIDfromNIPY(deputinipycode) # link = makeLinkVerifiy(deputiDosenID) # makeQrcodeLinkVerifySign(link, 'deputi', kode_dosen) masukan = catatanToList(catatan) # namaDeputi = nama_deputi # namaKaprodi = nama_kaprodi prodi = nama_prodi listMahasiswa = hadirAbsensiData(group_name, 'daring', kode_dosen) jumlahMhs = jmlPesertaPerwalian jumlahHadir = len(listMahasiswa) jumlahTdkHadir = jumlahMhs - jumlahHadir cekPerwalianLog(kode_dosen, prodi_id, kelas.getTahunID(), group_name, jumlahMhs, jumlahHadir, jumlahTdkHadir, catatan) # statusappove=cekStatusApprovePerwalian(kode_dosen, kelas.getTahunID()) qrWhiteImage = 'bkdqrcode/whiteimage.png' # if statusappove[1] == 'true': # qrDeputi = f'surat_perwalian_qrcode/deputiqrcode-{kelas.getTahunID()}-{kode_dosen}.png' # # qrKaprodi = 'bkdqrcode/whiteimage.png' # if statusappove[0] == 'true': # qrKaprodi = f'surat_perwalian_qrcode/kaprodiqrcode-{kelas.getTahunID()}-{kode_dosen}.png' qrKm = f'surat_perwalian_qrcode/kmqrcode-{kelas.getTahunID()}-{kode_dosen}.png' qrDosen = f'surat_perwalian_qrcode/dosenqrcode-{kelas.getTahunID()}-{kode_dosen}.png' tahunAkademik = f'{int(kelas.getTahunID()[:-1])} - {int(kelas.getTahunID()[:-1]) + 1}' hariSekarang = daysEnToInd(datetime.now().strftime('%A')) tglSekarang = bkd.sahTanggal() listMasukan = masukan doc = SimpleDocTemplate(namaFile, pagesize=A4, rightMargin=2.5 * cm, leftMargin=2.5 * cm, topMargin=2.5 * cm, bottomMargin=2.5 * cm) contain = [] styles = getSampleStyleSheet() styles.add( ParagraphStyle(name='Justify', alignment=TA_JUSTIFY, fontName='Times', fontSize=12)) styles.add( ParagraphStyle(name='Center', alignment=TA_CENTER, fontName='Times')) createBeritaAcaraPage(contain, styles, tahunAkademik, hariSekarang, tglSekarang, kode_dosen, prodi, tipe_kelas, jumlahMhs, jumlahHadir, jumlahTdkHadir, listMasukan, qrKm, qrWhiteImage, qrDosen, kelas.getStudentNameOnly(km_npm)) createAbsensiPage(contain, styles, kode_dosen, prodi, tipe_kelas, listMahasiswa, qrWhiteImage, qrDosen) doc.build(contain) bkd.mail( kelas.getEmailDosen(kode_dosen), f'alooooo {config.bot_name} kirim file Absensi Perwalian NICHHHHHHH', f'Tolong dicek kembali yaaa datanya, dan jangan lupa buruann minta approvalnya ke KAPRODI dan DEPUTI yaa....', bkd.getFilePath(kelas.getEmailDosen(kode_dosen), 'surat_perwalian', kelas.getTahunID()))
def makePdfAndSendToEmail(npm): checkDir() foldername = 'suratva' doc = SimpleDocTemplate(f'./{foldername}/SURAT-{npm}.pdf', pagesize=A4, rightMargin=30, leftMargin=30, topMargin=30, bottomMargin=18) doc.pagesize = portrait(A4) elements = [] for i in range(2): namaOrtu = kelas.getParentNamefromStudentID(npm)[i] noTelp = kelas.getParentTelpNumberandHandphoneNumber(npm)[0] noHandphone = kelas.getParentTelpNumberandHandphoneNumber(npm)[1] emailOrtu = kelas.getParentEmailfromStudentID(npm) if i == 0: pekerjaanOrtu = getPekerjaanOrtuAyah(npm) else: pekerjaanOrtu = getPekerjaanOrtuIbu(npm) alamatLengkapOrtu = getAlamatLengkapOrtu(npm) hari = datetime.now().strftime('%d') bulan = bkd.bulanSwitcher(datetime.now().strftime('%m')) tahun = datetime.now().strftime('%Y') logo = Image("logo.png", 7.3 * inch, 1 * inch) logo.hAlign = "CENTER" elements.append(logo) pdfmetrics.registerFont(TTFont('TNR', 'timesdownload.ttf')) pdfmetrics.registerFont(TTFont('TNRB', 'timesdownloadbd.ttf')) styles = getSampleStyleSheet() styles.add(ParagraphStyle(name='Justify', alignment=TA_JUSTIFY)) styles.add(ParagraphStyle(name='Center', alignment=TA_CENTER)) styles.add(ParagraphStyle(name='Right', alignment=TA_RIGHT)) styles.add( ParagraphStyle(name='surat_pernyataan_style', fontName="TNRB", fontSize=16, alignment=TA_CENTER)) styles.add(ParagraphStyle(name='Times', fontName="TNR")) ptext = '<font>SURAT PERNYATAAN</font>' elements.append( Paragraph(f'<u>{ptext}</u>', styles["surat_pernyataan_style"])) elements.append(Spacer(1, 35)) ptext = f'<font name="Times" size="10">Yang bertanda tangan di bawah ini :</font>' elements.append(Paragraph(ptext, styles["Justify"])) elements.append(Spacer(1, 8)) data = [ [ f'<font name="Times" size="10">Nama</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{namaOrtu}</font>' ], [ f'<font name="Times" size="10">KTP</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10"> </font>' ], [ f'<font name="Times" size="10">No. Telepon</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{noTelp}</font>' ], [ f'<font name="Times" size="10">No. HP/WA</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{noHandphone}</font>' ], [ f'<font name="Times" size="10">Alamat E-mail</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{emailOrtu}</font>' ], [ f'<font name="Times" size="10">Pekerjaan</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{pekerjaanOrtu}</font>' ], [ f'<font name="Times" size="10">Alamat</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{alamatLengkapOrtu}</font>' ], [ f'<font name="Times" size="10">Lampiran</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">FC KTP dan KK orang tua/Wali (Wajib)</font>' ] ] style = TableStyle([ ('VALIGN', (0, 0), (-1, -1), 'TOP'), ('ALIGN', (0, 0), (-1, -1), 'LEFT'), ]) s = getSampleStyleSheet() s = s["BodyText"] s.wordWrap = 'CJK' data1 = [[Paragraph(cell, s) for cell in row] for row in data] tab = Table(data1, hAlign='LEFT', colWidths=[3 * cm, .5 * cm, 10 * cm]) tab.setStyle(style) elements.append(tab) elements.append(Spacer(1, 0.35 * inch)) ptext = f'<font name="Times" size="10">Adalah orang tua/wali dari Mahasiswa Politeknik Pos Indonesia :</font>' elements.append(Paragraph(ptext, styles["Justify"])) elements.append(Spacer(1, 8)) data = [ [ f'<font name="Times" size="10">Nama</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{kelas.getStudentNameOnly(npm)}</font>' ], [ f'<font name="Times" size="10">NPM</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{npm}</font>' ], [ f'<font name="Times" size="10">No. HP</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{kelas.getStudentPhoneNumberFromNPM(npm)}</font>' ], [ f'<font name="Times" size="10">Alamat E-mail</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{kelas.getStudentEmail(npm)}</font>' ], [ f'<font name="Times" size="10">Prodi/Kelas</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{kelas.getProdiNameWithStudentID(npm)}/{kelas.getKelasMahasiswabyStudentID(npm)}</font>' ], [ f'<font name="Times" size="10">Angkatan</font>', '<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{kelas.getTahunAngkatanWithStudentID(npm)}</font>' ], ] style = TableStyle([ ('VALIGN', (0, 0), (-1, -1), 'TOP'), ('ALIGN', (0, 0), (-1, -1), 'LEFT'), ]) s = getSampleStyleSheet() s = s["BodyText"] s.wordWrap = 'CJK' data1 = [[Paragraph(cell, s) for cell in row] for row in data] tab = Table(data1, hAlign='LEFT', colWidths=[3 * cm, .5 * cm, 10 * cm]) tab.setStyle(style) elements.append(tab) elements.append(Spacer(1, 0.25 * inch)) ptext = f'<font name="Times" size="10">Dengan ini telah melakukan pembayaran sebesar Rp. .................................................................... (.............................................................................) serta menyatakan akan melunasi sisa kewajiban pembayaran uang SPP/Variabel/Tugas Akhir/PKL sebesar Rp. (...............................................................................) Paling lambat tanggal ...........................................................................</font>' elements.append(Paragraph(ptext, styles["Justify"])) elements.append(Spacer(1, 6)) ptext = f'<font name="Times" size="10">Demikian surat pernyataan ini saya buat dengan sebenarnya untuk dipergunakan sebagaimana mestinya. Apabila saya melalaikan surat pernyataan ini, maka saya bersedia menerima sanksi sesuai dengan ketentuan yang berlaku di Politeknik Pos Indonesia.</font>' elements.append(Paragraph(ptext, styles["Justify"])) elements.append(Spacer(1, 12.5)) data = [ [ '', '', Paragraph( f'<font name="Times">Bandung, {hari} {bulan} {tahun}</font>', styles["Center"]) ], [ Paragraph(f'<font name="Times">Mengetahui,</font>', styles["Justify"]), '', Paragraph( f'<font name="Times">Yang Membuat Pernyataan,</font>', styles["Center"]) ], [ Paragraph('<font name="Times">Dosen Wali</font>', styles["Justify"]), '', Paragraph('<font name="Times">Orang Tua/Wali</font>', styles["Center"]) ], ['', '', ''], [ '', '', Paragraph('<font name="Times">Materai</font>', styles["Center"]) ], ['', '', ''], [ Paragraph( f'<font name="Times">{kelas.getNamaDosen(kelas.getPenasehatAkademik(npm))}</font>', styles["Justify"]), '', Paragraph(f'<font name="Times">{namaOrtu}</font>', styles["Center"]) ], [ '', Paragraph('<font name="Times">Menyetujui,</font>', styles["Center"]), '' ], [ '', Paragraph('<font name="Times">Wadir 2 / Ka. BAUK</font>', styles["Center"]), '' ], ['', '', ''], [ '', Paragraph( '<font name="Times">...........................................</font>', styles["Center"]), '' ], ] table = Table(data, [7 * cm, 4.3 * cm, 7 * cm], [ 1 * cm, .5 * cm, .5 * cm, .65 * cm, .4 * cm, .65 * cm, .5 * cm, .5 * cm, .5 * cm, 1.7 * cm, .5 * cm ]) table.setStyle( TableStyle([ ('FONT', (0, 0), (-1, -1), 'Times-Roman', 12), ('ALIGN', (0, 0), (-1, -1), 'CENTER'), ])) elements.append(table) doc.build(elements) bkd.mail( kelas.getStudentEmail(npm), f'eyyyyooww {config.bot_name} kirim file SURAT PERNYATAAN PENGANGGUHAN SPP/VARIABEL nihhh', f'coba dicek dulu ya datanya, jika belum benar, coba cek SIAP-nya ya ubah lagi datanya, terus minta lagi ke {config.bot_name}, untuk surat pernyataannya', getFilePath(npm, foldername))
def makePDFandSEND(kode_pleton, nama_pleton, group_name, materi, npm_koor_pleton): folder_name='absensi_cb' checkDir(folder_name) doc = SimpleDocTemplate(f'./{folder_name}/ABSENSI-CB-PLETON-{npm_koor_pleton}-{kode_pleton}-{nama_pleton}-{kelas.getStudentEmail(npm_koor_pleton)}.pdf', pagesize=letter, leftMargin=30, rightMargin=30, topMargin=.1, bottomMargin=130) doc.pagesize = portrait(A4) elements = [] elements.append(Image(f'./skpi/header.png', 19 * cm, 2.5 * cm)) elements.append(Spacer(1, 0 * cm)) absensi_from_log = kelas.getnumonly(groupname=group_name, tipe='daring') npm_and_nama = [] for phone_number in absensi_from_log: peserta_cb_phone_number = numbers.normalize(phone_number[0]) if peserta_cb_phone_number in config.nomor_koor_pleton_cb: continue else: npm_nama = kelas.getNpmandNameMahasiswa(peserta_cb_phone_number) npm_and_nama.append(npm_nama) pdfmetrics.registerFont(TTFont('TNR', 'timesdownload.ttf')) pdfmetrics.registerFont(TTFont('TNRB', 'timesdownloadbd.ttf')) styles = getSampleStyleSheet() styles.add(ParagraphStyle(name='Justify', alignment=TA_JUSTIFY)) styles.add(ParagraphStyle(name='Center', alignment=TA_CENTER)) styles.add(ParagraphStyle(name='Right', alignment=TA_RIGHT)) styles.add(ParagraphStyle(name='absensi_cb_style', fontName="TNRB", fontSize=14, alignment=TA_CENTER)) styles.add(ParagraphStyle(name='Times', fontName="TNR")) ptext = '<font>ABSENSI CHARACTER BUILDING 2020</font>' elements.append(Paragraph(f'{ptext}', styles["absensi_cb_style"])) elements.append(Spacer(1, 35)) waktu_tanggal=datetime.now().strftime("%d-%m-%Y %H:%M:%S") data = [ [f'<font name="Times" size="10">Kode Pleton</font>', f'<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{kode_pleton}</font>', f'<font name="Times" size="10">Nama Pleton</font>', f'<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{nama_pleton}</font>'], [f'<font name="Times" size="10">Materi</font>', f'<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{materi}</font>', f'<font name="Times" size="10">Tanggal dan Waktu</font>', f'<font name="Times" size="10">:</font>', f'<font name="Times" size="10">{waktu_tanggal}</font>'], ] style = TableStyle( [ ('VALIGN', (0, 0), (-1, -1), 'MIDDLE'), ('ALIGN', (0, 0), (-1, -1), 'CENTER'), ] ) s = getSampleStyleSheet() s = s["BodyText"] s.wordWrap = 'CJK' data1 = [[Paragraph(cell, s) for cell in row] for row in data] tab = Table(data1, hAlign='CENTER', colWidths=[2.5*cm, .5*cm, 4.5*cm, 4*cm, .5*cm, 4.5*cm]) tab.setStyle(style) elements.append(tab) elements.append(Spacer(1, 0.35 * inch)) data = [['Nomor', 'NPM', 'Nama', 'Program Studi']] nomor=1 for npmnama in npm_and_nama: if npmnama: data_for_append=[] data_for_append.append(f'{str(nomor)}.') data_for_append.append(npmnama[0]) data_for_append.append(npmnama[1]) data_for_append.append(kelas.getProdiNameWithStudentID(npmnama[0])) data.append(data_for_append) nomor+=1 else: continue style = TableStyle([('FONT', (0, 0), (-1, -1), 'Helvetica-Bold'), ('VALIGN', (0, -1), (-1, -1), 'MIDDLE'), ('ALIGN', (0, -1), (-1, -1), 'CENTER'), ('INNERGRID', (0, 0), (-1, -1), 0.50, colors.black), ('BOX', (0, 0), (-1, -1), 0.25, colors.black) ]) s = getSampleStyleSheet() s = s["Normal"] s.wordWrap = 'CJK' data2 = [[Paragraph(cell, s) for cell in row] for row in data] t = Table(data2, hAlign='CENTER', colWidths=[1.5 * cm, 2 * cm, 8 * cm, 6 * cm]) t.setStyle(style) elements.append(t) elements.append(Spacer(1, 10)) ptext = '<font size=10> </font>' elements.append(Paragraph(ptext, styles["Right"])) elements.append(Spacer(1, .5 * inch)) bulan = date.today().strftime("%m") d2 = date.today().strftime(f"%d {bkd.bulanSwitcher(bulan)} %Y") ptext = '<font name="Times" size="10">Bandung, ' + d2 + '</font>' elements.append(Paragraph(ptext, styles["Right"])) elements.append(Spacer(1, 12)) ptext = '<font name="Times" size="10">Koordinator Pleton,</font>' elements.append(Paragraph(ptext, styles["Right"])) elements.append(Spacer(1, .1 * inch)) qrcode_path=makeQrcodeLinkVerifySign(link=makeLinkVerifiy(npm_koor_pleton), nama_pleton=nama_pleton, kode_pleton=kode_pleton, npm_koor_pleton=npm_koor_pleton) im = Image(qrcode_path, 1.5 * inch, 1.5 * inch) im.hAlign = "RIGHT" elements.append(im) ptext = '<font name="Times" size="10">' + kelas.getStudentNameOnly(npm_koor_pleton) + '</font>' elements.append(Paragraph(ptext, styles["Right"])) elements.append(Spacer(1, 1)) ptext = '<font name="Times" size="10">NIM. ' + npm_koor_pleton + '</font>' elements.append(Paragraph(ptext, styles["Right"])) elements.append(Spacer(1, 1)) doc.build(elements, onFirstPage=header_footer, onLaterPages=header_footer) bkd.mail( kelas.getStudentEmail(npm_koor_pleton), f'Halooooo, {config.bot_name} ngirim file nich....', f'ini ya file Absensi Character Building 2020 yang Akang/Teteh minta silahkan di cek... ehee....', getFilePath( kelas.getStudentEmail(npm_koor_pleton), folder_name, kode_pleton, nama_pleton, npm_koor_pleton ) ) msgreply = f'Kode Pleton: {kode_pleton}\n' \ f'Nama Pleton: {nama_pleton}\n' \ f'Materi: {materi}\n' \ f'Koordinator Pleton: {kelas.getStudentNameOnly(npm_koor_pleton)}\n' \ f'Tanggal dan Waktu: {waktu_tanggal}\n' \ f'Absensi Peserta CB:\n' number = 1 for data_npm_nama in npm_and_nama: if data_npm_nama: msgreply += f'{number}. {data_npm_nama[0]} - {data_npm_nama[1]}\n' number += 1 else: continue return msgreply
def replymsg(driver, data): ssl._create_default_https_context = ssl._create_unverified_context num = numbers.normalize(data[0]) studentid,studentname=kelas.getNpmandNameMahasiswa(num) tipe_bimbingan = cek_bimbingan_dosen.cekTipeBimbingan(data[3]) statusapprovalkambing = cekApprovalKambingAtBeginning(studentid, tipe_bimbingan) if tipe_bimbingan: if statusapprovalkambing is not None: if tipe_bimbingan == 'ta': if 'false' in statusapprovalkambing or '' in statusapprovalkambing: msgreply = 'wiwiwiwiwi KAMBING kamu belum di approve nih sama Bapak/Ibu dosen yang ini nih:' if 'false' == statusapprovalkambing[0] or '' == statusapprovalkambing[0]: kodedosen1 = getKodeDosenBimbingan(studentid)[0] namadosen = kelas.getNamaDosen(kodedosen1) msgreply += f'\n{kodedosen1} | {namadosen} | PEMBIMBING 1' if 'false' == statusapprovalkambing[1] or '' == statusapprovalkambing[1]: kodedosen1 = getKodeDosenBimbingan(studentid)[1] namadosen = kelas.getNamaDosen(kodedosen1) msgreply += f'\n{kodedosen1} | {namadosen} | PEMBIMBING 2' else: KODE_DOSEN_BIMBINGAN = getKodeDosenBimbingan(studentid) status_nilai1, nilai_total1 = totalNilai(studentid, config.MINIMUM_PERTEMUAN_BIMBINGAN, KODE_DOSEN_BIMBINGAN[0]) status_nilai2, nilai_total2 = totalNilai(studentid, config.MINIMUM_PERTEMUAN_BIMBINGAN, KODE_DOSEN_BIMBINGAN[1]) if status_nilai1 and status_nilai2: JUDUL_BIMBINGAN = getJudulBimbingan(studentid, kelas.getTahunID()) KODE_DOSEN_BIMBINGAN = getKodeDosenBimbingan(studentid) if KODE_DOSEN_BIMBINGAN is None: msgreply = f'data dengan npm {studentid} tidak ditemukan' else: for KODE_DOSEN in KODE_DOSEN_BIMBINGAN: NAMA_DOSEN = kelas.getNamaDosen(KODE_DOSEN) NIDN_DOSEN = getNIDNDosen(KODE_DOSEN) TAHUN_AJARAN = kelas.getTahunAjaran(kelas.getProdiIDwithStudentID(studentid)).split(' ')[-1] photo = berita_acara_pitak.cekPhotoRoute(studentid) makePdf( npm_mahasiswa=studentid, nama_mahasiswa=studentname, tipe_bimbingan=tipe_bimbingan, nama_pembimbing=NAMA_DOSEN, kode_dosen_pembimbing=KODE_DOSEN, nidn_pembimbing=NIDN_DOSEN, tahun_ajaran=TAHUN_AJARAN, photo=photo, judul=JUDUL_BIMBINGAN, total_nilai=totalNilai(studentid, config.MINIMUM_PERTEMUAN_BIMBINGAN, KODE_DOSEN)[1] ) bkd.mail(kelas.getDataMahasiswa(studentid)[3], f'eyyowwwwwww {config.bot_name} nihhhh mau nganter file yang kamu mintaaa', f'ini ya file KAMBING (Kartu Bimbingan) yang Akang/Teteh minta silahkan di cek... ehee....', bkd.getFilePath(kelas.getDataMahasiswa(studentid)[3], 'kambing', switcherTipeBimbingan(tipe_bimbingan))) msgreply = f"sudah selesai dan sudah dikirim ke email kamu yang {kelas.getDataMahasiswa(studentid)[3]} yaa...." else: msgreply = f'mohon maaf belum bisa cetak kartu bimbingan dikarenakan pertemuan masih ada yang kurang' if status_nilai1 == False: msgreply += f'\n{KODE_DOSEN_BIMBINGAN[0]} | {kelas.getNamaDosen(KODE_DOSEN_BIMBINGAN[0])}' if status_nilai2 == False: msgreply += f'\n{KODE_DOSEN_BIMBINGAN[1]} | {kelas.getNamaDosen(KODE_DOSEN_BIMBINGAN[1])}' else: if statusapprovalkambing[0] == 'false' or statusapprovalkambing[0] == '': msgreply = 'wiwiwiwiwi KAMBING kamu belum di approve nih sama Bapak/Ibu dosen yang ini nih:' kodedosen1 = getKodeDosenBimbingan(studentid)[0] namadosen = kelas.getNamaDosen(kodedosen1) msgreply += f'\n{kodedosen1} | {namadosen} | PEMBIMBING 1' else: KODE_DOSEN_BIMBINGAN = getKodeDosenBimbingan(studentid) status_nilai1, nilai_total1 = totalNilai(studentid, config.MINIMUM_PERTEMUAN_BIMBINGAN, KODE_DOSEN_BIMBINGAN[0]) if status_nilai1: JUDUL_BIMBINGAN = getJudulBimbingan(studentid, kelas.getTahunID()) KODE_DOSEN_BIMBINGAN = getKodeDosenBimbingan(studentid) if KODE_DOSEN_BIMBINGAN is None: msgreply = f'data dengan npm {studentid} tidak ditemukan' else: KODE_DOSEN = KODE_DOSEN_BIMBINGAN[0] NAMA_DOSEN = kelas.getNamaDosen(KODE_DOSEN) NIDN_DOSEN = getNIDNDosen(KODE_DOSEN) TAHUN_AJARAN = kelas.getTahunAjaran(kelas.getProdiIDwithStudentID(studentid)).split(' ')[-1] photo = berita_acara_pitak.cekPhotoRoute(studentid) makePdf( npm_mahasiswa=studentid, nama_mahasiswa=studentname, tipe_bimbingan=tipe_bimbingan, nama_pembimbing=NAMA_DOSEN, kode_dosen_pembimbing=KODE_DOSEN, nidn_pembimbing=NIDN_DOSEN, tahun_ajaran=TAHUN_AJARAN, photo=photo, judul=JUDUL_BIMBINGAN, total_nilai=totalNilai(studentid, config.MINIMUM_PERTEMUAN_BIMBINGAN, KODE_DOSEN)[1] ) getFilePath(kelas.getDataMahasiswa(studentid)[3], 'kambing', switcherTipeBimbingan(tipe_bimbingan)) bkd.mail(kelas.getDataMahasiswa(studentid)[3], f'eyyowwwwwww {config.bot_name} nihhhh mau nganter file yang kamu mintaaa', f'ini ya file KAMBING (Kartu Bimbingan) yang Akang/Teteh minta silahkan di cek... ehee....', getFilePath(kelas.getDataMahasiswa(studentid)[3], 'kambing', switcherTipeBimbingan(tipe_bimbingan))) msgreply = f"sudah selesai dan sudah dikirim ke email kamu yang {kelas.getDataMahasiswa(studentid)[3]} yaa...." else: msgreply = f'mohon maaf belum bisa cetak kartu bimbingan dikarenakan pertemuan masih ada yang kurang:' if status_nilai1 == False: msgreply += f'\n{KODE_DOSEN_BIMBINGAN[0]} | {kelas.getNamaDosen(KODE_DOSEN_BIMBINGAN[0])}' else: msgreply = f'mohon maaf data dengan npm {studentid} tidak bisa ditemukan' else: msgreply = 'Mana nihhhh tipe bimbingannya coba dicek lagi yaa....' return msgreply