Beispiel #1
0
 def test_hesa_returnable_programme_requires_entry_qual(self):
     programme = ProgrammeFactory(qualification_id=UG_CREDIT_QUALIFICATION)
     form = forms.CreateForm(data={
         'student': self.student,
         'programme': programme,
     })
     self.assertIn('entry_qualification', form.errors)
Beispiel #2
0
 def test_non_returnable_programme_allows_empty_entry_qual(self):
     programme = ProgrammeFactory(
         qualification_id=NON_ACCREDITED_QUALIFICATION)
     form = forms.CreateForm(data={
         'student': self.student,
         'programme': programme,
     })
     self.assertFalse(form.errors)
Beispiel #3
0
 def test_non_uk_overseas_location(self):
     programme = ProgrammeFactory(
         study_location_id=models.UK_DISTANCE_STUDY_LOCATION)
     student = StudentFactory(domicile_id=181)
     qa = factories.QualificationAimFactory(student=student,
                                            programme=programme)
     self.assertEqual(qa.study_location_id,
                      models.NON_UK_DISTANCE_STUDY_LOCATION)
Beispiel #4
0
 def setUpTestData(cls):
     cls.programme = ProgrammeFactory()
     cls.qa = QualificationAimFactory(programme=cls.programme)
     # Mixture of modules which should appear as options or not
     cls.future_module = ModuleFactory(start_date=date(2020, 2, 1))
     cls.future_module.programmes.add(cls.programme)
     cls.past_module = ModuleFactory(start_date=date(2000, 1, 1))
     cls.past_module.programmes.add(cls.programme)
     cls.non_programme_module = ModuleFactory()
Beispiel #5
0
    def test_create(self):
        # Attach the module to a programme so a qa can be created
        module = ModuleFactory()
        module.programmes.add(ProgrammeFactory())
        application = factories.ApplicationFactory(module=module)
        user = UserFactory()

        enrolment = services.enrol_applicant(application=application, user=user)

        self.assertEqual(enrolment.qa.student, application.student)
        self.assertEqual(enrolment.module, application.module)
Beispiel #6
0
    def test_merging_non_award_qas(self):
        """Enrolments should be moved"""
        programme = ProgrammeFactory(qualification_id=61)  # UG Credit
        source_enrolment = EnrolmentFactory(qa__programme=programme)
        target_enrolment = EnrolmentFactory(qa__programme=programme)

        services.merge._merge_qualification_aims(
            source=source_enrolment.qa.student,
            target=target_enrolment.qa.student)

        source_enrolment.refresh_from_db()
        self.assertEqual(source_enrolment.qa_id, target_enrolment.qa_id)
 def setUpTestData(cls):
     """Create a hesa-returnable student record"""
     cls.programme = ProgrammeFactory(
         qualification_id=INSTITUTIONAL_CREDIT_QUALIFICATION)
     cls.student = StudentFactory(domicile_id=ENGLAND_DOMICILE)
     cls.qa = QualificationAimFactory(
         student=cls.student,
         programme=cls.programme,
     )
     cls.module = ModuleFactory(credit_points=10, start_date='2021-01-01')
     cls.enrolment = EnrolmentFactory(qa=cls.qa,
                                      module=cls.module,
                                      status_id=CONFIRMED_STATUS,
                                      result_id=PASSED_RESULT)
    def setUpTestData(cls):
        cls.user = get_user_model().objects.create_user(username='******')
        cls.student = StudentFactory()
        cls.programme = ProgrammeFactory()

        cls.url = reverse('qualification_aim:new', args=[cls.student.pk])
 def setUpTestData(cls):
     cls.user = get_user_model().objects.create_user(username='******')
     cls.programme = ProgrammeFactory(sits_code=CERT_HE_SITS_CODE)
     cls.qa = factories.QualificationAimFactory(programme=cls.programme)
     cls.url = reverse('qualification_aim:certhe-marks', args=[cls.qa.pk])
Beispiel #10
0
 def setUpTestData(cls):
     cls.programme = ProgrammeFactory(
         study_location_id=models.AT_PROVIDER_STUDY_LOCATION)
     cls.student = StudentFactory(highest_qualification_id='C20')
 def setUpTestData(cls):
     cls.user = get_user_model().objects.create_user(username='******')
     cls.module = factories.ModuleFactory()
     cls.programme = ProgrammeFactory()
     cls.url = reverse('module:add-programme', args=[cls.module.pk])