Now let us know if the two electrical and electronics lab rooms are occupied or not

This commit is contained in:
Stefano Assenzo 2023-02-10 15:40:16 +00:00 committed by GitHub
parent b135312aa0
commit e856c71eff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 513 additions and 55 deletions

View File

@ -27,6 +27,7 @@ mongo_url = "mongodb+srv://elci:" + urllib.parse.quote_plus(PASSWORD_MONGODB) +
client = pymongo.MongoClient(mongo_url) # Connect to MongoDB
database = client["website-class"] # Database name
collection = database["school-time-table"] # Collection school time table current
collection_email = database["email"] # Collection email
#Date
current_time = datetime.datetime.now() # Current time
@ -66,7 +67,8 @@ async def orario():
driver.get_screenshot_as_file("screenshot.png")
driver.quit()
await channel.send(file=discord.File('screenshot.png'))
channel = bot.get_channel(GENERAL_ID)
await channel.send(file=discord.File("screenshot.png"))
os.remove("screenshot.png")
send_screenshot += 1
else:
@ -119,20 +121,24 @@ async def change_school_time(
{"$set": {f"School Subject.{day}.{int(hour_school)}.Subject": text}}
)
@bot.slash_command()
@discord.default_permissions(ban_members = True, administrator = True)
async def ban(ctx, member: Option(discord.Member, description="Select a member", required=True), reason: Option(str, description="Reason", required=True)):
ban.ban_user(bot, ctx, member, reason)
@bot.slash_command()
@discord.default_permissions(kick_members = True, administrator = True)
async def kick(ctx, member: Option(discord.Member, description="Select a member", required=True), reason: Option(str, description="Reason", required=True)):
kick.kick_user(bot, ctx, member, reason)
@bot.slash_command(name= 'clear', description= 'Clears messages from a channel')
@commands.has_permissions(manage_messages=True, administrator=True)
@commands.cooldown(1, 5, commands.BucketType.user)
async def clear(ctx, messages: Option(int, description="Amount of messages to delete", required=True)):
clear_msg.clear_messages(ctx, amount = messages)
@bot.slash_command(name='confirm', description='Confirm change school time')
async def confirm(ctx : ApplicationContext):
await ctx.respond(f"Confirm")
collection_email.update_one({}, {"$set": {"Send on Whatsapp": "yes"}})
#@bot.slash_command()
#@discord.default_permissions(ban_members = True, administrator = True)
#async def ban(ctx, member: Option(discord.Member, description="Select a member", required=True), reason: Option(str, description="Reason", required=True)):
# ban.ban_user(bot, ctx, member, reason)
#
#@bot.slash_command()
#@discord.default_permissions(kick_members = True, administrator = True)
#async def kick(ctx, member: Option(discord.Member, description="Select a member", required=True), reason: Option(str, description="Reason", required=True)):
# kick.kick_user(bot, ctx, member, reason)
#
#@bot.slash_command(name= 'clear', description= 'Clears messages from a channel')
#@commands.has_permissions(manage_messages=True, administrator=True)
#@commands.cooldown(1, 5, commands.BucketType.user)
#async def clear(ctx, messages: Option(int, description="Amount of messages to delete", required=True)):
# clear_msg.clear_messages(ctx, amount = messages)
bot.run(DISCORD_TOKEN)

View File

@ -1,30 +0,0 @@
from selenium.webdriver.firefox.options import Options # Selenium
from selenium import webdriver # Selenium
from dotenv import load_dotenv
from twilio.rest import Client
import os
load_dotenv()
SID = os.getenv('SID')
AUTH_TOKEN = os.getenv('AUTHTOKEN')
PHONE_NUMBER_BOT = os.getenv('PHONE_NUMBER_BOT')
PHONE_NUMBER_PERSONAL = os.getenv('PHONE_NUMBER_PERSONAL')
client = Client(SID, AUTH_TOKEN)
options = Options() # Set options
options.add_argument("--headless") # Headless mode (so you don't see the browser)
options.add_argument('--disable-gpu') # Disable GPU
options.add_argument('window-size=1024x768')
driver = webdriver.Firefox(options=options)
driver.get('http://127.0.0.1:4999/orario')
driver.get_screenshot_as_file("screenshot.png")
driver.quit()
message = client.messages \
.create(
body="Test",
media_url=['IMAGE URL'],
from_=PHONE_NUMBER_BOT,
to=PHONE_NUMBER_PERSONAL
)
print(message.sid)

View File

