Overview
The Bulletin System generates comprehensive academic reports showing student grades, calculated averages, and pass/fail status. Students can view their own bulletins, while administrators can generate bulletins for any student.Academic Reports
Complete grade reports with all course results
Average Calculation
Automatic calculation of overall academic average
Pass/Fail Status
Determination of VALIDÉ or NON VALIDÉ status
Role-Based Access
Students see own bulletin, admins see all students
What is a Bulletin?
A bulletin (also called academic transcript or report card) is a formal document showing:- Student information (name, email)
- All courses with grades
- Teacher names for each course
- Calculated overall average
- Academic status (passed or failed)
Grading System:
- Numerical scale (typically 0-20 in French academic systems)
- Passing grade: 10.00 or higher
- VALIDÉ: Average ≥ 10.00 (passed)
- NON VALIDÉ: Average < 10.00 (failed)
Bulletin Architecture
Data Flow
Controller Implementation
Listing Students (Admin)
Admins can select which student’s bulletin to view:Generating Bulletin
Unified bulletin generation for both students and admins:Role-Based Access Logic
Role-Based Access Logic
For Students:
- Use logged-in user’s ID from session
- Cannot specify different student_id
- Can only view own bulletin
- Must provide
student_idas URL parameter - Can view any student’s bulletin
- Access:
/bulletin/show?student_id=5
Auth::check()ensures user is logged in- Students automatically restricted to own data
- URL parameter required for admin access
Grade Data Retrieval
Getting Bulletin Data
Retrieve all necessary information for the bulletin:Query Analysis
Query Analysis
JOINs:
- grades → courses: Link grade to course
- courses → subjects: Get subject name
- courses → teachers → users: Get teacher name
WHERE grades.student_id = ?: Only this student’s grades
subject: Course subject name (e.g., “Mathematics”)teacher: Teacher’s full name (e.g., “Mr. Smith”)grade: Numerical grade (e.g., 16.50)
Average Calculation
Calculation Algorithm
Simple arithmetic mean of all grades:- Initialize total to 0
- Count number of grades
- Sum all grade values
- Divide total by count
- Round to 2 decimal places
- If no grades, return 0
Example Calculation
Calculation Notes:
- All courses weighted equally (no credit hours)
- Simple arithmetic mean
- Rounded to 2 decimal places for display
- Empty grade list results in 0.00 average
Status Determination
Pass/Fail Logic
- VALIDÉ (Passed): Average ≥ 10.00
- NON VALIDÉ (Failed): Average < 10.00
- Average 16.17 → VALIDÉ ✅
- Average 10.00 → VALIDÉ ✅ (exactly 10 passes)
- Average 9.99 → NON VALIDÉ ❌
- Average 0.00 → NON VALIDÉ ❌ (no grades)
Academic Standard:
The 10.00 threshold is common in French academic systems where:
- 0-20 is the grading scale
- 10/20 represents 50% (minimum passing)
- 10.00+ is considered satisfactory performance
Complete Bulletin Controller
API Endpoints
| Method | Endpoint | Access | Description |
|---|---|---|---|
| GET | /bulletin | Admin | List all students |
| GET | /bulletin/show | Student | View own bulletin |
| GET | /bulletin/show?student_id={id} | Admin | View any student’s bulletin |
Use Cases
Use Case 1: Student Viewing Own Bulletin
Use Case 1: Student Viewing Own Bulletin
Context: John Doe wants to check his academic performanceFlow:
- John logs in as student
- Navigates to Bulletin section
- System detects role: ‘student’
- Uses session ID:
$student_id = john_id - Retrieves:
$student = findById(john_id)- Result:
{id: 5, name: 'John Doe', email: '[email protected]'}
- Result:
- Retrieves:
$grades = getBulletinData(john_id)- Result:
- Mathematics (Mr. Smith): 16.50
- Physics (Dr. Johnson): 14.00
- English (Ms. Williams): 18.00
- Result:
- Calculates:
- Total: 48.50
- Count: 3
- Average: 16.17
- Status: VALIDÉ (16.17 ≥ 10)
- Displays bulletin:
Use Case 2: Admin Viewing Student Bulletin
Use Case 2: Admin Viewing Student Bulletin
Context: Admin needs to review Jane Smith’s academic recordFlow:
- Admin navigates to
/bulletin - System shows list of all students
- Admin clicks on “Jane Smith” (id: 8)
- Redirects to:
/bulletin/show?student_id=8 - System detects role: ‘admin’
- Extracts:
$student_id = $_GET['student_id'] = 8 - Retrieves:
$student = findById(8) - Retrieves:
$grades = getBulletinData(8)- Result:
- Mathematics: 12.00
- Chemistry: 8.50
- Result:
- Calculates:
- Total: 20.50
- Count: 2
- Average: 10.25
- Status: VALIDÉ (10.25 ≥ 10)
- Displays Jane’s bulletin with all details
Use Case 3: Student with Failing Average
Use Case 3: Student with Failing Average
Context: Student has low gradesFlow:
- Student views bulletin
- Grades retrieved:
- Mathematics: 8.00
- Physics: 7.50
- English: 9.00
- Calculation:
- Total: 24.50
- Count: 3
- Average: 8.17
- Status: NON VALIDÉ (8.17 < 10)
- Bulletin displays:
- All grades shown
- Average: 8.17
- Status: NON VALIDÉ (highlighted/styled differently)
- Student sees they need to improve grades
Use Case 4: Student with No Grades Yet
Use Case 4: Student with No Grades Yet
Context: New student with no recorded gradesFlow:
- Student views bulletin
- Query:
getBulletinData(student_id) - Result: Empty array
[](no grades in database) - Calculation:
- Total: 0
- Count: 0
- Average: 0.00 (count > 0 check prevents division by zero)
- Status: NON VALIDÉ (0.00 < 10)
- Bulletin displays:
- No courses listed
- Average: 0.00
- Status: NON VALIDÉ
- Message: “No grades recorded yet”
Bulletin Display Example
Sample Bulletin Output
Data Dependencies
Important Dependency:
Bulletins only show courses with recorded grades. A student enrolled in
5 courses but with grades in only 3 will see a bulletin with 3 courses.
This is intentional - it shows actual academic performance, not just enrollment.
Best Practices
Accuracy
- Use precise decimal calculations
- Round only for display (2 decimals)
- Handle zero-grade edge cases
- Maintain calculation transparency
Security
- Enforce role-based access
- Students see only own data
- Validate student_id parameter
- Require authentication
Data Quality
- Show only courses with grades
- Include teacher attribution
- Display complete student info
- Handle empty grade lists gracefully
User Experience
- Clear pass/fail indication
- Organized grade presentation
- Easy-to-read average display
- Professional bulletin format
Grading Scale Reference
Common Interpretation (0-20 Scale)
Common Interpretation (0-20 Scale)
| Range | Interpretation | Status |
|---|---|---|
| 18-20 | Excellent | VALIDÉ |
| 16-17.99 | Very Good | VALIDÉ |
| 14-15.99 | Good | VALIDÉ |
| 12-13.99 | Satisfactory | VALIDÉ |
| 10-11.99 | Passing | VALIDÉ |
| 8-9.99 | Insufficient | NON VALIDÉ |
| 6-7.99 | Poor | NON VALIDÉ |
| 0-5.99 | Very Poor | NON VALIDÉ |
The bulletin system provides a comprehensive academic report while
maintaining security, accuracy, and user-friendly presentation. It serves
as the primary tool for students to monitor their academic progress and
for administrators to assess student performance.