EVOLUTION-NINJA
Edit File: finaltest.php
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <title>Amcad Final Test</title> <link rel="stylesheet" type="text/css" href="<?php echo base_url('public/assets/css/mock_test.css'); ?>" /> <link rel="stylesheet" type="text/css" href="<?php echo base_url('public/assets/css/bootstrap.min.css'); ?>" /> <link rel="stylesheet" type="text/css" href="<?php echo base_url('public/assets/css/font-awesome.min.css'); ?>" /> <link href='http://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'> <link rel='shortcut icon' type='image/x-icon' href="<?php echo base_url('public/assets/images/favicon.png'); ?>" /> <script type="text/javascript" src="<?php echo base_url('public/assets/js/jquery-3.3.1.min.js'); ?>"></script> <script type="text/javascript" src="<?php echo base_url('public/assets/js/bootstrap.min.js'); ?>"></script> <link rel="stylesheet" href="<?php echo base_url('public/assets/toastr/toastr.min.css'); ?>"> <script type="text/javascript" src="<?php echo base_url('public/assets/toastr/toastr.min.js'); ?>"></script> </head> <body> <header> <div class="container-fluid"> <div class="col-sm-3"> <a class="logo-lg"><img src="<?php echo base_url('public/assets/images/Logo_AMCAD.png'); ?>" class="img-responsive"></a> </div> <div class="col-sm-9 header_right"> <ul> <li><?php echo $course_title; ?></li> <li>|</li> <li>Final Test</li> </ul> </div> </div><!-- container----> </header> <section class="welcome_middle_one"> <div class="container-fluid"> <div class="col-sm-3"></div> <div class="col-sm-6 welcome_middle_one_middle"> <?php if (!empty($check)) { ?> <input type="hidden" value="<?php echo $check->id; ?>" class="check_if" /> <?php } else { ?> <input type="hidden" value="0" class="check_if" /> <?php } ?> <h4>Welcome to Final Test</h4> <?php foreach ($questions as $quest) { ?> <p>* This is a Final Test of <?php echo $subject->sub_domain; ?> online Course which contains <?php echo $quest->number_of_questions; ?> multiple choice questions. <p>* Test duration is <?php echo $quest->total_time ?> minutes. <?php } ?> <!-- <p>* Test duration is 6 in total(72 seconds per question).</p>--> <p>* There is no negative marking.</p> <p>* If you are unsure about the answer, you have an option 'Mark For Later' which marks that question to review and you can answer whenever before finishing the test.</p> <!-- <p>* Simply mark the question for the later and review at the end of the exam.</p> --> <p>* On clicking the questions on the left side of the screen it will be redirected to the particular question.</p> <p>* Marked for later questions will be highlighted in green color among the questions on left side of the screen.</p> <p>* Write down the formuals, mindmaps, brain dump and any other notes you may need to refer during the test.</p> <div class="label_mark"> <div class="radio"> <label class="round mark_checked1147"></label> <label>Mark For Later</label> </div> <!--- <div class="radio"> <label><input type="radio" name="optradio">Attempted</label> </div>---> </div> </div> <div class="col-sm-3"> <?php foreach ($details as $det) { ?> <input type="hidden" value="<?php echo $det->selected_type; ?>" class="type_value" /> <input type="hidden" value="<?php echo $det->subject_id; ?>" class="sub_val" /> <input type="hidden" value="<?php echo $det->chapter_id; ?>" class="chapter_val" /> <?php } ?> <input type="hidden" value="<?= current_url(true)->getSegment(4) ?>" class="chapter_val_url" /> </div> </div><!-- container----> </section> <!------------------------------------- middle Work END ------------------------------------------------> <footer> <div class="container-fluid"> <div class="col-sm-4"></div> <div class="col-sm-4"> <input type="hidden" class="mapping_id" value="<?= current_url(true)->getSegment(4) ?>" /> <button type="button" class="btn btn-success buttonsri" onclick="previous()">Back</button> </div> <div class="col-sm-4"> <button type="button" class="btn btn-success buttonsri button" value="<?php echo $course_id; ?>" >Start Test</button> </div> </div><!-- container----> </footer> </body> </html> <script type="text/javascript"> function previous() { var mapping_id = $('.mapping_id').val(); window.location.href = "<?php echo site_url('added-course-details'); ?>/<?= current_url(true)->getSegment(4) ?>"; } $('.button').click(function() { var selected_type = $('.type_value').val(); var subject = $('.sub_val').val(); var chapter = $('.chapter_val').val(); var chapter_val_url = $('.chapter_val_url').val(); var check_if = $('.check_if').val(); if (check_if == "0") { toastr["error"]('Test Setting Is Not Yet Done By Faculty!'); } else { toastr["success"]('You will be redirected to take test'); window.location.href = "<?php echo site_url('get_questions_for_final_test'); ?>/<?= current_url(true)->getSegment(4) ?>/" + subject; } }); </script> <style> .welcome_middle_one_middle{ border-radius: 10px; box-shadow: 2px 2px 15px grey; } .round { width: 30px; height: 30px; border: 1px solid silver; text-align: center; line-height: 25px; border-radius: 50px; margin-top: -10px; margin-bottom: 0 !important; background-color: #00ff00; } .label_mark label { vertical-align: middle; } .logo-lg img { width: 33%; margin-left: 25px; } .header_links ul { padding-top: 1%; } </style>