code: def user_saw_task(self, username, courseid, taskid):
          
          self._database.user_tasks.update({"username": username, "courseid": courseid, "taskid": taskid},
                                           {"$setOnInsert": {"username": username, "courseid": courseid, "taskid": taskid,
                                                             "tried": 0, "succeeded": False, "grade": 0.0, "submissionid": None, "state": ""}},
                                           upsert=True)
docs: Set in the database that the user has viewed this task