<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

include('../../../config/config.php');


$studentIDnew = $_POST["studentIDnew"];

$studentcampus = $_POST["studentcampus"];

$assignmentid = $_POST["assignmentid"];
$studentIDnew = explode(',', $studentIDnew);
// $ObjectAnswer = explode(',', $ObjectAnswer);

foreach($studentIDnew as $student)
{

    $resetassignment = mysqli_query($link, "UPDATE `assignmentanswer` SET`resetstatus`= 1 WHERE `CampusID`= '$studentcampus' AND `AssignmentSettingsID` = '$assignmentid' AND `StudentID` = '$student'");

}

if($resetassignment == true)
{
    echo 'success';

}else
{
    echo 'failed';
}



?>