コード例 #1
0
ファイル: kalika_kendra.py プロジェクト: udraar/Abhyudaya
 def json(self):
     return {'kalika_kendra_name': self.kalika_kendra_name, 'cluster_id': self.cluster_id,
             'cluster_name': ClusterModel.find_by_cluster_id(self.cluster_id).cluster_name,
             'isactive': self.isactive,
             'isdeprecated': self.isdeprecated,
             "id":self.id
             }
コード例 #2
0
ファイル: teacher.py プロジェクト: udraar/Abhyudaya
 def json(self):
     return {
         'teacher_id':
         self.id,
         'teacher_name':
         self.teacher_name,
         'teacher_code':
         self.teacher_code,
         'kalika_kendra_id':
         self.kalika_kendra_id,
         'cluster_id':
         self.cluster_id,
         'kalika_kendra_name':
         KalikaKendraModel.find_by_kalika_kendra_id(
             self.kalika_kendra_id).kalika_kendra_name
         if KalikaKendraModel.find_by_kalika_kendra_id(
             self.kalika_kendra_id) else None,
         'cluster_name':
         ClusterModel.find_by_cluster_id(self.cluster_id).cluster_name,
         'isactive':
         self.isactive,
         'bank_account_no':
         self.bank_account_no,
         'bank_name':
         self.bank_name,
         'ifsc':
         self.ifsc,
         'teacher_category':
         self.teacher_category,
         'creation_date':
         str(self.creation_date),
         'modified_date':
         str(self.modified_date)
     }
コード例 #3
0
ファイル: assessment_result.py プロジェクト: udraar/Abhyudaya
 def json(self):
     student = StudentModel.find_by_student_id(self.student_id)
     cluster = ClusterModel.find_by_cluster_id(student.cluster_id)
     kalika_kendra = KalikaKendraModel.find_by_kalika_kendra_id(
         student.kalika_kendra_id)
     return {
         'result_id':
         self.id,
         'attempt_id':
         self.attempt_id,
         'student_id':
         self.student_id,
         'student_name':
         student.student_name if student else None,
         'cluster_id':
         cluster.id if cluster else None,
         'cluster_name':
         cluster.cluster_name if cluster else None,
         'kalika_kendra_id':
         kalika_kendra.id if kalika_kendra else None,
         'kalika_kendra_name':
         kalika_kendra.kalika_kendra_name if kalika_kendra else None,
         'subject_id':
         self.subject_id,
         'subject_name':
         SubjectModel.find_by_subject_id(self.subject_id).subject_name,
         'assessment_category_id':
         self.category_id,
         'assessment_category_name':
         AssessmentCategoryModel.find_by_category_id(
             self.category_id).category_name,
         'assessment_skill_id':
         self.skill_id,
         'assessment_skill_name':
         AssessmentSkillModel.find_by_skill_id(self.skill_id).skill_name
         if AssessmentSkillModel.find_by_skill_id(self.skill_id) else None,
         'assessment_period_id':
         self.period_id,
         'assessment_year':
         self.year,
         'assessment_month':
         self.month,
         'assessment_day':
         self.day,
         'assessment_session':
         self.session,
         'assessment_score':
         self.score,
         'assessment_full_score':
         self.full_score,
         'assessment_grade':
         self.grade,
         'creation_date':
         str(self.creation_date),
         'modified_date':
         str(self.modified_date),
         'modified_by':
         self.modified_by
     }
コード例 #4
0
ファイル: student.py プロジェクト: udraar/Abhyudaya
 def json(self):
     return {
         'student_id':
         self.id,
         'student_name':
         self.student_name,
         'gender':
         self.gender,
         'aadhar':
         self.aadhar,
         'dob':
         self.dob,
         'class_std':
         self.class_std,
         'kalika_kendra_id':
         self.kalika_kendra_id,
         'kalika_kendra_name':
         KalikaKendraModel.find_by_kalika_kendra_id(
             self.kalika_kendra_id).kalika_kendra_name
         if KalikaKendraModel.find_by_kalika_kendra_id(
             self.kalika_kendra_id) else None,
         'cluster_name':
         ClusterModel.find_by_cluster_id(self.cluster_id).cluster_name,
         'cluster_id':
         self.cluster_id,
         'father_name':
         self.father_name,
         'father_occupation':
         self.father_occupation,
         'mother_name':
         self.mother_name,
         'mother_occupation':
         self.mother_occupation,
         'contact':
         self.contact,
         'isactive':
         self.isactive,
         'register_date':
         str(self.register_date),
         'modified_date':
         str(self.modified_date),
         'modified_by':
         self.modified_by
     }