<?php
// exit(urldecode($_POST['SubDir']));
require_once("../../../../general/TaquaLB/Elements/Elements.php");
$configdir = "../../../../../../".urldecode($_POST['SubDir']);
require_once("../../../../general/config.php");
//require("../../../../general/getinfo.php");

/* if(isset($_POST['exid']) && (int)$_POST['exid'] > 0 && isset($_POST['bases'])){

} */
if((int)$_POST['type'] == 0){
/* Table("rowselect=false,style=width:100%;font-size:0.8em;margin:auto;text-align:left;margin-top:0px;border-top-color:transparent,id=mkquestlist,multiselect=false,data-type=table,onselect=Student.RegReport.NullFunc,rowalt=true,rowfilter=true,filtertitle=Filter Exam Question,filterstyle=width:100%");
 THeader(array("#","Question"));

    $rw = 1;
    while($rw < 20){
//$sel = ((int)$PayID == (int)$rw['ID'])?'-1':'';
TRecord(array($rw,"Question Question Question ".$rw),"");
$rw++;
//TRecord(array($rw['ItemName'].""),"style=text-align:left,id=".$rw['ID'].",selected=true");
    }
 _Table(); */
 Box("class=defaultTabText");
 Box();Icon("info-circle fa-3x");_Box();
  Box();echo"NOT ALLOWED";_Box();  
 Box();echo"Marking/Viewing CBT Result by Question is temporarily not allowed";_Box();  
_Box();

}else{
    //get all the student that write exam for this shedule
    $studs = $dbo->Select("cbt_studentquestions_tb","","OriginalSchedID={$_POST['SchID']}");
    if($studs[1] > 0){
        Table("style=width:100%;font-size:0.8em;margin:auto;text-align:left;margin-top:0px;border-top-color:transparent,id=mkcandlist,multiselect=false,data-type=table,onselect=Cbt.Mark.LoadQuestions,rowalt=true,rowfilter=true,filtertitle=Filter Candidate,filterstyle=width:100%,rowselect=true");
    THeader(array("#","Reg.No.","Name","Status"));
       $rw = 1;
       while($rec = $studs[0]->fetch_assoc()){
   //$sel = ((int)$PayID == (int)$rw['ID'])?'-1':'';
   TRecord(array($rw,$rec['RegNo'],$rec['Candidate'],$rec['Finish']==0?'InProgress':'Finished'),"data-id={$rec['ID']}");
   $rw++;
   //TRecord(array($rw['ItemName'].""),"style=text-align:left,id=".$rw['ID'].",selected=true");
       }
    /*   }
   } */
   
    _Table(); 
    }else{
        Box("class=defaultTabText");
        Box();Icon("info-circle fa-3x");_Box();
         Box();echo"NO STUDENT/RESULT";_Box();  
        Box();echo"No Student has written the Examination";_Box();  
       _Box();
    }
   
}



?>