<?php
include("../../db.php");
header('Content-Type: application/json');

$chapterId = $_GET['chapter_id'];

$status = 0;

if ($chapterId != null && $chapterId != ''){

    $attemptpaper = $db->getRows("select * from assignment_paper WHERE chapter='$chapterId' AND paper_type='2'");

    $status = 1;

}


$array['status'] = $status;

$array['count'] = count($attemptpaper);

echo json_encode($array);

