Commit 2ee80e84 by stv

Remove COURSEWARE_ENABLED flag

Per Dave Ormsbee:
> That was from way back when, when we actually had Django server pools,
> proxied differently by nginx; one was the courseware, and the other
> was askbot, a discussion forum.
>
> They shared all the same code, but different parts were live. It was
> about as good an idea as it sounds.
>
> There is no reason that I can think of in the current day and age where
> you would ever want to run the LMS and *turn off courseware*.
parent 1f2f3de4
...@@ -51,7 +51,7 @@ def index(request): ...@@ -51,7 +51,7 @@ def index(request):
Redirects to main page -- info page if user authenticated, or marketing if not Redirects to main page -- info page if user authenticated, or marketing if not
''' '''
if settings.COURSEWARE_ENABLED and request.user.is_authenticated(): if request.user.is_authenticated():
# For microsites, only redirect to dashboard if user has # For microsites, only redirect to dashboard if user has
# courses in his/her dashboard. Otherwise UX is a bit cryptic. # courses in his/her dashboard. Otherwise UX is a bit cryptic.
# In this case, we want to have the user stay on a course catalog # In this case, we want to have the user stay on a course catalog
......
...@@ -54,7 +54,6 @@ COPYRIGHT_YEAR = "2015" ...@@ -54,7 +54,6 @@ COPYRIGHT_YEAR = "2015"
PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount" PLATFORM_FACEBOOK_ACCOUNT = "http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount" PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount"
COURSEWARE_ENABLED = True
ENABLE_JASMINE = False ENABLE_JASMINE = False
DISCUSSION_SETTINGS = { DISCUSSION_SETTINGS = {
......
...@@ -238,298 +238,297 @@ if settings.WIKI_ENABLED: ...@@ -238,298 +238,297 @@ if settings.WIKI_ENABLED:
url(r'^courses/{}/wiki/'.format(settings.COURSE_KEY_REGEX), include(wiki_pattern())), url(r'^courses/{}/wiki/'.format(settings.COURSE_KEY_REGEX), include(wiki_pattern())),
) )
if settings.COURSEWARE_ENABLED: COURSE_URLS = patterns(
COURSE_URLS = patterns( '',
'', url(
url( r'^look_up_registration_code$',
r'^look_up_registration_code$', 'instructor.views.registration_codes.look_up_registration_code',
'instructor.views.registration_codes.look_up_registration_code', name='look_up_registration_code'
name='look_up_registration_code' ),
), url(
url( r'^registration_code_details$',
r'^registration_code_details$', 'instructor.views.registration_codes.registration_code_details',
'instructor.views.registration_codes.registration_code_details', name='registration_code_details'
name='registration_code_details'
)
) )
urlpatterns += ( )
# jump_to URLs for direct access to a location in the course urlpatterns += (
url( # jump_to URLs for direct access to a location in the course
r'^courses/{}/jump_to/(?P<location>.*)$'.format(settings.COURSE_ID_PATTERN), url(
'courseware.views.jump_to', name="jump_to", r'^courses/{}/jump_to/(?P<location>.*)$'.format(settings.COURSE_ID_PATTERN),
), 'courseware.views.jump_to', name="jump_to",
url( ),
r'^courses/{}/jump_to_id/(?P<module_id>.*)$'.format(settings.COURSE_ID_PATTERN), url(
'courseware.views.jump_to_id', name="jump_to_id", r'^courses/{}/jump_to_id/(?P<module_id>.*)$'.format(settings.COURSE_ID_PATTERN),
), 'courseware.views.jump_to_id', name="jump_to_id",
),
# xblock Handler APIs
url( # xblock Handler APIs
r'^courses/{course_key}/xblock/{usage_key}/handler/(?P<handler>[^/]*)(?:/(?P<suffix>.*))?$'.format( url(
course_key=settings.COURSE_ID_PATTERN, r'^courses/{course_key}/xblock/{usage_key}/handler/(?P<handler>[^/]*)(?:/(?P<suffix>.*))?$'.format(
usage_key=settings.USAGE_ID_PATTERN, course_key=settings.COURSE_ID_PATTERN,
), usage_key=settings.USAGE_ID_PATTERN,
'courseware.module_render.handle_xblock_callback',
name='xblock_handler',
),
url(
r'^courses/{course_key}/xblock/{usage_key}/handler_noauth/(?P<handler>[^/]*)(?:/(?P<suffix>.*))?$'.format(
course_key=settings.COURSE_ID_PATTERN,
usage_key=settings.USAGE_ID_PATTERN,
),
'courseware.module_render.handle_xblock_callback_noauth',
name='xblock_handler_noauth',
), ),
'courseware.module_render.handle_xblock_callback',
# xblock View API name='xblock_handler',
# (unpublished) API that returns JSON with the HTML fragment and related resources ),
# for the xBlock's requested view. url(
url( r'^courses/{course_key}/xblock/{usage_key}/handler_noauth/(?P<handler>[^/]*)(?:/(?P<suffix>.*))?$'.format(
r'^courses/{course_key}/xblock/{usage_key}/view/(?P<view_name>[^/]*)$'.format( course_key=settings.COURSE_ID_PATTERN,
course_key=settings.COURSE_ID_PATTERN, usage_key=settings.USAGE_ID_PATTERN,
usage_key=settings.USAGE_ID_PATTERN,
),
'courseware.module_render.xblock_view',
name='xblock_view',
), ),
'courseware.module_render.handle_xblock_callback_noauth',
# xblock Rendering View URL name='xblock_handler_noauth',
# URL to provide an HTML view of an xBlock. The view type (e.g., student_view) is ),
# passed as a "view" parameter to the URL.
# Note: This is not an API. Compare this with the xblock_view API above. # xblock View API
url( # (unpublished) API that returns JSON with the HTML fragment and related resources
r'^xblock/{usage_key_string}$'.format(usage_key_string=settings.USAGE_KEY_PATTERN), # for the xBlock's requested view.
'courseware.views.render_xblock', url(
name='render_xblock', r'^courses/{course_key}/xblock/{usage_key}/view/(?P<view_name>[^/]*)$'.format(
course_key=settings.COURSE_ID_PATTERN,
usage_key=settings.USAGE_ID_PATTERN,
), ),
'courseware.module_render.xblock_view',
# xblock Resource URL name='xblock_view',
url( ),
r'xblock/resource/(?P<block_type>[^/]+)/(?P<uri>.*)$',
'openedx.core.djangoapps.common_views.xblock.xblock_resource', # xblock Rendering View URL
name='xblock_resource_url', # URL to provide an HTML view of an xBlock. The view type (e.g., student_view) is
# passed as a "view" parameter to the URL.
# Note: This is not an API. Compare this with the xblock_view API above.
url(
r'^xblock/{usage_key_string}$'.format(usage_key_string=settings.USAGE_KEY_PATTERN),
'courseware.views.render_xblock',
name='render_xblock',
),
# xblock Resource URL
url(
r'xblock/resource/(?P<block_type>[^/]+)/(?P<uri>.*)$',
'openedx.core.djangoapps.common_views.xblock.xblock_resource',
name='xblock_resource_url',
),
url(
r'^courses/{}/xqueue/(?P<userid>[^/]*)/(?P<mod_id>.*?)/(?P<dispatch>[^/]*)$'.format(
settings.COURSE_ID_PATTERN
), ),
'courseware.module_render.xqueue_callback',
url( name='xqueue_callback'
r'^courses/{}/xqueue/(?P<userid>[^/]*)/(?P<mod_id>.*?)/(?P<dispatch>[^/]*)$'.format( ),
settings.COURSE_ID_PATTERN url(r'^change_setting$', 'student.views.change_setting',
), name='change_setting'),
'courseware.module_render.xqueue_callback',
name='xqueue_callback' # TODO: These views need to be updated before they work
url(r'^calculate$', 'util.views.calculate'),
url(r'^courses/?$', 'branding.views.courses', name="courses"),
url(r'^change_enrollment$',
'student.views.change_enrollment', name="change_enrollment"),
url(r'^change_email_settings$', 'student.views.change_email_settings', name="change_email_settings"),
#About the course
url(r'^courses/{}/about$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.course_about', name="about_course"),
#Inside the course
url(r'^courses/{}/$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.course_info', name="course_root"),
url(r'^courses/{}/info$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.course_info', name="info"),
# TODO arjun remove when custom tabs in place, see courseware/courses.py
url(r'^courses/{}/syllabus$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.syllabus', name="syllabus"),
#Survey associated with a course
url(r'^courses/{}/survey$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.course_survey', name="course_survey"),
url(r'^courses/{}/book/(?P<book_index>\d+)/$'.format(settings.COURSE_ID_PATTERN),
'staticbook.views.index', name="book"),
url(r'^courses/{}/book/(?P<book_index>\d+)/(?P<page>\d+)$'.format(settings.COURSE_ID_PATTERN),
'staticbook.views.index', name="book"),
url(r'^courses/{}/pdfbook/(?P<book_index>\d+)/$'.format(settings.COURSE_ID_PATTERN),
'staticbook.views.pdf_index', name="pdf_book"),
url(r'^courses/{}/pdfbook/(?P<book_index>\d+)/(?P<page>\d+)$'.format(settings.COURSE_ID_PATTERN),
'staticbook.views.pdf_index', name="pdf_book"),
url(r'^courses/{}/pdfbook/(?P<book_index>\d+)/chapter/(?P<chapter>\d+)/$'.format(settings.COURSE_ID_PATTERN),
'staticbook.views.pdf_index', name="pdf_book"),
url(
r'^courses/{}/pdfbook/(?P<book_index>\d+)/chapter/(?P<chapter>\d+)/(?P<page>\d+)$'.format(
settings.COURSE_ID_PATTERN
), ),
url(r'^change_setting$', 'student.views.change_setting', 'staticbook.views.pdf_index', name="pdf_book"
name='change_setting'), ),
# TODO: These views need to be updated before they work url(r'^courses/{}/htmlbook/(?P<book_index>\d+)/$'.format(settings.COURSE_ID_PATTERN),
url(r'^calculate$', 'util.views.calculate'), 'staticbook.views.html_index', name="html_book"),
url(r'^courses/{}/htmlbook/(?P<book_index>\d+)/chapter/(?P<chapter>\d+)/$'.format(settings.COURSE_ID_PATTERN),
url(r'^courses/?$', 'branding.views.courses', name="courses"), 'staticbook.views.html_index', name="html_book"),
url(r'^change_enrollment$',
'student.views.change_enrollment', name="change_enrollment"), url(r'^courses/{}/courseware/?$'.format(settings.COURSE_ID_PATTERN),
url(r'^change_email_settings$', 'student.views.change_email_settings', name="change_email_settings"), 'courseware.views.index', name="courseware"),
url(r'^courses/{}/courseware/(?P<chapter>[^/]*)/$'.format(settings.COURSE_ID_PATTERN),
#About the course 'courseware.views.index', name="courseware_chapter"),
url(r'^courses/{}/about$'.format(settings.COURSE_ID_PATTERN), url(r'^courses/{}/courseware/(?P<chapter>[^/]*)/(?P<section>[^/]*)/$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.course_about', name="about_course"), 'courseware.views.index', name="courseware_section"),
url(
#Inside the course r'^courses/{}/courseware/(?P<chapter>[^/]*)/(?P<section>[^/]*)/(?P<position>[^/]*)/?$'.format(
url(r'^courses/{}/$'.format(settings.COURSE_ID_PATTERN), settings.COURSE_ID_PATTERN
'courseware.views.course_info', name="course_root"),
url(r'^courses/{}/info$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.course_info', name="info"),
# TODO arjun remove when custom tabs in place, see courseware/courses.py
url(r'^courses/{}/syllabus$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.syllabus', name="syllabus"),
#Survey associated with a course
url(r'^courses/{}/survey$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.course_survey', name="course_survey"),
url(r'^courses/{}/book/(?P<book_index>\d+)/$'.format(settings.COURSE_ID_PATTERN),
'staticbook.views.index', name="book"),
url(r'^courses/{}/book/(?P<book_index>\d+)/(?P<page>\d+)$'.format(settings.COURSE_ID_PATTERN),
'staticbook.views.index', name="book"),
url(r'^courses/{}/pdfbook/(?P<book_index>\d+)/$'.format(settings.COURSE_ID_PATTERN),
'staticbook.views.pdf_index', name="pdf_book"),
url(r'^courses/{}/pdfbook/(?P<book_index>\d+)/(?P<page>\d+)$'.format(settings.COURSE_ID_PATTERN),
'staticbook.views.pdf_index', name="pdf_book"),
url(r'^courses/{}/pdfbook/(?P<book_index>\d+)/chapter/(?P<chapter>\d+)/$'.format(settings.COURSE_ID_PATTERN),
'staticbook.views.pdf_index', name="pdf_book"),
url(
r'^courses/{}/pdfbook/(?P<book_index>\d+)/chapter/(?P<chapter>\d+)/(?P<page>\d+)$'.format(
settings.COURSE_ID_PATTERN
),
'staticbook.views.pdf_index', name="pdf_book"
), ),
'courseware.views.index', name="courseware_position"
),
url(r'^courses/{}/progress$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.progress', name="progress"),
# Takes optional student_id for instructor use--shows profile as that student sees it.
url(r'^courses/{}/progress/(?P<student_id>[^/]*)/$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.progress', name="student_progress"),
# For the instructor
url(r'^courses/{}/instructor$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.instructor_dashboard.instructor_dashboard_2', name="instructor_dashboard"),
url(r'^courses/{}/set_course_mode_price$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.instructor_dashboard.set_course_mode_price', name="set_course_mode_price"),
url(r'^courses/{}/instructor/api/'.format(settings.COURSE_ID_PATTERN),
include('instructor.views.api_urls')),
url(r'^courses/{}/remove_coupon$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.coupons.remove_coupon', name="remove_coupon"),
url(r'^courses/{}/add_coupon$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.coupons.add_coupon', name="add_coupon"),
url(r'^courses/{}/update_coupon$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.coupons.update_coupon', name="update_coupon"),
url(r'^courses/{}/get_coupon_info$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.coupons.get_coupon_info', name="get_coupon_info"),
url(r'^courses/{}/'.format(settings.COURSE_ID_PATTERN), include(COURSE_URLS)),
# see ENABLE_INSTRUCTOR_LEGACY_DASHBOARD section for legacy dash urls
# Open Ended grading views
url(r'^courses/{}/staff_grading$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.staff_grading', name='staff_grading'),
url(r'^courses/{}/staff_grading/get_next$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.staff_grading_service.get_next', name='staff_grading_get_next'),
url(r'^courses/{}/staff_grading/save_grade$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.staff_grading_service.save_grade', name='staff_grading_save_grade'),
url(r'^courses/{}/staff_grading/get_problem_list$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.staff_grading_service.get_problem_list', name='staff_grading_get_problem_list'),
# Open Ended problem list
url(r'^courses/{}/open_ended_problems$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.student_problem_list', name='open_ended_problems'),
# Open Ended flagged problem list
url(r'^courses/{}/open_ended_flagged_problems$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.flagged_problem_list', name='open_ended_flagged_problems'),
url(r'^courses/{}/open_ended_flagged_problems/take_action_on_flags$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.take_action_on_flags', name='open_ended_flagged_problems_take_action'),
# Cohorts management
url(r'^courses/{}/cohorts/settings$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.course_cohort_settings_handler',
name="course_cohort_settings"),
url(r'^courses/{}/cohorts/(?P<cohort_id>[0-9]+)?$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.cohort_handler', name="cohorts"),
url(r'^courses/{}/cohorts/(?P<cohort_id>[0-9]+)$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.users_in_cohort',
name="list_cohort"),
url(r'^courses/{}/cohorts/(?P<cohort_id>[0-9]+)/add$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.add_users_to_cohort',
name="add_to_cohort"),
url(r'^courses/{}/cohorts/(?P<cohort_id>[0-9]+)/delete$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.remove_user_from_cohort',
name="remove_from_cohort"),
url(r'^courses/{}/cohorts/debug$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.debug_cohort_mgmt',
name="debug_cohort_mgmt"),
url(r'^courses/{}/cohorts/topics$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.cohort_discussion_topics',
name='cohort_discussion_topics'),
# Open Ended Notifications
url(r'^courses/{}/open_ended_notifications$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.combined_notifications', name='open_ended_notifications'),
url(r'^courses/{}/peer_grading$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.peer_grading', name='peer_grading'),
url(r'^courses/{}/notes$'.format(settings.COURSE_ID_PATTERN), 'notes.views.notes', name='notes'),
url(r'^courses/{}/notes/'.format(settings.COURSE_ID_PATTERN), include('notes.urls')),
# LTI endpoints listing
url(r'^courses/{}/lti_rest_endpoints/'.format(settings.COURSE_ID_PATTERN),
'courseware.views.get_course_lti_endpoints', name='lti_rest_endpoints'),
# Student account
url(r'^account/', include('student_account.urls')),
# Student profile
url(r'^u/(?P<username>[\w.@+-]+)$', 'student_profile.views.learner_profile', name='learner_profile'),
# Student Notes
url(r'^courses/{}/edxnotes'.format(settings.COURSE_ID_PATTERN),
include('edxnotes.urls'), name="edxnotes_endpoints"),
url(r'^api/branding/v1/', include('branding.api_urls')),
)
url(r'^courses/{}/htmlbook/(?P<book_index>\d+)/$'.format(settings.COURSE_ID_PATTERN), if settings.FEATURES["ENABLE_TEAMS"]:
'staticbook.views.html_index', name="html_book"), # Teams endpoints
url(r'^courses/{}/htmlbook/(?P<book_index>\d+)/chapter/(?P<chapter>\d+)/$'.format(settings.COURSE_ID_PATTERN), urlpatterns += (
'staticbook.views.html_index', name="html_book"), url(r'^api/team/', include('lms.djangoapps.teams.api_urls')),
url(r'^courses/{}/teams'.format(settings.COURSE_ID_PATTERN),
url(r'^courses/{}/courseware/?$'.format(settings.COURSE_ID_PATTERN), include('lms.djangoapps.teams.urls'), name="teams_endpoints"),
'courseware.views.index', name="courseware"), )
url(r'^courses/{}/courseware/(?P<chapter>[^/]*)/$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.index', name="courseware_chapter"),
url(r'^courses/{}/courseware/(?P<chapter>[^/]*)/(?P<section>[^/]*)/$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.index', name="courseware_section"),
url(
r'^courses/{}/courseware/(?P<chapter>[^/]*)/(?P<section>[^/]*)/(?P<position>[^/]*)/?$'.format(
settings.COURSE_ID_PATTERN
),
'courseware.views.index', name="courseware_position"
),
url(r'^courses/{}/progress$'.format(settings.COURSE_ID_PATTERN), # allow course staff to change to student view of courseware
'courseware.views.progress', name="progress"), if settings.FEATURES.get('ENABLE_MASQUERADE'):
# Takes optional student_id for instructor use--shows profile as that student sees it. urlpatterns += (
url(r'^courses/{}/progress/(?P<student_id>[^/]*)/$'.format(settings.COURSE_ID_PATTERN), url(r'^courses/{}/masquerade$'.format(settings.COURSE_KEY_PATTERN),
'courseware.views.progress', name="student_progress"), 'courseware.masquerade.handle_ajax', name="masquerade_update"),
)
# For the instructor
url(r'^courses/{}/instructor$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.instructor_dashboard.instructor_dashboard_2', name="instructor_dashboard"),
url(r'^courses/{}/set_course_mode_price$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.instructor_dashboard.set_course_mode_price', name="set_course_mode_price"),
url(r'^courses/{}/instructor/api/'.format(settings.COURSE_ID_PATTERN),
include('instructor.views.api_urls')),
url(r'^courses/{}/remove_coupon$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.coupons.remove_coupon', name="remove_coupon"),
url(r'^courses/{}/add_coupon$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.coupons.add_coupon', name="add_coupon"),
url(r'^courses/{}/update_coupon$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.coupons.update_coupon', name="update_coupon"),
url(r'^courses/{}/get_coupon_info$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.coupons.get_coupon_info', name="get_coupon_info"),
url(r'^courses/{}/'.format(settings.COURSE_ID_PATTERN), include(COURSE_URLS)),
# see ENABLE_INSTRUCTOR_LEGACY_DASHBOARD section for legacy dash urls
# Open Ended grading views
url(r'^courses/{}/staff_grading$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.staff_grading', name='staff_grading'),
url(r'^courses/{}/staff_grading/get_next$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.staff_grading_service.get_next', name='staff_grading_get_next'),
url(r'^courses/{}/staff_grading/save_grade$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.staff_grading_service.save_grade', name='staff_grading_save_grade'),
url(r'^courses/{}/staff_grading/get_problem_list$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.staff_grading_service.get_problem_list', name='staff_grading_get_problem_list'),
# Open Ended problem list
url(r'^courses/{}/open_ended_problems$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.student_problem_list', name='open_ended_problems'),
# Open Ended flagged problem list
url(r'^courses/{}/open_ended_flagged_problems$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.flagged_problem_list', name='open_ended_flagged_problems'),
url(r'^courses/{}/open_ended_flagged_problems/take_action_on_flags$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.take_action_on_flags', name='open_ended_flagged_problems_take_action'),
# Cohorts management
url(r'^courses/{}/cohorts/settings$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.course_cohort_settings_handler',
name="course_cohort_settings"),
url(r'^courses/{}/cohorts/(?P<cohort_id>[0-9]+)?$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.cohort_handler', name="cohorts"),
url(r'^courses/{}/cohorts/(?P<cohort_id>[0-9]+)$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.users_in_cohort',
name="list_cohort"),
url(r'^courses/{}/cohorts/(?P<cohort_id>[0-9]+)/add$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.add_users_to_cohort',
name="add_to_cohort"),
url(r'^courses/{}/cohorts/(?P<cohort_id>[0-9]+)/delete$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.remove_user_from_cohort',
name="remove_from_cohort"),
url(r'^courses/{}/cohorts/debug$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.debug_cohort_mgmt',
name="debug_cohort_mgmt"),
url(r'^courses/{}/cohorts/topics$'.format(settings.COURSE_KEY_PATTERN),
'openedx.core.djangoapps.course_groups.views.cohort_discussion_topics',
name='cohort_discussion_topics'),
# Open Ended Notifications
url(r'^courses/{}/open_ended_notifications$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.combined_notifications', name='open_ended_notifications'),
url(r'^courses/{}/peer_grading$'.format(settings.COURSE_ID_PATTERN),
'open_ended_grading.views.peer_grading', name='peer_grading'),
url(r'^courses/{}/notes$'.format(settings.COURSE_ID_PATTERN), 'notes.views.notes', name='notes'),
url(r'^courses/{}/notes/'.format(settings.COURSE_ID_PATTERN), include('notes.urls')),
# LTI endpoints listing
url(r'^courses/{}/lti_rest_endpoints/'.format(settings.COURSE_ID_PATTERN),
'courseware.views.get_course_lti_endpoints', name='lti_rest_endpoints'),
# Student account
url(r'^account/', include('student_account.urls')),
# Student profile
url(r'^u/(?P<username>[\w.@+-]+)$', 'student_profile.views.learner_profile', name='learner_profile'),
# Student Notes
url(r'^courses/{}/edxnotes'.format(settings.COURSE_ID_PATTERN),
include('edxnotes.urls'), name="edxnotes_endpoints"),
url(r'^api/branding/v1/', include('branding.api_urls')),
)
if settings.FEATURES["ENABLE_TEAMS"]:
# Teams endpoints
urlpatterns += (
url(r'^api/team/', include('lms.djangoapps.teams.api_urls')),
url(r'^courses/{}/teams'.format(settings.COURSE_ID_PATTERN),
include('lms.djangoapps.teams.urls'), name="teams_endpoints"),
)
# allow course staff to change to student view of courseware urlpatterns += (
if settings.FEATURES.get('ENABLE_MASQUERADE'): url(r'^courses/{}/generate_user_cert'.format(settings.COURSE_ID_PATTERN),
urlpatterns += ( 'courseware.views.generate_user_cert', name="generate_user_cert"),
url(r'^courses/{}/masquerade$'.format(settings.COURSE_KEY_PATTERN), )
'courseware.masquerade.handle_ajax', name="masquerade_update"),
)
# discussion forums live within courseware, so courseware must be enabled first
if settings.FEATURES.get('ENABLE_DISCUSSION_SERVICE'):
urlpatterns += ( urlpatterns += (
url(r'^courses/{}/generate_user_cert'.format(settings.COURSE_ID_PATTERN), url(r'^api/discussion/', include('discussion_api.urls')),
'courseware.views.generate_user_cert', name="generate_user_cert"), url(r'^courses/{}/discussion/'.format(settings.COURSE_ID_PATTERN),
include('django_comment_client.urls')),
url(r'^notification_prefs/enable/', 'notification_prefs.views.ajax_enable'),
url(r'^notification_prefs/disable/', 'notification_prefs.views.ajax_disable'),
url(r'^notification_prefs/status/', 'notification_prefs.views.ajax_status'),
url(r'^notification_prefs/unsubscribe/(?P<token>[a-zA-Z0-9-_=]+)/',
'notification_prefs.views.set_subscription', {'subscribe': False}, name="unsubscribe_forum_update"),
url(r'^notification_prefs/resubscribe/(?P<token>[a-zA-Z0-9-_=]+)/',
'notification_prefs.views.set_subscription', {'subscribe': True}, name="resubscribe_forum_update"),
) )
urlpatterns += (
# This MUST be the last view in the courseware--it's a catch-all for custom tabs.
url(r'^courses/{}/(?P<tab_slug>[^/]+)/$'.format(settings.COURSE_ID_PATTERN),
'courseware.views.static_tab', name="static_tab"),
)
# discussion forums live within courseware, so courseware must be enabled first if settings.FEATURES.get('ENABLE_STUDENT_HISTORY_VIEW'):
if settings.FEATURES.get('ENABLE_DISCUSSION_SERVICE'):
urlpatterns += (
url(r'^api/discussion/', include('discussion_api.urls')),
url(r'^courses/{}/discussion/'.format(settings.COURSE_ID_PATTERN),
include('django_comment_client.urls')),
url(r'^notification_prefs/enable/', 'notification_prefs.views.ajax_enable'),
url(r'^notification_prefs/disable/', 'notification_prefs.views.ajax_disable'),
url(r'^notification_prefs/status/', 'notification_prefs.views.ajax_status'),
url(r'^notification_prefs/unsubscribe/(?P<token>[a-zA-Z0-9-_=]+)/',
'notification_prefs.views.set_subscription', {'subscribe': False}, name="unsubscribe_forum_update"),
url(r'^notification_prefs/resubscribe/(?P<token>[a-zA-Z0-9-_=]+)/',
'notification_prefs.views.set_subscription', {'subscribe': True}, name="resubscribe_forum_update"),
)
urlpatterns += ( urlpatterns += (
# This MUST be the last view in the courseware--it's a catch-all for custom tabs. url(
url(r'^courses/{}/(?P<tab_slug>[^/]+)/$'.format(settings.COURSE_ID_PATTERN), r'^courses/{}/submission_history/(?P<student_username>[^/]*)/(?P<location>.*?)$'.format(
'courseware.views.static_tab', name="static_tab"), settings.COURSE_ID_PATTERN
),
'courseware.views.submission_history',
name='submission_history'),
) )
if settings.FEATURES.get('ENABLE_STUDENT_HISTORY_VIEW'):
urlpatterns += (
url(
r'^courses/{}/submission_history/(?P<student_username>[^/]*)/(?P<location>.*?)$'.format(
settings.COURSE_ID_PATTERN
),
'courseware.views.submission_history',
name='submission_history'),
)
if settings.COURSEWARE_ENABLED and settings.FEATURES.get('ENABLE_INSTRUCTOR_LEGACY_DASHBOARD'): if settings.FEATURES.get('ENABLE_INSTRUCTOR_LEGACY_DASHBOARD'):
urlpatterns += ( urlpatterns += (
url(r'^courses/{}/legacy_instructor_dash$'.format(settings.COURSE_ID_PATTERN), url(r'^courses/{}/legacy_instructor_dash$'.format(settings.COURSE_ID_PATTERN),
'instructor.views.legacy.instructor_dashboard', name="instructor_dashboard_legacy"), 'instructor.views.legacy.instructor_dashboard', name="instructor_dashboard_legacy"),
......
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