EVOLUTION-NINJA
Edit File: user_course_details_review.php
<?php echo view('includes/user_header'); ?> <div id="page-wrapper"> <div class="row my_header_review"> <div class="col-md-12"> <input type="hidden" value="<?php echo $finals; ?>" class="check_final" /> <h4>Mock Test <?= current_url(true)->getSegment(5) ?> Summary</h4> <hr> <h3>Mock Test <?= current_url(true)->getSegment(5) ?></h3> <div class="row top_right_review_row"> <div class="col-sm-6"> <p>No. of Attempts: <?php echo $mocktests_taken; ?></p> </div> <div class="col-sm-6 top_right_review"> <td><?php if ($mocktests_taken != '0') { ?><button type="button" class="btn btn-primary attempt_again" id=""><i class="fa fa-hand-o-right" aria-hidden="true"></i> Attempt Again</button><?php } else { ?><?php } ?></td> </div> </div> <table class="table"> <thead> <tr> <th>Sl.No</th> <th>Attempted On</th> <th>Score</th> <th></th> </tr> </thead> <tbody> <?php $i = 1; foreach ($mocktests as $mocktest) { ?> <tr> <input type="hidden" class="subject_id" value="<?php echo $mocktest['subject_id']; ?>"> <input type="hidden" class="test_id" value="<?= current_url(true)->getSegment(4) ?>"> <td><?php echo $i; ?></td> <td><?php echo date("d-m-Y", strtotime($mocktest['answered_on'])); ?></td> <td><?php echo $mocktest['correct_answers']; ?></td> <td><button type="button" class="review" id="<?php echo $mocktest['test_id']; ?>,<?= current_url(true)->getSegment(5) ?>"><i class="fa fa-file-text-o" aria-hidden="true"></i> Review</button></td> </tr> <?php $i++; } ?> </tbody> </table> </div> <!-- /.col-lg-8 --> </div> <!-- /.row --> </div> <?php echo view('includes/user_footer'); ?> <script type="text/javascript"> $(document).ready(function() { var check = $('.check_final').val(); if (check == 1) { $('.attempt_again').prop('disabled', true); } else { $('.attempt_again').prop('disabled', false); } }); $('.review').click(function() { var mocktest_ids = $(this).attr('id'); var mocktest_id = mocktest_ids.split(',')[1]; var mocktest_sl_no = mocktest_ids.split(',')[0]; window.location.href = '<?php echo site_url('review_result_report'); ?>/<?= current_url(true)->getSegment(4) ?>/' + mocktest_id + '/' + mocktest_sl_no; }); $('.attempt_again').click(function() { var mocktest_id = $('.test_id').val(); var sub_domain_id = $('.subject_id').val(); window.location.href = '<?php echo site_url('mocktest-practice'); ?>/<?= current_url(true)->getSegment(4) ?>/' + sub_domain_id + '/' + mocktest_id; }); </script> <style> .analysis { border: transparent; } .healthcheck_div { padding-top: 30px; } .my_header_review { padding-top: 3%; } .top_right_review_row { margin-bottom: 1%; } .top_right_review { text-align: right; } .review { border: 2px solid #337ab7; padding: 2px 15px; border-radius: 4px; } .review:hover { text-decoration: none; } .table>tbody>tr>td, .table>tbody>tr>th { padding: 10px; } .top_right_review button { padding: 5px 12px !important; } </style>