Exemplo n.º 1
0
        }
    }
}
date_default_timezone_set('Asia/Kolkata');
if (isset($_POST['Agree']) && isset($_SESSION["email"])) {
    //echo $_SESSION["email"];
    $cn = $_SESSION["CName"];
    $todayDate = date("Y-m-d");
    //$todayDate=date("2016-04-13");
    $em = $_SESSION["email"];
    $tn = $cn . $todayDate;
    $result25 = checkFormultipleattemp($em, $tn);
    //while ($row25=$result25->fetch_assoc())
    $row25 = $result25->fetch_assoc();
    if (!isset($row25['SerialNo'])) {
        $result3 = CountVisibleQuestion($_SESSION["CName"], $todayDate);
        while ($row1 = $result3->fetch_assoc()) {
            $visi = (int) $row1['Visible'];
        }
        $result = select_Domain_id($_SESSION["CName"]);
        $id = "";
        $time = "";
        while ($row = $result->fetch_assoc()) {
            $id = $row["Topic_id"];
        }
        $result4 = SelectExamDateTime($_SESSION["CName"] . $todayDate, $_SESSION["email"]);
        while ($row2 = $result4->fetch_assoc()) {
            $examDate = $row2['SerialNo'];
        }
        if ($visi !== 0) {
            if (isset($examDate)) {
Exemplo n.º 2
0
while ($row = $result->fetch_assoc()) {
    $ans = $row['Answer'];
}
//$ans="1::bb,2::cc";
//$ans=substr($an, 1,-1);
$ans = explode(",", $ans);
//var_dump($ans);
//print_r($ans);
for ($i = 0; $i < sizeof($ans); $i++) {
    $ans[$i] . "<br>";
    $temp = array();
    $temp = explode("::", $ans[$i]);
    // var_dump($temp);
}
$todayDate = date("Y-m-d");
$totalquestion = CountVisibleQuestion($_GET['cname'], $todayDate);
while ($row = $totalquestion->fetch_assoc()) {
    $TotalQuestion = $row['Visible'];
}
// echo $Total;
// echo $TotalQuestion;
$score = $score / $Total * $TotalQuestion;
//Negative marking
//echo $score;
for ($i = 0; $i < sizeof($ans1); $i++) {
    if (!in_array($ans1[$i], $checkForNegative)) {
        // var_dump($checkForNegative);
        // echo $ans1[$i];
        $QN = explode("::", $ans1[$i]);
        $qn = $QN[0];
        $qn = $qn - 1;