bientôt a alpha
This commit is contained in:
@@ -143,6 +143,8 @@ class cl_Student_eval(models.Model):
|
||||
if sStudent is None:
|
||||
sStudent = self.sStudent
|
||||
|
||||
print(f"get_all_evals_for_student launched ! {sStudent}")
|
||||
|
||||
self.a_evals = []
|
||||
evals = cl_Student_eval.objects.filter(sStudent=sStudent).order_by('sRef')
|
||||
for eval in evals:
|
||||
@@ -152,29 +154,42 @@ class cl_Student_eval(models.Model):
|
||||
#print(self.a_evals)
|
||||
return self.a_evals
|
||||
|
||||
@admin.display(description="Présence d'évaluation mirroir", boolean=True)
|
||||
@admin.display(description="Mirroir ?", boolean=True)
|
||||
def get_mirrored(self):
|
||||
self.get_all_evals_for_student()
|
||||
self.get_mirror_eval(self.a_evals)
|
||||
return self.mirrored
|
||||
|
||||
def get_eval_type(self):
|
||||
return EVAL_TYPE[int(self.nEval_Type)-1][1]
|
||||
|
||||
def get_inter_nature(self):
|
||||
return INTER_NATURE[int(self.nInter_Nature)-1][1]
|
||||
if isinstance(self.nEval_Type, int):
|
||||
return EVAL_TYPE[int(self.nEval_Type) - 1][1]
|
||||
return "Unknown"
|
||||
|
||||
def get_inter_complexity(self):
|
||||
return INTER_COMPLEXITY[int(self.nInter_Nature)-1][1]
|
||||
if isinstance(self.nInter_Nature, int):
|
||||
return INTER_COMPLEXITY[int(self.nInter_Nature) - 1][1]
|
||||
return "Unknown"
|
||||
|
||||
def get_inter_priority(self):
|
||||
return INTER_PRIORITY[int(self.nInter_Priority)-1][1]
|
||||
if isinstance(self.nInter_Priority, int):
|
||||
return INTER_PRIORITY[int(self.nInter_Priority) - 1][1]
|
||||
return "Unknown"
|
||||
|
||||
def get_eval_mode(self):
|
||||
return EVAL_MODE[int(self.nEval_Mode)-1][1]
|
||||
if isinstance(self.nEval_Mode, int):
|
||||
return EVAL_MODE[int(self.nEval_Mode) - 1][1]
|
||||
return "Unknown"
|
||||
|
||||
def get_student_role(self):
|
||||
return STUDENT_ROLE[int(self.nStudent_Role)-1][1]
|
||||
if isinstance(self.nStudent_Role, int):
|
||||
return STUDENT_ROLE[int(self.nStudent_Role) - 1][1]
|
||||
return "Unknown"
|
||||
|
||||
def get_inter_nature(self):
|
||||
if isinstance(self.nInter_Nature,int):
|
||||
return INTER_NATURE[int(self.nInter_Nature)-1][1]
|
||||
return "Uncknow"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -212,6 +227,9 @@ def import_data_csv():
|
||||
value = line[key]
|
||||
if key == "dtDate":
|
||||
value = datetime.strptime(value, "%d.%m.%Y").date()
|
||||
elif key == "sStudent":
|
||||
temp_obj = cl_Student_eval(
|
||||
|
||||
setattr(new_eval, key,value)
|
||||
|
||||
new_eval.save()
|
||||
|
Reference in New Issue
Block a user