<?php
// Script to fix the syntax error in the marksheet

$file_path = 'reports/all_subjects_marksheet.php';
$content = file_get_contents($file_path);

// Fix the CQ section syntax error
$content = str_replace(
    "echo implode(', ', $individual_marks) . ' (গড়: ' . floor($avg_cq) . ')'; else {",
    "echo implode(', ', $individual_marks) . ' (গড়: ' . floor($avg_cq) . ')';\n                            } else {",
    $content
);

// Fix the MCQ section syntax error
$content = str_replace(
    "echo implode(', ', $individual_marks) . ' (গড়: ' . floor($avg_mcq) . ')'; else {",
    "echo implode(', ', $individual_marks) . ' (গড়: ' . floor($avg_mcq) . ')';\n                            } else {",
    $content
);

file_put_contents($file_path, $content);
echo "Syntax error fixed successfully!\n";
?>