EVOLUTION-NINJA
Edit File: recorded_feedback.php
<?php echo view('includes/user_header'); ?> <div id="page-wrapper" style="overflow: hidden;"> <div class="row my_header"> <section class="feedback"> <div class="container"> <form class="feedback_form"> <div class="col-sm-8 feedback_div"> <h3>Training Feedback Form</h3> <div class="row" style="margin-top: 30px"> <div class="col-sm-3"> <h5>Course Name : </h5> </div> <div class="col-sm-9 feedback_title"> <input type="hidden" value="<?php echo $course->course_id; ?>" name="course_id"> <?php echo $course->course_title; ?> </div> </div> <div class="row"> <div class="col-sm-3"> <h5>Instructor Name : </h5> </div> <div class="col-sm-9 feedback_title"> <?php foreach ($faculties as $faculty) { ?> <input type="hidden" value="<?php echo $faculty->login_id; ?>" name="faculty_id"> <div style="display: inline"><span><?php echo $faculty->fullname; ?></span></div> <?php } ?> </div> </div> <div class="row"> <div class="col-sm-3"> <h5>Session : </h5> </div> <div class="col-sm-9 feedback_title"> <div style="display: inline"><span>Recorded</span></div> </div> </div> <hr> <div class="program_feedback"> <h4>Program Feedback</h4> <div class="form-group feedback_radio"> <p>The training met its objectives</p> <label class="radio-inline"><input type="radio" name="objectives" value="Strongly Disagree" required="required">Strongly Disagree</label> <label class="radio-inline"><input type="radio" name="objectives" value="Disagree" required="required">Disagree</label> <label class="radio-inline"><input type="radio" name="objectives" value="Neutral" required="required">Neutral</label> <label class="radio-inline"><input type="radio" name="objectives" value="Agree" required="required">Agree</label> <label class="radio-inline"><input type="radio" name="objectives" value="Strongly Agree" required="required">Strongly Agree</label> </div> <div class="form-group feedback_radio"> <p>A suitable combination of training approaches were used eg: presentations, video, course content etc</p> <label class="radio-inline"><input type="radio" name="combination_of_training" value="Strongly Disagree" required="required">Strongly Disagree</label> <label class="radio-inline"><input type="radio" name="combination_of_training" value="Disagree" required="required">Disagree</label> <label class="radio-inline"><input type="radio" name="combination_of_training" value="Neutral" required="required">Neutral</label> <label class="radio-inline"><input type="radio" name="combination_of_training" value="Agree" required="required">Agree</label> <label class="radio-inline"><input type="radio" name="combination_of_training" value="Strongly Agree" required="required">Strongly Agree</label> </div> <div class="form-group feedback_radio"> <p>The duration of the program was ideal for the concepts covered</p> <label class="radio-inline"><input type="radio" name="program_duration" value="Strongly Disagree" required="required">Strongly Disagree</label> <label class="radio-inline"><input type="radio" name="program_duration" value="Disagree" required="required">Disagree</label> <label class="radio-inline"><input type="radio" name="program_duration" value="Neutral" required="required">Neutral</label> <label class="radio-inline"><input type="radio" name="program_duration" value="Agree" required="required">Agree</label> <label class="radio-inline"><input type="radio" name="program_duration" value="Strongly Agree" required="required">Strongly Agree</label> </div> </div> <hr> <div class="program_materials"> <h4>Program Materials</h4> <div class="form-group feedback_radio"> <p>The materials were useful, well-structured and relevant to the training</p> <label class="radio-inline"><input type="radio" name="material_use" value="Strongly Disagree" required="required">Strongly Disagree</label> <label class="radio-inline"><input type="radio" name="material_use" value="Disagree" required="required">Disagree</label> <label class="radio-inline"><input type="radio" name="material_use" value="Neutral" required="required">Neutral</label> <label class="radio-inline"><input type="radio" name="material_use" value="Agree" required="required">Agree</label> <label class="radio-inline"><input type="radio" name="material_use" value="Strongly Agree" required="required">Strongly Agree</label> </div> <div class="form-group"> <p>What 2-3 things you have learned from this program that will help you in your daily work?</p> <textarea class="form-control" id="text1" name="learnt_things" rows="5" required="required"></textarea> </div> <div class="form-group"> <p>Any other comments/suggestions about the program</p> <textarea class="form-control" id="text2" rows="5" name="feedback" required="required"></textarea> </div> </div> <div class="submit_button"> <center><button type="submit" class="btn btn-primary btn-lg submit" id="">Submit</button></center> </div> </form> </div> </div> </section> </div> </div> <script type="text/javascript"> function study_material() { $("#study_material").modal("show"); } function fun_feedback() { $("#myModal").modal("show"); } $('.feedback_form').submit(function(e) { e.preventDefault(); formdata = new FormData($(this)[0]); $(".submit").attr('disabled', 'disabled'); $(".submit").text("Submitting..."); $.ajax({ type: 'post', url: '<?php echo site_url("add_recorded_feedback") ?>', data: formdata, contentType: false, processData: false, success: function(response) { response = jQuery.parseJSON(response); console.log(response); if (response.result == 1) { toastr["success"](response.message); $('.feedback_form')[0].reset(); $(".submit").text("Submit"); $(".submit").removeAttr('disabled'); window.location.href = '<?php echo site_url('added-course-details'); ?>/<?= current_url(true)->getSegment(2) ?>'; } else { toastr["error"](response.message); $(".submit").text("Update"); $(".submit").removeAttr('disabled'); } } }); }); </script> <?php echo view('includes/user_footer'); ?> <style> .feedback h3 { text-align: center; text-transform: uppercase; font-weight: 600; } .feedback h4 { font-weight: 600; color: #333; text-align: center; } .feedback h5 { font-weight: 600; } .feedback p { font-weight: 600; color: #333; } .feedback_div { padding-top: 2%; padding-bottom: 2%; } .feedback_radio { background-color: white; padding: 10px 20px; } hr { border-top: 1px solid #5555557a; } .feedback_title { padding-top: 1%; } </style>