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


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

function callThValMarks() 
{
  $("#page_main_div").load(
    "../html_modules/thvalmarks.html",
    function () 
    {
      document.getElementById("display_module_name").innerHTML =
        "Theory External Val. Marks";
      document.getElementById("module_name_for_save").value =
        "Theory External Val. Marks";
      getDefaultHeadFooterLinks("Theory External Val. Marks");
      $("#semTitle").html("Semester");
      // console.log(db);
      loadDegreeThValMarks();
    }
  );
}

function loadDegreeThValMarks() {
  $.ajax({
    type: "GET",
    url: $host_url + "loadDegreeThValMarks",
    success: function (res) {
      let response = JSON.parse(res);
      console.log(response);
      let options = "";
      if (response.error_code === 0) {
        options += `<option>---select---</option>`;
        for (let i in response.data) {
          options += `<option value='${response.data[i].id}'>${response.data[i].value}</option>`;
          i++;
        }
        $("#degcode").html(options);
      } else {
        alert(response.data.msg);
        return;
      }
    },
  });
}

function getDegThalSem() {
  
  let degcode = $('#degcode').val();

  $.ajax({
    type: "GET",
    url: $host_url + "getDegThalSem",
    data:"degcode="+degcode,
    success: function (res) {
      let response = JSON.parse(res);
      console.log(response);
      let options = "";
      if (response.error_code === 0) {
        options += `<option>---select---</option>`;
        for (let i in response.data) {
          options += `<option value='${response.data[i].id}'>${response.data[i].value}</option>`;
          i++;
        }
        $("#sem").html(options);
      } else {
        alert(response.data.msg);
        return;
      }
    },
  });
}

function getExamDateThVal() {

  let degcode = $('#degcode').val();
  let sem = $('#sem').val();

  $.ajax({
    type: "GET",
    url: $host_url + "getExamDateThVal",
    data:"degcode="+degcode+"&sem="+sem,
    success: function (res) {
      let response = JSON.parse(res);
      let options = "";
      if (response.error_code === 0) {
        options += `<option>---select---</option>`;
        for (let i in response.data) {
          options += `<option value='${response.data[i].id}'>${response.data[i].value}</option>`;
          i++;
        }
        $("#examdate").html(options);
      } else {
        alert(response.data.msg);
        return;
      }
    },
  });
}

function generateThValMarks()
{
  let degcode = $('#degcode').val();
  let sem = $('#sem').val();
  let examdate = $('#examdate').val();

  window.open(
    $host_url +
      `generateThValMarks&degcode=${degcode}&sem=${sem}&examdate=${examdate}`
  );

}