Esempio n. 1
0
        header("Location:{$redirect}");
    }
}
$hldGlobal->fnTrackUser("Take Quiz", $_SESSION["MaInId"], $_GET["cid"], $_GET["qid"]);
$arrCourseName = $hldGlobal->fnFetchCourse($_GET["cid"]);
$hdlTpl->setVariable("cname", $arrCourseName[0]["cname"]);
//Assigns course name
$arrQuizquestion = $hldGlobal->fnGetQuizQuestion($_GET["qid"]);
if (is_array($arrQuizquestion) && count($arrQuizquestion) > 0) {
    $intCnt = 1;
    foreach ($arrQuizquestion as $key => $value) {
        $hdlTpl->setVariable("mid", $value["module_id"]);
        //Assign mid
        $hdlTpl->setVariable("quiz_title_id", $value["quiz_title_id"]);
        //Assign quiz title id
        $arrOption = $hldGlobal->fnFetchOption($value["id"]);
        $intCnt1 = count($arrOption);
        $strTab = "";
        if ($intCnt1) {
            $strTab .= '<table width="100%"  border="0" cellspacing="2" cellpadding="1">';
            for ($c = 0; $c < $intCnt1;) {
                $temp = $c;
                $strTab .= '<tr>';
                while ($c < $temp + 2) {
                    $strTab .= '<td width="50%" valign="top" align="left">';
                    $strTab .= '<input type="radio" name="opt[' . $value["id"] . ']" value="' . $arrOption[$c]["id"] . '" />' . $arrOption[$c]["options"];
                    $strTab .= '</td>';
                    $c++;
                    if ($c >= $intCnt1 && $c % 2) {
                        $strTab .= "<td>&nbsp;</td>";
                        break;