@@ -68,7 +68,8 @@ def add_teacher(self):
68
68
except :
69
69
return False
70
70
71
- def delete_teacher (self , email , user_name ):
71
+ @staticmethod
72
+ def delete_teacher (email , user_name ):
72
73
results = []
73
74
for result in auth_collection_sign_in .find (
74
75
{"User Name" : user_name , "Email" : email , "Role" : "Teacher" }
@@ -93,7 +94,8 @@ def get_data_of_teacher(user_name, email):
93
94
return [False , results ]
94
95
return [True , results ]
95
96
96
- def update_teacher (self , new_info : dict , old_info : dict ):
97
+ @staticmethod
98
+ def update_teacher (new_info : dict , old_info : dict ):
97
99
# si1 = Sign_In(
98
100
# user_name=new_info["User Name"],
99
101
# password_or_email=new_info["Password"],
@@ -209,15 +211,17 @@ def add_student(self):
209
211
)
210
212
return [True , "New Student Created ! " ]
211
213
212
- def delete_student (self , infos : list ):
214
+ @staticmethod
215
+ def delete_student (infos : list ):
213
216
for info in infos :
214
217
try :
215
218
auth_collection_sign_in .delete_one (info )
216
219
except :
217
220
pass
218
221
return True
219
222
220
- def get_students (self ):
223
+ @staticmethod
224
+ def get_students ():
221
225
try :
222
226
results = []
223
227
for result in auth_collection_sign_in .find ({"Role" : "Student" }):
@@ -226,7 +230,8 @@ def get_students(self):
226
230
except :
227
231
return [False , "" ]
228
232
229
- def update_student (self , new_info : dict , old_info : dict ):
233
+ @staticmethod
234
+ def update_student (new_info : dict , old_info : dict ):
230
235
# si1 = Sign_In(
231
236
# user_name=new_info["User Name"],
232
237
# password_or_email=new_info["Password"],
0 commit comments