Compare commits

..

No commits in common. "14b7a724aec1914887c31009198238d0b595f12d" and "aaae780530df0b8e83c06706861587afca8f5f22" have entirely different histories.

1 changed files with 5 additions and 73 deletions

View File

@ -43,49 +43,41 @@ def update_time_school():
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
],
"Tuesday": [
@ -93,49 +85,41 @@ def update_time_school():
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
],
"Wednesday": [
@ -143,49 +127,41 @@ def update_time_school():
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
],
"Thursday": [
@ -193,49 +169,41 @@ def update_time_school():
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
],
"Friday": [
@ -243,49 +211,41 @@ def update_time_school():
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
],
"Saturday": [
@ -293,49 +253,41 @@ def update_time_school():
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
},
],
}
@ -371,7 +323,6 @@ def update_time_school():
school_subject = ws.cell(row=i, column=column).value # Get school subject from excel file
teacher = ws.cell(row=i, column=column+1).value
room = ws.cell(row=i, column=column+2).value
print(school_subject)
if dont_repeat == 9:
check_repeat += 1
if check_repeat == 5:
@ -625,23 +576,4 @@ def update_time_school():
if gagaga_room == 8:
gagaga_room = 0
# Look for other classes doing PE at the same time as us
if school_subject == "CEAM EDUCAZIONE ATTIVITA' MOTORIE" or school_subject == "CEAM EDUCAZIONE ATTIVITA' MOTORIE":
for c in range(1,100):
search_motoria = ws.cell(row=i, column=c).value
if search_motoria == "CEAM EDUCAZIONE ATTIVITA' MOTORIE" or search_motoria == "CEAM EDUCAZIONE ATTIVITA' MOTORIE":
if c == column:
print("Non valido")
print("Row " + str(i) + " Column " + str(c) + " is " + school_subject)
else:
search_class = ws.cell(row=3, column=c).value
collection.update_one(
{ "_id": ObjectId(array_document_school_time_table)},
{ "$set": {
"School Subject." + array_test[0] + "." + str(gagaga_room)+ ".PE with": search_class,
}
}
)
else:
print("")
update_time_school()