ipaddr
This commit is contained in:
parent
19a628efab
commit
5ee55a19af
|
|
@ -216,7 +216,7 @@ async def canvas_data_2024():
|
|||
#connection_string: str = "postgresql://postgres:rolley34@192.168.1.6/db"
|
||||
|
||||
# todo: use secrets
|
||||
connection_string: str = "postgresql://postgres:rolley34@192.168.1.199/db"
|
||||
connection_string: str = "postgresql://postgres:rolley34@192.168.1.198/db"
|
||||
|
||||
desired_tables = "users,courses,communication_channels,context_modules,conversation_message_participants,conversation_messages,conversation_participants,conversations,course_sections,enrollment_states,enrollment_dates_overrides,enrollment_terms,enrollments,learning_outcome_groups,learning_outcome_question_results,learning_outcomes,pseudonyms,quizzes,scores,submissions,submission_versions,wiki_pages,wikis".split(',')
|
||||
credentials = Credentials.create(client_id=client_id, client_secret=client_secret)
|
||||
|
|
|
|||
46
users.py
46
users.py
|
|
@ -2129,6 +2129,7 @@ def training_find_goos():
|
|||
pass
|
||||
print()
|
||||
|
||||
# Cross-reference training records with upcoming sections to flag missing GOTT work.
|
||||
def cross_ref_training():
|
||||
from semesters import find_term
|
||||
from openpyxl import Workbook, load_workbook
|
||||
|
|
@ -2265,8 +2266,7 @@ def cross_ref_training():
|
|||
|
||||
for t in teachers_bydept[D]:
|
||||
if t == 'STAFF, STAFF': continue
|
||||
completed = 0
|
||||
waived = 0
|
||||
waived = False
|
||||
sects = teachers[t]
|
||||
print(f"Sections for {t}: {sects}")
|
||||
goo = sects[0][6]
|
||||
|
|
@ -2274,44 +2274,44 @@ def cross_ref_training():
|
|||
print(t)
|
||||
sheet.cell(row=r, column=1).value = f"{t}"
|
||||
sheet.cell(row=r, column=2).value = f"{goo}"
|
||||
teacher_row = r
|
||||
r += 1
|
||||
if goo in records['GOTT1']:
|
||||
has_gott1 = goo in records['GOTT1']
|
||||
has_gott2 = goo in records['GOTT2']
|
||||
if has_gott1:
|
||||
sheet.cell(row=r, column=2).value = f"✓ GOTT 1 Trained"
|
||||
print(f" GOTT 1")
|
||||
completed =1
|
||||
r += 1
|
||||
if goo in records['Other Certifications']:
|
||||
sheet.cell(row=r, column=2).value = f"✓ GOTT Waived - Outside Training"
|
||||
print(f" GOTT outside training")
|
||||
completed = 1
|
||||
waived = 1
|
||||
waived = True
|
||||
r += 1
|
||||
if goo in records['GOTT2']:
|
||||
if has_gott2:
|
||||
sheet.cell(row=r, column=2).value = f"✓ GOTT 2 Trained"
|
||||
print(f" GOTT 2")
|
||||
completed = 1
|
||||
waived = 1
|
||||
r += 1
|
||||
if goo in records['POCR Reviewed']:
|
||||
sheet.cell(row=r, column=2).value = f"✓ POCR Reviewed"
|
||||
print(f" POCR")
|
||||
completed = 1
|
||||
waived = 1
|
||||
waived = True
|
||||
r += 1
|
||||
if goo in records['TITLE V GOTT ACADEMY']:
|
||||
sheet.cell(row=r, column=2).value = f"✓ TITLE V GOTT ACADEMY 2014"
|
||||
print(f" GOTT Academy")
|
||||
completed = 1
|
||||
waived = 1
|
||||
r += 1
|
||||
if not completed:
|
||||
if waived:
|
||||
sheet.cell(row=r, column=2).value = f"✓ GOTT 1 Waived"
|
||||
else:
|
||||
sheet.cell(row=r, column=2).value = f"- MISSING GOTT 1"
|
||||
sheet.cell(row=r-1,column=1).fill = flagfont
|
||||
report.write(f"\tMISSING GOTT 1: {t} {goo}\n")
|
||||
waived = True
|
||||
r += 1
|
||||
missing_requirements = []
|
||||
if (not has_gott1) and (not waived):
|
||||
missing_requirements.append("GOTT 1")
|
||||
if (not has_gott2) and (not waived):
|
||||
missing_requirements.append("GOTT 2")
|
||||
if missing_requirements:
|
||||
sheet.cell(row=teacher_row, column=1).fill = flagfont
|
||||
for requirement in missing_requirements:
|
||||
sheet.cell(row=r, column=2).value = f"- MISSING {requirement}"
|
||||
report.write(f"\tMISSING {requirement}: {t} {goo}\n")
|
||||
r += 1
|
||||
if goo in records['GOTT4']:
|
||||
sheet.cell(row=r, column=2).value = f"✓ GOTT 4 Trained"
|
||||
print(f" GOTT 4")
|
||||
|
|
@ -2345,9 +2345,9 @@ def cross_ref_training():
|
|||
sheet.cell(row=r, column=3).value = f"{s[1]}"
|
||||
r += 1
|
||||
|
||||
if (not completed) and (not waived):
|
||||
if missing_requirements:
|
||||
report.write(f"\t\t{s[3]}\t{s[1]}\t{s[7]}\n")
|
||||
if (not completed) and (not waived):
|
||||
if missing_requirements:
|
||||
report.write(f"\n")
|
||||
|
||||
#for c in sheet.columns:
|
||||
|
|
|
|||
Loading…
Reference in New Issue