예제 #1
0
파일: wpt.php 프로젝트: seaside7/wom_psi
function loadWPT($UsrDef)
{
    $content = '<div class="col-md-12" role="main">';
    $content .= '<div class="page-title">';
    $content .= '<div id="title-left" align="center" class="col-md-12"><h3>WPT</h3></div>';
    $content .= "</div>";
    $content .= "<div class='col-md-6 col-md-offset-3' style='padding-bottom: 10px;' id='rules'><fieldset class=contentInfo style='margin-top:0 '>\n\t\t\t\t<center><h4>Ketentuan Pengerjaan Tes WPT</h4></center>\n\t\t\t\t\t\t<div class='col-md-12'><ol>\n\t\t\t\t\t\t\t<li>Tes WPT terdiri dari 50 soal.</li>\n\t\t\t\t\t\t\t<li>Tuliskan jawaban setiap pertanyaan pada kotak yang telah disediakan.</li>\n\t\t\t\t\t\t\t<li>Jika dalam isi jawaban terdapat jawaban dengan tanda koma (,) maka koma diganti dengan titik (.) Contoh (3.5).</li>\n\t\t\t\t\t\t\t<li>Waktu pengerjaan tes dibatasi 12 menit.</li>\n\t\t\t\t\t\t\t<li>Dilarang menggunakan alat bantu hitung.</li>\n\t\t\t\t\t\t\t<li>Klik tombol start untuk memulai tes.</li>\n\t\t\t\t\t\t</ol></div></fieldset></div>";
    $content .= '<div class="col-md-12" id="btstart" align="center"><input type=button id="btnstart" tabindex="-1" value="Start"></div>';
    $content .= '<form action="" method="post" enctype="multipart/form-data" id="formWPT" name="formWPT">';
    $content .= LocalWPTForm($UsrDef, '0');
    $content .= "</form>";
    $content .= "</div>";
    echo $content;
}
예제 #2
0
파일: wpt.php 프로젝트: seaside7/wom_psi
         }
     } else {
         if (str_replace(' ', '', strtolower($_GET['txtans' . $x])) == str_replace(' ', '', strtolower($_GET['hdans_' . $x]))) {
             $benar = $benar + 1;
         }
     }
 }
 $_SESSION['benar'][$limit] = $benar;
 // print_r($_SESSION);
 if ($po == "previousPage") {
     $limit = $_GET['limit'] - 10;
     echo LocalWPTForm($_GET['id'], $limit);
 } else {
     if ($po == "nextPage") {
         $limit = $_GET['limit'] + 10;
         echo LocalWPTForm($_GET['id'], $limit);
     } else {
         if ($po == "saveHasilWPT") {
             $totalbenar = 0;
             for ($y = 0; $y <= 40; $y += 10) {
                 $totalbenar = $totalbenar + $_SESSION['benar'][$y];
             }
             list($usia) = sql_fetchrow(sql_query("SELECT usia FROM user WHERE no_ktp = '" . $_GET['id'] . "'"));
             if ($usia > 40) {
                 $totalbenar = $totalbenar + 2;
             } else {
                 if ($usia > 30) {
                     $totalbenar = $totalbenar + 1;
                 }
             }
             list($wpt_iq) = sql_fetchrow(sql_query("SELECT wpt_iq FROM wpt_mapping WHERE wpt_skor = '" . $totalbenar . "'"));