Beispiel #1
0
 def setUpClass(cls):
     super(InstructorServiceTests, cls).setUpClass()
     cls.course = CourseFactory.create()
     cls.problem_location = msk_from_problem_urlname(
         cls.course.id, 'robot-some-problem-urlname')
     cls.other_problem_location = msk_from_problem_urlname(
         cls.course.id, 'robot-some-other_problem-urlname')
     cls.problem_urlname = unicode(cls.problem_location)
     cls.other_problem_urlname = unicode(cls.other_problem_location)
 def setUpClass(cls):
     super(InstructorServiceTests, cls).setUpClass()
     cls.course = CourseFactory.create()
     cls.problem_location = msk_from_problem_urlname(
         cls.course.id,
         'robot-some-problem-urlname'
     )
     cls.other_problem_location = msk_from_problem_urlname(
         cls.course.id,
         'robot-some-other_problem-urlname'
     )
     cls.problem_urlname = unicode(cls.problem_location)
     cls.other_problem_urlname = unicode(cls.other_problem_location)
Beispiel #3
0
    def setUp(self):
        super(InstructorServiceTests, self).setUp()

        self.course = CourseFactory.create()
        self.student = UserFactory()
        CourseEnrollment.enroll(self.student, self.course.id)

        self.problem_location = msk_from_problem_urlname(self.course.id, "robot-some-problem-urlname")

        self.other_problem_location = msk_from_problem_urlname(self.course.id, "robot-some-other_problem-urlname")

        self.problem_urlname = unicode(self.problem_location)
        self.other_problem_urlname = unicode(self.other_problem_location)

        self.service = InstructorService()
        self.module_to_reset = StudentModule.objects.create(
            student=self.student,
            course_id=self.course.id,
            module_state_key=self.problem_location,
            state=json.dumps({"attempts": 2}),
        )
Beispiel #4
0
    def setUp(self):
        super(InstructorServiceTests, self).setUp()

        self.course = CourseFactory.create()
        self.student = UserFactory()
        CourseEnrollment.enroll(self.student, self.course.id)

        self.problem_location = msk_from_problem_urlname(
            self.course.id, 'robot-some-problem-urlname')

        self.other_problem_location = msk_from_problem_urlname(
            self.course.id, 'robot-some-other_problem-urlname')

        self.problem_urlname = unicode(self.problem_location)
        self.other_problem_urlname = unicode(self.other_problem_location)

        self.service = InstructorService()
        self.module_to_reset = StudentModule.objects.create(
            student=self.student,
            course_id=self.course.id,
            module_state_key=self.problem_location,
            state=json.dumps({'attempts': 2}),
        )