When a task is reopend by the system, student entity is updated.

BUG=https://code.google.com/p/soc/issues/detail?id=2466

Change-Id: I21916940eeb76e7dc24ddab4cc480b1440dfe45f
diff --git a/app/soc/modules/gci/logic/task.py b/app/soc/modules/gci/logic/task.py
index fe8f4ed..48b5b98 100644
--- a/app/soc/modules/gci/logic/task.py
+++ b/app/soc/modules/gci/logic/task.py
@@ -622,11 +622,18 @@
   Args:
     task: The task_model.GCITask entity
   """
+  student_key = task_model.GCITask.student.get_value_for_datastore(task)
+  old_status = task.status
+
   task.student = None
   task.status = task_model.REOPENED
   task.last_status_change = datetime.datetime.utcnow()
   task.deadline = None
 
+  if student_key:
+    _updateStudentAfterTaskStatusChange(
+        ndb.Key.from_old_key(student_key), task, old_status)
+
   comment_props = {
       'parent': task,
       'title': DEF_REOPENED_TITLE,