<?php
//$_SESSION['upload_dir'] = '/source/' . $person_info->url . '/';
//$_SESSION['current_path'] = '../source/' . $person_info->url . '/';
?>
<?php
$_SESSION['upload_dir'] = '/content-library/' . $person_info->url . '/my-work-file/'.$quiz_url.'/';
$_SESSION['current_path'] = '../content-library/' . $person_info->url . '/my-work-file/'.$quiz_url.'/';

$person_id = $this->session->userdata('person_id');
$directory = 'content-library/' . $person_info->url . '/my-work-file/' . $quiz_url;
if (is_dir($directory)) {
    $_SESSION['upload_dir'] = '/content-library/' . $person_info->url . '/my-work-file/' . $quiz_url . '/';
    $_SESSION['current_path'] = '../content-library/' . $person_info->url . '/my-work-file/' . $quiz_url . '/';
} else {
    $_SESSION['upload_dir'] = '/source/' . $person_info->url . '/';
    $_SESSION['current_path'] = '../source/' . $person_info->url . '/';
}

?>
<div class="col-sm-10">
    <div class="row gray_ttc">
        <div role="tabpanel">
            <?php
            $question_type = $this->session->userdata('question_type');
            $this->session->unset_userdata('question_type');
            ?>
            <!-- Nav tabs -->
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="<?php
                if (set_value('question_type') == 1) {
                    echo 'active';
                } else if ($question_type == 1) {
                    echo 'active';
                } else if (!$question_type) {
                    echo 'active';
                }
                ?>">
                    <a href="#home" aria-controls="home" role="tab" data-toggle="tab">Multiple Choice</a>
                </li>

                <li role="presentation" class="<?php
                if (set_value('question_type') == 2) {
                    echo 'active';
                } else if ($question_type == 2) {
                    echo 'active';
                }
                ?>">
                    <a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">True False</a>

                </li>

                <li role="presentation" class="<?php
                if (set_value('question_type') == 3) {
                    echo 'active';
                } else if ($question_type == 3) {
                    echo 'active';
                }
                ?>">
                    <a href="#desc" aria-controls="desc" role="tab" data-toggle="tab">Descriptive Question</a>

                </li>

<!--                <li role="presentation" class="<?php
   //             if (set_value('question_type') == 4) {
       //             echo 'active';
        //        } else if ($question_type == 4) {
        //            echo 'active';
          //      }
                ?>">
                    <a href="#fill" aria-controls="fill" role="tab" data-toggle="tab">Fill in the blank</a>
                </li>-->

            </ul>

            <!-- Tab panes -->
            <div class="tab-content">

                <div role="tabpanel" class="tab-pane col-sm-10 <?php
                if (set_value('question_type') == 1) {
                    echo 'active';
                } else if ($question_type == 1) {
                    echo 'active';
                } else if (!$question_type) {
                    echo 'active';
                }
                ?>" id="home">

                    <?php
                    $message = $this->session->userdata('message');
                    if ($message) {
                        echo $message;
                        $this->session->unset_userdata('message');
                    }
                    ?>

                    <div class="form-group col-sm-12">
                        <?php
                        echo validation_errors(); //formID2
                        $url = 'super-admin/quiz/' . $quiz_info->url . '/add-quiz-question';
                        echo form_open($url, 'class="" id="formID2" name="mcqForm" onsubmit="return check_form();"');
                        ?>
                        <div class="col-sm-12">
                            <div>
                                <br/>
                                <br/>
                                <br/>
<!--                                <div class="col-sm-12" >-->
<!--                                    <div class="input-group"  >-->
                                        <textarea 
                                            data-errormessage-value-missing="Question  is required!" 
                                            class="form-control validate[required] resoulation1280" 
                                            id="mc_details" 
                                            name="question_details"  
                                            rows="4"
                                            placeholder="Please Type Your question"><?php echo set_value('question_details'); ?>
                                        </textarea>
                                        <input type="hidden" class="form-control" id="question_type" name="question_type" value="1"  >
                                        <?php echo form_error('question_details'); ?>
                                        <div class="form-group  required" ></div>
