Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(13)  |  Derive(0)  |  Import(0)

src/m/h/MHST2013-14-HEAD/edx_all/edx-platform/common/djangoapps/django_comment_common/utils.py   MHST2013-14(Download)
def seed_permissions_roles(course_id):
    administrator_role = Role.objects.get_or_create(name="Administrator", course_id=course_id)[0]
    moderator_role = Role.objects.get_or_create(name="Moderator", course_id=course_id)[0]
    community_ta_role = Role.objects.get_or_create(name="Community TA", course_id=course_id)[0]
    student_role = Role.objects.get_or_create(name="Student", course_id=course_id)[0]

src/m/h/MHST2013-14-HEAD/edx_all/edx-platform/lms/djangoapps/django_comment_client/tests/test_models.py   MHST2013-14(Download)
 
        self.course_id = "edX/toy/2012_Fall"
        self.student_role = models.Role.objects.get_or_create(name="Student",
                                                              course_id=self.course_id)[0]
        self.student_role.add_permission("delete_thread")
        self.student_2_role = models.Role.objects.get_or_create(name="Student",
                                                                course_id=self.course_id)[0]
        self.TA_role = models.Role.objects.get_or_create(name="Community TA",
                                                         course_id=self.course_id)[0]
        self.course_id_2 = "edx/6.002x/2012_Fall"
        self.TA_role_2 = models.Role.objects.get_or_create(name="Community TA",
                                                           course_id=self.course_id_2)[0]
 

src/m/h/MHST2013-14-HEAD/edx_all/edx-platform/lms/djangoapps/instructor/tests/test_forum_admin.py   MHST2013-14(Download)
    def initialize_roles(self, course_id):
        self.admin_role = Role.objects.get_or_create(name=FORUM_ROLE_ADMINISTRATOR, course_id=course_id)[0]
        self.moderator_role = Role.objects.get_or_create(name=FORUM_ROLE_MODERATOR, course_id=course_id)[0]
        self.community_ta_role = Role.objects.get_or_create(name=FORUM_ROLE_COMMUNITY_TA, course_id=course_id)[0]
 

src/m/h/MHST2013-14-HEAD/edx_all/edx-platform/lms/djangoapps/django_comment_client/tests.py   MHST2013-14(Download)
    def setUp(self):
 
        self.course_id = "edX/toy/2012_Fall"
 
        self.moderator_role = Role.objects.get_or_create(name="Moderator", course_id=self.course_id)[0]
        self.student_role = Role.objects.get_or_create(name="Student", course_id=self.course_id)[0]