This commit is contained in:
parent
2577d105f5
commit
08514ad69e
|
|
@ -551,7 +551,7 @@ def courses_to_sched():
|
|||
|
||||
|
||||
# Populate schedule table and correlate to courses table
|
||||
def refresh_semester_schedule_db(term="fa25"):
|
||||
def refresh_semester_schedule_db(term="sp26"):
|
||||
|
||||
# TODO: fix units when they are variable... change to float in between range. round to 0.5 unit.
|
||||
|
||||
|
|
@ -612,8 +612,13 @@ def refresh_semester_schedule_db(term="fa25"):
|
|||
full_sis_code = sis_code+'-'+c['crn']
|
||||
|
||||
if full_sis_code in sis_to_sched:
|
||||
print(c['cred'])
|
||||
q = [sis_to_sched[full_sis_code][0][0], c['crn'], c['code'], c['cred'], c['teacher'], c['start'], c['end'], c['type'], c['loc'], c['site'], pod, int(c['cap']), int(c['act']), sis_code]
|
||||
shell_id = sis_to_sched[full_sis_code][0][0]
|
||||
else:
|
||||
print(f"{full_sis_code} not in canvas courses.")
|
||||
shell_id = 1
|
||||
#print(c['cred'])
|
||||
q = [shell_id, c['crn'], c['code'], c['cred'], c['teacher'], c['start'], c['end'], c['type'], c['loc'], c['site'], pod, int(c['cap']), int(c['act']), sis_code]
|
||||
print(q)
|
||||
vals_cache.append( q ) # [ str(x) for x in q ] )
|
||||
#print(f"{i}: {q}")
|
||||
i += 1
|
||||
|
|
@ -626,8 +631,6 @@ def refresh_semester_schedule_db(term="fa25"):
|
|||
delta = t - last_time
|
||||
last_time = t
|
||||
print(f"Loop {i} - committed to db in %0.3fs. " % delta, flush=True)
|
||||
else:
|
||||
print(f"{full_sis_code} not in canvas courses.")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue