<span class="number"><?php echo $people; ?> </span> People Taken | <span class="number"><?php echo get_created_time($quizid); ?> </span> <input type="hidden" name="amount" id="amount" value="<?php echo $amount; ?> " /> </li> <?php if ($status == 'take' || $status == 'took') { $score = get_individual_score($username, $quizid); ?> <li> <ul class="score"> <li>Score: <?php echo $score; ?> out of <?php echo $amount; ?> </li> <li class="center">Percentage: <?php echo get_percentage($score, $amount); ?> </li>
function get_rank($userid, $quizid) { $point = get_individual_score($userid, $quizid); $query =& get_instance()->db->query("SELECT COUNT(id) AS total FROM score WHERE point>'{$point}' AND quiz_id= '{$quizid}' AND type='take'"); return $query->row()->total + 1; }