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.147.46.174


Current Path : /proc/thread-self/root/var/www/oasis/js/
Upload File :
Current File : //proc/thread-self/root/var/www/oasis/js/elementwisereport.js

function callelementwiseMarksReport() {
  console.log();
  $("#page_main_div").load(
    "../html_modules/elementwisereport.html?v=31072017",
    function () {
      document.getElementById("display_module_name").innerHTML =
        "Elementwise Marks Report";
      document.getElementById("module_name_for_save").value =
        "Elementwise Marks Report";
      getDefaultHeadFooterLinks("Elementwise Marks Report");
      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>---Select---</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;
      }
    },
  });
}
function handleSubject() {
  let degree = document.getElementById("markentry_sub_degree_code").value;
  let sem = document.getElementById("markentry_sub_Examno").value;
  $.ajax({
    type: "GET",
    url: $host_url + "getsubforIAreport",
    data: "&degree=" + degree + "&sem=" + sem,
    success: function (res) {
      let response = JSON.parse(res);
      let option = "";
      option += `<option>---Select---</option>`;
      // option += `<option value = 'All'>All</option>`;
      if (response.error_code == 0) {
        response.data.forEach((elements) => {
          option += `<option value='${elements.fsub}'>${elements.fsubname}</option>`;
        });
        document.getElementById("subjectforia").innerHTML = option;
      }
    },
  });
}

function handleElement() {
  let degree = document.getElementById("markentry_sub_degree_code").value;
  let sem = document.getElementById("markentry_sub_Examno").value;
  let sub = document.getElementById("subjectforia").value;

  $.ajax({
    type: "GET",
    url: $host_url + "testforIAreport",
    data: "&degree=" + degree + "&sem=" + sem + "&sub=" + sub,
    success: function (res) {
      let response = JSON.parse(res);
      console.log(response);
      option = "";
      option += `<option>---Select---</option>`;
      if (response.error_code == 0) {
        response.data.forEach((elements) => {
          option += `<option value='${elements.fsubname}'>${elements.fsubname}</option>`;
        });
        document.getElementById("elementIamarks").innerHTML = option;
      }
    },
  });
}

function handleTest() {
  let degree = document.getElementById("markentry_sub_degree_code").value;
  let sem = document.getElementById("markentry_sub_Examno").value;
  let sub = document.getElementById("subjectforia").value;
  let subelement = document.getElementById("elementIamarks").value;

  $.ajax({
    type: "GET",
    url: $host_url + "testforIAreporttest",
    data:
      "&degree=" +
      degree +
      "&sem=" +
      sem +
      "&sub=" +
      sub +
      "&subelement=" +
      subelement,
    success: function (res) {
      let response = JSON.parse(res);
      console.log(response, "ghvjh");
      option = "";
      option += `<option>---Select---</option>`;
      if (response.error_code == 0) {
        response.data.forEach((elements) => {
          option += `<option value='${elements.ftest}'>${elements.ftest}</option>`;
        });
        document.getElementById("testIAreport").innerHTML = option;
      }
    },
  });
}

function generateIAreportDegwise() {
  let degree = document.getElementById("markentry_sub_degree_code").value;
  let sem = document.getElementById("markentry_sub_Examno").value;
  let sub = document.getElementById("subjectforia").value;
  let test = document.getElementById("testIAreport").value;
  let subelement = document.getElementById("elementIamarks").value;
  console.log(test);
  if (degree == "---Select---") {
    alert("Select Degree");
    document.getElementById("markentry_sub_degree_code").focus();
    return;
  } else if (sem == "---Select---" || sem == "") {
    alert("Select Exam No.");
    document.getElementById("markentry_sub_Examno").focus();
    return;
  } else if (sub == "---Select---" || sub == "") {
    alert("Select Subject");
    document.getElementById("subjectforia").focus();
    return;
  } else if (subelement == "---Select---" || subelement == "") {
    alert("Select Subject");
    document.getElementById("elementIamarks").focus();
    return;
  } else if (test == "---Select---") {
    alert("Select Test");
    document.getElementById("testIAreport" || test == "").focus();
    return;
  } else {
    window.open(
      $host_url +
        "elememntWiseReport&degree=" +
        degree +
        "&sem=" +
        sem +
        "&sub=" +
        sub +
        "&test=" +
        test +
        "&subele=" +
        subelement
    );
  }
  console.log(sub);
}