<?php
// Set up the same parameters as in the original request
$_GET['roll'] = '101';
$_GET['class'] = 'ONE';
$_GET['session'] = '2025';
$_GET['exam'] = 'midterm';

// Capture the output of the public_report.php
ob_start();
include 'public_report.php';
$output = ob_get_clean();

// Check if GPA is displayed in the output
if (strpos($output, 'জিপিএ (GPA)') !== false) {
    echo "SUCCESS: GPA is being displayed in the public report page.\n";
    
    // Extract the GPA value from the output
    if (preg_match('/জিপিএ \(GPA\):<\/span>\s*<span[^>]*>(.*?)<\/span>/s', $output, $matches)) {
        echo "GPA Value Found: " . trim(strip_tags($matches[1])) . "\n";
    } else {
        echo "Could not extract GPA value from the output.\n";
    }
} else {
    echo "ERROR: GPA is not being displayed in the public report page.\n";
}

// Also check for the grade point display
if (strpos($output, 'পয়েন্ট:') !== false) {
    echo "SUCCESS: Grade point is being displayed.\n";
} else {
    echo "ERROR: Grade point is not being displayed.\n";
}
?>