0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.145.12.100


Current Path : /var/www/oasis/js/
Upload File :
Current File : /var/www/oasis/js/coporeport.js

function enablecoporeport() {
  $("#page_main_div").load("../html_modules/coporeport.html", function () {
    document.getElementById("display_module_name").innerHTML =
      "Update COPO Report";
    document.getElementById("module_name_for_save").value =
      "Update COPO Report";
    getDefaultHeadFooterLinks("Update COPO Report");
    loadDegreeDetails();
  });
}

function loadDegreeDetails() {
  $.ajax({
    type: "POST",
    url: $host_url + "loadDegreeDetails",
    success: function (response) {
      var res = JSON.parse(response);
      // console.log(res);
      var marksdegree = `<option value = "">----Select----</option>`;
      for (var i = 0; i < res.data.length; i++) {
        marksdegree += `<option value = ${res.data[i].fdegree}>${res.data[i].fdegree} - ${res.data[i].fdescpn}</option>`;
      }
      $("#degree").html(marksdegree);
    },
  });
}

function getExamNoDet() {
  var degree = document.getElementById("degree").value;

  $.ajax({
    type: "GET",
    data: "degree=" + degree,
    url: $host_url + "getExamNumberDet",
    success: function (response) {
      var res = JSON.parse(response);
      //   console.log(res);
      //   return;
      var examno = `<option value = "">----Select----</option>`;
      for (var i = 0; i < res.data.length; i++) {
        examno += `<option value = ${res.data[i].fexamno}>${res.data[i].fexamname}</option>`;
      }
      $("#examno").html(examno);
    },
  });
}

function getSubjectDetails1() {
  var degree = document.getElementById("degree").value;
  var examno = document.getElementById("examno").value;

  $.ajax({
    type: "GET",
    url: $host_url + "getSubjectDetails1",
    data: "degree=" + degree + "&examno=" + examno,
    success: function (response) {
      var res = JSON.parse(response);

      var qpcode = `<option value = "">----Select----</option>`;
      for (var i = 0; i < res.data.length; i++) {
        qpcode += `<option value = ${res.data[i].fqpcode}>${res.data[i].fqpcode}-${res.data[i].fsubname}</option>`;
      }
      $("#subject").html(qpcode);
    },
  });
}

function generateCOPOReport() {
  var degree = document.getElementById("degree").value;
  var examno = document.getElementById("examno").value;
  var subject = document.getElementById("subject").value;

  window.open(    $host_url +
    "generateCOPOReport&degree=" +
    degree +
    "&examno=" +
    examno +
    "&subject=" +
    subject);
}