Fixed Student Attendence
This commit is contained in:
parent
293158db6e
commit
f869a679ae
@ -375,3 +375,4 @@ erpnext.patches.v7_2.setup_auto_close_settings
|
|||||||
erpnext.patches.v7_2.empty_supplied_items_for_non_subcontracted
|
erpnext.patches.v7_2.empty_supplied_items_for_non_subcontracted
|
||||||
erpnext.patches.v7_2.arrear_leave_encashment_as_salary_component
|
erpnext.patches.v7_2.arrear_leave_encashment_as_salary_component
|
||||||
erpnext.patches.v7_2.rename_att_date_attendance
|
erpnext.patches.v7_2.rename_att_date_attendance
|
||||||
|
erpnext.patches.v7_2.update_attendance_docstatus
|
10
erpnext/patches/v7_2/update_attendance_docstatus.py
Normal file
10
erpnext/patches/v7_2/update_attendance_docstatus.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.reload_doctype('Student Attendance')
|
||||||
|
# frappe.reload_doc("schools", "doctype", "student_attendance")
|
||||||
|
frappe.db.sql('''
|
||||||
|
update `tabStudent Attendance` set
|
||||||
|
docstatus=0
|
||||||
|
where
|
||||||
|
docstatus=1''')
|
@ -1,5 +1,5 @@
|
|||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<div class="checkbox {% if status %} text-muted {% endif %}">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@ -7,9 +7,6 @@
|
|||||||
data-student="{{student}}"
|
data-student="{{student}}"
|
||||||
data-student-name="{{student_name}}"
|
data-student-name="{{student_name}}"
|
||||||
class="students-check"
|
class="students-check"
|
||||||
{% if status %}
|
|
||||||
disabled="true"
|
|
||||||
{% endif %}
|
|
||||||
{% if status === "Present" %}
|
{% if status === "Present" %}
|
||||||
checked
|
checked
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -67,21 +67,31 @@ def mark_attendance(students_present, students_absent, course_schedule=None, stu
|
|||||||
frappe.msgprint(_("Attendance has been marked successfully."))
|
frappe.msgprint(_("Attendance has been marked successfully."))
|
||||||
|
|
||||||
def make_attendance_records(student, student_name, status, course_schedule=None, student_batch=None, date=None):
|
def make_attendance_records(student, student_name, status, course_schedule=None, student_batch=None, date=None):
|
||||||
"""Creates Attendance Record.
|
"""Creates/Update Attendance Record.
|
||||||
|
|
||||||
:param student: Student.
|
:param student: Student.
|
||||||
:param student_name: Student Name.
|
:param student_name: Student Name.
|
||||||
:param course_schedule: Course Schedule.
|
:param course_schedule: Course Schedule.
|
||||||
:param status: Status (Present/Absent)
|
:param status: Status (Present/Absent)
|
||||||
"""
|
"""
|
||||||
student_attendance = frappe.new_doc("Student Attendance")
|
student_attendance_list = frappe.get_list("Student Attendance", fields = ["name"], filters = {
|
||||||
|
"student": student,
|
||||||
|
"course_schedule": course_schedule,
|
||||||
|
"student_batch": student_batch,
|
||||||
|
"date": date
|
||||||
|
})
|
||||||
|
|
||||||
|
if student_attendance_list:
|
||||||
|
student_attendance = frappe.get_doc("Student Attendance", student_attendance_list[0])
|
||||||
|
else:
|
||||||
|
student_attendance = frappe.new_doc("Student Attendance")
|
||||||
student_attendance.student = student
|
student_attendance.student = student
|
||||||
student_attendance.student_name = student_name
|
student_attendance.student_name = student_name
|
||||||
student_attendance.course_schedule = course_schedule
|
student_attendance.course_schedule = course_schedule
|
||||||
student_attendance.student_batch = student_batch
|
student_attendance.student_batch = student_batch
|
||||||
student_attendance.date = date
|
student_attendance.date = date
|
||||||
student_attendance.status = status
|
student_attendance.status = status
|
||||||
student_attendance.submit()
|
student_attendance.save()
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_student_guardians(student):
|
def get_student_guardians(student):
|
||||||
|
@ -578,6 +578,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"default": "INDIAN",
|
||||||
"fieldname": "nationality",
|
"fieldname": "nationality",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1022,7 +1023,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-02-20 13:20:10.117987",
|
"modified": "2017-02-21 01:14:59.352772",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Student Applicant",
|
"name": "Student Applicant",
|
||||||
|
@ -256,11 +256,11 @@
|
|||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
"in_dialog": 0,
|
||||||
"is_submittable": 1,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-02-20 13:19:02.708904",
|
"modified": "2017-02-21 01:15:20.989687",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Student Attendance",
|
"name": "Student Attendance",
|
||||||
@ -268,9 +268,9 @@
|
|||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 1,
|
"amend": 0,
|
||||||
"apply_user_permissions": 0,
|
"apply_user_permissions": 0,
|
||||||
"cancel": 1,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
@ -284,7 +284,7 @@
|
|||||||
"role": "Academics User",
|
"role": "Academics User",
|
||||||
"set_user_permissions": 0,
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 1,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -3,148 +3,152 @@
|
|||||||
frappe.provide("schools")
|
frappe.provide("schools")
|
||||||
|
|
||||||
frappe.ui.form.on('Student Attendance Tool', {
|
frappe.ui.form.on('Student Attendance Tool', {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frm.disable_save();
|
frm.disable_save();
|
||||||
},
|
},
|
||||||
|
|
||||||
based_on: function(frm) {
|
based_on: function(frm) {
|
||||||
if (frm.doc.based_on == "Student Batch") {
|
if (frm.doc.based_on == "Student Batch") {
|
||||||
frm.set_value("course_schedule", "");
|
frm.set_value("course_schedule", "");
|
||||||
} else {
|
} else {
|
||||||
frm.set_value("student_batch", "");
|
frm.set_value("student_batch", "");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
student_batch: function(frm) {
|
student_batch: function(frm) {
|
||||||
if ((frm.doc.student_batch && frm.doc.date) || frm.doc.course_schedule) {
|
if ((frm.doc.student_batch && frm.doc.date) || frm.doc.course_schedule) {
|
||||||
var method = "erpnext.schools.doctype.student_attendance_tool.student_attendance_tool.get_student_attendance_records";
|
var method = "erpnext.schools.doctype.student_attendance_tool.student_attendance_tool.get_student_attendance_records";
|
||||||
|
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: method,
|
method: method,
|
||||||
args: {
|
args: {
|
||||||
based_on: frm.doc.based_on,
|
based_on: frm.doc.based_on,
|
||||||
student_batch: frm.doc.student_batch,
|
student_batch: frm.doc.student_batch,
|
||||||
date: frm.doc.date,
|
date: frm.doc.date,
|
||||||
course_schedule: frm.doc.course_schedule
|
course_schedule: frm.doc.course_schedule
|
||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
frm.events.get_students(frm, r.message);
|
frm.events.get_students(frm, r.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
date: function(frm) {
|
date: function(frm) {
|
||||||
frm.trigger("student_batch");
|
frm.trigger("student_batch");
|
||||||
},
|
},
|
||||||
|
|
||||||
course_schedule: function(frm) {
|
course_schedule: function(frm) {
|
||||||
frm.trigger("student_batch");
|
frm.trigger("student_batch");
|
||||||
},
|
},
|
||||||
|
|
||||||
get_students: function(frm, students) {
|
get_students: function(frm, students) {
|
||||||
if (!frm.students_area) {
|
if (!frm.students_area) {
|
||||||
frm.students_area = $('<div>')
|
frm.students_area = $('<div>')
|
||||||
.appendTo(frm.fields_dict.students_html.wrapper);
|
.appendTo(frm.fields_dict.students_html.wrapper);
|
||||||
}
|
}
|
||||||
frm.students_editor = new schools.StudentsEditor(frm, frm.students_area, students)
|
frm.students_editor = new schools.StudentsEditor(frm, frm.students_area, students)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
schools.StudentsEditor = Class.extend({
|
schools.StudentsEditor = Class.extend({
|
||||||
init: function(frm, wrapper, students) {
|
init: function(frm, wrapper, students) {
|
||||||
this.wrapper = wrapper;
|
this.wrapper = wrapper;
|
||||||
this.frm = frm;
|
this.frm = frm;
|
||||||
this.make(frm, students);
|
this.make(frm, students);
|
||||||
},
|
},
|
||||||
make: function(frm, students) {
|
make: function(frm, students) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
$(this.wrapper).empty();
|
$(this.wrapper).empty();
|
||||||
var student_toolbar = $('<p>\
|
var student_toolbar = $('<p>\
|
||||||
<button class="btn btn-default btn-add btn-xs" style="margin-right: 5px;"></button>\
|
<button class="btn btn-default btn-add btn-xs" style="margin-right: 5px;"></button>\
|
||||||
<button class="btn btn-xs btn-default btn-remove" style="margin-right: 5px;"></button>\
|
<button class="btn btn-xs btn-default btn-remove" style="margin-right: 5px;"></button>\
|
||||||
<button class="btn btn-default btn-primary btn-mark-att btn-xs"></button></p>').appendTo($(this.wrapper));
|
<button class="btn btn-default btn-primary btn-mark-att btn-xs"></button></p>').appendTo($(this.wrapper));
|
||||||
|
|
||||||
student_toolbar.find(".btn-add")
|
student_toolbar.find(".btn-add")
|
||||||
.html(__('Check all'))
|
.html(__('Check all'))
|
||||||
.on("click", function() {
|
.on("click", function() {
|
||||||
$(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
|
$(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
|
||||||
if (!$(check).prop("disabled")) {
|
if (!$(check).prop("disabled")) {
|
||||||
check.checked = true;
|
check.checked = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
student_toolbar.find(".btn-remove")
|
student_toolbar.find(".btn-remove")
|
||||||
.html(__('Uncheck all'))
|
.html(__('Uncheck all'))
|
||||||
.on("click", function() {
|
.on("click", function() {
|
||||||
$(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
|
$(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
|
||||||
if (!$(check).prop("disabled")) {
|
if (!$(check).prop("disabled")) {
|
||||||
check.checked = false;
|
check.checked = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var get_present_student = function(student) {
|
var get_present_student = function(student) {
|
||||||
return students.filter(function(s) {
|
return students.filter(function(s) {
|
||||||
return s.idx === idx;
|
return s.idx === idx;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
var get_absent_student = function(idx) {
|
var get_absent_student = function(idx) {
|
||||||
return students.filter(function(s) {
|
return students.filter(function(s) {
|
||||||
return s.idx === idx;
|
return s.idx === idx;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
student_toolbar.find(".btn-mark-att")
|
student_toolbar.find(".btn-mark-att")
|
||||||
.html(__('Mark Attendence'))
|
.html(__('Mark Attendence'))
|
||||||
.on("click", function() {
|
.on("click", function() {
|
||||||
var studs = [];
|
var studs = [];
|
||||||
$(me.wrapper.find('input[type="checkbox"]')).each(function(i, check) {
|
$(me.wrapper.find('input[type="checkbox"]')).each(function(i, check) {
|
||||||
var $check = $(check);
|
var $check = $(check);
|
||||||
studs.push({
|
studs.push({
|
||||||
student: $check.data().student,
|
student: $check.data().student,
|
||||||
student_name: $check.data().studentName,
|
student_name: $check.data().studentName,
|
||||||
idx: $check.data().idx,
|
idx: $check.data().idx,
|
||||||
disabled: $check.prop("disabled"),
|
disabled: $check.prop("disabled"),
|
||||||
checked: $check.is(":checked")
|
checked: $check.is(":checked")
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var students_present = studs.filter(function(stud) {
|
var students_present = studs.filter(function(stud) {
|
||||||
return !stud.disabled && stud.checked;
|
return !stud.disabled && stud.checked;
|
||||||
});
|
});
|
||||||
|
|
||||||
var students_absent = studs.filter(function(stud) {
|
var students_absent = studs.filter(function(stud) {
|
||||||
return !stud.disabled && !stud.checked;
|
return !stud.disabled && !stud.checked;
|
||||||
});
|
});
|
||||||
|
|
||||||
frappe.call({
|
frappe.confirm(__("Do you want to save attendance?<br>Present: {0}\
|
||||||
method: "erpnext.schools.api.mark_attendance",
|
<br>Absent: {1}", [students_present.length, students_absent.length]), function() {
|
||||||
args: {
|
frappe.call({
|
||||||
"students_present": students_present,
|
method: "erpnext.schools.api.mark_attendance",
|
||||||
"students_absent": students_absent,
|
args: {
|
||||||
"student_batch": frm.doc.student_batch,
|
"students_present": students_present,
|
||||||
"course_schedule": frm.doc.course_schedule,
|
"students_absent": students_absent,
|
||||||
"date": frm.doc.date
|
"student_batch": frm.doc.student_batch,
|
||||||
},
|
"course_schedule": frm.doc.course_schedule,
|
||||||
callback: function(r) {
|
"date": frm.doc.date
|
||||||
frm.trigger("student_batch");
|
},
|
||||||
}
|
callback: function(r) {
|
||||||
});
|
frm.trigger("student_batch");
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
var htmls = students.map(function(student) {
|
});
|
||||||
return frappe.render_template("student_button", {
|
|
||||||
student: student.student,
|
|
||||||
student_name: student.student_name,
|
|
||||||
idx: student.idx,
|
|
||||||
status: student.status
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
$(htmls.join("")).appendTo(me.wrapper);
|
var htmls = students.map(function(student) {
|
||||||
}
|
return frappe.render_template("student_button", {
|
||||||
|
student: student.student,
|
||||||
|
student_name: student.student_name,
|
||||||
|
idx: student.idx,
|
||||||
|
status: student.status
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
$(htmls.join("")).appendTo(me.wrapper);
|
||||||
|
}
|
||||||
});
|
});
|
@ -23,6 +23,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Based On",
|
"label": "Based On",
|
||||||
@ -52,6 +53,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@ -80,6 +82,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Student Batch",
|
"label": "Student Batch",
|
||||||
@ -110,6 +113,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Course Schedule",
|
"label": "Course Schedule",
|
||||||
@ -140,6 +144,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Date",
|
"label": "Date",
|
||||||
@ -169,6 +174,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Attendance",
|
"label": "Attendance",
|
||||||
@ -197,6 +203,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Students HTML",
|
"label": "Students HTML",
|
||||||
@ -225,7 +232,7 @@
|
|||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-12-09 17:36:28.739318",
|
"modified": "2017-02-21 01:15:11.435110",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Student Attendance Tool",
|
"name": "Student Attendance Tool",
|
||||||
@ -242,7 +249,6 @@
|
|||||||
"export": 0,
|
"export": 0,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 0,
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
@ -263,7 +269,6 @@
|
|||||||
"export": 0,
|
"export": 0,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
@ -278,7 +283,9 @@
|
|||||||
"quick_entry": 0,
|
"quick_entry": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
|
"show_name_in_global_search": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
@ -27,10 +27,10 @@ def get_student_attendance_records(based_on, date=None, student_batch=None, cour
|
|||||||
|
|
||||||
if course_schedule:
|
if course_schedule:
|
||||||
student_attendance_list= frappe.db.sql("""select student, status from `tabStudent Attendance` where \
|
student_attendance_list= frappe.db.sql("""select student, status from `tabStudent Attendance` where \
|
||||||
course_schedule= %s and docstatus=1""", (course_schedule), as_dict=1)
|
course_schedule= %s""", (course_schedule), as_dict=1)
|
||||||
else:
|
else:
|
||||||
student_attendance_list= frappe.db.sql("""select student, status from `tabStudent Attendance` where \
|
student_attendance_list= frappe.db.sql("""select student, status from `tabStudent Attendance` where \
|
||||||
student_batch= %s and date= %s and docstatus=1 and \
|
student_batch= %s and date= %s and \
|
||||||
(course_schedule is Null or course_schedule='')""",
|
(course_schedule is Null or course_schedule='')""",
|
||||||
(student_batch, date), as_dict=1)
|
(student_batch, date), as_dict=1)
|
||||||
|
|
||||||
@ -38,4 +38,5 @@ def get_student_attendance_records(based_on, date=None, student_batch=None, cour
|
|||||||
for student in student_list:
|
for student in student_list:
|
||||||
if student.student == attendance.student:
|
if student.student == attendance.student:
|
||||||
student.status = attendance.status
|
student.status = attendance.status
|
||||||
|
print student_list
|
||||||
return student_list
|
return student_list
|
Loading…
Reference in New Issue
Block a user