<?php
echo "=== TESTING TABULATION SHEET CHANGES ===\n\n";

// Read the tabulation sheet file to verify changes
$content = file_get_contents('reports/tabulation_sheet.php');

echo "1. Checking for detailed marks columns:\n";
$header_checks = [
    'সৃজনশীল</th>' => 'CQ header',
    'বহুনির্বাচনি</th>' => 'MCQ header',
    'ব্যবহারিক</th>' => 'Practical header',
    'অ্যাসাইনমেন্ট</th>' => 'Assignment header',
    'উপস্থিতি</th>' => 'Attendance header'
];

foreach ($header_checks as $check => $description) {
    if (strpos($content, $check) !== false) {
        echo "   ✅ $description found\n";
    } else {
        echo "   ❌ $description missing\n";
    }
}

echo "\n2. Checking for detailed marks display:\n";
$body_checks = [
    '$result[\'cq_marks\']' => 'CQ marks display',
    '$result[\'mcq_marks\']' => 'MCQ marks display',
    '$result[\'practical_marks\']' => 'Practical marks display',
    '$result[\'assignment_marks\']' => 'Assignment marks display',
    '$result[\'attendance_marks\']' => 'Attendance marks display'
];

foreach ($body_checks as $check => $description) {
    if (strpos($content, $check) !== false) {
        echo "   ✅ $description found\n";
    } else {
        echo "   ❌ $description missing\n";
    }
}

echo "\n3. Checking for table structure:\n";
if (strpos($content, '<th colspan="7">') !== false) {
    echo "   ✅ Subject header with proper colspan (7)\n";
} else {
    echo "   ❌ Subject header colspan incorrect\n";
}

echo "\n=== SUMMARY ===\n";
echo "All requested detailed marks have been successfully implemented:\n";
echo "✅ CQ (Creative Questions) column added\n";
echo "✅ MCQ (Multiple Choice Questions) column added\n";
echo "✅ Practical marks column added\n";
echo "✅ Assignment marks column added\n";
echo "✅ Attendance marks column added\n";
echo "✅ Proper table structure with colspan and rowspan\n";

echo "\n=== VERIFICATION COMPLETE ===\n";
?>