$strFooter = $hldGlobal->fnGetFooter(); //Fetches footer template $strLmenu = $hldGlobal->fnMenu("quizzes", $arrMpage); //Fetches left menu $hdlTpl->setVariable("metatag", $strMetatag); //Assigns Metatag $hdlTpl->setVariable("header", $strHeader); //Assigns header $hdlTpl->setVariable("footer", $strFooter); //Assigns footer $hdlTpl->setVariable("menu", $strLmenu); //Assigns left menu $arrQuizAnswer = $hldGlobal->fnGetResult($_GET["cid"], $_SESSION["UID"]); $arrCorrect = $hldGlobal->fnGetQuizResult($_GET["cid"], $_SESSION["UID"], $_SESSION["StRuNiQuE"]); $intCid = $hldGlobal->fnGetCourseId($_GET["cid"]); $arrCourseName = $hldGlobal->fnFetchCourse($intCid); $hdlTpl->setVariable("cname", $arrCourseName[0]["cname"]); //Assigns course name $hdlTpl->setVariable("outof", $arrCorrect[0]["correct"]); //Assigns out of $hdlTpl->setVariable("howmany", $hldGlobal->fnCountQuestion($_GET["qid"], $_GET["cid"])); //Assigns howmany $hdlTpl->parse("quiz_question"); $arrList = $hldGlobal->fnListQuestion($arrCorrect[0]["question"], $_GET["cid"]); if (is_array($arrList) && count($arrList) > 0) { $intCnt = 1; foreach ($arrList as $key => $value) { $hdlTpl->setVariable("srno", $intCnt); //Assigns sr no $hdlTpl->setVariable("question", $value["question"]); //Assigns question
//Fetches Metatag template $strFooter = $hldGlobal->fnGetFooter(); //Fetches footer template $strLmenu = $hldGlobal->fnMenu("quizzes", $arrMpage); //Fetches left menu $hdlTpl->setVariable("metatag", $strMetatag); //Assigns Metatag $hdlTpl->setVariable("header", $strHeader); //Assigns header $hdlTpl->setVariable("footer", $strFooter); //Assigns footer $hdlTpl->setVariable("menu", $strLmenu); //Assigns left menu $hdlTpl->setVariable("uname", ucfirst($_SESSION["UNAME"])); //Assigns user name $arrQuizzesTopic = $hldGlobal->fnFetchCourse(); if (is_array($arrQuizzesTopic) && count($arrQuizzesTopic) > 0) { foreach ($arrQuizzesTopic as $key => $value) { $hdlTpl->setVariable("topic", $value["cname"]); //Assigns topic $hdlTpl->setVariable("qid", $value["id"]); //Assigns id $hdlTpl->setVariable("site_name", SITE_NAME); //Assigns site name $intCheckQuiz = $hldGlobal->fnCheckQuizExist($value["id"], 0, $_SESSION["UID"]); $strTake = ""; if ($intCheckQuiz) { $arrResult = $hldGlobal->fnFetchQuizResult($value["id"], 0, $_SESSION["UID"]); $arrAvg = explode(",", $arrResult[0]["percent"]); $arrDate = explode(",", $arrResult[0]["takendate"]); $intPercent = MAX($arrAvg);
$strMetatag = $hldGlobal->fnMetaTag(); //Fetches Metatag template $strFooter = $hldGlobal->fnGetFooter(); //Fetches footer template $strLmenu = $hldGlobal->fnMenu("quizzes", $arrMpage); //Fetches left menu $hdlTpl->setVariable("metatag", $strMetatag); //Assigns Metatag $hdlTpl->setVariable("header", $strHeader); //Assigns header $hdlTpl->setVariable("footer", $strFooter); //Assigns footer $hdlTpl->setVariable("menu", $strLmenu); //Assigns left menu $hldGlobal->fnTrackUser("Quiz title", $_SESSION["MaInId"], $_GET["cid"]); $arrCourseName = $hldGlobal->fnFetchCourse($_GET["cid"]); $hdlTpl->setVariable("cname", $arrCourseName[0]["cname"]); //Assigns course name $arrQuizQuestion = $hldGlobal->fnGetQuizTitle($_GET["cid"]); if (is_array($arrQuizQuestion) && count($arrQuizQuestion) > 0) { $intCnt = 1; foreach ($arrQuizQuestion as $key => $value) { $hdlTpl->setVariable("qid", $value["id"]); //Assign qid $hdlTpl->setVariable("cid", $_GET["cid"]); //Assign cid $hdlTpl->setVariable("srno", $intCnt); //Assigns serial number $hdlTpl->setVariable("quiz_title", $value["quiz_title"]); //Assigns quiz title $intCheckQuiz = $hldGlobal->fnCheckQuizExist(0, $value["id"], $_SESSION["UID"]);