    <?php
        $mdl = base64_decode($param3);
        $mdlEx = explode('-', $mdl);
    ?>
    <script src="<?php echo base_url();?>public/style/cms/bower_components/ckeditor/ckeditor.js"></script>
    <script src="<?php echo base_url();?>public/style/cms/bower_components/bootstrap-clockpicker/bootstrap-clockpicker.min.js"></script>
    <script src="<?php echo base_url();?>public/style/js/modal_validation.js"></script>
    <script src="<?php echo base_url();?>public/style/js/picker.js"></script>
    <script src="<?php echo base_url();?>public/style/js/picker.en.js"></script>

    <div class="modal-body">
        <div class="modal-header mdl-header">
            <h6 class="title text-white"><?php echo getEduAppGTLang('homework');?></h6>
        </div>
        <div class="ui-block-content">
            <?php if($param2 == 'add'):?>
            <form id="YTForm" action="<?php echo base_url();?>teacher/activities/homework" method="POST" enctype="multipart/form-data">
                <input type="hidden" value="<?php echo $mdlEx[0];?>" name="class_id">
                <input type="hidden" value="<?php echo $mdlEx[1];?>" name="section_id">
                <input type="hidden" value="<?php echo $mdlEx[2];?>" name="subject_id">
                <input type="hidden" value="create" name="method">
                <div class="row">
                    <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="form-group mb-3">
            		        <label><?php echo getEduAppGTLang('title');?>:</label>
        		            <input class="form-control" name="title" type="text" required="">
        		        </div>
        		    </div>
        		    <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
		                <label><?php echo getEduAppGTLang('type');?>:</label>
		            </div>
		            <div class="col col-lg-6 col-md-6 col-sm-6 col-6">
		                <center>
		                    <div class="custom-control custom-radio pull-right">
                                <input  type="radio" name="type" id="1" required="" value="1" class="custom-control-input"> <label for="1" class="custom-control-label"><?php echo getEduAppGTLang('online_text');?></label>
                            </div>
                        </center>
                    </div>
                    <div class="col col-lg-6 col-md-6 col-sm-6 col-6">
                        <div class="custom-control custom-radio">
                            <input  type="radio" name="type" id="2" value="2" class="custom-control-input"> <label for="2" class="custom-control-label"><?php echo getEduAppGTLang('files');?></label>
                        </div>
		            </div>
		            <div class="col col-lg-6 col-md-6 col-sm-6 col-12">
        	            <div class="form-group label-floating">
      			            <label class="control-label"><?php echo getEduAppGTLang('date');?></label>
      			            <input type='text' class="datepicker-here" required="" data-position="bottom left" data-language='en' name="date_end" data-multiple-dates-separator="/"/>
        	            </div>
		            </div>
		            <div class="col col-lg-6 col-md-6 col-sm-6 col-12">
        	            <div class="form-group label-floating">
      		                <label class="control-label"><?php echo getEduAppGTLang('time');?></label>
      			            <div class="input-group clockpicker" data-align="top" data-autoclose="true">
		                        <input type="text" required="" name="time_end" class="form-control">
	                        </div>
        	            </div>
		            </div>
        		    <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="form-group mb-3">
                            <label><?php echo getEduAppGTLang('description');?>:</label>
                            <textarea class="form-control" name="description" id="ckeditor1" required=""></textarea>
                        </div>
                    </div>
                    <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="mb-3">
                            <label><?php echo getEduAppGTLang('choose_file');?>:</label>
                            <input type="file" class="inputFile" name="file_name">
                        </div>
                    </div>
                    <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="checkbox-wrapper-4">
                            <input class="inp-cbx" id="showToStudents" name="status" value="1" type="checkbox"/>
                            <label class="cbx" for="showToStudents"><span>
                                <svg width="12px" height="10px">
                                    <use xlink:href="#check-4"></use>
                                </svg>
                                </span><span><?php echo getEduAppGTLang('show_message');?>.</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 col-lg-12 col-md-12 col-sm-12 col-12">
                        <button class="btn btn-rounded btn-primary" type="submit"><?php echo getEduAppGTLang('create');?></button>
                    </div>
                </div>
            </form>
            <?php elseif($param2 == 'edit'):?>
            <?php 
                $dataQ = $this->db->get_where('activity', array('activity_id' => $param3))->result_array();
                foreach($dataQ as $rm):
            ?>
            <form id="YTForm" action="<?php echo base_url();?>teacher/activities/homework/<?php echo $param3;?>" method="POST" enctype="multipart/form-data">
                <input type="hidden" value="<?php echo $rm['class_id'];?>" name="class_id">
                <input type="hidden" value="<?php echo $rm['section_id'];?>" name="section_id">
                <input type="hidden" value="<?php echo $rm['subject_id'];?>" name="subject_id">
                <input type="hidden" value="update" name="method">
                <div class="row">
                    <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="form-group mb-3">
            		        <label><?php echo getEduAppGTLang('title');?>:</label>
        		            <input class="form-control" name="title" type="text" value="<?php echo $rm['title'];?>" required="">
        		        </div>
        		    </div>
        		    <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
		                <label><?php echo getEduAppGTLang('type');?>:</label>
		            </div>
		            <div class="col col-lg-6 col-md-6 col-sm-6 col-6">
		                <center>
		                    <div class="custom-control custom-radio pull-right">
                                <input <?php if($rm['homework_type'] == 1) echo 'checked';?> type="radio" name="type" id="1" required="" value="1" class="custom-control-input"> 
                                <label for="1" class="custom-control-label"><?php echo getEduAppGTLang('online_text');?></label>
                            </div>
                        </center>
                    </div>
                    <div class="col col-lg-6 col-md-6 col-sm-6 col-6">
                        <div class="custom-control custom-radio">
                            <input <?php if($rm['homework_type'] == 2) echo 'checked';?> type="radio" name="type" id="2" value="2" class="custom-control-input"> 
                            <label for="2" class="custom-control-label"><?php echo getEduAppGTLang('files');?></label>
                        </div>
		            </div>
		            <div class="col col-lg-6 col-md-6 col-sm-6 col-12">
        	            <div class="form-group label-floating">
      			            <label class="control-label"><?php echo getEduAppGTLang('date');?></label>
      			            <input type='text' class="datepicker-here" required="" value="<?php echo date('m/d/Y',strtotime($rm['delivery_date']));?>" data-position="bottom left" data-language='en' name="date_end" data-multiple-dates-separator="/"/>
        	            </div>
		            </div>
		            <div class="col col-lg-6 col-md-6 col-sm-6 col-12">
        	            <div class="form-group label-floating">
      		                <label class="control-label"><?php echo getEduAppGTLang('time');?></label>
      			            <div class="input-group clockpicker" data-align="top" data-autoclose="true">
		                        <input type="text" required="" name="time_end" value="<?php echo $rm['end_time'];?>" class="form-control">
	                        </div>
        	            </div>
		            </div>
        		    <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="form-group mb-3">
                            <label><?php echo getEduAppGTLang('description');?>:</label>
                            <textarea class="form-control" name="description" id="ckeditor1" required=""><?php echo $rm['description'];?></textarea>
                        </div>
                    </div>
                    <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="mb-3">
                            <label><?php echo getEduAppGTLang('choose_file');?>:</label>
                            <input type="file" class="inputFile" name="file_name">
                        </div>
                    </div>
                    <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="checkbox-wrapper-4">
                            <input class="inp-cbx" id="showToStudents" name="status" value="1" <?php if($rm['status'] == 1) echo 'checked';?> type="checkbox"/>
                            <label class="cbx" for="showToStudents"><span>
                                <svg width="12px" height="10px">
                                    <use xlink:href="#check-4"></use>
                                </svg>
                                </span><span><?php echo getEduAppGTLang('show_message');?>.</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 col-lg-12 col-md-12 col-sm-12 col-12">
                        <button class="btn btn-rounded btn-primary" type="submit"><?php echo getEduAppGTLang('update');?></button>
                    </div>
                </div>
            </form>
            <?php endforeach;?>
            <?php else:?>
            <?php 
                $dataQ = $this->db->get_where('activity', array('activity_id' => $param3))->result_array();
                foreach($dataQ as $rm):
            ?>
            <div class="col col-lg-12 col-md-12 col-sm-12 col-12">
                <div class="form-group label-floating">
                    <label class="text-bold"><?php echo getEduAppGTLang('description');?></label>
                    <p class="mb-4"><?php echo html_entity_decode($rm['description']);?></p>
                    <label class="text-bold"><?php echo getEduAppGTLang('uploaded_by');?></label>
                    <p class="mb-4"><img src="<?php echo $this->crud->get_image_url($rm['uploader_role'], $rm['uploader_id']);?>" width="20px"> <?php echo $this->crud->get_name($rm['uploader_role'], $rm['uploader_id']);?></p>
                    <label class="text-bold"><?php echo getEduAppGTLang('uploaded_date');?></label>
                    <p><?php echo $rm['date'];?></p>
                    <label class="text-bold"><?php echo getEduAppGTLang('delivery_date');?></label>
                    <p><?php echo date($this->db->get_where('settings', array('type' => 'date_format'))->row()->description,strtotime($rm['delivery_date']));?> <?php echo getEduAppGTLang('at');?> <?php echo date('h:i A',strtotime($rm['end_time']));?></p>
                    <?php if($rm['file'] != ''):?>
                    <label class="text-bold"><?php echo getEduAppGTLang('uploaded_file');?></label>
                    <p class="mb-4"><a href="<?php echo base_url();?>teacher/downloadHomework/<?php echo $rm['activity_id'];?>"><?php echo $rm['real_name'];?> (<?php echo $rm['file_size'];?>)</a></p>
                    <?php endif;?>
                </div>
            </div>
            <?php endforeach;?>
            <?php endif;?>
        </div>
    </div>
    <script src="<?php echo base_url();?>public/style/js/subject.js"></script>