Beispiel #1
0
 def make_one(self, **kw):
     from edx_sga.sga import StaffGradedAssignmentXBlock as cls
     field_data = DictFieldData(kw)
     block = cls(self.runtime, field_data, self.scope_ids)
     block.location = Location('org', 'course', 'run', 'category', 'name', 'revision')
     block.xmodule_runtime = self.runtime
     return block
Beispiel #2
0
    def make_one(self, **kw):
        from edx_sga.sga import StaffGradedAssignmentXBlock as cls

        field_data = DictFieldData(kw)
        block = cls(self.runtime, field_data, self.scope_ids)
        block.location = DummyLocation()
        block.xmodule_runtime = self.runtime
        return block
Beispiel #3
0
    def make_one(self, **kw):
        from edx_sga.sga import StaffGradedAssignmentXBlock as cls

        field_data = DictFieldData(kw)
        block = cls(self.runtime, field_data, self.scope_ids)
        block.location = Location("org", "course", "run", "category", "name", "revision")
        block.xmodule_runtime = self.runtime
        block.course_id = self.course_id
        block.scope_ids.usage_id = "XXX"
        block.category = "problem"
        block.start = datetime.datetime(2010, 5, 12, 2, 42, tzinfo=pytz.utc)
        return block
Beispiel #4
0
 def make_one(self, **kw):
     from edx_sga.sga import StaffGradedAssignmentXBlock as cls
     field_data = DictFieldData(kw)
     block = cls(self.runtime, field_data, self.scope_ids)
     block.location = Location(
         'org', 'course', 'run', 'category', 'name', 'revision'
     )
     block.xmodule_runtime = self.runtime
     block.course_id = self.course_id
     block.scope_ids.usage_id = 'XXX'
     block.category = 'problem'
     block.start = datetime.datetime(2010, 5, 12, 2, 42, tzinfo=pytz.utc)
     return block
Beispiel #5
0
    def make_one(self, display_name=None, **kw):
        """
        Creates a XBlock SGA for testing purpose.
        """
        from edx_sga.sga import StaffGradedAssignmentXBlock as cls
        field_data = DictFieldData(kw)
        block = cls(self.runtime, field_data, self.scope_ids)
        block.location = Location(
            'org', 'course', 'run', 'category', 'name', 'revision'
        )
        block.xmodule_runtime = self.runtime
        block.course_id = self.course_id
        block.scope_ids.usage_id = 'XXX'
        block.category = 'problem'

        if display_name:
            block.display_name = display_name

        block.start = datetime.datetime(2010, 5, 12, 2, 42, tzinfo=pytz.utc)
        return block
Beispiel #6
0
    def make_xblock(self, display_name=None, **kwargs):
        """
        Creates a XBlock SGA for testing purpose.
        """
        from edx_sga.sga import StaffGradedAssignmentXBlock as cls
        field_data = DictFieldData(kwargs)
        block = cls(self.runtime, field_data, self.scope_ids)
        block.location = Location('foo', 'bar', 'baz', 'category', 'name',
                                  'revision')

        block.xmodule_runtime = self.runtime
        block.course_id = self.course_id
        block.scope_ids.usage_id = "i4x://foo/bar/category/name"
        block.category = 'problem'

        if display_name:
            block.display_name = display_name

        block.start = datetime.datetime(2010, 5, 12, 2, 42, tzinfo=pytz.utc)
        return block