本文整理汇总了Python中oppia.models.Tracker.completed方法的典型用法代码示例。如果您正苦于以下问题:Python Tracker.completed方法的具体用法?Python Tracker.completed怎么用?Python Tracker.completed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oppia.models.Tracker
的用法示例。
在下文中一共展示了Tracker.completed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: record_mobile_tracker
# 需要导入模块: from oppia.models import Tracker [as 别名]
# 或者: from oppia.models.Tracker import completed [as 别名]
def record_mobile_tracker(request, course_id, type, page):
t = Tracker()
t.user = request.user
t.ip = request.META.get('REMOTE_ADDR', oppia.DEFAULT_IP_ADDRESS)
t.agent = request.META.get('HTTP_USER_AGENT', 'unknown')
t.digest = ""
t.data = ""
t.course = course_id
t.type = type
t.completed = True
t.activity_title = page
t.save()
return
示例2: record_mobile_tracker
# 需要导入模块: from oppia.models import Tracker [as 别名]
# 或者: from oppia.models.Tracker import completed [as 别名]
def record_mobile_tracker(request, course_id, type, page):
t = Tracker()
t.user = request.user
t.ip = request.META.get("REMOTE_ADDR", "0.0.0.0")
t.agent = request.META.get("HTTP_USER_AGENT", "unknown")
t.digest = ""
t.data = ""
t.course = course_id
t.type = type
t.completed = True
t.activity_title = page
t.save()
return