* Generate common/djangoapps import shims for LMS * Generate common/djangoapps import shims for Studio * Stop appending project root to sys.path * Stop appending common/djangoapps to sys.path * Import from common.djangoapps.course_action_state instead of course_action_state * Import from common.djangoapps.course_modes instead of course_modes * Import from common.djangoapps.database_fixups instead of database_fixups * Import from common.djangoapps.edxmako instead of edxmako * Import from common.djangoapps.entitlements instead of entitlements * Import from common.djangoapps.pipline_mako instead of pipeline_mako * Import from common.djangoapps.static_replace instead of static_replace * Import from common.djangoapps.student instead of student * Import from common.djangoapps.terrain instead of terrain * Import from common.djangoapps.third_party_auth instead of third_party_auth * Import from common.djangoapps.track instead of track * Import from common.djangoapps.util instead of util * Import from common.djangoapps.xblock_django instead of xblock_django * Add empty common/djangoapps/__init__.py to fix pytest collection * Fix pylint formatting violations * Exclude import_shims/ directory tree from linting
58 lines
1.7 KiB
Python
58 lines
1.7 KiB
Python
"""
|
|
Index view for the support app.
|
|
"""
|
|
|
|
|
|
from django.urls import reverse_lazy
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from common.djangoapps.edxmako.shortcuts import render_to_response
|
|
from lms.djangoapps.support.decorators import require_support_permission
|
|
|
|
SUPPORT_INDEX_URLS = [
|
|
{
|
|
"url": reverse_lazy("support:certificates"),
|
|
"name": _("Certificates"),
|
|
"description": _("View and regenerate certificates."),
|
|
},
|
|
{
|
|
"url": reverse_lazy("support:enrollment"),
|
|
"name": _("Enrollment"),
|
|
"description": _("View and update learner enrollments."),
|
|
},
|
|
{
|
|
"url": reverse_lazy("support:manage_user"),
|
|
"name": _("Manage User"),
|
|
"description": _("Disable User Account"),
|
|
},
|
|
{
|
|
"url": reverse_lazy("support:course_entitlement"),
|
|
"name": _("Entitlements"),
|
|
"description": _("View, create, and reissue learner entitlements"),
|
|
},
|
|
{
|
|
"url": reverse_lazy("support:feature_based_enrollments"),
|
|
"name": _("Feature Based Enrollments"),
|
|
"description": _("View feature based enrollment settings"),
|
|
},
|
|
{
|
|
"url": reverse_lazy("support:link_program_enrollments"),
|
|
"name": _("Link Program Enrollments"),
|
|
"description": _("Link LMS users to program enrollments"),
|
|
},
|
|
{
|
|
"url": reverse_lazy("support:program_enrollments_inspector"),
|
|
"name": _("Program Enrollments Inspector Tool"),
|
|
"description": _("Find information related to a learner's program enrollments"),
|
|
},
|
|
]
|
|
|
|
|
|
@require_support_permission
|
|
def index(request):
|
|
"""Render the support index view. """
|
|
context = {
|
|
"urls": SUPPORT_INDEX_URLS
|
|
}
|
|
return render_to_response("support/index.html", context)
|