@ -47,7 +47,7 @@ def check_email():
if extension_file != ".xlsx": # Check if file is xlsx
print("Check file")
else:
if collection.find_one({"filename": att_fn}):
if collection.find_one({"Filename": att_fn, "Send on Whatsapp": "no"}):
print("File already exists")
recheck_email()
else:
@ -55,7 +55,7 @@ def check_email():
fp.write(attachment.get('content').read())
os.rename(download_path, f"{DOWNLOAD_FOLDER}/school_time.xlsx") # Rename file
collection.delete_many({}) # Delete old file
collection.insert_one({"filename": att_fn}) # Insert filename to MongoDB
collection.insert_one({"Filename": att_fn, "Send on Whatsapp": "no"}) # Insert filename to MongoDB
send_xlsx()
except:
print(traceback.print_exc())
@ -70,7 +70,6 @@ def send_xlsx():
from update_time_school import update_time_school
update_time_school()
os.remove(f"{DOWNLOAD_FOLDER}/school_time.xlsx") # Delete file
recheck_email()
check_email()

View File

@ -44,48 +44,64 @@ def update_time_school():
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
],
"Tuesday": [
@ -94,48 +110,64 @@ def update_time_school():
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
],
"Wednesday": [
@ -144,48 +176,64 @@ def update_time_school():
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
],
"Thursday": [
@ -194,48 +242,64 @@ def update_time_school():
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
],
"Friday": [
@ -244,48 +308,64 @@ def update_time_school():
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
],
"Saturday": [
@ -294,48 +374,64 @@ def update_time_school():
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
{
"Subject": "",
"Teacher": "",
"Room": "",
"PE with": "",
"le is busy": "",
"le3 is busy": "",
},
],
}
@ -392,6 +488,23 @@ def update_time_school():
find_document_archive_school_time_table = list(collection_archive.find({}, {"Date": long_date}))
array_document_school_time_table = find_document_school_time_table[0]["_id"]
array_document_archive_school_time_table = find_document_archive_school_time_table[0]["_id"]
if remove_things_in_front == "MISURE ELETTRICHE":
remove_things_in_front = "MISURE"
elif remove_things_in_front == " EDUCAZIONE ATTIVITA' MOTORIE":
remove_things_in_front = "MOTORIA"
elif remove_things_in_front == "EDUCAZIONE ATTIVITA' MOTORIE":
remove_things_in_front = "Motoria"
elif remove_things_in_front == "DIRITTO ED ECONOMIA":
remove_things_in_front = "DIRITTO"
elif remove_things_in_front == "INGLESE PROFESSIONALE":
remove_things_in_front = "INGLESE PRO."
elif remove_things_in_front == "LABORATORIO ELETTRICO":
remove_things_in_front = "LAB. ELETTRICO"
elif remove_things_in_front == "LINGUA INGLESE":
remove_things_in_front = "INGLESE"
elif remove_things_in_front == "SCIENZE INTEGRATE - FISICA":
remove_things_in_front = "FISICA"
# Add school subject in MongoDB beacause school subject is not 0
collection.update_one(
{ "_id": ObjectId(array_document_school_time_table)},
@ -421,7 +534,6 @@ def update_time_school():
array_test.append(convert_date_to_day)
number_day += 1
if school_subject == 0: #If school subject is 0, add "" in MongoDB
print(school_subject)
find_document_school_time_table = list(collection.find({}, {"Date": long_date}))
find_document_archive_school_time_table = list(collection_archive.find({}, {"Date": long_date}))
array_document_school_time_table = find_document_school_time_table[0]["_id"]
@ -429,7 +541,7 @@ def update_time_school():
collection.update_one(
{ "_id": ObjectId(array_document_school_time_table)},
{ "$set": {
"School Subject." + array_test[0] + "." + str(gagaga) + ".Subject": school_subject,
"School Subject." + array_test[0] + "." + str(gagaga) + ".Subject": remove_things_in_front,
}
}
)
@ -450,7 +562,29 @@ def update_time_school():
if gagaga == 8:
gagaga = 0
else: #If school subject is not 0, add school subject in MongoDB
remove_things_in_front = school_subject.split(' ', 1)[1]
if school_subject == "21PM1 MISURE ELETTRICHE":
school_subject = "MISURE"
elif school_subject == " CEAM EDUCAZIONE ATTIVITA' MOTORIE":
school_subject = "MOTORIA"
elif school_subject == "CEAM EDUCAZIONE ATTIVITA' MOTORIE":
school_subject = "MOTORIA"
elif school_subject == "CSGGE1 DIRITTO ED ECONOMIA":
school_subject = "DIRITTO"
elif school_subject == "PR1 INGLESE PROFESSIONALE":
school_subject = "INGLESE PRO."
elif school_subject == "PR1 LABORATORIO ELETTRICO":
school_subject = "LAB. ELETTRICO"
elif school_subject == "CLING LINGUA INGLESE":
school_subject = "INGLESE"
elif school_subject == "CMST2 SCIENZE INTEGRATE - FISICA":
school_subject = "FISICA"
elif school_subject == "PR1 DISEGNO":
school_subject = "DISEGNO"
elif school_subject == "CSGGE2 STORIA":
school_subject = "STORIA"
elif school_subject == "CMST1 MATEMATICA":
school_subject = "MATEMATICA"
find_document_school_time_table = list(collection.find({}, {"Date": long_date}))
find_document_archive_school_time_table = list(collection_archive.find({}, {"Date": long_date}))
array_document_school_time_table = find_document_school_time_table[0]["_id"]
@ -459,14 +593,14 @@ def update_time_school():
collection.update_one(
{ "_id": ObjectId(array_document_school_time_table)},
{ "$set": {
"School Subject." + array_test[0] + "." + str(gagaga)+ ".Subject": remove_things_in_front,
"School Subject." + array_test[0] + "." + str(gagaga)+ ".Subject": school_subject,
}
}
)
collection_archive.update_one(
{ "_id": ObjectId(array_document_archive_school_time_table)},
{ "$set": {
"School Subject." + array_test[0] + "." + str(gagaga)+ ".Subject": remove_things_in_front,
"School Subject." + array_test[0] + "." + str(gagaga)+ ".Subject": school_subject,
}
}
)
@ -645,4 +779,39 @@ def update_time_school():
else:
pass
# Search if class le3 is busy
for c in range(1,100):
search_other_subject = ws.cell(row=i, column=c).value
search_room = ws.cell(row=i, column=c).value
if c == column:
pass
else:
if teacher == "Martin":
if search_other_subject == "le3" or search_other_subject == "le":
search_class = ws.cell(row=3, column=c-2).value
if search_class == "2elci":
pass
else:
if c == column:
pass
else:
if search_other_subject == "le3":
collection.update_one(
{ "_id": ObjectId(array_document_school_time_table)},
{ "$set": {
"School Subject." + array_test[0] + "." + str(gagaga_room-1)+ ".le3 is busy": search_class,
}
}
)
if search_other_subject == "le":
collection.update_one(
{ "_id": ObjectId(array_document_school_time_table)},
{ "$set": {
"School Subject." + array_test[0] + "." + str(gagaga_room-1)+ ".le is busy": search_class,
}
}
)
else:
pass
update_time_school()

View File

@ -1,6 +1,5 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link type="text/css" rel="stylesheet" href="resources/sheet.css">
<style type="text/css">
.ritz .waffle a {
color: inherit;
@ -307,4 +306,319 @@
{% endfor %}
</tbody>
</table>
<br>
{% for i in data %}
{% if i['School Subject']['Monday'][0]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Lunedì alla prima ora siamo con: {{ i['School Subject']['Monday'][0]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Monday'][1]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Lunedì alla seconda ora siamo con: {{ i['School Subject']['Monday'][1]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Monday'][2]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Lunedì alla terza ora siamo con: {{ i['School Subject']['Monday'][2]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Monday'][3]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Lunedì alla quarta ora siamo con: {{ i['School Subject']['Monday'][3]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Monday'][4]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Lunedì alla quinta ora siamo con: {{ i['School Subject']['Monday'][4]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Monday'][5]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Lunedì alla sesta ora siamo con: {{ i['School Subject']['Monday'][5]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][0]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Martedì alla prima ora siamo con: {{ i['School Subject']['Tuesday'][0]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][1]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Martedì alla seconda ora siamo con: {{ i['School Subject']['Tuesday'][1]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][2]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Martedì alla terza ora siamo con: {{ i['School Subject']['Tuesday'][2]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][3]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Martedì alla quarta ora siamo con: {{ i['School Subject']['Tuesday'][3]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][4]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Martedì alla quinta ora siamo con: {{ i['School Subject']['Tuesday'][4]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][5]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Martedì alla sesta ora siamo con: {{ i['School Subject']['Tuesday'][5]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][0]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Mercoledì alla prima ora siamo con: {{ i['School Subject']['Wednesday'][0]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][1]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Mercoledì alla seconda ora siamo con: {{ i['School Subject']['Wednesday'][1]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][2]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Mercoledì alla terza ora siamo con: {{ i['School Subject']['Wednesday'][2]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][3]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Mercoledì alla quarta ora siamo con: {{ i['School Subject']['Wednesday'][3]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][4]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Mercoledì alla quinta ora siamo con: {{ i['School Subject']['Wednesday'][4]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][5]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Mercoledì alla sesta ora siamo con: {{ i['School Subject']['Wednesday'][5]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][0]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Giovedì alla prima ora siamo con: {{ i['School Subject']['Thursday'][0]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][1]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Giovedì alla seconda ora siamo con: {{ i['School Subject']['Thursday'][1]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][2]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Giovedì alla terza ora siamo con: {{ i['School Subject']['Thursday'][2]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][3]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Giovedì alla quarta ora siamo con: {{ i['School Subject']['Thursday'][3]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][4]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) Giovedì alla quinta ora siamo con: {{ i['School Subject']['Thursday'][4]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][5]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) (Motoria) Giovedì alla sesta ora siamo con: {{ i['School Subject']['Thursday'][5]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][0]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) (Motoria) Venerdì alla prima ora siamo con: {{ i['School Subject']['Friday'][0]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][1]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) (Motoria) Venerdì alla seconda ora siamo con: {{ i['School Subject']['Friday'][1]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][2]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) (Motoria) Venerdì alla terza ora siamo con: {{ i['School Subject']['Friday'][2]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][3]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) (Motoria) Venerdì alla quarta ora siamo con: {{ i['School Subject']['Friday'][3]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][4]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) (Motoria) Venerdì alla quinta ora siamo con: {{ i['School Subject']['Friday'][4]['PE with']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][5]['PE with'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Motoria) (Motoria) Venerdì alla sesta ora siamo con: {{ i['School Subject']['Friday'][5]['PE with']}}</div>
{% endif %}
{% endfor %}
{% for i in data %}
{% if i['School Subject']['Monday'][0]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Lunedì (1 ora) le è occupato da: {{ i['School Subject']['Monday'][1]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Monday'][1]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Lunedì (2 ora) le è occupato da: {{ i['School Subject']['Monday'][1]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Monday'][2]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Lunedì (3 ora) le è occupato da: {{ i['School Subject']['Monday'][2]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Monday'][3]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Lunedì (4 ora) le è occupato da: {{ i['School Subject']['Monday'][3]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Monday'][4]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Lunedì (5 ora) le è occupato da: {{ i['School Subject']['Monday'][4]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Monday'][5]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Lunedì (6 ora) le è occupato da: {{ i['School Subject']['Monday'][5]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][0]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Martedì (1 ora) le è occupato da: {{ i['School Subject']['Tuesday'][0]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][1]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Martedì (2 ora) le è occupato da: {{ i['School Subject']['Tuesday'][1]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][2]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Martedì (3 ora) le è occupato da: {{ i['School Subject']['Tuesday'][2]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][3]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Martedì (4 ora) le è occupato da: {{ i['School Subject']['Tuesday'][3]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][4]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Martedì (5 ora) le è occupato da: {{ i['School Subject']['Tuesday'][4]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Tuesday'][5]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Martedì (6 ora) le è occupato da: {{ i['School Subject']['Tuesday'][5]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][0]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Mercoledì (1 ora) le è occupato da: {{ i['School Subject']['Wednesday'][0]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][1]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Mercoledì (2 ora) le è occupato da: {{ i['School Subject']['Wednesday'][1]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][2]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Mercoledì (3 ora) le è occupato da: {{ i['School Subject']['Wednesday'][2]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][3]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Mercoledì (4 ora) le è occupato da: {{ i['School Subject']['Wednesday'][3]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][4]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Mercoledì (5 ora) le è occupato da: {{ i['School Subject']['Wednesday'][4]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Wednesday'][5]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Mercoledì (6 ora) le è occupato da: {{ i['School Subject']['Wednesday'][5]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][0]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Giovedì (1 ora) le è occupato da: {{ i['School Subject']['Thursday'][0]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][1]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Giovedì (2 ora) le è occupato da: {{ i['School Subject']['Thursday'][1]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][2]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Giovedì (3 ora) le è occupato da: {{ i['School Subject']['Thursday'][2]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][3]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Giovedì (4 ora) le è occupato da: {{ i['School Subject']['Thursday'][2]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][4]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Giovedì (5 ora) le è occupato da: {{ i['School Subject']['Thursday'][4]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Thursday'][5]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Giovedì (6 ora) le è occupato da: {{ i['School Subject']['Thursday'][5]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][0]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Venerdì (1 ora) le è occupato da: {{ i['School Subject']['Friday'][0]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][1]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Venerdì (2 ora) le è occupato da: {{ i['School Subject']['Friday'][1]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][2]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Venerdì (3 ora) le è occupato da: {{ i['School Subject']['Friday'][2]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][3]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Venerdì (4 ora) le è occupato da: {{ i['School Subject']['Friday'][3]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][4]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Venerdì (5 ora) le è occupato da: {{ i['School Subject']['Friday'][3]['le is busy']}}</div>
{% endif %}
{% if i['School Subject']['Friday'][5]['le is busy'] == "" %}
<div class="s7"></div>
{% else %}
<div class="s7">(Martin) Venerdì (6 ora) le è occupato da: {{ i['School Subject']['Friday'][5]['le is busy']}}</div>
{% endif %}
{% endfor %}
</div>