<!--                                    </div>-->
<!--                                </div>-->
                            </div> 

                            <?php
                            if ($quiz_info->quiz_random_static == '1') {
                                if ($this->session->userdata('points_per_answer')) {
                                    ?>
                                    <input type="hidden" name="points_per_answer" value="<?php echo $this->session->userdata('points_per_answer'); ?>">
                                    <input type="hidden" name="time_limit" value="<?php echo $this->session->userdata('time_limit'); ?>">
                                <?php } else { ?>

                                    <div class="form-group col-sm-6">
                                        <input type="number" 
                                               data-errormessage-value-missing="Mark is required!" 
                                               class="form-control validate[required]"  
                                               id="points_per_answer" name="points_per_answer" value="<?php echo set_value('points_per_answer'); ?>"   
                                               onchange = "checkNegative(this.value, 'marks3', 'marks_err3');"  
                                               placeholder="Type  question Marks" 
                                               title="Type  question Marks">
                                    </div>

                                    <div class="form-group col-sm-6">
                                        <input type="number" 
                                               data-errormessage-value-missing="Time limit required!"
                                               class="form-control validate[required]"  
                                               id="time_limit" name="time_limit" value="<?php echo set_value('time_limit'); ?>"  
                                               onchange = "checkNegative(this.value, 'time_limit3', 'time_err3');" 
                                               placeholder="Type Time Limit (In minute)" 
                                               title="Type Time Limit (In minute)">
                                    </div>

                                    <?php
                                }
                            } else {
                                ?>

                                <div class="form-group col-sm-6">
                                    <input type="number" 
                                           data-errormessage-value-missing="Mark is required!" 
                                           class="form-control validate[required]"  
                                           id="marks3" name="points_per_answer" value="<?php echo set_value('points_per_answer'); ?>"   
                                           onchange = "checkNegative(this.value, 'marks3', 'marks_err3');"  
                                           placeholder="Type  question Marks" 
                                           title="Type  question Marks">
                                </div>

                                <div class="form-group col-sm-6">
                                    <input type="number" 
                                           data-errormessage-value-missing="Time limit required!"
                                           class="form-control validate[required]"  
                                           id="time_limit3" name="time_limit" value="<?php echo set_value('time_limit'); ?>"  
                                           onchange = "checkNegative(this.value, 'time_limit3', 'time_err3');" 
                                           placeholder="Type Time Limit (In minute)" 
                                           title="Type Time Limit (In minute)">
                                </div>
                            <?php } ?>

                            <input type="hidden" name="quiz_id" id="quiz_id" value="<?php echo $quiz_info->url; ?>">

                        </div>

                        <div class="col-sm-10 col-sm-offset-1">
                            <div class="radio radio-success">
                                <br>
                                <h4>Answers:</h4>

                                <div class="form-group col-sm-12">
                                    <!--<label for="option"><h3>(A)</h3></label>-->

                                    <input data-errormessage-value-missing="Please Select Currect Answer!" 
                                           class="form-control validate[required] showCorrect mc_forminput" 
                                           type="radio" name="status" value="0" id="a1">
                                    <label for="a1" class=""><Strong>(A)</strong>This answer option is correct</label>
                                    <textarea 
                                        data-errormessage-value-missing="Question  is required!" 
                                        class="form-control validate[required] resoulation1280" 
                                        id="mc_details" 
                                        name="option[]"  
                                        rows="4"
                                        placeholder="Please Type Your question"><?php echo set_value('option'); ?>
                                    </textarea>

                                </div>

                                <div class="form-group col-sm-12">
                                    <!--<label for="option"><h3>(B)</h3></label>-->
                                    <input data-errormessage-value-missing="Please Select Currect Answer!" 
                                           class="form-control validate[required] showCorrect mc_forminput"
                                           type="radio" name="status" value="1" id="b1">
                                    <label for="b1" class=""><Strong>(B)</strong>This answer option is correct</label>
                                    <textarea name="option[]" 
                                              data-errormessage-value-missing="Please provide an option!" 
                                              class="form-control validate[required] resoulation1280" >
                                        <?php echo set_value('option'); ?></textarea>
                                </div>

                                <div class="form-group col-sm-12">
                                    <!--<label for="option"><h3>(C)</h3></label>-->
                                    <input data-errormessage-value-missing="Please Select Currect Answer!" 
                                           class="form-control validate[required] showCorrect mc_forminput"
                                           type="radio" name="status" value="2" id="c1" >
                                    <label for="c1" class=""><Strong>(C)</strong>This answer option is correct</label>
                                    <textarea name="option[]" 
                                              data-errormessage-value-missing="Please provide an option!" 
                                              class="form-control validate[required] resoulation1280"  >
                                        <?php echo set_value('option'); ?></textarea>
                                </div>

                                <div class="form-group col-sm-12">
                                    <!--<label for="d1"><h3>(D)</h3></label>-->
                                    <input data-errormessage-value-missing="Please Select Currect Answer!" 
                                           class="form-control validate[required] showCorrect mc_forminput"
                                           type="radio" name="status" value="3" id="d1" >
                                    <label for="d1" class=""><Strong>(D)</strong>This answer option is correct</label>
                                    <textarea name="option[]" 
                                              data-errormessage-value-missing="Please provide an option!" 
                                              class="form-control validate[required] resoulation1280" >
                                        <?php echo set_value('option'); ?></textarea>
                                </div>
                                <br/>
                            </div>
                        </div>

                        <div class=" col-sm-12" >
                            <br/>
                            <br/>
                            <div class="col-sm-6 col-sm-offset-4">
                                <a class="btn btn-success" href="<?php echo base_url() . 'super-admin/quiz/' . $quiz_info->url . '/edit-quiz'; ?>" id=""> Edit quiz </a>
                                <button class="btn btn-success">Add Question</button>
                                <a class="btn btn-success" href="javascript:;" id="finish_button1"> Finish </a>
                            </div>

                            <script>
                                $('#finish_button1').click(function () {
                                    window.location.href = '<?php echo base_url() . 'super-admin/manage-quiz'; ?>';
                                });
                            </script>

                            <div class="col-sm-4"></div>
                        </div>
                        <?php echo form_close(); ?>
                    </div>
                </div>

