|
7 | 7 | def main(): |
8 | 8 | db = next(database.get_db()) |
9 | 9 | print("Enter certificate details:") |
| 10 | + |
10 | 11 | student_name = input("Student name: ") |
11 | 12 | course_title = input("Course title: ") |
12 | 13 | completion_date = input("Completion date (YYYY-MM-DD): ") |
13 | 14 | duration_hours = int(input("Duration (hours): ")) |
| 15 | + attendance_percentage = int(input("Attendance percentage (0-100): ")) |
| 16 | + assignment_completion_percentage = int(input("Assignment completion percentage (0-100): ")) |
| 17 | + course_level = input("Course level (e.g. Master-level, Bachelor-level, High School-level): ") |
| 18 | + course_format = input("Course format (e.g. Online (via Zoom), In-person, Hybrid): ") |
| 19 | + instruction_language = input("Instruction language (e.g. English, German, Arabic): ") |
14 | 20 | cert_in = schemas.CertificateCreate( |
15 | 21 | student_name=student_name, |
16 | 22 | course_title=course_title, |
17 | 23 | completion_date=completion_date, |
18 | | - duration_hours=duration_hours |
| 24 | + duration_hours=duration_hours, |
| 25 | + attendance_percentage=attendance_percentage, |
| 26 | + assignment_completion_percentage=assignment_completion_percentage, |
| 27 | + course_level=course_level, |
| 28 | + course_format=course_format, |
| 29 | + instruction_language=instruction_language |
19 | 30 | ) |
20 | 31 | cert = crud.create_certificate(db, cert_in) |
21 | 32 | print(f"Created certificate: {cert.certificate_id}") |
| 33 | + print(f"Verification URL: https://mathcodelab.de/verify/?id={cert.certificate_id}") |
22 | 34 |
|
23 | 35 | if __name__ == "__main__": |
24 | 36 | main() |
0 commit comments