Use the right parameter name, there is no student_key.
diff --git a/app/soc/modules/gci/logic/org_score.py b/app/soc/modules/gci/logic/org_score.py
index 50351c9..09b214a 100644
--- a/app/soc/modules/gci/logic/org_score.py
+++ b/app/soc/modules/gci/logic/org_score.py
@@ -107,10 +107,10 @@
   profile key.
   """
   def txn():
-    org_scores = queryForAncestor(student_key).fetch(1000)
+    org_scores = queryForAncestor(profile_key).fetch(1000)
     db.delete(org_scores)
 
-    student_info = profile_logic.queryStudentInfoForParent(student_key).get()
+    student_info = profile_logic.queryStudentInfoForParent(profile_key).get()
     student_info.number_of_completed_tasks = 0
     student_info.put()