Skip to content

Commit

Permalink
Update grade setter tool for progsoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Deee92 committed Oct 5, 2023
1 parent b41060b commit 1d55976
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions tools/missing_grade.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,19 @@
DEADLINE = 0
CANVAS_TOKEN = ''
CANVAS_URL = "https://canvas.kth.se"
CANVAS_COURSE_ID = 38951 # 2023 edition
CANVAS_COURSE_ID = 43069 # 2023 edition
CONTRIBUTION_PATH = '../contributions'


# Mapping from github task name to canvas group set id
def task_to_set(task_name, canvas_set):
mapping = {
#"course-automation": canvas_set["Course automation"],
"demo": canvas_set["Demos"],
"essay": canvas_set["Essays"],
"executable-tutorial": canvas_set["Executable Tutorials"],
"feedback": canvas_set["Feedback"],
"opensource": canvas_set["Open-source contributions"],
"presentation": canvas_set["Presentations"],
"smart-contract-protocol": canvas_set["Smart Contract Protocol"]
}
return mapping.get(task_name, Exception("Groupset mapping"))

Expand Down Expand Up @@ -141,19 +140,14 @@ def filter_deadline_groups(groups, deadline):
def check_all_assigned():
l = []
#mapping = {
#"course-automation": canvas_set["Course automation"],
#"demo": canvas_set["Demos"],
#"essay": canvas_set["Essays"],
#"executable-tutorial": canvas_set["Executable Tutorials"],
#"feedback": canvas_set["Feedback"],
#"open-source": canvas_set["Open-source contributions"],
#"presentation": canvas_set["Presentations"], }
for i in get_sub_directory(CONTRIBUTION_PATH+"/"+"course-automation").values():
l.append(i['path'])
#"presentation": canvas_set["Presentations"],
#"smart-contract-protocol": canvas_set["Smart Contract Protocol"] }
for i in get_sub_directory(CONTRIBUTION_PATH+"/"+"essay").values():
l.append(i['path'])
for i in get_sub_directory(CONTRIBUTION_PATH+"/"+"executable-tutorial").values():
l.append(i['path'])
for i in get_sub_directory(CONTRIBUTION_PATH+"/"+"feedback").values():
l.append(i['path'])
for i in get_sub_directory(CONTRIBUTION_PATH+"/"+"open-source").values():
Expand All @@ -166,7 +160,7 @@ def check_all_assigned():
#for i in get_sub_directory(CONTRIBUTION_PATH+"/"+"demo").values():
#for j in get_sub_directory(i['path']).values():
#l.append(j['path'])

# remove "../"
l = ["https://github.com/KTH/programmable-society/tree/"+datetime.today().strftime("%Y")+"/"+x[3:] for x in l]

Expand Down

0 comments on commit 1d55976

Please sign in to comment.