<!--------------------------------- start true false --------------------------------------->
                <div role="tabpanel" class="tab-pane col-sm-10 <?php
                if (set_value('question_type') == 2) {
                    echo 'active';
                } else if ($question_type == 2) {
                    echo 'active';
                }
                ?>" id="profile">

                    <div class="form-group col-sm-12"> 
                        <?php
                        echo validation_errors(); //formID2
                        $url = 'super-admin/quiz/' . $quiz_info->url . '/add-quiz-question';
                        echo form_open($url, 'class="" id="formID3" name="trueFalseForm" onsubmit="return check_form();"');
                        ?>
                        <div class="col-sm-12">
                            <div >
                                <br/>
                                <br/>
                                <br/>
                                <textarea
                                    data-errormessage-value-missing="Question  is required!" 
                                    class="form-control validate[required] resoulation1280"  
                                    id="tf_details" 
                                    name="question_details" 
                                    value="<?php echo set_value('question_details'); ?>"  
                                    placeholder="Please Type Your question" ></textarea>

                                <input type="hidden" class="form-control" id="question_type" name="question_type" value="2"  >
                                <?php echo form_error('question_details'); ?>
                                <div class="form-group  required" ></div>
                            </div> 
                            <br/>

                            <?php
                            if ($quiz_info->quiz_random_static == '1') {
                                if ($this->session->userdata('points_per_answer')) {
                                    ?>
                                    <input type="hidden" name="points_per_answer" value="<?php echo $this->session->userdata('points_per_answer'); ?>">
                                    <input type="hidden" name="time_limit" value="<?php echo $this->session->userdata('time_limit'); ?>">
                                <?php } else { ?>

                                    <div class="form-group col-sm-6">
                                        <input type="number" 
                                               data-errormessage-value-missing="Mark is required!" 
                                               class="form-control validate[required]"  
                                               id="points_per_answer" name="points_per_answer" value="<?php echo set_value('points_per_answer'); ?>"   
                                               onchange = "checkNegative(this.value, 'marks3', 'marks_err3');"  
                                               placeholder="Type  question Marks" 
                                               title="Type  question Marks">
                                    </div>

                                    <div class="form-group col-sm-6">
                                        <input type="number" 
                                               data-errormessage-value-missing="Time limit required!"
                                               class="form-control validate[required]"  
                                               id="time_limit" name="time_limit" value="<?php echo set_value('time_limit'); ?>"  
                                               onchange = "checkNegative(this.value, 'time_limit3', 'time_err3');" 
                                               placeholder="Type Time Limit (In minute)" 
                                               title="Type Time Limit (In minute)">
                                    </div>

                                    <?php
                                }
                            } else {
                                ?>

                                <div class="form-group col-sm-6">
                                    <input type="number" 
                                           data-errormessage-value-missing="Mark is required!" 
                                           class="form-control validate[required]"  
                                           id="points_per_answer" name="points_per_answer" value="<?php echo set_value('points_per_answer'); ?>"   
                                           onchange = "checkNegative(this.value, 'marks3', 'marks_err3');"  
                                           placeholder="Type  question Marks" 
                                           title="Type  question Marks">
                                </div>

                                <div class="form-group col-sm-6">
                                    <input type="number" 
                                           data-errormessage-value-missing="Time limit required!"
                                           class="form-control validate[required]"  
                                           id="time_limit" name="time_limit" value="<?php echo set_value('time_limit'); ?>"  
                                           onchange = "checkNegative(this.value, 'time_limit3', 'time_err3');" 
                                           placeholder="Type Time Limit (In minute)" 
                                           title="Type Time Limit (In minute)">
                                </div>
                            <?php } ?>
                            <input type="hidden" name="quiz_id" id="quiz_id" value="<?php echo $quiz_info->url; ?>">
                        </div>

                        <div class="col-sm-10 col-sm-offset-1">
                            <div class="radio radio-success">
                                <h4>Answers:</h4>
                                <div class="form-group col-sm-4">
                                    <input class="showCorrect mc_forminput" type="hidden" name="option[]" value="True" id="true">
                                    <input data-errormessage-value-missing="Please Select True or False!" 
                                           class="form-control validate[required] showCorrect mc_forminput"  
                                           type="radio" name="status" value="0" id="a1">
                                    <label for="a1" class=""><Strong>(A)</strong>&nbsp;True</label>
                                </div>

                                <div class="form-group col-sm-4">
                                    <input class="showCorrect mc_forminput" type="hidden" name="option[]" value="False" id="false">
                                    <input data-errormessage-value-missing="Please Select True or False!" 
                                           class="form-control validate[required] showCorrect mc_forminput"  
                                           type="radio" name="status" value="1" id="b1">
                                    <label for="b1" class=""><Strong>(B)</strong>&nbsp;False</label>
                                </div>
                                <br/>
                            </div>
                        </div>


                        <div class=" col-sm-12" >
                            <br/>
                            <br/>
                            <div class="col-sm-6 col-sm-offset-4">
                                <a class="btn btn-success" href="<?php echo base_url() . 'super-admin/quiz/' . $quiz_info->url . '/edit-quiz'; ?>" id=""> Edit quiz </a>
                                <button class="btn btn-success">Add Question</button>
                                <a class="btn btn-success" href="javascript:;" id="finish_button2"> Finish </a>
                            </div>

                            <script>
                                $('#finish_button2').click(function () {
                                    window.location.href = '<?php echo base_url() . 'super-admin/manage-quiz'; ?>';
                                });
                            </script>

                            <div class="col-sm-4"></div>
                        </div>
                        <?php echo form_close(); ?>
                    </div>
                </div>
