<?php
chdir('../../');
require_once 'autoload.php';
$exam_session = new exam_sessions_controller;

if ($_SERVER['REQUEST_METHOD'] === 'GET' && isset($_GET['csrf_token']) && isset($_GET['csrf_form_id']) && $waf->csrf_validate($_GET['csrf_form_id'], $_GET['csrf_token'], $utility->action_name())) {

$exam_session->destroy($_GET['id']);

$utility->setMessage("success", 'Exam session deleted');

header("location:../sessions");

}else{
header("location:../sessions");
}
?>
