add evals
This commit is contained in:
parent
2391d11f98
commit
6b2c5350f3
19
courses.py
19
courses.py
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
import json, re, requests, codecs, sys, time, funcy, os
|
||||
import pandas as pd
|
||||
#from tabulate import tabulate
|
||||
from dateutil import parser
|
||||
from datetime import datetime
|
||||
from util import print_table
|
||||
|
|
@ -1047,7 +1045,7 @@ def enroll_orientation_students():
|
|||
r3 = requests.post(t, headers=header, params=data)
|
||||
eee += 1
|
||||
#print(r3.text)
|
||||
time.sleep(0.600)
|
||||
time.sleep(0.400)
|
||||
except Exception as e:
|
||||
print(" - Something went wrong with id %s, %s, %s" % (j, str(s), str(e)))
|
||||
return (eee,uuu)
|
||||
|
|
@ -1170,18 +1168,19 @@ def instructor_list_to_activate_evals():
|
|||
|
||||
def add_evals(section=0):
|
||||
# show or hide?
|
||||
hidden = True
|
||||
hidden = False
|
||||
#s = [ x.strip() for x in codecs.open('cache/sp21_eval_sections.txt','r').readlines()]
|
||||
#s = [ x.split(',')[4].split('::') for x in codecs.open('cache/fa22_eval_sections.csv','r').readlines()]
|
||||
s = [ x.strip() for x in codecs.open('cache/fa22_eval_sections.csv','r').readlines()]
|
||||
print(s)
|
||||
#s = [ x.strip() for x in codecs.open('cache/fa22_eval_sections.csv','r').readlines()]
|
||||
s = [ x.strip() for x in codecs.open('cache/sp23_eval_sections.csv','r').readlines()]
|
||||
s = list(funcy.flatten(s))
|
||||
s.sort()
|
||||
xyz = input('hit return to continue')
|
||||
|
||||
#c = getCoursesInTerm(168,0,1)
|
||||
#c = getCoursesInTerm(174,0,1) # sp22
|
||||
c = getCoursesInTerm(176,0,1) # fa22
|
||||
#c = getCoursesInTerm(176,0,1) # fa22
|
||||
c = getCoursesInTerm(178,0,1) # sp23
|
||||
print(c)
|
||||
ids = []
|
||||
courses = {}
|
||||
|
|
@ -1193,7 +1192,7 @@ def add_evals(section=0):
|
|||
courses[str(C['id'])] = C
|
||||
ids.append(str(C['id']))
|
||||
|
||||
ask = 0
|
||||
ask = 1
|
||||
data = {'position':2, 'hidden':hidden}
|
||||
|
||||
for i in ids:
|
||||
|
|
@ -1203,8 +1202,8 @@ def add_evals(section=0):
|
|||
if a == 'q': return
|
||||
u2 = "https://gavilan.instructure.com:443/api/v1/courses/%s/tabs/context_external_tool_1953" % i
|
||||
r3 = requests.put(u2, headers=header, params=data)
|
||||
print(r3)
|
||||
time.sleep(0.600)
|
||||
print(r3.text)
|
||||
time.sleep(0.400)
|
||||
|
||||
|
||||
return 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue