|
|
|
@ -208,9 +208,10 @@ def get_all_grades(ctx, exam):
|
|
|
|
|
}
|
|
|
|
|
if weighted:
|
|
|
|
|
out["weighted"] = weighted_user_scores
|
|
|
|
|
out["weighted_total"] = sum(
|
|
|
|
|
i for i in weighted_user_scores.values() if i is not None
|
|
|
|
|
)
|
|
|
|
|
for serial, scores in weighted_user_scores.items():
|
|
|
|
|
out["weighted"][serial]["total"] = sum(
|
|
|
|
|
i for i in scores.values() if i is not None
|
|
|
|
|
)
|
|
|
|
|
out["max_weighted"] = sum(i.get("weight", i["points"]) for i in pinfo.values())
|
|
|
|
|
|
|
|
|
|
return out
|
|
|
|
|