<!--------------------------------- end true false --------------------------------------->
<!--------------------------------- start descriptive question --------------------------------------->
                <div role="tabpanel" class="tab-pane  col-sm-10 <?php
                if (set_value('question_type') == 3) {
                    echo 'active';
                } else if ($question_type == 3) {
                    echo 'active';
                }
                ?>" id="desc">

                    <div class="form-group col-sm-12"> 
                        <?php
//                        echo validation_errors(); //formID2
                        $url = 'super-admin/quiz/' . $quiz_info->url . '/add-quiz-question';
                        echo form_open($url, 'class="" id="formID4" name="descForm" onsubmit="return check_form();"');
                        ?>
                        <div class="col-sm-8 col-sm-offset-2">
                            <div>
                                <br/>
                                <br/>
                                <br/>
                                <input type="text" 
                                       data-errormessage-value-missing="Question  is required!" 
                                       class="form-control validate[required]"  
                                       id="question_details" 
                                       name="question_details" 
                                       value="<?php echo set_value('question_details'); ?>"  
                                       placeholder="Please Type Your question" >
                                <input type="hidden" class="form-control" id="question_type" name="question_type" value="3"  >
                                <?php echo form_error('question_details'); ?>
                                <div class="form-group  required" ></div>
                            </div> 
                            <br/>


                            <?php
                            if ($quiz_info->quiz_random_static == '1') {
                                if ($this->session->userdata('points_per_answer')) {
                                    ?>
                                    <input type="hidden" name="points_per_answer" value="<?php echo $this->session->userdata('points_per_answer'); ?>">
                                    <input type="hidden" name="time_limit" value="<?php echo $this->session->userdata('time_limit'); ?>">
                                <?php } else { ?>

                                    <div class="form-group col-sm-6">
                                        <input type="number" 
                                               data-errormessage-value-missing="Mark is required!" 
                                               class="form-control validate[required]"  
                                               id="points_per_answer" name="points_per_answer" value="<?php echo set_value('points_per_answer'); ?>"   
                                               onchange = "checkNegative(this.value, 'marks3', 'marks_err3');"  
                                               placeholder="Type  question Marks" 
                                               title="Type  question Marks">
                                    </div>

                                    <div class="form-group col-sm-6">
                                        <input type="number" 
                                               data-errormessage-value-missing="Time limit required!"
                                               class="form-control validate[required]"  
                                               id="time_limit" name="time_limit" value="<?php echo set_value('time_limit'); ?>"  
                                               onchange = "checkNegative(this.value, 'time_limit3', 'time_err3');" 
                                               placeholder="Type Time Limit (In minute)" 
                                               title="Type Time Limit (In minute)">
                                    </div>

                                    <?php
                                }
                            } else {
                                ?>

                                <div class="form-group col-sm-6">
                                    <input type="number" 
                                           data-errormessage-value-missing="Mark is required!" 
                                           class="form-control validate[required]"  
                                           id="points_per_answer" name="points_per_answer" value="<?php echo set_value('points_per_answer'); ?>"   
                                           onchange = "checkNegative(this.value, 'marks3', 'marks_err3');"  
                                           placeholder="Type  question Marks" 
                                           title="Type  question Marks">
                                </div>

                                <div class="form-group col-sm-6">
                                    <input type="number" 
                                           data-errormessage-value-missing="Time limit required!"
                                           class="form-control validate[required]"  
                                           id="time_limit" name="time_limit" value="<?php echo set_value('time_limit'); ?>"  
                                           onchange = "checkNegative(this.value, 'time_limit3', 'time_err3');" 
                                           placeholder="Type Time Limit (In minute)" 
                                           title="Type Time Limit (In minute)">
                                </div>
                            <?php } ?>
                            <input type="hidden" name="quiz_id" id="quiz_id" value="<?php echo $quiz_info->url; ?>">
                        </div>

                        <div class="col-sm-10 col-sm-offset-1">
                            <div class="">
                                <div class="form-group col-sm-12">
                                    <label for="desc_answer"><h3>Answer of the Question:</h3></label>
                                    <input class="showCorrect mc_forminput" type="hidden" name="option[]" value="Descriptive" id="dsc">
                                    <textarea name="desc_answer" data-errormessage-value-missing="Answer is required!" class="form-control validate[required] resoulation1280" rows="7" ></textarea>
                                </div>
                                <br/>
                            </div>
                        </div>


                        <div class=" col-sm-12" >
                            <br/>
                            <br/>
                            <div class="col-sm-6 col-sm-offset-4">
                                <a class="btn btn-success" href="<?php echo base_url() . 'super-admin/quiz/' . $quiz_info->url . '/edit-quiz'; ?>" id=""> Edit quiz </a>
                                <button class="btn btn-success">Add Question</button>
                                <a class="btn btn-success" href="javascript:;" id="finish_button3"> Finish </a>
                            </div>

                            <script>
                                $('#finish_button3').click(function () {
                                    window.location.href = '<?php echo base_url() . 'super-admin/manage-quiz'; ?>';
                                });
                            </script>

                            <div class="col-sm-4"></div>
                        </div>
                        <?php echo form_close(); ?>
                    </div>
                </div>
