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 : 52.14.219.203


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

function callAttDegwise() {
  $("#page_main_div").load(
    "../html_modules/attDegwiseReport.html?v=31072017",
    function () {
      document.getElementById("display_module_name").innerHTML =
        "Attendance Report Degree Wise";
      document.getElementById("module_name_for_save").value =
        "Attendance Report Degree Wise";
      getDefaultHeadFooterLinks("Attendance Report Degree Wise");
      loadAttDegwise();
    }
  );
}

function loadAttDegwise() {
  $.ajax({
    type: "GET",
    url: $host_url + "loadAttDegwise",
    success: function (res) {
      let response = JSON.parse(res);
      let opt = "";
      opt += `<option>---Select---</option>`;
      if (response.error_code === 0) {
        response.data.forEach((element) => {
          opt += `<option value='${element.fdegree}'>${element.fdegree} - ${element.fdescpn}</option>`;
        });
        document.getElementById("markentry_sub_degree_code").innerHTML = opt;
      }
    },
  });
}

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

  $.ajax({
    type: "GET",
    url: $host_url + "getAttDegSem" + "&degree=" + degree,
    success: function (res) {
      let response = JSON.parse(res);
      let option = "";

      option += `<option value = 'All'>---All---</option>`;
      if (response.error_code === 0) {
        response.data.forEach((elements) => {
          option += `<option value='${elements.fexamno}'>${elements.fexamno} - ${elements.fexamname}</option>`;
        });
        document.getElementById("markentry_sub_Examno").innerHTML = option;
      }
    },
  });
  $.ajax({
    type: "GET",
    url: $host_url + "getAttDegSec" + "&degree=" + degree,
    success: function (res) {
      let response = JSON.parse(res);
      let option = "";
      option += `<option value = 'All'>---All---</option>`;
      if (response.error_code === 0) {
        response.data.forEach((elements) => {
          option += `<option value='${elements.fsection}'>${elements.fsection}</option>`;
        });
        document.getElementById("markentry_sub_section").innerHTML = option;
      }
    },
  });
}

function generateAttDegwise() {
  let degree = document.getElementById("markentry_sub_degree_code").value;
  let sem = document.getElementById("markentry_sub_Examno").value;
  let fromdate = document.getElementById("fromdate").value;
  let todate = document.getElementById("todate").value;
  let section = document.getElementById("markentry_sub_section").value;
  let reporttype = document.getElementById("rtype").value;

  if (reporttype === "attreport") {
    window.open(
      $host_url +
        "attDegwiseReport&degree=" +
        degree +
        "&sem=" +
        sem +
        "&fromdate=" +
        fromdate +
        "&todate=" +
        todate +
        "&section=" +
        section
    );
  } else if (reporttype === "prgressreport") {
    window.open(
      $host_url +
        "progDegwiseReport&degree=" +
        degree +
        "&sem=" +
        sem +
        "&fromdate=" +
        fromdate +
        "&todate=" +
        todate +
        "&section=" +
        section
    );
  }
}