mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Removed email from Assistant
This commit is contained in:
parent
dca0ec8828
commit
aa7ab40f1e
5 changed files with 6 additions and 9 deletions
File diff suppressed because one or more lines are too long
|
@ -52,7 +52,6 @@ This URL leads to the home page where you can login with this testing admin acco
|
|||
# To-Do:
|
||||
- Rest of admin model views
|
||||
- Calculate final experiment and part mark
|
||||
- Check if passed in GroupExperiment.checkAndInit
|
||||
- Assistants space
|
||||
- Deactivate assistants account after a while if not assigned to experiments
|
||||
- Homepage text changeable
|
||||
|
|
|
@ -124,7 +124,7 @@ class SemesterView(SecureModelView):
|
|||
),
|
||||
"transfer_assistants": BooleanField(
|
||||
"Transfer Assistants",
|
||||
description="This option transfers assistants of your active semester to active experiments in the new semester. Make sure that your semester is the last semester before creating a new one (recommended)! Active experiments are transfered anyway. If you don't want an experiment to be transfered, set it to inactive before creating the new semester. Experiments which are switched to active before creating the new semester will be created in the new semester without assistants. It is important to check the assistants of all experiments after creating a new semester.",
|
||||
description="This option transfers assistants of your active semester to active experiments in the new semester. Make sure that your semester is the last semester before creating a new one (recommended)! Active experiments are transfered anyway. If you do not want an experiment to be transfered, set it to inactive before creating the new semester. Experiments which are switched to active before creating the new semester will be created in the new semester without assistants. It is important to check the assistants of all experiments after creating a new semester.",
|
||||
default=True,
|
||||
),
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ class PartStudentView(SecureModelView):
|
|||
|
||||
column_filters = ["part", "student", "group"]
|
||||
|
||||
partGroupPartMismatchException = "Part and groups part don't match!"
|
||||
partGroupPartMismatchException = "Student's part and group's part do not match!"
|
||||
|
||||
def create_form(self, obj=None):
|
||||
form = self.CreateForm
|
||||
|
@ -299,7 +299,7 @@ class GroupView(SecureModelView):
|
|||
column_list = ["number", "part", "part_students", "group_experiments"]
|
||||
column_filters = ["number", "part"]
|
||||
|
||||
partStudentPartPartMismatchException = "Part and StudentParts part don't match!"
|
||||
partStudentPartPartMismatchException = "Group's part and student's part do not match!"
|
||||
|
||||
def create_model(self, form):
|
||||
try:
|
||||
|
@ -384,7 +384,7 @@ class SemesterExperimentView(SecureModelView):
|
|||
|
||||
class AssistantView(SecureModelView):
|
||||
can_view_details = True
|
||||
column_list = ["first_name", "last_name", "email", "user", "semester_experiments"]
|
||||
column_list = ["first_name", "last_name", "user", "semester_experiments"]
|
||||
column_details_list = column_list + [
|
||||
"phone_number",
|
||||
"mobile_phone_number",
|
||||
|
|
|
@ -149,7 +149,6 @@ class Assistant(db.Model):
|
|||
id = db.Column(db.Integer, primary_key=True)
|
||||
first_name = db.Column(db.String(100), nullable=False)
|
||||
last_name = db.Column(db.String(100), nullable=False)
|
||||
email = db.Column(db.String(200), nullable=False)
|
||||
phone_number = db.Column(db.String(50), nullable=True)
|
||||
mobile_phone_number = db.Column(db.String(50), nullable=True)
|
||||
room = db.Column(db.String(100), nullable=True)
|
||||
|
|
|
@ -93,12 +93,11 @@ with app.app_context():
|
|||
as1 = Assistant(
|
||||
first_name="As1",
|
||||
last_name="l",
|
||||
email="test@test.com",
|
||||
phone_number="012333212",
|
||||
mobile_phone_number="012334123",
|
||||
user=us1,
|
||||
)
|
||||
as2 = Assistant(first_name="As2", last_name="l", email="test2@test.com", user=us2)
|
||||
as2 = Assistant(first_name="As2", last_name="l", user=us2)
|
||||
|
||||
as1.semester_experiments.append(sx1)
|
||||
as2.semester_experiments.append(sx2)
|
||||
|
|
Loading…
Reference in a new issue