<!--------------------------------- end descriptive question --------------------------------------->
<!--------------------------------- start fill in the blank --------------------------------------->
<!--                <div role="tabpanel" class="tab-pane  col-sm-10 <?php
                if (set_value('question_type') == 4) {
                    echo 'active';
                } else if ($question_type == 4) {
                    echo 'active';
                }
                ?>" id="fill">

                    <div class="form-group col-sm-12"> 
                        <?php
//                        echo validation_errors(); //formID2
                        $url = 'super-admin/quiz/' . $quiz_info->url . '/add-quiz-question';
                        echo form_open($url, 'class="" id="formID5" name="fillBlankForm" onsubmit="return check_form();"');
                        ?>
                        <div class="col-sm-12">
                            <div >
                                <br/>
                                <br/>
                                <br/>
                                <textarea class="form-control validate[required] resoulation1280"  
                                          id="fb_details" 
                                          name="question_details" 
                                          value="<?php echo set_value('question_details'); ?>"  
                                          placeholder="Please Type Your question" ></textarea>

                                <input type="hidden" class="form-control" id="question_type" name="question_type" value="4"  >
                                <?php echo form_error('question_details'); ?>
                                <div class="form-group  required" ></div>
                            </div> 
                            <br/>


                            <?php
                            if ($quiz_info->quiz_random_static == '1') {
                                if ($this->session->userdata('points_per_answer')) {
                                    ?>
                                    <input type="hidden" name="points_per_answer" value="<?php echo $this->session->userdata('points_per_answer'); ?>">
                                    <input type="hidden" name="time_limit" value="<?php echo $this->session->userdata('time_limit'); ?>">
                                <?php } else { ?>

                                    <div class="form-group col-sm-6">
                                        <input type="number" 
                                               data-errormessage-value-missing="Mark is required!" 
                                               class="form-control validate[required]"  
                                               id="points_per_answer" name="points_per_answer" value="<?php echo set_value('points_per_answer'); ?>"   
                                               onchange = "checkNegative(this.value, 'marks3', 'marks_err3');"  
                                               placeholder="Type  question Marks" 
                                               title="Type  question Marks">
                                    </div>

                                    <div class="form-group col-sm-6">
                                        <input type="number" 
                                               data-errormessage-value-missing="Time limit required!"
                                               class="form-control validate[required]"  
                                               id="time_limit" name="time_limit" value="<?php echo set_value('time_limit'); ?>"  
                                               onchange = "checkNegative(this.value, 'time_limit3', 'time_err3');" 
                                               placeholder="Type Time Limit (In minute)" 
                                               title="Type Time Limit (In minute)">
                                    </div>

                                    <?php
                                }
                            } else {
                                ?>

                                <div class="form-group col-sm-6">
                                    <input type="number" 
                                           data-errormessage-value-missing="Mark is required!" 
                                           class="form-control validate[required]"  
                                           id="marks3" name="points_per_answer" value="<?php echo set_value('points_per_answer'); ?>"   
                                           onchange = "checkNegative(this.value, 'marks3', 'marks_err3');"  
                                           placeholder="Type  question Marks" 
                                           title="Type  question Marks">
                                </div>

                                <div class="form-group col-sm-6">
                                    <input type="number" 
                                           data-errormessage-value-missing="Time limit required!"
                                           class="form-control validate[required]"  
                                           id="time_limit3" name="time_limit" value="<?php echo set_value('time_limit'); ?>"  
                                           onchange = "checkNegative(this.value, 'time_limit3', 'time_err3');" 
                                           placeholder="Type Time Limit (In minute)" 
                                           title="Type Time Limit (In minute)">
                                </div>
                            <?php } ?>
                            <input type="hidden" name="quiz_id" id="quiz_id" value="<?php echo $quiz_info->url; ?>">

                        </div>

                        <div class="col-sm-12"><br></div>
                        <div class="col-sm-12">
                            <div>
                                <textarea
                                    data-errormessage-value-missing="" 
                                    class="form-control validate[required] resoulation12"
                                    name="option" id="fill_blank"
                                    placeholder="Type Answer of the Question" ></textarea>

                            </div>
                        </div>


                        <div class="col-sm-12">
                            <br/>
                            <br/>
                            <div class="col-sm-6 col-sm-offset-4">
                                <a class="btn btn-success" href="<?php echo base_url() . 'super-admin/quiz/' . $quiz_info->url . '/edit-quiz'; ?>" id=""> Edit quiz </a>
                                <button class="btn btn-success">Add Question</button>
                                <a class="btn btn-success" href="javascript:;" id="finish_button4"> Finish </a>
                            </div>

                            <script>
                                $('#finish_button4').click(function () {
                                    window.location.href = '<?php echo base_url() . 'super-admin/manage-quiz'; ?>';
                                });
                            </script>

                            <div class="col-sm-4"></div>
                        </div>
                        <?php echo form_close(); ?>
                    </div>
                </div>-->
