<link href="<?=base_url();?>assets/css/jadval.css" rel="stylesheet" type="text/css" />

<div class="container">
    <div class="sticky-wrap">
        <table class="sticky-enabled" style="border: 1px solid #eeeeee;">
            <thead>
                <tr>
                    <th colspan="4" align="center"><h4 style="text-align:center;margin:0px;"><b>Imtihon natijalari</b></h4></th>
                    
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><b>Topshirilgan test</b></td>
                    <td><?=$results['examname'];?></td>
                </tr>
                <tr>
                    <td><b>Vaqt</b></td>
                    <td><?=$results['duration'];?></td>
                </tr>
                <tr>
                    <td><b>Savollar soni</b></td>
                    <td><?=$results['totalmarks'];?> ta savol</td>
                </tr>
                <tr>
                    <td><b>To'g'ri belgilangan</b></td>
                    <td><?=$results['marksobtained'];?> javob</td>
                </tr>
                <tr>
                    <td><b>Javob natijasi</b></td>
                    <td>
                    <?php
                        if ($results['passed']) {
                            echo $results['percentage'].'% <small class="green"><b>(Topshirildi)</b></small>';
                        } else {
                            echo $results['percentage'].'% <small class="red"><b>(Topshirilmadi)</b></small>';
                        }
                        ?>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
                    
                    
<div class="mainholder ">

        <div class="usercontent ui-corner-all">

        
        <?php
        if(!empty($results['failedquestions']))
        {?>
        
        <h3 class="red" style="text-align:center;">Noto'g'ri belgilagan javob natijalaringiz</h3>
        
        
    <div class="sticky-wrap">
        <table cellpadding="0" cellspacing="30" class="datatable">
        <tbody><tr><th>T/R</th><th>Savol</th><th>To'g'ri javob</th><th>Sizning javob</th><th>Ball</th></tr>
        <?php
        $count = 1;
        foreach ($results['failedquestions'] as $question) 
        {?>
          <tr>
                <td style="text-align: center;"><?=$count;?></td>
                <td><?=$question['question'];?></td>
                <td class="notogri"><?=$question['correctanswer'];?></td>
                <td class="togri"><?=$question['youranswer'];?></td>
                <td class="ball"><b><?=$question['marks'];?></b></td>
          </tr>
        <?php
        $count ++;
        }
        ?>

        </tbody></table>
        </div>
        <?
        }
        ?>

        </div>
</div>


</div> <!-- container -->

