diff --git a/common/djangoapps/nodebb/admin.py b/common/djangoapps/nodebb/admin.py new file mode 100644 index 000000000000..fb655cd14154 --- /dev/null +++ b/common/djangoapps/nodebb/admin.py @@ -0,0 +1,11 @@ +from django.contrib import admin + +from models import DiscussionCommunity + + +class DiscussionCommunityAdmin(admin.ModelAdmin): + list_display = ('course_id', 'community_url', ) + + +admin.site.register(DiscussionCommunity, DiscussionCommunityAdmin) + diff --git a/common/djangoapps/nodebb/migrations/0003_auto_20180312_1021.py b/common/djangoapps/nodebb/migrations/0003_auto_20180312_1021.py new file mode 100644 index 000000000000..b4662557600d --- /dev/null +++ b/common/djangoapps/nodebb/migrations/0003_auto_20180312_1021.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('nodebb', '0002_teamgroupchat'), + ] + + operations = [ + migrations.AlterField( + model_name='discussioncommunity', + name='community_url', + field=models.CharField(unique=True, max_length=255), + ), + ] diff --git a/common/djangoapps/nodebb/models.py b/common/djangoapps/nodebb/models.py index 9a7022068f9b..ed65c7b98bb1 100644 --- a/common/djangoapps/nodebb/models.py +++ b/common/djangoapps/nodebb/models.py @@ -14,7 +14,7 @@ class DiscussionCommunity(TimeStampedModel): """ course_id = CourseKeyField(max_length=255, db_index=True) - community_url = models.CharField(max_length=100, unique=True) + community_url = models.CharField(max_length=255, unique=True) def __str__(self): return "%s" % self.community_url diff --git a/lms/djangoapps/oef/migrations/0011_auto_20180312_1021.py b/lms/djangoapps/oef/migrations/0011_auto_20180312_1021.py new file mode 100644 index 000000000000..a1a3caf67bbc --- /dev/null +++ b/lms/djangoapps/oef/migrations/0011_auto_20180312_1021.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('oef', '0010_load_instructions'), + ] + + operations = [ + migrations.AlterField( + model_name='oefsurvey', + name='description', + field=models.TextField(), + ), + migrations.AlterField( + model_name='topicquestion', + name='score_name', + field=models.CharField(max_length=50), + ), + ] diff --git a/lms/djangoapps/onboarding/forms.py b/lms/djangoapps/onboarding/forms.py index a65d200cf6e3..294f57276469 100644 --- a/lms/djangoapps/onboarding/forms.py +++ b/lms/djangoapps/onboarding/forms.py @@ -748,7 +748,7 @@ def save(self, user=None, commit=True): class OrganizationMetricModelForm(BaseOnboardingModelForm): - can_provide_info = forms.ChoiceField(label=ugettext_noop('Are you able to provide information requested bellow?'), + can_provide_info = forms.ChoiceField(label=ugettext_noop('Are you able to provide information requested below?'), choices=((1, ugettext_noop('Yes')), (0, ugettext_noop('No'))), label_suffix="*", widget=forms.RadioSelect, diff --git a/lms/djangoapps/onboarding/migrations/0013_auto_20180312_1021.py b/lms/djangoapps/onboarding/migrations/0013_auto_20180312_1021.py new file mode 100644 index 000000000000..32f3015d3e1f --- /dev/null +++ b/lms/djangoapps/onboarding/migrations/0013_auto_20180312_1021.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('onboarding', '0012_auto_20180228_0848'), + ] + + operations = [ + migrations.AlterField( + model_name='historicaluserextendedprofile', + name='function_stakeholder_engagement', + field=models.SmallIntegerField(default=0, verbose_name=b'External relations and partnerships'), + ), + migrations.AlterField( + model_name='historicaluserextendedprofile', + name='interest_stakeholder_engagement', + field=models.SmallIntegerField(default=0, verbose_name=b'External relations and partnerships'), + ), + migrations.AlterField( + model_name='userextendedprofile', + name='function_stakeholder_engagement', + field=models.SmallIntegerField(default=0, verbose_name=b'External relations and partnerships'), + ), + migrations.AlterField( + model_name='userextendedprofile', + name='interest_stakeholder_engagement', + field=models.SmallIntegerField(default=0, verbose_name=b'External relations and partnerships'), + ), + ] diff --git a/lms/djangoapps/philu_api/views.py b/lms/djangoapps/philu_api/views.py index f6d1157dae08..ab5457f6b4b9 100644 --- a/lms/djangoapps/philu_api/views.py +++ b/lms/djangoapps/philu_api/views.py @@ -121,7 +121,7 @@ def mark_user_chat_read(request): def get_user_data(request): """ Get the user profile data from NodeBB for current user """ data_endpoint = settings.NODEBB_ENDPOINT + '/api/v2/users/data' - username = request.user.username + username = request.POST.get("username") headers = {'Authorization': 'Bearer ' + settings.NODEBB_MASTER_TOKEN} response = requests.post(data_endpoint, data={'_uid': 1, 'username': username}, diff --git a/lms/djangoapps/philu_overrides/views.py b/lms/djangoapps/philu_overrides/views.py index 276f96d89fbc..e99e5ad49d4a 100644 --- a/lms/djangoapps/philu_overrides/views.py +++ b/lms/djangoapps/philu_overrides/views.py @@ -206,11 +206,21 @@ def courses_custom(request): course.id.to_deprecated_string()) with modulestore().bulk_operations(course_key): if has_access(request.user, 'load', course): - course.course_target = get_last_accessed_courseware( + access_link = get_last_accessed_courseware( get_course_by_id(course_key, 0), request, request.user ) + + first_chapter_url, first_section = get_course_related_keys( + request, get_course_by_id(course_key, 0)) + first_target = reverse('courseware_section', args=[ + course.id.to_deprecated_string(), + first_chapter_url, + first_section + ]) + + course.course_target = access_link if access_link != None else first_target else: course.course_target = '/courses/' + course.id.to_deprecated_string() diff --git a/lms/djangoapps/teams/static/teams/templates/team-member.underscore b/lms/djangoapps/teams/static/teams/templates/team-member.underscore index f53e4734fb8a..7f594a94992c 100644 --- a/lms/djangoapps/teams/static/teams/templates/team-member.underscore +++ b/lms/djangoapps/teams/static/teams/templates/team-member.underscore @@ -2,7 +2,7 @@

<%= username %>

- profile page + profile page