config = json.loads(config_file.read())
self.today = str(datetime.date(datetime.now()))
+
# how much less likely should it be that a student is called upon?
self.weight = 2
self.record_attendance = record_attendance
return previous_questions
- def __get_preferred_names(self):
+ def get_preferred_names(self):
# translate the unique name into the preferred students name,
# if possible, otherwise return the unique name
return(preferred_names)
def __get_preferred_name(self, selected_student):
- if selected_student in self.preferred_names:
- return self.preferred_names[selected_student]
+ preferred_names = self.get_preferred_names()
+ if selected_student in preferred_names:
+ return preferred_names[selected_student]
else:
return None
print("\t".join([self.unique_row, self.preferred_row, "answered", "assessment", "timestamp"]), file=f)
preferred_name = self.__get_preferred_name(selected_student)
+ if preferred_name == None:
+ preferred_name = ""
# open for appending the student
with open(self.__fn_daily_calllist, "a") as f: