<?php
require_once '../../config/config.php';
header('Content-Type: application/json');
try { if(!isset($_GET['id'])){ echo json_encode(null); exit; } $id=(int)$_GET['id']; $stmt=$pdo->prepare('SELECT grading_system_id, system_name, course_id, is_active FROM grading_systems WHERE grading_system_id=?'); $stmt->execute([$id]); echo json_encode($stmt->fetch(PDO::FETCH_ASSOC)?:null); } catch(Throwable $e){ http_response_code(500); echo json_encode(['error'=>$e->getMessage()]); }
?>


