Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions common/djangoapps/nodebb/admin.py
Original file line number Diff line number Diff line change
@@ -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)

19 changes: 19 additions & 0 deletions common/djangoapps/nodebb/migrations/0003_auto_20180312_1021.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
2 changes: 1 addition & 1 deletion common/djangoapps/nodebb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions lms/djangoapps/oef/migrations/0011_auto_20180312_1021.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
2 changes: 1 addition & 1 deletion lms/djangoapps/onboarding/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
34 changes: 34 additions & 0 deletions lms/djangoapps/onboarding/migrations/0013_auto_20180312_1021.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]
2 changes: 1 addition & 1 deletion lms/djangoapps/philu_api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
12 changes: 11 additions & 1 deletion lms/djangoapps/philu_overrides/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<span class="team-member">
<a class="member-profile" href="<%= memberProfileUrl %>">
<p class="tooltip-custom"><%= username %></p>
<img class="image-url" src="<%= imageUrl %>" alt="profile page" />
<img class="image-url" src="<%= imageUrl %>" alt="profile page"/>
</a>
</span>
</li>