/** * @return bool * @param int $step */ public static function isDone($step) { switch ($step) { case 1: return QuestionCtrl::isDone(1); break; case 2: return QuestionCtrl::isDone(3); break; case 3: return QuestionCtrl::isDone(2); break; case 4: return QuestionCtrl::isDone(4); break; } }
<?php /** * Created by PhpStorm. * User: JayDz * Date: 10/07/15 * Time: 12:02 AM */ require_once './controller/QuestionCtrl.php'; $done4 = QuestionCtrl::isDone(4); $c = 1; if (isset($_GET['c']) && $_GET['c'] != '') { $c = $_GET['c']; if ($c != 1 && $c != 2) { $c = 1; } } $arr = QuestionCtrl::getRes($c); $total = 0; $mark = 0; $correct = 0; foreach ($arr as $p) { $total += $p->getPoint(); $mark += $p->getMark(); if ($p->getMark() > 0) { $correct++; } } $q_arr = QuestionCtrl::getQuestionsByCategory($c); $type = 'Pre-Test Result'; if ($c == 2) {