<!--------------------------------- end fill in the blank --------------------------------------->
            </div>

        </div>

    </div><!-- /.row gray_ttc -->

</div>


<script>

    function checkQuizType(quizURL, objID) {
        if (quizURL) {
            var xmlhttp = create_xmlhttp();
            var serverPage = '<?php echo base_url(); ?>get-quiz-required-information/' + quizURL;
            xmlhttp.open("GET", serverPage);
            xmlhttp.onreadystatechange = function ()
            {
                if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
                {
                    _(objID).innerHTML = xmlhttp.responseText;
                }
            };
            xmlhttp.send(null);
        } else {
            _(objID).innerHTML = '';
        }
    }

</script>


<script type="text/javascript">

<?php if (set_value('question_type') == 1) { ?>
        document.forms['mcqForm'].elements['quiz_id'].value = '<?php echo set_value('quiz_id'); ?>';
        document.forms['mcqForm'].elements['status'].value = '<?php echo set_value('status'); ?>';
<?php } ?>

<?php if (set_value('question_type') == 2) { ?>
        document.forms['trueFalseForm'].elements['quiz_id'].value = '<?php echo set_value('quiz_id'); ?>';
        document.forms['trueFalseForm'].elements['status'].value = '<?php echo set_value('status'); ?>';
<?php } ?>

<?php if (set_value('question_type') == 3) { ?>
        document.forms['descForm'].elements['quiz_id'].value = '<?php echo set_value('quiz_id'); ?>';
        document.forms['descForm'].elements['status'].value = '<?php echo set_value('status'); ?>';
<?php } ?>

<?php if (set_value('question_type') == 4) { ?>
        document.forms['fillBlankForm'].elements['quiz_id'].value = '<?php echo set_value('quiz_id'); ?>';
        document.forms['fillBlankForm'].elements['status'].value = '<?php echo set_value('status'); ?>';
<?php } ?>

</script>