当前位置: 首页>>代码示例>>Python>>正文


Python SoftwareSecurePhotoVerification.display_off方法代码示例

本文整理汇总了Python中verify_student.models.SoftwareSecurePhotoVerification.display_off方法的典型用法代码示例。如果您正苦于以下问题:Python SoftwareSecurePhotoVerification.display_off方法的具体用法?Python SoftwareSecurePhotoVerification.display_off怎么用?Python SoftwareSecurePhotoVerification.display_off使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在verify_student.models.SoftwareSecurePhotoVerification的用法示例。


在下文中一共展示了SoftwareSecurePhotoVerification.display_off方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: toggle_failed_banner_off

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import display_off [as 别名]
def toggle_failed_banner_off(request):
    """
    Finds all denied midcourse reverifications for a user and permanently toggles
    the "Reverification Failed" banner off for those verifications.
    """
    user_id = request.POST.get('user_id')
    SoftwareSecurePhotoVerification.display_off(user_id)
开发者ID:BeiLuoShiMen,项目名称:edx-platform,代码行数:9,代码来源:views.py

示例2: toggle_failed_banner_off

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import display_off [as 别名]
def toggle_failed_banner_off(request):
    """
    Finds all denied midcourse reverifications for a user and permanently toggles
    the "Reverification Failed" banner off for those verifications.
    """
    user_id = request.user.id
    SoftwareSecurePhotoVerification.display_off(user_id)
    return HttpResponse('Success')
开发者ID:nouaya,项目名称:edx-platform,代码行数:10,代码来源:views.py

示例3: test_display

# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import display_off [as 别名]
    def test_display(self):
        user = UserFactory.create()
        window = MidcourseReverificationWindowFactory()
        attempt = SoftwareSecurePhotoVerification(user=user, window=window, status="denied")
        attempt.save()

        # We expect the verification to be displayed by default
        self.assertEquals(SoftwareSecurePhotoVerification.display_status(user, window), True)

        # Turn it off
        SoftwareSecurePhotoVerification.display_off(user.id)
        self.assertEquals(SoftwareSecurePhotoVerification.display_status(user, window), False)
开发者ID:escolaglobal,项目名称:edx-platform,代码行数:14,代码来源:test_models.py


注:本文中的verify_student.models.SoftwareSecurePhotoVerification.display_off方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。