code: def get_user_submissions(self, task):
          
          if not self._user_manager.session_logged_in():
              raise Exception("A user must be logged in to get his submissions")
  
          cursor = self._database.submissions.find({"username": self._user_manager.session_username(),
                                                    "taskid": task.get_id(), "courseid": task.get_course_id()})
          cursor.sort([("submitted_on", -1)])
          return list(cursor)
docs: Get all the user's submissions for a given task