    <?php 
        $running_year = $this->crud->getInfo('running_year');
        $online_exam = $this->db->get_where('activity', array('activity_id' => base64_decode($online_exam_id)))->row_array();
    ?>
    <div class="content-w">
        <div class="conty">
        <?php include 'fancy.php';?>
        <div class="header-spacer"></div>
            <div class="os-tabs-w menu-shad">
                <div class="os-tabs-controls">
                    <ul class="navs navs-tabs upper">
                        <li class="navs-item">
                            <a class="navs-links" href="<?php echo base_url();?>teacher/examroom/<?php echo $online_exam_id;?>/"><i class="os-icon picons-thin-icon-thin-0016_bookmarks_reading_book"></i><span><?php echo getEduAppGTLang('exam_details');?></span></a>
                        </li>
                        <li class="navs-item">
                            <a class="navs-links" href="<?php echo base_url();?>teacher/exam_results/<?php echo $online_exam_id;?>/"><i class="os-icon picons-thin-icon-thin-0100_to_do_list_reminder_done"></i><span><?php echo getEduAppGTLang('results');?></span></a>
                        </li>
                        <li class="navs-item">
                            <a class="navs-links active" href="<?php echo base_url();?>teacher/exam_edit/<?php echo $online_exam_id;?>/"><i class="os-icon picons-thin-icon-thin-0001_compose_write_pencil_new"></i><span><?php echo getEduAppGTLang('edit');?></span></a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="content-i">
                <div class="content-box">
                    <div class="back mb-3">
                        <a class="fs-16" href="<?php echo base_url();?>teacher/subject_dashboard/<?php echo base64_encode($online_exam['class_id'].'-'.$online_exam['section_id'].'-'.$online_exam['subject_id']);?>/"><i class="picons-thin-icon-thin-0131_arrow_back_undo"></i> <span><?php echo getEduAppGTLang('return_to_dashboard');?></span></a>
                    </div>
                    <div>
                        <div class="pipeline white lined-primary">
                            <?php echo form_open(base_url() . 'teacher/activities/exam/', array('enctype' => 'multipart/form-data')); ?>
                                <input type="hidden" name="method" value="update">
                                <div class="row">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label for=""><?php echo getEduAppGTLang('title');?></label>
                                            <div class="input-group">
                                                <input type="text" class="form-control" name="title" value="<?php echo $online_exam['title']; ?>">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label for=""><?php echo getEduAppGTLang('date');?></label>
                                            <div class="input-group">
                                                <input type='text' class="datepicker-here" data-position="top left" data-language='en' name="exam_date" data-multiple-dates-separator="/" value="<?php echo date('m/d/Y', strtotime($online_exam['delivery_date'])); ?>"/>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <div class="form-group">
                                            <label for=""><?php echo getEduAppGTLang('start_time');?></label>
                                            <div class="input-group clockpicker" data-align="top" data-autoclose="true">
                                                <input type="text" required="" name="time_start" class="form-control" value="<?php echo $online_exam['start_time'];?>">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <div class="form-group">
                                            <label for=""><?php echo getEduAppGTLang('end_time');?></label>
                                            <div class="input-group clockpicker" data-align="top" data-autoclose="true">
                                                <input type="text" required="" name="time_end" class="form-control" value="<?php echo $online_exam['end_time'];?>">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <div class="form-group">
                                            <label for=""><?php echo getEduAppGTLang('percentage_required');?></label>
                                            <div class="input-group">
                                                <input type="text" class="form-control" name="minimum_percentage" value="<?php echo $online_exam['percentage']; ?>">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <div class="form-group is-select">
                                            <label><?php echo getEduAppGTLang('issue_certificate');?></label>
                                            <div class="select">
                                                <select name="certificate" required="">
                                                    <option value=""><?php echo getEduAppGTLang('select');?></option>
                                                    <option value="1" <?php if($online_exam['certificate'] == 1) echo 'selected';?>><?php echo getEduAppGTLang('yes');?></option>
                                                    <option value="2" <?php if($online_exam['certificate'] == 2) echo 'selected';?>><?php echo getEduAppGTLang('no');?></option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for=""><?php echo getEduAppGTLang('password');?></label>
                                            <div class="input-group">
                                                <input type="text" class="form-control" name="password" value="<?php echo base64_decode($online_exam['password']);?>">
                                            </div>
                                            <small><?php echo getEduAppGTLang('optional');?></small>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group is-select">
                                            <label class="control-label"><?php echo getEduAppGTLang('show_results');?></label>
                                            <div class="select">
                                                <select name="results" required="">
                                                    <option value=""><?php echo getEduAppGTLang('select');?></option>
                                                    <option value="1" <?php if($online_exam['showResults'] == 1) echo 'selected';?>><?php echo getEduAppGTLang('keep_hidden');?></option>
                                                    <option value="2" <?php if($online_exam['showResults'] == 2) echo 'selected';?>><?php echo getEduAppGTLang('show_when_exam_is_finished');?></option>
                                                    <option value="3" <?php if($online_exam['showResults'] == 3) echo 'selected';?>><?php echo getEduAppGTLang('15_minutes_after_finished');?></option>
                                                    <option value="4" <?php if($online_exam['showResults'] == 4) echo 'selected';?>><?php echo getEduAppGTLang('30_minutes_after_finished');?></option> 
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="checkbox-wrapper-4 mt-4">
                                            <input class="inp-cbx" id="show_random" name="show_random" value="1" <?php if($online_exam['isRandom'] == 1) echo 'checked';?> type="checkbox"/>
                                            <label class="cbx" for="show_random"><span>
                                                <svg width="12px" height="10px">
                                                    <use xlink:href="#check-4"></use>
                                                </svg>
                                                </span><span><?php echo getEduAppGTLang('show_questions_randomly');?>.</span>
                                            </label>
                                            <svg class="inline-svg">
                                                <symbol id="check-4" viewbox="0 0 12 10">
                                                    <polyline points="1.5 6 4.5 9 10.5 1"></polyline>
                                                </symbol>
                                            </svg>
                                        </div>
                                    </div>
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <label for=""><?php echo getEduAppGTLang('description');?></label>
                                            <textarea class="form-control" name="instruction" id="ckeditorEmail"><?php echo $online_exam['description']; ?></textarea>
                                        </div>
                                    </div>
                                    <input type="hidden" value="<?php echo $online_exam['class_id'];?>" name="class_id">
                                    <input type="hidden" value="<?php echo $online_exam['section_id'];?>" name="section_id">
                                    <input type="hidden" value="<?php echo $online_exam['subject_id'];?>" name="subject_id">
                                    <input type="hidden" name="online_exam_id" value="<?php echo $online_exam['activity_id'];?>"/>
                                    <div class="form-group">
                                        <div class="col-sm-12 text-center">
                                            <button type="submit" class="btn btn-success btn-rounded"><?php echo getEduAppGTLang('update');?></button>
                                        </div>
                                    </div>
                                </div>
                            <?php echo form_close();?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>