<div class="widget">
        				<div class="widget-title">
        					<h4><i class="icon-reorder "></i><?php echo $record['member']['v_first_name'].', '.$record['member']['v_last_name']; ?>'s Lesson</h4>
                            <span class="tools"><a class="back_table" href="javascript:;">Back to listing</a></span>
        				</div>
        				<div class="widget-body" id="answer-section-reviewed">
					<?php echo Form::open( array('url' => ADMIN_URL.'review-lessons/edit/'.$record['id'].'/'.time(), 'id' => 'frmEdit','name' => 'frmEdit','class'=>'form-horizontal','onsubmit'=>"return false;") ); ?>

						<?php echo Form::token(); ?>

                           <h4><b class="lesson-title">QUESTIONNAIRE <?php echo $record['i_lesson_id']; ?> - <?php echo $record['e_status']; ?></b></h4>
                           <table class="table2">
                                <tr>
                                    <td class="span2"><h5><b>Name:</b></h5></td>
                                    <td><h5><b><?php echo $record['member']['v_first_name'].', '.$record['member']['v_last_name']; ?></b></h5></td>
                                </tr>
                                <tr>
                                    <td class="span2"><h5><b>Student ID:</b></h5></td>
                                    <td><h5><b><?php echo $record['member']['v_student_id']; ?></b></h5></td>
                                </tr>
                                <tr>
                                    <td class="span2"><h5><b>Status:</b></h5></td>
                                    <td><h5><b><?php echo $record['e_status']; ?></b></h5></td>
                                </tr>
                                <?php if($record['e_status'] == 'Submitted'): ?>
                                    <tr>
                                        <td class="span2"><h5><b>Questionnaire Submitted On:</b></h5></td>
                                        <td><h5><b><?php echo date('m/d/Y  H:m:i A',strtotime($record['d_submitted_date'])); ?></b></h5></td>
                                    </tr>
                                <?php endif; ?>
                                <tr>
                                    <td class="span2" colspan="2"><h5><b><a target="_blank" href="<?php echo ADMIN_URL.'review-lessons/print/'.$record['id']; ?>">Printer friendly version</a></b></h5></td>
                                </tr>
                                <tr>
                                    <td class="span2" colspan="2"><h5><b><a class="back_table" href="javascript:;">Back to listing</a></b></h5></td>
                                </tr>
                           </table>
                           <div>
                            <p class="lesson_info">
                                <?php echo $record['lesson']['v_page_heading']; ?>

                            </p>
                            <hr />
                           </div>
                           <?php $i = 1; $j = 1;
                            foreach($memberlessonAnswer as $key => $val){ ?>
                                <?php if($val['lesson_question']['v_pre_description'] != ''): ?>
                                    <span class="pre-description"><?php echo $val['lesson_question']['v_pre_description']; ?></span>
                                <?php endif; ?>
                                <div class="control-group question-block">
                                        <?php if($val['lesson_question']['v_description'] != ''): ?>
                                            <span class="question-no"><?php echo $j.'.'; ?></span> 
                                            <label class="control-label question-label description">
                                               <?php echo $val['lesson_question']['v_description']; ?>

                                            </label>
                                        <?php $j++; ?>       
                                        <?php endif; ?>
                                        <?php if($val['lesson_question']['v_description'] == '' && $val['lesson_question']['i_parent_id'] == 0): ?>
                                            <span class="question-no"><?php echo $j.'.'; ?></span>
                                            <?php $j++; ?>    
                                        <?php else: ?>
                                            <span class="question-no">&nbsp;</span>
                                        <?php endif; ?>
                                        <label class="control-label question-label <?php if($val['lesson_question']['i_parent_id'] != 0 || $val['lesson_question']['v_description'] != ''){ echo 'sub_question';} ?> cf">
                                            <?php echo $val['lesson_question']['v_question']; ?>

                                        </label>
                                   <div class="controls question-control question-answer">
                                        <?php echo $val['v_question_answer']; ?>                      
                                    </div>
                                </div>
                           <?php $i++; } ?>
                           <div class="control-group question-block">
                                <span class="question-no">&nbsp;</span>    
                                <label class="control-label question-label">
                                    <?php echo $record['lesson']['v_page_footer']; ?>

                                </label>
                            </div>
                           <?php
                           if($record['e_status']=='Reviewed' && $record['d_reviewed_date'] != '0000-00-00 00:00:00') { ?>
                           <div class="control-group">
                            	<label class="control-label"> Review Date:</label>
                            	<div class="controls">
                            		    <span class="help-inline"><b><?php echo date('m/d/Y  H:m:i A',strtotime($record['d_reviewed_date'])); ?></b></span>
                                </div>
                            </div>
                            <?php } ?>
                            <div class="control-group">
                            	<label class="control-label">
                            		Review By:
                            	</label>
                            	<div class="controls">
                            		<input type="text" name="v_reviewed_by" class="input-large" placeholder="Reviewed By" value="<?php echo $record['v_reviewed_by']; ?>">
                            	</div>
                            </div>
                            <div class="control-group">
                            	<label class="control-label">
                            		Review Comments:
                            	</label>
                            	<div class="controls">
                            		<textarea rows="5" name="v_reviewed_comment" class="input-xlarge"><?php echo $record['v_reviewed_comment']; ?></textarea>
                            	</div>
                            </div> 
                            <input type="hidden" id="lesson_status" name="lesson_status" value=""/>
                            <div class="form-actions">
                                <?php echo Form::submit('Reviewed',array('id'=>'review','name'=>'frmEditSubmit','value1'=>'Reviewed','class' => 'btn btn-success','div'=>false, 'onclick'=>"this.form.submited=this.value;")); ?>

                                <?php if($record['e_status'] != 'Submitted'): ?>
                                    <?php echo Form::submit('Partial Reviewed',array('id'=>'partial_review','name'=>'frmEditSubmit','value1'=>'Partial Reviewed','class' => 'btn btn-success','div'=>false, 'onclick'=>"this.form.submited=this.value;")); ?>

                                <?php endif; ?>
                                <?php echo Form::submit('Save for later',array('id'=>'save','name'=>'frmEditSubmit','class' => 'btn btn-success','div'=>false, 'onclick'=>"this.form.submited=this.value;")); ?>

                        		<input type="button" class="btn back_table form-submit" id="back_table" value="Back to listing" />
	                       </div>
					</form>
                    <?php Session::remove('message'); ?>
				</div>
  </div>
<style>
.control-group.question-block .description{padding-bottom: 6px;}
.question-block label.question-label{width: 94% !important; display: block; height: auto;margin-bottom: 10px;margin-top: 0px;padding-top: 0px;font-weight: bold;padding-left:23px;}
</style>
<script type="text/javascript">
    intialise_datepicker();
    $(document).ready(function()
    {
       setTimeout(function(){ $(".flash-msg").html('');$(".greenMsg").html(''); },3000);
    });
</script>             
                