CLI Reference
This page provides a detailed reference for all the command-line interface (CLI) options available in GradeForge. The CLI is implemented in the GradeForge class ingradeforge.py.
Main Menu Options
When you run GradeForge, you'll be presented with the following main menu options:
========================================
Main Menu:
1. Add New Student
2. Assign Subject to Student
3. Input Grades for Subject
4. View Student Performance Summary
5. Generate Full Student Report
6. List All Students
7. List Available Subjects (Templates)
8. Export All Data to CSV
9. Save Data
10. Delete Student
0. Exit
========================================
Enter your choice:Command Reference
1. Add New Student
This option allows you to add a new student to the system.
- Prompts:
- Student Name: Enter the name of the student
- Student ID: Enter a unique ID for the student
- Student Type: Enter 1 for High School, 2 for College, or press Enter for Generic
- Major (College students only): Enter the student's major
- Validation:
- Name and ID cannot be empty
- ID must be unique (not already in use)
- Output: Confirmation message that the student was added successfully
2. Assign Subject to Student
This option allows you to assign a subject to a student.
- Prompts:
- Student ID: Enter the ID of an existing student
- Subject Code: Enter the code of an existing subject template or a new subject
- Subject Name (if new): Enter the name of the new subject
- Credit Hours (College students only): Enter the number of credit hours for this enrollment
- Validation:
- Student ID must exist in the system
- Subject code must be valid (existing or new)
- Student must not already be enrolled in the subject
- Output: Confirmation message that the subject was assigned successfully
3. Input Grades for Subject
This option allows you to input grades for a specific subject a student is enrolled in.
- Prompts:
- Student ID: Enter the ID of an existing student
- Subject Code: Enter the code of a subject the student is enrolled in
- Grade Description: Enter a description for the grade (e.g., "Midterm Exam")
- Letter Grade (College students): Enter a valid letter grade (A+, A, A-, etc.)
- Numeric Score (High School/Generic students): Enter a numeric score (0-100)
- Validation:
- Student ID must exist in the system
- Subject code must be valid and the student must be enrolled in it
- Grade description must be unique for the subject
- Letter grade must be valid (for College students)
- Numeric score must be in the valid range (for High School/Generic students)
- Output: Confirmation message that the grade was added successfully
4. View Student Performance Summary
This option allows you to view a summary of a student's performance.
- Prompts:
- Student ID: Enter the ID of an existing student
- Output:
- For College students: GPA, academic status, and F grade alert
- For High School/Generic students: Subject averages, overall average, and pass/fail status
5. Generate Full Student Report
This option allows you to generate a detailed report for a specific student.
- Prompts:
- Student ID: Enter the ID of an existing student
- Output: A detailed report including student details, enrolled subjects, grades, and performance metrics
6. List All Students
This option lists all students in the system.
- Output: A list of all students with their basic information
7. List Available Subjects (Templates)
This option lists all available subject templates in the system.
- Output: A list of all subject templates with their basic information
8. Export All Data to CSV
This option allows you to export all data to a CSV file.
- Prompts:
- CSV Filename: Enter the name of the CSV file to create
- Output: Confirmation message that the data was exported successfully
9. Save Data
This option saves all data to the gradeforge_data.json file.
- Output: Confirmation message that the data was saved successfully
10. Delete Student
This option allows you to delete a student from the system.
- Prompts:
- Student ID: Enter the ID of an existing student
- Confirmation: Enter 'y' to confirm deletion
- Output: Confirmation message that the student was deleted successfully
0. Exit
This option saves all data and exits the application.
- Output: Confirmation message that the data was saved and the application is exiting