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 : 18.225.54.147
Current Path : /var/www/oasis/js_old/ |
| Current File : /var/www/oasis/js_old/boeselection.js |
function Callboeselection() {
$("#page_main_div").load("../html_modules/boeselection.html", function() {
document.getElementById("display_module_name").innerHTML = "Boe Selection";
document.getElementById("module_name_for_save").value = "Boe Selection";
getDefaultHeadFooterLinks("Boe Selection");
$.ajax({
type: "POST",
url: $host_url + "AssignTeachDropDownMenus",
data: "id=",
success: function AssignTeachDropDownMenusSuccess(responce) {
responce = eval("(" + responce + ")");
var dept = responce.data["dept"];
for ($i = 0; $i < dept.length; $i++) {
$op = new Option(dept[$i]["value"], dept[$i]["code"]);
$op.id = dept[$i]["code"];
document.getElementById("department").options.add($op);
}
}
});
});
}
function getsubjectdet(deptCode) {
$.ajax({
type: "POST",
url: $host_url + "DepartmentSubjectDropdown",
data: "deptCode=" + deptCode,
success: function DepartmentSubjectDropdownSuccess(responce) {
responce = eval("(" + responce + ")");
var { deptSubj } = responce.data;
document.getElementById("subject").options.length = 0;
$op = new Option("None", "0");
$op.id = "0";
document.getElementById("subject").options.add($op);
for ($i = 0; $i < deptSubj.length; $i++) {
$op = new Option(deptSubj[$i]["value"], deptSubj[$i]["code"]);
$op.id = deptSubj[$i]["code"];
document.getElementById("subject").options.add($op);
}
}
});
}
function Saveboeteach() {
var deptcode = document.getElementById("department").value;
var qpcode = document.getElementById("subject").value;
if (deptcode == "0") {
alert("select Department");
return;
}
if (qpcode == "0") {
alert("select subject");
return;
}
var saveteach_arr = [];
$("#tbl_teach .jqgrow").each(function() {
let teacher = {};
teacher.teachcode = $.trim(
$(this)
.find("#teachcode")
.html()
);
teacher.fpsapprove = $(this)
.find("#qp_" + teacher.teachcode)
.is(":checked")
? "T"
: "F";
teacher.fvalapprove = $(this)
.find("#val_" + teacher.teachcode)
.is(":checked")
? "T"
: "F";
teacher.fprapprove = $(this)
.find("#pr_" + teacher.teachcode)
.is(":checked")
? "T"
: "F";
saveteach_arr.push(teacher);
});
$.ajax({
type: "POST",
url: $host_url + "saveExaminerDetails",
data:
"&deptCode=" +
deptcode +
"&qpcode=" +
qpcode +
"&teach_arr=" +
JSON.stringify(saveteach_arr),
success: function(responce) {
var { error_code, status, data } = JSON.parse(responce);
if (error_code == 0) {
alert(data);
} else {
alert(data);
}
}
});
}
function getExaminers() {
var department = document.getElementById("department").value;
var subject = document.getElementById("subject").value;
if (department == "0") {
alert("select Department");
return;
}
if (subject == "0") {
alert("select subject");
return;
}
$.ajax({
type: "POST",
url: $host_url + "getExaminerDetails",
data: "&deptCode=" + department + "&qpcode=" + subject,
success: function(responce) {
var { error_code, status, data } = JSON.parse(responce);
if (error_code == 0) {
var { teachers } = data;
var table_html = `<tr class="ui-state-default ui-jqgrid-hdiv" style="font-size:12px;">
<td colspan=8 style="border-top:1px solid #C5DBEC;text-align:center; padding:2px; width:60px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;">Examiner Selection</td>
</tr>
<tr class="ui-state-default ui-jqgrid-hdiv" style="font-size:12px;">
<td style="padding:2px; width:30px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;" align='center'>Sl. No. </td>
<td style="padding:2px; width:50px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;" align='center'>Teacher Code</td>
<td style="padding:2px; width:150px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;" align='center'>Teacher Name</td>
<td style="padding:2px; width:100px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;" align='center'>QP Setter</td>
<td style="padding:2px; width:50px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;" align='center'>Examiner(Theory)</td>
<td style="padding:2px; width:50px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;" align='center'>Examiner(Practical)</td>
</tr>`;
console.log(teachers);
for (let i in teachers) {
let { fteachcode, fteachname } = teachers[i];
table_html += `<tr class="ui-widget-content jqgrow" style="font-size:12px;">
<td align="center" style="border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;" class="tbl_row_new">${parseInt(
i
) + 1}</td>
<td align="center" style="border-right:1px solid #C5DBEC; padding:2px;" class="tbl_row_new" id="teachcode">
${fteachcode}</td>
<td style="border-right:1px solid #C5DBEC; padding:2px;" class="tbl_row_new" align='center'>${fteachname}</td>
<td style="border-right:1px solid #C5DBEC; padding:2px;" class="tbl_row_new" align='center'><input type='checkbox' class='examiner' id="qp_${fteachcode}" style="vertical-align:middle;" > </td>
<td style="border-right:1px solid #C5DBEC; padding:2px;" class="tbl_row_new" align='center'><input type='checkbox' class='examiner' id="val_${fteachcode}" style="vertical-align:middle;" ></td>
<td style="border-right:1px solid #C5DBEC; padding:2px;" class="tbl_row_new" align='center'><input type='checkbox' class='examiner' id="pr_${fteachcode}$" style="vertical-align:middle;" ></td>
</tr>`;
}
$("#tbl_teach").html(table_html);
}
}
});
}
/*function Reportboeteach()
{
var department = document.getElementById('department').value;
var subject = document.getElementById('subject').value;
if(department == '0')
{
alert("select Department");
return;
}
if(subject == '0')
{
alert("select subject");
return;
}
var str="&from_dept="+from_dept+"&to_dept="+to_dept+"&from_des="+from_des+"&to_des="+to_des;
window.location.href = $host_url+"generateBoeSelectionReport"+str;
}*/
function DisplaybulkAckExamApplications() {
$.ajax({
type: "POST",
data:
"&app_no_from=" +
$("#app_no_from").val() +
"&app_no_to=" +
$("#app_no_to ").val() +
"&ack_type=" +
$("#ack_type").val(),
url: $host_url + "DisplaybulkAckExamApplications",
success: DisplayAllAckExamApplicationsResponce
});
}
function DisplayAllAckExamApplicationsResponce(responce) {
responce = eval("(" + responce + ")");
$("#ack_rv_rt_application_details").html("");
$("#ack_rv_rt_application_details").html(responce.data["html"]);
}
function BulkacknowledgeSelectedExamApplications() {
checked_app_nos = new Array();
var obj = $("input[id*='ack_check_box_']");
jQuery.each(obj, function(k, v) {
row_id = v["id"].split("_")[3];
if ($(this).is(":checked")) checked_app_nos.push(row_id);
});
if (empty(checked_app_nos)) {
alert("Please select minumum one application to acknowledge.");
return false;
}
$.ajax({
type: "POST",
data: "checked_app_nos=" + checked_app_nos,
url: $host_url + "BulkacknowledgeSelectedExamApplications",
success: AcknowledgeSelectedExamApplicationsResponce
});
}
function AcknowledgeSelectedExamApplicationsResponce(responce) {
responce = eval("(" + responce + ")");
alert(responce.data);
DisplayAllAckExamApplications();
}
function PrintExamApplicationForm(app_no) {
window.location.href =
$host_url + "PrintExamApplicationForm&app_no=" + app_no;
}
function DownloadExamApplicationsForms() {
window.location.href =
$host_url +
"DownloadExamAppFormApplications&app_no_from=" +
$("#app_no_from").val() +
"&app_no_to=" +
$("#app_no_to ").val() +
"&ack_type=" +
$("#ack_type").val();
}
|