Commit 4ef56930 by Ibrahim

add partner description view

parent 72549cf3
......@@ -154,6 +154,24 @@ def courses(request):
)
@ensure_csrf_cookie
@cache_if_anonymous()
def partners_description(request, org):
courses_list = get_courses(request.user, org=org)
if configuration_helpers.get_value(
"ENABLE_COURSE_SORTING_BY_START_DATE",
settings.FEATURES["ENABLE_COURSE_SORTING_BY_START_DATE"]
):
courses_list = sort_by_start_date(courses_list)
else:
courses_list = sort_by_announcement(courses_list)
return render_to_response(
"partners-description.html", {'courses': courses_list}
)
def get_current_child(xmodule, min_depth=None, requested_child=None):
"""
Get the xmodule.position's display item of an xmodule that has a position and
......
......@@ -117,6 +117,9 @@ urlpatterns = (
url(r'^update_lang/', include('dark_lang.urls', namespace='darklang')),
# URLs for API access management
url(r'^api-admin/', include('openedx.core.djangoapps.api_admin.urls', namespace='api_admin')),
# Partners description page.
url(r'^partners/(?P<org>[\w]+)/$', 'courseware.views.views.partners_description', name="partners_description"),
)
urlpatterns += (
......
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