Commit cff93438 by Jonathan Piacenti

Change issuing_component for included badge events.

parent a04a635e
......@@ -77,7 +77,7 @@ class UserBadgeAssertions(generics.ListAPIView):
{
"badge_class": {
"slug": "special_award",
"issuing_component": "edx__course",
"issuing_component": "openedx__course",
"display_name": "Very Special Award",
"course_id": "course-v1:edX+DemoX+Demo_Course",
"description": "Awarded for people who did something incredibly special",
......
......@@ -20,7 +20,7 @@ def award_badge(config, count, user):
if not slug:
return
badge_class = BadgeClass.get_badge_class(
slug=slug, issuing_component='edx__course', create=False,
slug=slug, issuing_component='openedx__course', create=False,
)
if not badge_class:
return
......@@ -72,7 +72,7 @@ def course_group_check(user, course_key):
for slug in awards:
badge_class = BadgeClass.get_badge_class(
slug=slug, issuing_component='edx__course', create=False,
slug=slug, issuing_component='openedx__course', create=False,
)
if badge_class and not badge_class.get_for_user(user):
badge_class.award(user)
......@@ -34,13 +34,13 @@ class CourseEnrollmentBadgeTest(ModuleStoreTestCase):
super(CourseEnrollmentBadgeTest, self).setUp()
self.badge_classes = [
RandomBadgeClassFactory(
issuing_component='edx__course'
issuing_component='openedx__course'
),
RandomBadgeClassFactory(
issuing_component='edx__course'
issuing_component='openedx__course'
),
RandomBadgeClassFactory(
issuing_component='edx__course'
issuing_component='openedx__course'
),
]
nums = ['3', '5', '8']
......@@ -102,13 +102,13 @@ class CourseCompletionBadgeTest(ModuleStoreTestCase):
super(CourseCompletionBadgeTest, self).setUp()
self.badge_classes = [
RandomBadgeClassFactory(
issuing_component='edx__course'
issuing_component='openedx__course'
),
RandomBadgeClassFactory(
issuing_component='edx__course'
issuing_component='openedx__course'
),
RandomBadgeClassFactory(
issuing_component='edx__course'
issuing_component='openedx__course'
),
]
nums = ['2', '6', '9']
......@@ -179,13 +179,13 @@ class CourseGroupBadgeTest(ModuleStoreTestCase):
super(CourseGroupBadgeTest, self).setUp()
self.badge_classes = [
RandomBadgeClassFactory(
issuing_component='edx__course'
issuing_component='openedx__course'
),
RandomBadgeClassFactory(
issuing_component='edx__course'
issuing_component='openedx__course'
),
RandomBadgeClassFactory(
issuing_component='edx__course'
issuing_component='openedx__course'
),
]
self.courses = []
......
......@@ -20,9 +20,9 @@ class Migration(migrations.Migration):
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
('courses_completed', models.TextField(default=b'', help_text="On each line, put the number of completed courses to award a badge for, a comma, and the slug of a badge class you have created with the issuing component 'edx__course'. For example: 3,enrolled_3_courses", blank=True)),
('courses_enrolled', models.TextField(default=b'', help_text="On each line, put the number of enrolled courses to award a badge for, a comma, and the slug of a badge class you have created with the issuing component 'edx__course'. For example: 3,enrolled_3_courses", blank=True)),
('course_groups', models.TextField(default=b'', help_text="Each line is a comma-separated list. The first item in each line is the slug of a badge class to award, with an issuing component of 'edx__course'. The remaining items in each line are the course keys the user will need to complete to be awarded the badge. For example: slug_for_compsci_courses_group_badge,course-v1:CompSci+Course+First,course-v1:CompsSci+Course+Second", blank=True)),
('courses_completed', models.TextField(default=b'', help_text="On each line, put the number of completed courses to award a badge for, a comma, and the slug of a badge class you have created that has the issuing component 'openedx__course'. For example: 3,enrolled_3_courses", blank=True)),
('courses_enrolled', models.TextField(default=b'', help_text="On each line, put the number of enrolled courses to award a badge for, a comma, and the slug of a badge class you have created that has the issuing component 'openedx__course'. For example: 3,enrolled_3_courses", blank=True)),
('course_groups', models.TextField(default=b'', help_text="Each line is a comma-separated list. The first item in each line is the slug of a badge class you have created that has an issuing component of 'openedx__course'. The remaining items in each line are the course keys the learner needs to complete to be awarded the badge. For example: slug_for_compsci_courses_group_badge,course-v1:CompSci+Course+First,course-v1:CompsSci+Course+Second", blank=True)),
('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')),
],
),
......
......@@ -220,7 +220,7 @@ class CourseEventBadgesConfiguration(ConfigurationModel):
blank=True, default='',
help_text=_(
u"On each line, put the number of completed courses to award a badge for, a comma, and the slug of a "
u"badge class you have created with the issuing component 'edx__course'. "
u"badge class you have created that has the issuing component 'openedx__course'. "
u"For example: 3,enrolled_3_courses"
)
)
......@@ -228,16 +228,16 @@ class CourseEventBadgesConfiguration(ConfigurationModel):
blank=True, default='',
help_text=_(
u"On each line, put the number of enrolled courses to award a badge for, a comma, and the slug of a "
u"badge class you have created with the issuing component 'edx__course'. "
u"badge class you have created that has the issuing component 'openedx__course'. "
u"For example: 3,enrolled_3_courses"
)
)
course_groups = models.TextField(
blank=True, default='',
help_text=_(
u"Each line is a comma-separated list. The first item in each line is the slug of a badge class to award, "
u"with an issuing component of 'edx__course'. The remaining items in each line are the course keys the "
u"user will need to complete to be awarded the badge. For example: "
u"Each line is a comma-separated list. The first item in each line is the slug of a badge class you "
u"have created that has an issuing component of 'openedx__course'. The remaining items in each line are "
u"the course keys the learner needs to complete to be awarded the badge. For example: "
u"slug_for_compsci_courses_group_badge,course-v1:CompSci+Course+First,course-v1:CompsSci+Course+Second"
)
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment