From fe001028cf0feef704d8712f944834f65e07e9ec Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Mon, 2 Dec 2013 11:37:07 -0500 Subject: [PATCH 1/8] mitxmako => edxmako --- cms/djangoapps/contentstore/views/assets.py | 2 +- cms/djangoapps/contentstore/views/checklist.py | 2 +- cms/djangoapps/contentstore/views/component.py | 2 +- cms/djangoapps/contentstore/views/course.py | 2 +- cms/djangoapps/contentstore/views/dev.py | 2 +- cms/djangoapps/contentstore/views/error.py | 2 +- cms/djangoapps/contentstore/views/helpers.py | 2 +- cms/djangoapps/contentstore/views/import_export.py | 2 +- cms/djangoapps/contentstore/views/item.py | 2 +- cms/djangoapps/contentstore/views/preview.py | 2 +- cms/djangoapps/contentstore/views/public.py | 2 +- cms/djangoapps/contentstore/views/tabs.py | 2 +- cms/djangoapps/contentstore/views/user.py | 2 +- cms/djangoapps/course_creators/admin.py | 2 +- cms/envs/acceptance.py | 2 +- cms/envs/common.py | 4 ++-- cms/envs/dev.py | 2 +- cms/envs/test.py | 2 +- common/djangoapps/course_groups/views.py | 2 +- common/djangoapps/course_modes/views.py | 2 +- common/djangoapps/{mitxmako => edxmako}/README | 0 common/djangoapps/{mitxmako => edxmako}/__init__.py | 0 .../djangoapps/{mitxmako => edxmako}/makoloader.py | 2 +- .../{mitxmako => edxmako}/management/__init__.py | 0 .../management/commands/__init__.py | 0 .../management/commands/preprocess_assets.py | 0 .../djangoapps/{mitxmako => edxmako}/middleware.py | 0 common/djangoapps/{mitxmako => edxmako}/shortcuts.py | 10 +++++----- common/djangoapps/{mitxmako => edxmako}/startup.py | 4 ++-- common/djangoapps/{mitxmako => edxmako}/template.py | 12 ++++++------ .../{mitxmako => edxmako}/templatetag_helpers.py | 0 common/djangoapps/{mitxmako => edxmako}/tests.py | 4 ++-- common/djangoapps/external_auth/views.py | 2 +- common/djangoapps/pipeline_js/views.py | 2 +- common/djangoapps/pipeline_mako/__init__.py | 2 +- .../student/management/commands/massemail.py | 6 +++--- .../student/management/commands/massemailtxt.py | 6 +++--- common/djangoapps/student/views.py | 2 +- common/djangoapps/track/views.py | 2 +- common/djangoapps/util/views.py | 2 +- common/djangoapps/xmodule_modifiers.py | 2 +- .../xmodule/modulestore/tests/django_utils.py | 6 +++--- lms/djangoapps/branding/views.py | 4 ++-- lms/djangoapps/circuit/views.py | 2 +- lms/djangoapps/courseware/module_render.py | 2 +- lms/djangoapps/courseware/tests/__init__.py | 2 +- lms/djangoapps/courseware/tests/test_views.py | 2 +- lms/djangoapps/courseware/views.py | 2 +- lms/djangoapps/dashboard/views.py | 2 +- lms/djangoapps/debug/views.py | 2 +- lms/djangoapps/django_comment_client/base/views.py | 2 +- lms/djangoapps/django_comment_client/forum/views.py | 2 +- lms/djangoapps/django_comment_client/utils.py | 4 ++-- lms/djangoapps/instructor/enrollment.py | 2 +- lms/djangoapps/instructor/hint_manager.py | 2 +- .../instructor/views/instructor_dashboard.py | 2 +- lms/djangoapps/instructor/views/legacy.py | 2 +- lms/djangoapps/licenses/views.py | 2 +- lms/djangoapps/multicourse/views.py | 2 +- lms/djangoapps/notes/views.py | 2 +- lms/djangoapps/notification_prefs/views.py | 2 +- .../open_ended_grading/open_ended_notifications.py | 2 +- .../open_ended_grading/staff_grading_service.py | 2 +- lms/djangoapps/open_ended_grading/tests.py | 2 +- lms/djangoapps/open_ended_grading/utils.py | 2 +- lms/djangoapps/open_ended_grading/views.py | 4 ++-- lms/djangoapps/shoppingcart/models.py | 2 +- .../shoppingcart/processors/CyberSource.py | 2 +- lms/djangoapps/shoppingcart/tests/payment_fake.py | 2 +- lms/djangoapps/shoppingcart/tests/test_views.py | 2 +- lms/djangoapps/shoppingcart/views.py | 2 +- lms/djangoapps/static_template_view/views.py | 2 +- lms/djangoapps/staticbook/views.py | 2 +- lms/djangoapps/verify_student/views.py | 2 +- lms/envs/acceptance.py | 2 +- lms/envs/cms/dev.py | 2 +- lms/envs/cms/mixed_dev.py | 2 +- lms/envs/common.py | 10 +++++----- lms/envs/dev_ike.py | 2 +- lms/envs/dev_mongo.py | 2 +- 80 files changed, 98 insertions(+), 98 deletions(-) rename common/djangoapps/{mitxmako => edxmako}/README (100%) rename common/djangoapps/{mitxmako => edxmako}/__init__.py (100%) rename common/djangoapps/{mitxmako => edxmako}/makoloader.py (98%) rename common/djangoapps/{mitxmako => edxmako}/management/__init__.py (100%) rename common/djangoapps/{mitxmako => edxmako}/management/commands/__init__.py (100%) rename common/djangoapps/{mitxmako => edxmako}/management/commands/preprocess_assets.py (100%) rename common/djangoapps/{mitxmako => edxmako}/middleware.py (100%) rename common/djangoapps/{mitxmako => edxmako}/shortcuts.py (94%) rename common/djangoapps/{mitxmako => edxmako}/startup.py (94%) rename common/djangoapps/{mitxmako => edxmako}/template.py (88%) rename common/djangoapps/{mitxmako => edxmako}/templatetag_helpers.py (100%) rename common/djangoapps/{mitxmako => edxmako}/tests.py (92%) diff --git a/cms/djangoapps/contentstore/views/assets.py b/cms/djangoapps/contentstore/views/assets.py index 7f2fab96f3ea..ed3588d8958e 100644 --- a/cms/djangoapps/contentstore/views/assets.py +++ b/cms/djangoapps/contentstore/views/assets.py @@ -7,7 +7,7 @@ from django_future.csrf import ensure_csrf_cookie from django.views.decorators.http import require_POST -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from cache_toolbox.core import del_cached_content from xmodule.contentstore.django import contentstore diff --git a/cms/djangoapps/contentstore/views/checklist.py b/cms/djangoapps/contentstore/views/checklist.py index 61c6c672a73f..7326c3d16b53 100644 --- a/cms/djangoapps/contentstore/views/checklist.py +++ b/cms/djangoapps/contentstore/views/checklist.py @@ -6,7 +6,7 @@ from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_http_methods from django_future.csrf import ensure_csrf_cookie -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from django.http import HttpResponseNotFound from django.core.exceptions import PermissionDenied from xmodule.modulestore.django import loc_mapper diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 3742c7af203e..269b603effc0 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -9,7 +9,7 @@ from django_future.csrf import ensure_csrf_cookie from django.conf import settings from xmodule.modulestore.exceptions import ItemNotFoundError -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from xmodule.modulestore.django import modulestore from xmodule.util.date_utils import get_default_time_display diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 044ef79473bf..a92708bd69dc 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -16,7 +16,7 @@ from django.core.urlresolvers import reverse from django.http import HttpResponseBadRequest, HttpResponseNotFound from util.json_request import JsonResponse -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from xmodule.error_module import ErrorDescriptor from xmodule.modulestore.django import modulestore, loc_mapper diff --git a/cms/djangoapps/contentstore/views/dev.py b/cms/djangoapps/contentstore/views/dev.py index 0fcc355c117b..6bda59abddff 100644 --- a/cms/djangoapps/contentstore/views/dev.py +++ b/cms/djangoapps/contentstore/views/dev.py @@ -4,7 +4,7 @@ in a 404 error. """ # pylint: disable=W0613 -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response def dev_mode(request): diff --git a/cms/djangoapps/contentstore/views/error.py b/cms/djangoapps/contentstore/views/error.py index 56499a69acb9..9983987d29ef 100644 --- a/cms/djangoapps/contentstore/views/error.py +++ b/cms/djangoapps/contentstore/views/error.py @@ -2,7 +2,7 @@ from django.http import (HttpResponse, HttpResponseServerError, HttpResponseNotFound) -from mitxmako.shortcuts import render_to_string, render_to_response +from edxmako.shortcuts import render_to_string, render_to_response import functools import json diff --git a/cms/djangoapps/contentstore/views/helpers.py b/cms/djangoapps/contentstore/views/helpers.py index abbf84755ef3..a10a489c9aa3 100644 --- a/cms/djangoapps/contentstore/views/helpers.py +++ b/cms/djangoapps/contentstore/views/helpers.py @@ -1,6 +1,6 @@ from django.http import HttpResponse from django.shortcuts import redirect -from mitxmako.shortcuts import render_to_string, render_to_response +from edxmako.shortcuts import render_to_string, render_to_response __all__ = ['edge', 'event', 'landing'] diff --git a/cms/djangoapps/contentstore/views/import_export.py b/cms/djangoapps/contentstore/views/import_export.py index f740d10707e5..c36d30a34d87 100644 --- a/cms/djangoapps/contentstore/views/import_export.py +++ b/cms/djangoapps/contentstore/views/import_export.py @@ -21,7 +21,7 @@ from django.views.decorators.http import require_http_methods, require_GET from django.utils.translation import ugettext as _ -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from auth.authz import create_all_course_groups from xmodule.modulestore.xml_importer import import_from_xml diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index 220da038a781..0a85eb7765cd 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -30,7 +30,7 @@ from django.http import HttpResponseBadRequest from xblock.fields import Scope from preview import handler_prefix, get_preview_html -from mitxmako.shortcuts import render_to_response, render_to_string +from edxmako.shortcuts import render_to_response, render_to_string from models.settings.course_grading import CourseGradingModel __all__ = ['orphan_handler', 'xblock_handler'] diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index 123d7fbadbdd..3f5bfbfa6079 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -5,7 +5,7 @@ from django.core.urlresolvers import reverse from django.http import Http404, HttpResponseBadRequest from django.contrib.auth.decorators import login_required -from mitxmako.shortcuts import render_to_response, render_to_string +from edxmako.shortcuts import render_to_response, render_to_string from xmodule_modifiers import replace_static_urls, wrap_xblock from xmodule.error_module import ErrorDescriptor diff --git a/cms/djangoapps/contentstore/views/public.py b/cms/djangoapps/contentstore/views/public.py index 9ab03a409331..c7857af0c0a9 100644 --- a/cms/djangoapps/contentstore/views/public.py +++ b/cms/djangoapps/contentstore/views/public.py @@ -6,7 +6,7 @@ from django.shortcuts import redirect from django.conf import settings -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from external_auth.views import ssl_login_shortcut diff --git a/cms/djangoapps/contentstore/views/tabs.py b/cms/djangoapps/contentstore/views/tabs.py index 46791ddc26f3..cf0ab42ffb4a 100644 --- a/cms/djangoapps/contentstore/views/tabs.py +++ b/cms/djangoapps/contentstore/views/tabs.py @@ -9,7 +9,7 @@ from django.core.exceptions import PermissionDenied from django_future.csrf import ensure_csrf_cookie from django.views.decorators.http import require_http_methods -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from xmodule.modulestore import Location from xmodule.modulestore.inheritance import own_metadata from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/views/user.py b/cms/djangoapps/contentstore/views/user.py index 6f2a2fbdec9f..50120bad3861 100644 --- a/cms/djangoapps/contentstore/views/user.py +++ b/cms/djangoapps/contentstore/views/user.py @@ -7,7 +7,7 @@ from django.utils.translation import ugettext as _ from django.views.decorators.http import require_POST from django_future.csrf import ensure_csrf_cookie -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from xmodule.modulestore.django import modulestore, loc_mapper from util.json_request import JsonResponse diff --git a/cms/djangoapps/course_creators/admin.py b/cms/djangoapps/course_creators/admin.py index df2baa1aa26b..87e17fabfa90 100644 --- a/cms/djangoapps/course_creators/admin.py +++ b/cms/djangoapps/course_creators/admin.py @@ -8,7 +8,7 @@ from ratelimitbackend import admin from django.conf import settings from django.dispatch import receiver -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from django.core.mail import send_mail from smtplib import SMTPException diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index 1a9621a221f4..afbdff7d3f0c 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -34,7 +34,7 @@ def seed(): MODULESTORE_OPTIONS = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': TEST_ROOT / "data", - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { diff --git a/cms/envs/common.py b/cms/envs/common.py index 8e2788a86a0e..961a089a14f0 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -161,7 +161,7 @@ 'django.contrib.messages.middleware.MessageMiddleware', 'track.middleware.TrackMiddleware', - 'mitxmako.middleware.MakoMiddleware', + 'edxmako.middleware.MakoMiddleware', # Detects user-requested locale from 'accept-language' header in http request 'django.middleware.locale.LocaleMiddleware', @@ -393,7 +393,7 @@ 'datadog', # For asset pipelining - 'mitxmako', + 'edxmako', 'pipeline', 'staticfiles', 'static_replace', diff --git a/cms/envs/dev.py b/cms/envs/dev.py index ea66688a8a01..ddf1708c875f 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -30,7 +30,7 @@ modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': GITHUB_REPO_ROOT, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { diff --git a/cms/envs/test.py b/cms/envs/test.py index c64e0ef1e893..ef7133e0bd60 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -60,7 +60,7 @@ MODULESTORE_OPTIONS = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': TEST_ROOT / "data", - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { diff --git a/common/djangoapps/course_groups/views.py b/common/djangoapps/course_groups/views.py index 764f6c301d14..fb1a99a6aa02 100644 --- a/common/djangoapps/course_groups/views.py +++ b/common/djangoapps/course_groups/views.py @@ -9,7 +9,7 @@ import re from courseware.courses import get_course_with_access -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from . import cohorts diff --git a/common/djangoapps/course_modes/views.py b/common/djangoapps/course_modes/views.py index 7c4bb3a1f787..f3dca5d08f8a 100644 --- a/common/djangoapps/course_modes/views.py +++ b/common/djangoapps/course_modes/views.py @@ -13,7 +13,7 @@ from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from course_modes.models import CourseMode from courseware.access import has_access diff --git a/common/djangoapps/mitxmako/README b/common/djangoapps/edxmako/README similarity index 100% rename from common/djangoapps/mitxmako/README rename to common/djangoapps/edxmako/README diff --git a/common/djangoapps/mitxmako/__init__.py b/common/djangoapps/edxmako/__init__.py similarity index 100% rename from common/djangoapps/mitxmako/__init__.py rename to common/djangoapps/edxmako/__init__.py diff --git a/common/djangoapps/mitxmako/makoloader.py b/common/djangoapps/edxmako/makoloader.py similarity index 98% rename from common/djangoapps/mitxmako/makoloader.py rename to common/djangoapps/edxmako/makoloader.py index 06ae2219e642..8e741f994608 100644 --- a/common/djangoapps/mitxmako/makoloader.py +++ b/common/djangoapps/edxmako/makoloader.py @@ -6,7 +6,7 @@ from django.template.loaders.filesystem import Loader as FilesystemLoader from django.template.loaders.app_directories import Loader as AppDirectoriesLoader -from mitxmako.template import Template +from edxmako.template import Template import tempdir diff --git a/common/djangoapps/mitxmako/management/__init__.py b/common/djangoapps/edxmako/management/__init__.py similarity index 100% rename from common/djangoapps/mitxmako/management/__init__.py rename to common/djangoapps/edxmako/management/__init__.py diff --git a/common/djangoapps/mitxmako/management/commands/__init__.py b/common/djangoapps/edxmako/management/commands/__init__.py similarity index 100% rename from common/djangoapps/mitxmako/management/commands/__init__.py rename to common/djangoapps/edxmako/management/commands/__init__.py diff --git a/common/djangoapps/mitxmako/management/commands/preprocess_assets.py b/common/djangoapps/edxmako/management/commands/preprocess_assets.py similarity index 100% rename from common/djangoapps/mitxmako/management/commands/preprocess_assets.py rename to common/djangoapps/edxmako/management/commands/preprocess_assets.py diff --git a/common/djangoapps/mitxmako/middleware.py b/common/djangoapps/edxmako/middleware.py similarity index 100% rename from common/djangoapps/mitxmako/middleware.py rename to common/djangoapps/edxmako/middleware.py diff --git a/common/djangoapps/mitxmako/shortcuts.py b/common/djangoapps/edxmako/shortcuts.py similarity index 94% rename from common/djangoapps/mitxmako/shortcuts.py rename to common/djangoapps/edxmako/shortcuts.py index 356c80ced3f1..e83f1b028f31 100644 --- a/common/djangoapps/mitxmako/shortcuts.py +++ b/common/djangoapps/edxmako/shortcuts.py @@ -16,8 +16,8 @@ from django.http import HttpResponse import logging -import mitxmako -import mitxmako.middleware +import edxmako +import edxmako.middleware from django.conf import settings from django.core.urlresolvers import reverse log = logging.getLogger(__name__) @@ -81,15 +81,15 @@ def render_to_string(template_name, dictionary, context=None, namespace='main'): context_instance['marketing_link'] = marketing_link # In various testing contexts, there might not be a current request context. - if mitxmako.middleware.requestcontext is not None: - for d in mitxmako.middleware.requestcontext: + if edxmako.middleware.requestcontext is not None: + for d in edxmako.middleware.requestcontext: context_dictionary.update(d) for d in context_instance: context_dictionary.update(d) if context: context_dictionary.update(context) # fetch and render template - template = mitxmako.lookup[namespace].get_template(template_name) + template = edxmako.lookup[namespace].get_template(template_name) return template.render_unicode(**context_dictionary) diff --git a/common/djangoapps/mitxmako/startup.py b/common/djangoapps/edxmako/startup.py similarity index 94% rename from common/djangoapps/mitxmako/startup.py rename to common/djangoapps/edxmako/startup.py index db9483b36634..2b58deac2ea4 100644 --- a/common/djangoapps/mitxmako/startup.py +++ b/common/djangoapps/edxmako/startup.py @@ -6,7 +6,7 @@ from django.conf import settings from mako.lookup import TemplateLookup -import mitxmako +import edxmako def run(): @@ -30,4 +30,4 @@ def run(): encoding_errors='replace', ) - mitxmako.lookup = lookup + edxmako.lookup = lookup diff --git a/common/djangoapps/mitxmako/template.py b/common/djangoapps/edxmako/template.py similarity index 88% rename from common/djangoapps/mitxmako/template.py rename to common/djangoapps/edxmako/template.py index 7dfc6de026c3..d515425b1637 100644 --- a/common/djangoapps/mitxmako/template.py +++ b/common/djangoapps/edxmako/template.py @@ -14,10 +14,10 @@ from django.conf import settings from mako.template import Template as MakoTemplate -from mitxmako.shortcuts import marketing_link +from edxmako.shortcuts import marketing_link -import mitxmako -import mitxmako.middleware +import edxmako +import edxmako.middleware django_variables = ['lookup', 'output_encoding', 'encoding_errors'] @@ -34,7 +34,7 @@ class Template(MakoTemplate): def __init__(self, *args, **kwargs): """Overrides base __init__ to provide django variable overrides""" if not kwargs.get('no_django', False): - overrides = dict([(k, getattr(mitxmako, k, None),) for k in django_variables]) + overrides = dict([(k, getattr(edxmako, k, None),) for k in django_variables]) overrides['lookup'] = overrides['lookup']['main'] kwargs.update(overrides) super(Template, self).__init__(*args, **kwargs) @@ -48,8 +48,8 @@ def render(self, context_instance): context_dictionary = {} # In various testing contexts, there might not be a current request context. - if mitxmako.middleware.requestcontext is not None: - for d in mitxmako.middleware.requestcontext: + if edxmako.middleware.requestcontext is not None: + for d in edxmako.middleware.requestcontext: context_dictionary.update(d) for d in context_instance: context_dictionary.update(d) diff --git a/common/djangoapps/mitxmako/templatetag_helpers.py b/common/djangoapps/edxmako/templatetag_helpers.py similarity index 100% rename from common/djangoapps/mitxmako/templatetag_helpers.py rename to common/djangoapps/edxmako/templatetag_helpers.py diff --git a/common/djangoapps/mitxmako/tests.py b/common/djangoapps/edxmako/tests.py similarity index 92% rename from common/djangoapps/mitxmako/tests.py rename to common/djangoapps/edxmako/tests.py index e7e56a94724e..a4eb84eda8f2 100644 --- a/common/djangoapps/mitxmako/tests.py +++ b/common/djangoapps/edxmako/tests.py @@ -1,14 +1,14 @@ from django.test import TestCase from django.test.utils import override_settings from django.core.urlresolvers import reverse -from mitxmako.shortcuts import marketing_link +from edxmako.shortcuts import marketing_link from mock import patch from util.testing import UrlResetMixin class ShortcutsTests(UrlResetMixin, TestCase): """ - Test the mitxmako shortcuts file + Test the edxmako shortcuts file """ @override_settings(MKTG_URLS={'ROOT': 'dummy-root', 'ABOUT': '/about-us'}) @override_settings(MKTG_URL_LINK_MAP={'ABOUT': 'login'}) diff --git a/common/djangoapps/external_auth/views.py b/common/djangoapps/external_auth/views.py index a995dff22b56..aa7536c46095 100644 --- a/common/djangoapps/external_auth/views.py +++ b/common/djangoapps/external_auth/views.py @@ -28,7 +28,7 @@ from django.shortcuts import redirect from django.utils.translation import ugettext as _ -from mitxmako.shortcuts import render_to_response, render_to_string +from edxmako.shortcuts import render_to_response, render_to_string try: from django.views.decorators.csrf import csrf_exempt except ImportError: diff --git a/common/djangoapps/pipeline_js/views.py b/common/djangoapps/pipeline_js/views.py index 06b76900cf25..6cd97159d45b 100644 --- a/common/djangoapps/pipeline_js/views.py +++ b/common/djangoapps/pipeline_js/views.py @@ -5,7 +5,7 @@ from django.conf import settings from django.http import HttpResponse from staticfiles.storage import staticfiles_storage -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response def get_xmodule_urls(): diff --git a/common/djangoapps/pipeline_mako/__init__.py b/common/djangoapps/pipeline_mako/__init__.py index 1cdc287e2eae..ed343588dacc 100644 --- a/common/djangoapps/pipeline_mako/__init__.py +++ b/common/djangoapps/pipeline_mako/__init__.py @@ -1,4 +1,4 @@ -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from pipeline.conf import settings from pipeline.packager import Packager diff --git a/common/djangoapps/student/management/commands/massemail.py b/common/djangoapps/student/management/commands/massemail.py index a1864f048e68..5ce8afb41fdd 100644 --- a/common/djangoapps/student/management/commands/massemail.py +++ b/common/djangoapps/student/management/commands/massemail.py @@ -1,7 +1,7 @@ from django.core.management.base import BaseCommand from django.contrib.auth.models import User -import mitxmako +import edxmako class Command(BaseCommand): @@ -15,8 +15,8 @@ def handle(self, *args, **options): #text = open(args[0]).read() #subject = open(args[1]).read() users = User.objects.all() - text = mitxmako.lookup['main'].get_template('email/' + args[0] + ".txt").render() - subject = mitxmako.lookup['main'].get_template('email/' + args[0] + "_subject.txt").render().strip() + text = edxmako.lookup['main'].get_template('email/' + args[0] + ".txt").render() + subject = edxmako.lookup['main'].get_template('email/' + args[0] + "_subject.txt").render().strip() for user in users: if user.is_active: user.email_user(subject, text) diff --git a/common/djangoapps/student/management/commands/massemailtxt.py b/common/djangoapps/student/management/commands/massemailtxt.py index 0228acf9239a..1ff8557a2592 100644 --- a/common/djangoapps/student/management/commands/massemailtxt.py +++ b/common/djangoapps/student/management/commands/massemailtxt.py @@ -4,7 +4,7 @@ from django.core.management.base import BaseCommand from django.conf import settings -import mitxmako +import edxmako from django.core.mail import send_mass_mail import sys @@ -39,8 +39,8 @@ def handle(self, *args, **options): users = [u.strip() for u in open(user_file).readlines()] - message = mitxmako.lookup['main'].get_template('emails/' + message_base + "_body.txt").render() - subject = mitxmako.lookup['main'].get_template('emails/' + message_base + "_subject.txt").render().strip() + message = edxmako.lookup['main'].get_template('emails/' + message_base + "_body.txt").render() + subject = edxmako.lookup['main'].get_template('emails/' + message_base + "_subject.txt").render().strip() rate = int(ratestr) self.log_file = open(logfilename, "a+", buffering=0) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 2c3099a67278..28c4e4f5fd4d 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -35,7 +35,7 @@ from ratelimitbackend.exceptions import RateLimitException -from mitxmako.shortcuts import render_to_response, render_to_string +from edxmako.shortcuts import render_to_response, render_to_string from course_modes.models import CourseMode from student.models import ( diff --git a/common/djangoapps/track/views.py b/common/djangoapps/track/views.py index e493babe5dda..ec052323957d 100644 --- a/common/djangoapps/track/views.py +++ b/common/djangoapps/track/views.py @@ -9,7 +9,7 @@ from django_future.csrf import ensure_csrf_cookie -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from track import tracker from track import contexts diff --git a/common/djangoapps/util/views.py b/common/djangoapps/util/views.py index 10492e383d54..b08c719baa50 100644 --- a/common/djangoapps/util/views.py +++ b/common/djangoapps/util/views.py @@ -9,7 +9,7 @@ from django.http import (Http404, HttpResponse, HttpResponseNotAllowed, HttpResponseServerError) from dogapi import dog_stats_api -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response import zendesk import calc diff --git a/common/djangoapps/xmodule_modifiers.py b/common/djangoapps/xmodule_modifiers.py index 6e6d01c28f4d..d46065d5a765 100644 --- a/common/djangoapps/xmodule_modifiers.py +++ b/common/djangoapps/xmodule_modifiers.py @@ -9,7 +9,7 @@ from django.conf import settings from django.utils.timezone import UTC -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from xblock.fragment import Fragment from xmodule.seq_module import SequenceModule diff --git a/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py index 776543ec4eb4..16f756b233af 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py @@ -60,7 +60,7 @@ def mongo_store_config(data_dir): 'OPTIONS': { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': data_dir, - 'render_template': 'mitxmako.shortcuts.render_to_string' + 'render_template': 'edxmako.shortcuts.render_to_string' } } } @@ -77,7 +77,7 @@ def draft_mongo_store_config(data_dir): modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': data_dir, - 'render_template': 'mitxmako.shortcuts.render_to_string' + 'render_template': 'edxmako.shortcuts.render_to_string' } store = { @@ -126,7 +126,7 @@ def studio_store_config(data_dir): options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': data_dir, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } store = { diff --git a/lms/djangoapps/branding/views.py b/lms/djangoapps/branding/views.py index 3ce8dbd40177..215d442de547 100644 --- a/lms/djangoapps/branding/views.py +++ b/lms/djangoapps/branding/views.py @@ -3,12 +3,12 @@ from django.http import Http404 from django.shortcuts import redirect from django_future.csrf import ensure_csrf_cookie -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response import student.views import branding import courseware.views -from mitxmako.shortcuts import marketing_link +from edxmako.shortcuts import marketing_link from util.cache import cache_if_anonymous diff --git a/lms/djangoapps/circuit/views.py b/lms/djangoapps/circuit/views.py index cc85c2a4525e..5af9ce1b4456 100644 --- a/lms/djangoapps/circuit/views.py +++ b/lms/djangoapps/circuit/views.py @@ -4,7 +4,7 @@ from django.http import Http404 from django.http import HttpResponse -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from .models import ServerCircuit diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 3b804c4ba96f..436e9ee54af4 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -22,7 +22,7 @@ from courseware.model_data import FieldDataCache, DjangoKeyValueStore from lms.lib.xblock.field_data import LmsFieldData from lms.lib.xblock.runtime import LmsModuleSystem, handler_prefix, unquote_slashes -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from psychometrics.psychoanalyze import make_psychometrics_data_update_handler from student.models import anonymous_id_for_user, user_by_anonymous_id from util.json_request import JsonResponse diff --git a/lms/djangoapps/courseware/tests/__init__.py b/lms/djangoapps/courseware/tests/__init__.py index 9a17073a372c..fcca925f3574 100644 --- a/lms/djangoapps/courseware/tests/__init__.py +++ b/lms/djangoapps/courseware/tests/__init__.py @@ -11,7 +11,7 @@ from django.core.urlresolvers import reverse from django.test.client import Client -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from student.tests.factories import UserFactory, CourseEnrollmentFactory from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE from xblock.field_data import DictFieldData diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index 17198c372d17..b1634a72ac00 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -17,7 +17,7 @@ from student.models import CourseEnrollment from student.tests.factories import AdminFactory -from mitxmako.middleware import MakoMiddleware +from edxmako.middleware import MakoMiddleware from xmodule.modulestore import Location from xmodule.modulestore.django import modulestore diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 69fd33f41767..2ce1f545717f 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -11,7 +11,7 @@ from django.contrib.auth.decorators import login_required from django.http import Http404, HttpResponse, HttpResponseRedirect from django.shortcuts import redirect -from mitxmako.shortcuts import render_to_response, render_to_string +from edxmako.shortcuts import render_to_response, render_to_string from django_future.csrf import ensure_csrf_cookie from django.views.decorators.cache import cache_control from django.db import transaction diff --git a/lms/djangoapps/dashboard/views.py b/lms/djangoapps/dashboard/views.py index 630222d7bfe2..8d1f63b410d5 100644 --- a/lms/djangoapps/dashboard/views.py +++ b/lms/djangoapps/dashboard/views.py @@ -1,5 +1,5 @@ from django.http import Http404 -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from django.db import connection from student.models import CourseEnrollment diff --git a/lms/djangoapps/debug/views.py b/lms/djangoapps/debug/views.py index 317ebcada988..5a5927e35008 100644 --- a/lms/djangoapps/debug/views.py +++ b/lms/djangoapps/debug/views.py @@ -6,7 +6,7 @@ from django.http import Http404 from django.contrib.auth.decorators import login_required from django_future.csrf import ensure_csrf_cookie -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from codejail.safe_exec import safe_exec diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py index 4600f121f707..0e0bedc141a1 100644 --- a/lms/djangoapps/django_comment_client/base/views.py +++ b/lms/djangoapps/django_comment_client/base/views.py @@ -19,7 +19,7 @@ from django.utils.translation import ugettext as _ from django.contrib.auth.models import User -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from courseware.courses import get_course_with_access, get_course_by_id from course_groups.cohorts import get_cohort_id, is_commentable_cohorted diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index dac91512d6a0..83516fc3ac3f 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -8,7 +8,7 @@ from django.contrib.auth.models import User import newrelic.agent -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from courseware.courses import get_course_with_access from course_groups.cohorts import (is_course_cohorted, get_cohort_id, is_commentable_cohorted, get_cohorted_commentables, get_course_cohorts, get_cohort_by_id) diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index 527a7d0860c8..a92797f7e6c5 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -12,7 +12,7 @@ from django_comment_common.models import Role, FORUM_ROLE_STUDENT from django_comment_client.permissions import check_permissions_by_view -import mitxmako +import edxmako import pystache_custom as pystache from xmodule.modulestore.django import modulestore @@ -310,7 +310,7 @@ def url_for_tags(course_id, tags): def render_mustache(template_name, dictionary, *args, **kwargs): - template = mitxmako.lookup['main'].get_template(template_name).source + template = edxmako.lookup['main'].get_template(template_name).source return pystache.render(template, dictionary) diff --git a/lms/djangoapps/instructor/enrollment.py b/lms/djangoapps/instructor/enrollment.py index 508271fa8b8c..a7c4fe0b6554 100644 --- a/lms/djangoapps/instructor/enrollment.py +++ b/lms/djangoapps/instructor/enrollment.py @@ -12,7 +12,7 @@ from student.models import CourseEnrollment, CourseEnrollmentAllowed from courseware.models import StudentModule -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string # For determining if a shibboleth course SHIBBOLETH_DOMAIN_PREFIX = 'shib:' diff --git a/lms/djangoapps/instructor/hint_manager.py b/lms/djangoapps/instructor/hint_manager.py index 9f555b9c56f2..a8b97fbe32a9 100644 --- a/lms/djangoapps/instructor/hint_manager.py +++ b/lms/djangoapps/instructor/hint_manager.py @@ -13,7 +13,7 @@ from django.http import HttpResponse, Http404 from django_future.csrf import ensure_csrf_cookie -from mitxmako.shortcuts import render_to_response, render_to_string +from edxmako.shortcuts import render_to_response, render_to_string from courseware.courses import get_course_with_access from courseware.models import XModuleUserStateSummaryField diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index de14df29404e..9c1cc43a6146 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -6,7 +6,7 @@ from django.utils.translation import ugettext as _ from django_future.csrf import ensure_csrf_cookie from django.views.decorators.cache import cache_control -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from django.core.urlresolvers import reverse from django.utils.html import escape from django.http import Http404 diff --git a/lms/djangoapps/instructor/views/legacy.py b/lms/djangoapps/instructor/views/legacy.py index 98c18dc68bea..09046f759381 100644 --- a/lms/djangoapps/instructor/views/legacy.py +++ b/lms/djangoapps/instructor/views/legacy.py @@ -50,7 +50,7 @@ submit_reset_problem_attempts_for_all_students, submit_bulk_course_email) from instructor_task.views import get_task_completion_info -from mitxmako.shortcuts import render_to_response, render_to_string +from edxmako.shortcuts import render_to_response, render_to_string from psychometrics import psychoanalyze from student.models import CourseEnrollment, CourseEnrollmentAllowed, unique_id_for_user from student.views import course_from_id diff --git a/lms/djangoapps/licenses/views.py b/lms/djangoapps/licenses/views.py index 1c1a80ed3182..42ecb9ecf19c 100644 --- a/lms/djangoapps/licenses/views.py +++ b/lms/djangoapps/licenses/views.py @@ -5,7 +5,7 @@ from collections import namedtuple, defaultdict -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User diff --git a/lms/djangoapps/multicourse/views.py b/lms/djangoapps/multicourse/views.py index da9ccb77a665..c48c4477e48f 100644 --- a/lms/djangoapps/multicourse/views.py +++ b/lms/djangoapps/multicourse/views.py @@ -1,5 +1,5 @@ from django.conf import settings -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from multicourse import multicourse_settings diff --git a/lms/djangoapps/notes/views.py b/lms/djangoapps/notes/views.py index 01671b7ccdab..bf57f80c3d48 100644 --- a/lms/djangoapps/notes/views.py +++ b/lms/djangoapps/notes/views.py @@ -1,6 +1,6 @@ from django.contrib.auth.decorators import login_required from django.http import Http404 -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from courseware.courses import get_course_with_access from notes.models import Note from notes.utils import notes_enabled_for_course diff --git a/lms/djangoapps/notification_prefs/views.py b/lms/djangoapps/notification_prefs/views.py index 6be5b8f76647..68e8c875daf2 100644 --- a/lms/djangoapps/notification_prefs/views.py +++ b/lms/djangoapps/notification_prefs/views.py @@ -10,7 +10,7 @@ from django.http import Http404, HttpResponse from django.views.decorators.http import require_GET, require_POST -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from notification_prefs import NOTIFICATION_PREF_KEY from user_api.models import UserPreference diff --git a/lms/djangoapps/open_ended_grading/open_ended_notifications.py b/lms/djangoapps/open_ended_grading/open_ended_notifications.py index c4580dd30436..e99f51283c78 100644 --- a/lms/djangoapps/open_ended_grading/open_ended_notifications.py +++ b/lms/djangoapps/open_ended_grading/open_ended_notifications.py @@ -9,7 +9,7 @@ from courseware.access import has_access from lms.lib.xblock.runtime import LmsModuleSystem -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from student.models import unique_id_for_user from util.cache import cache diff --git a/lms/djangoapps/open_ended_grading/staff_grading_service.py b/lms/djangoapps/open_ended_grading/staff_grading_service.py index 1322f3f06933..ba8009ece3c3 100644 --- a/lms/djangoapps/open_ended_grading/staff_grading_service.py +++ b/lms/djangoapps/open_ended_grading/staff_grading_service.py @@ -13,7 +13,7 @@ from courseware.access import has_access from lms.lib.xblock.runtime import LmsModuleSystem -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from student.models import unique_id_for_user from util.json_request import expect_json diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index ad6298d71a9f..7e4a805fc9e4 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -27,7 +27,7 @@ from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE from lms.lib.xblock.runtime import LmsModuleSystem from courseware.roles import CourseStaffRole -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from student.models import unique_id_for_user from open_ended_grading import staff_grading_service, views, utils diff --git a/lms/djangoapps/open_ended_grading/utils.py b/lms/djangoapps/open_ended_grading/utils.py index bfde229e9c85..01d58fb479d4 100644 --- a/lms/djangoapps/open_ended_grading/utils.py +++ b/lms/djangoapps/open_ended_grading/utils.py @@ -11,7 +11,7 @@ from django.conf import settings from lms.lib.xblock.runtime import LmsModuleSystem -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string log = logging.getLogger(__name__) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index e8002e0883f7..383187bbb9b7 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -2,7 +2,7 @@ from django.conf import settings from django.views.decorators.cache import cache_control -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from django.core.urlresolvers import reverse from student.models import unique_id_for_user @@ -19,7 +19,7 @@ from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem from django.http import HttpResponse, Http404, HttpResponseRedirect -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from django.utils.translation import ugettext as _ from open_ended_grading.utils import (STAFF_ERROR_MESSAGE, STUDENT_ERROR_MESSAGE, diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index fa77efb50f93..7de62343c778 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -23,7 +23,7 @@ from xmodule.modulestore.exceptions import ItemNotFoundError from course_modes.models import CourseMode -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from student.views import course_from_id from student.models import CourseEnrollment, unenroll_done diff --git a/lms/djangoapps/shoppingcart/processors/CyberSource.py b/lms/djangoapps/shoppingcart/processors/CyberSource.py index 5d43482bd4c3..d6811303a1f7 100644 --- a/lms/djangoapps/shoppingcart/processors/CyberSource.py +++ b/lms/djangoapps/shoppingcart/processors/CyberSource.py @@ -13,7 +13,7 @@ from textwrap import dedent from django.conf import settings from django.utils.translation import ugettext as _ -from mitxmako.shortcuts import render_to_string +from edxmako.shortcuts import render_to_string from shoppingcart.models import Order from shoppingcart.processors.exceptions import * diff --git a/lms/djangoapps/shoppingcart/tests/payment_fake.py b/lms/djangoapps/shoppingcart/tests/payment_fake.py index fa6f40190415..0de87410ef03 100644 --- a/lms/djangoapps/shoppingcart/tests/payment_fake.py +++ b/lms/djangoapps/shoppingcart/tests/payment_fake.py @@ -15,7 +15,7 @@ from django.views.generic.base import View from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseBadRequest -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response # We use the same hashing function as the software under test, diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index 0451277ce235..0d23dc041904 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -18,7 +18,7 @@ from student.tests.factories import UserFactory from student.models import CourseEnrollment from course_modes.models import CourseMode -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from shoppingcart.processors import render_purchase_form_html from mock import patch, Mock diff --git a/lms/djangoapps/shoppingcart/views.py b/lms/djangoapps/shoppingcart/views.py index ad7ef6b0800a..26cf3e5a51d3 100644 --- a/lms/djangoapps/shoppingcart/views.py +++ b/lms/djangoapps/shoppingcart/views.py @@ -10,7 +10,7 @@ from django.core.urlresolvers import reverse from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from .models import Order, PaidCourseRegistration, OrderItem from .processors import process_postpay_callback, render_purchase_form_html from .exceptions import ItemAlreadyInCartException, AlreadyEnrolledInCourseException, CourseDoesNotExistException diff --git a/lms/djangoapps/static_template_view/views.py b/lms/djangoapps/static_template_view/views.py index e5a8c43ca86a..4cff3c77ac71 100644 --- a/lms/djangoapps/static_template_view/views.py +++ b/lms/djangoapps/static_template_view/views.py @@ -3,7 +3,7 @@ # List of valid templates is explicitly managed for (short-term) # security reasons. -from mitxmako.shortcuts import render_to_response, render_to_string +from edxmako.shortcuts import render_to_response, render_to_string from mako.exceptions import TopLevelLookupException from django.shortcuts import redirect from django.conf import settings diff --git a/lms/djangoapps/staticbook/views.py b/lms/djangoapps/staticbook/views.py index f73cfb6e5bb3..db9dce87dd16 100644 --- a/lms/djangoapps/staticbook/views.py +++ b/lms/djangoapps/staticbook/views.py @@ -4,7 +4,7 @@ from django.contrib.auth.decorators import login_required from django.http import Http404 -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from courseware.access import has_access from courseware.courses import get_course_with_access diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index 673564e72c06..2ac798bbf203 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -6,7 +6,7 @@ import logging import decimal -from mitxmako.shortcuts import render_to_response +from edxmako.shortcuts import render_to_response from django.conf import settings from django.core.urlresolvers import reverse diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index 8236303161e7..76db5b005b9c 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -36,7 +36,7 @@ def seed(): modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': TEST_ROOT / "data", - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { diff --git a/lms/envs/cms/dev.py b/lms/envs/cms/dev.py index 0978d88d173b..f70d05653f57 100644 --- a/lms/envs/cms/dev.py +++ b/lms/envs/cms/dev.py @@ -31,7 +31,7 @@ modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': DATA_DIR, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } MODULESTORE = { diff --git a/lms/envs/cms/mixed_dev.py b/lms/envs/cms/mixed_dev.py index ba45d7e747cc..f636566558cf 100644 --- a/lms/envs/cms/mixed_dev.py +++ b/lms/envs/cms/mixed_dev.py @@ -33,7 +33,7 @@ 'OPTIONS': { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': DATA_DIR, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } } }, diff --git a/lms/envs/common.py b/lms/envs/common.py index 46c9df1a6ecb..2341e30cb128 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -281,7 +281,7 @@ 'course_wiki.course_nav.context_processor', # Hack to get required link URLs to password reset templates - 'mitxmako.shortcuts.marketing_link_context_processor', + 'edxmako.shortcuts.marketing_link_context_processor', # Shoppingcart processor (detects if request.user has a cart) 'shoppingcart.context_processor.user_has_cart_context_processor', @@ -592,8 +592,8 @@ # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( - 'mitxmako.makoloader.MakoFilesystemLoader', - 'mitxmako.makoloader.MakoAppDirectoriesLoader', + 'edxmako.makoloader.MakoFilesystemLoader', + 'edxmako.makoloader.MakoAppDirectoriesLoader', # 'django.template.loaders.filesystem.Loader', # 'django.template.loaders.app_directories.Loader', @@ -615,7 +615,7 @@ 'django.contrib.messages.middleware.MessageMiddleware', 'track.middleware.TrackMiddleware', - 'mitxmako.middleware.MakoMiddleware', + 'edxmako.middleware.MakoMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'course_wiki.course_nav.Middleware', @@ -928,7 +928,7 @@ 'service_status', # For asset pipelining - 'mitxmako', + 'edxmako', 'pipeline', 'staticfiles', 'static_replace', diff --git a/lms/envs/dev_ike.py b/lms/envs/dev_ike.py index 50bbfff0968d..0123c5c1e0af 100644 --- a/lms/envs/dev_ike.py +++ b/lms/envs/dev_ike.py @@ -47,7 +47,7 @@ INSTALLED_APPS = tuple([app for app in INSTALLED_APPS if not app.startswith('debug_toolbar')]) MIDDLEWARE_CLASSES = tuple([mcl for mcl in MIDDLEWARE_CLASSES if not mcl.startswith('debug_toolbar')]) -#TEMPLATE_LOADERS = tuple([ app for app in TEMPLATE_LOADERS if not app.startswith('mitxmako') ]) +#TEMPLATE_LOADERS = tuple([ app for app in TEMPLATE_LOADERS if not app.startswith('edxmako') ]) TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', diff --git a/lms/envs/dev_mongo.py b/lms/envs/dev_mongo.py index bd7a8b20aa95..3a99f4465551 100644 --- a/lms/envs/dev_mongo.py +++ b/lms/envs/dev_mongo.py @@ -21,7 +21,7 @@ 'OPTIONS': { 'default_class': 'xmodule.raw_module.RawDescriptor', 'fs_root': GITHUB_REPO_ROOT, - 'render_template': 'mitxmako.shortcuts.render_to_string', + 'render_template': 'edxmako.shortcuts.render_to_string', } } } From ede4223fdef0176620a3b474cc5e88262c742ac8 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Mon, 2 Dec 2013 11:55:01 -0500 Subject: [PATCH 2/8] settings.MITX_FEATURES => settings.FEATURES --- cms/djangoapps/auth/authz.py | 4 +- cms/djangoapps/auth/tests/test_authz.py | 6 +- .../contentstore/tests/test_contentstore.py | 10 ++-- .../tests/test_course_settings.py | 4 +- .../contentstore/tests/test_request_event.py | 4 +- .../contentstore/tests/test_utils.py | 24 ++++---- cms/djangoapps/contentstore/utils.py | 4 +- .../contentstore/views/component.py | 2 +- cms/djangoapps/contentstore/views/course.py | 6 +- cms/djangoapps/course_creators/admin.py | 4 +- .../course_creators/tests/test_admin.py | 6 +- .../course_creators/tests/test_views.py | 4 +- cms/envs/acceptance.py | 2 +- cms/envs/aws.py | 8 +-- cms/envs/common.py | 6 +- cms/envs/dev.py | 8 +-- cms/envs/dev_ike.py | 4 +- cms/envs/dev_shared_preview.py | 2 +- cms/envs/devstack.py | 2 +- cms/envs/test.py | 8 +-- cms/templates/index.html | 8 +-- cms/templates/widgets/qualaroo.html | 2 +- cms/templates/widgets/segment-io.html | 2 +- cms/urls.py | 4 +- common/djangoapps/edxmako/shortcuts.py | 4 +- common/djangoapps/edxmako/tests.py | 4 +- .../tests/test_openid_provider.py | 32 +++++------ .../external_auth/tests/test_shib.py | 14 ++--- common/djangoapps/external_auth/views.py | 18 +++--- .../templates/static_content.html | 4 +- common/djangoapps/student/models.py | 2 +- .../student/tests/test_auto_auth.py | 10 ++-- .../student/tests/test_bulk_email_settings.py | 12 ++-- common/djangoapps/student/tests/test_login.py | 8 +-- common/djangoapps/student/tests/tests.py | 4 +- common/djangoapps/student/views.py | 26 ++++----- common/djangoapps/track/tests.py | 4 +- .../util/tests/test_submit_feedback.py | 4 +- common/djangoapps/util/views.py | 2 +- common/djangoapps/xmodule_modifiers.py | 4 +- common/lib/xmodule/xmodule/video_module.py | 2 +- docs/internal/development.md | 2 +- docs/internal/remote_gradebook.md | 2 +- lms/djangoapps/branding/__init__.py | 4 +- lms/djangoapps/branding/tests.py | 14 ++--- lms/djangoapps/branding/views.py | 8 +-- lms/djangoapps/bulk_email/models.py | 4 +- .../bulk_email/tests/test_course_optout.py | 4 +- lms/djangoapps/bulk_email/tests/test_email.py | 2 +- lms/djangoapps/bulk_email/tests/test_forms.py | 8 +-- .../bulk_email/tests/test_models.py | 4 +- lms/djangoapps/courseware/access.py | 8 +-- lms/djangoapps/courseware/masquerade.py | 2 +- lms/djangoapps/courseware/module_render.py | 4 +- lms/djangoapps/courseware/tabs.py | 8 +-- lms/djangoapps/courseware/tests/test_tabs.py | 14 ++--- .../courseware/tests/test_video_mongo.py | 4 +- .../courseware/tests/test_video_xml.py | 2 +- .../tests/test_view_authentication.py | 12 ++-- lms/djangoapps/courseware/tests/test_views.py | 4 +- lms/djangoapps/courseware/views.py | 14 ++--- .../django_comment_client/base/tests.py | 2 +- .../django_comment_client/forum/tests.py | 2 +- lms/djangoapps/instructor/hint_manager.py | 4 +- lms/djangoapps/instructor/tests/test_email.py | 14 ++--- .../instructor/tests/test_legacy_email.py | 10 ++-- .../instructor/views/instructor_dashboard.py | 4 +- lms/djangoapps/instructor/views/legacy.py | 14 ++--- lms/djangoapps/notes/utils.py | 4 +- .../shoppingcart/context_processor.py | 4 +- lms/djangoapps/shoppingcart/models.py | 4 +- .../tests/test_context_processor.py | 16 +++--- .../shoppingcart/tests/test_models.py | 4 +- lms/djangoapps/shoppingcart/urls.py | 4 +- lms/djangoapps/verify_student/models.py | 6 +- .../verify_student/tests/test_views.py | 2 +- lms/envs/acceptance.py | 14 ++--- lms/envs/aws.py | 8 +-- lms/envs/cms/acceptance.py | 2 +- lms/envs/cms/dev.py | 4 +- lms/envs/common.py | 12 ++-- lms/envs/dev.py | 56 +++++++++---------- lms/envs/dev_ike.py | 26 ++++----- lms/envs/dev_int.py | 2 +- lms/envs/devstack.py | 4 +- lms/envs/test.py | 24 ++++---- lms/templates/courseware/course_about.html | 8 +-- .../courseware/instructor_dashboard.html | 22 ++++---- lms/templates/dashboard.html | 2 +- .../discussion/_underscore_templates.html | 4 +- lms/templates/help_modal.html | 2 +- lms/templates/index.html | 2 +- .../instructor_dashboard_2/course_info.html | 2 +- .../instructor_dashboard_2/data_download.html | 6 +- .../instructor_dashboard_2/send_email.html | 2 +- .../instructor_dashboard_2/student_admin.html | 8 +-- lms/templates/login.html | 2 +- lms/templates/login_modal.html | 2 +- lms/templates/main.html | 2 +- lms/templates/navigation.html | 14 ++--- lms/templates/staff_problem_info.html | 2 +- lms/templates/widgets/segment-io.html | 2 +- lms/urls.py | 44 +++++++-------- 103 files changed, 392 insertions(+), 392 deletions(-) diff --git a/cms/djangoapps/auth/authz.py b/cms/djangoapps/auth/authz.py index c4d1a9ddffb3..429a11d9d912 100644 --- a/cms/djangoapps/auth/authz.py +++ b/cms/djangoapps/auth/authz.py @@ -217,11 +217,11 @@ def is_user_in_creator_group(user): return True # On edx, we only allow edX staff to create courses. This may be relaxed in the future. - if settings.MITX_FEATURES.get('DISABLE_COURSE_CREATION', False): + if settings.FEATURES.get('DISABLE_COURSE_CREATION', False): return False # Feature flag for using the creator group setting. Will be removed once the feature is complete. - if settings.MITX_FEATURES.get('ENABLE_CREATOR_GROUP', False): + if settings.FEATURES.get('ENABLE_CREATOR_GROUP', False): return user.groups.filter(name=COURSE_CREATOR_GROUP_NAME).count() > 0 return True diff --git a/cms/djangoapps/auth/tests/test_authz.py b/cms/djangoapps/auth/tests/test_authz.py index 69050539cf58..6bbb8d0a4191 100644 --- a/cms/djangoapps/auth/tests/test_authz.py +++ b/cms/djangoapps/auth/tests/test_authz.py @@ -33,7 +33,7 @@ def test_creator_group_not_enabled(self): def test_creator_group_enabled_but_empty(self): """ Tests creator group feature on, but group empty. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): self.assertFalse(is_user_in_creator_group(self.user)) # Make user staff. This will cause is_user_in_creator_group to return True. @@ -42,7 +42,7 @@ def test_creator_group_enabled_but_empty(self): def test_creator_group_enabled_nonempty(self): """ Tests creator group feature on, user added. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): self.assertTrue(add_user_to_creator_group(self.admin, self.user)) self.assertTrue(is_user_in_creator_group(self.user)) @@ -70,7 +70,7 @@ def test_add_user_not_active(self): def test_course_creation_disabled(self): """ Tests that the COURSE_CREATION_DISABLED flag overrides course creator group settings. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', + with mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_COURSE_CREATION': True, "ENABLE_CREATOR_GROUP": True}): # Add user to creator group. self.assertTrue(add_user_to_creator_group(self.admin, self.user)) diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index 0aaf2dfb2992..62c4d6b14528 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -1506,31 +1506,31 @@ def test_create_course_with_bad_organization(self): def test_create_course_with_course_creation_disabled_staff(self): """Test new course creation -- course creation disabled, but staff access.""" - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'DISABLE_COURSE_CREATION': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_COURSE_CREATION': True}): self.assert_created_course() def test_create_course_with_course_creation_disabled_not_staff(self): """Test new course creation -- error path for course creation disabled, not staff access.""" - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'DISABLE_COURSE_CREATION': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_COURSE_CREATION': True}): self.user.is_staff = False self.user.save() self.assert_course_permission_denied() def test_create_course_no_course_creators_staff(self): """Test new course creation -- course creation group enabled, staff, group is empty.""" - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_CREATOR_GROUP': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_CREATOR_GROUP': True}): self.assert_created_course() def test_create_course_no_course_creators_not_staff(self): """Test new course creation -- error path for course creator group enabled, not staff, group is empty.""" - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): self.user.is_staff = False self.user.save() self.assert_course_permission_denied() def test_create_course_with_course_creator(self): """Test new course creation -- use course creator group""" - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): add_user_to_creator_group(self.user, self.user) self.assert_created_course() diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py index 792b28fe4da6..1801e7c8dc90 100644 --- a/cms/djangoapps/contentstore/tests/test_course_settings.py +++ b/cms/djangoapps/contentstore/tests/test_course_settings.py @@ -106,7 +106,7 @@ def test_update_and_fetch(self): def test_marketing_site_fetch(self): settings_details_url = self.course_locator.url_reverse('settings/details/') - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): response = self.client.get_html(settings_details_url) self.assertNotContains(response, "Course Summary Page") self.assertNotContains(response, "Send a note to students via email") @@ -127,7 +127,7 @@ def test_marketing_site_fetch(self): def test_regular_site_fetch(self): settings_details_url = self.course_locator.url_reverse('settings/details/') - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': False}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}): response = self.client.get_html(settings_details_url) self.assertContains(response, "Course Summary Page") self.assertContains(response, "Send a note to students via email") diff --git a/cms/djangoapps/contentstore/tests/test_request_event.py b/cms/djangoapps/contentstore/tests/test_request_event.py index 0126de66c619..166187ee587e 100644 --- a/cms/djangoapps/contentstore/tests/test_request_event.py +++ b/cms/djangoapps/contentstore/tests/test_request_event.py @@ -20,7 +20,7 @@ def test_post_answers_to_log(self): {"event": "my_event", "event_type": "my_event_type", "page": "my_page"}, {"event": "{'json': 'object'}", "event_type": unichr(512), "page": "my_page"} ] - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_SQL_TRACKING_LOGS': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_SQL_TRACKING_LOGS': True}): for request_params in requests: response = self.client.post(reverse(cms_user_track), request_params) self.assertEqual(response.status_code, 204) @@ -34,7 +34,7 @@ def test_get_answers_to_log(self): {"event": "my_event", "event_type": "my_event_type", "page": "my_page"}, {"event": "{'json': 'object'}", "event_type": unichr(512), "page": "my_page"} ] - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_SQL_TRACKING_LOGS': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_SQL_TRACKING_LOGS': True}): for request_params in requests: response = self.client.get(reverse(cms_user_track), request_params) self.assertEqual(response.status_code, 204) diff --git a/cms/djangoapps/contentstore/tests/test_utils.py b/cms/djangoapps/contentstore/tests/test_utils.py index 5311396f2fb0..928e3b41a6ea 100644 --- a/cms/djangoapps/contentstore/tests/test_utils.py +++ b/cms/djangoapps/contentstore/tests/test_utils.py @@ -23,38 +23,38 @@ class LMSLinksTestCase(TestCase): def about_page_test(self): """ Get URL for about page, no marketing site """ # default for ENABLE_MKTG_SITE is False. - self.assertEquals(self.get_about_page_link(), "//localhost:8000/courses/mitX/101/test/about") + self.assertEquals(self.get_about_page_link(), "//localhost:8000/courses/edX/101/test/about") @override_settings(MKTG_URLS={'ROOT': 'dummy-root'}) def about_page_marketing_site_test(self): """ Get URL for about page, marketing root present. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): - self.assertEquals(self.get_about_page_link(), "//dummy-root/courses/mitX/101/test/about") - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': False}): - self.assertEquals(self.get_about_page_link(), "//localhost:8000/courses/mitX/101/test/about") + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): + self.assertEquals(self.get_about_page_link(), "//dummy-root/courses/edX/101/test/about") + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': False}): + self.assertEquals(self.get_about_page_link(), "//localhost:8000/courses/edX/101/test/about") @override_settings(MKTG_URLS={'ROOT': 'http://www.dummy'}) def about_page_marketing_site_remove_http_test(self): """ Get URL for about page, marketing root present, remove http://. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): - self.assertEquals(self.get_about_page_link(), "//www.dummy/courses/mitX/101/test/about") + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): + self.assertEquals(self.get_about_page_link(), "//www.dummy/courses/edX/101/test/about") @override_settings(MKTG_URLS={'ROOT': 'https://www.dummy'}) def about_page_marketing_site_remove_https_test(self): """ Get URL for about page, marketing root present, remove https://. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): - self.assertEquals(self.get_about_page_link(), "//www.dummy/courses/mitX/101/test/about") + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): + self.assertEquals(self.get_about_page_link(), "//www.dummy/courses/edX/101/test/about") @override_settings(MKTG_URLS={'ROOT': 'www.dummyhttps://x'}) def about_page_marketing_site_https__edge_test(self): """ Get URL for about page, only remove https:// at the beginning of the string. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): - self.assertEquals(self.get_about_page_link(), "//www.dummyhttps://x/courses/mitX/101/test/about") + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): + self.assertEquals(self.get_about_page_link(), "//www.dummyhttps://x/courses/edX/101/test/about") @override_settings(MKTG_URLS={}) def about_page_marketing_urls_not_set_test(self): """ Error case. ENABLE_MKTG_SITE is True, but there is either no MKTG_URLS, or no MKTG_URLS Root property. """ - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_MKTG_SITE': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}): self.assertEquals(self.get_about_page_link(), None) @override_settings(LMS_BASE=None) diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 0a2ecbd37be0..cf4bffc503b3 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -136,7 +136,7 @@ def get_lms_link_for_item(location, preview=False, course_id=None): if settings.LMS_BASE is not None: if preview: - lms_base = settings.MITX_FEATURES.get('PREVIEW_LMS_BASE') + lms_base = settings.FEATURES.get('PREVIEW_LMS_BASE') else: lms_base = settings.LMS_BASE @@ -155,7 +155,7 @@ def get_lms_link_for_about_page(location): """ Returns the url to the course about page from the location tuple. """ - if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE', False): + if settings.FEATURES.get('ENABLE_MKTG_SITE', False): if not hasattr(settings, 'MKTG_URLS'): log.exception("ENABLE_MKTG_SITE is True, but MKTG_URLS is not defined.") about_base = None diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 269b603effc0..0a3404568723 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -256,7 +256,7 @@ def unit_handler(request, tag=None, course_id=None, branch=None, version_guid=No break index = index + 1 - preview_lms_base = settings.MITX_FEATURES.get('PREVIEW_LMS_BASE') + preview_lms_base = settings.FEATURES.get('PREVIEW_LMS_BASE') preview_lms_link = ( '//{preview_lms_base}/courses/{org}/{course}/' diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index a92708bd69dc..a5fd0e4ced2a 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -423,7 +423,7 @@ def settings_handler(request, tag=None, course_id=None, branch=None, version_gui 'lms_link_for_about_page': utils.get_lms_link_for_about_page(course_old_location), 'course_image_url': utils.course_image_url(course_module), 'details_url': locator.url_reverse('/settings/details/'), - 'about_page_editable': not settings.MITX_FEATURES.get( + 'about_page_editable': not settings.FEATURES.get( 'ENABLE_MKTG_SITE', False ), 'upload_asset_url': upload_asset_url @@ -822,9 +822,9 @@ def _get_course_creator_status(user): """ if user.is_staff: course_creator_status = 'granted' - elif settings.MITX_FEATURES.get('DISABLE_COURSE_CREATION', False): + elif settings.FEATURES.get('DISABLE_COURSE_CREATION', False): course_creator_status = 'disallowed_for_this_site' - elif settings.MITX_FEATURES.get('ENABLE_CREATOR_GROUP', False): + elif settings.FEATURES.get('ENABLE_CREATOR_GROUP', False): course_creator_status = get_course_creator_status(user) if course_creator_status is None: # User not grandfathered in as an existing user, has not previously visited the dashboard page. diff --git a/cms/djangoapps/course_creators/admin.py b/cms/djangoapps/course_creators/admin.py index 87e17fabfa90..5eaa8c4ac36d 100644 --- a/cms/djangoapps/course_creators/admin.py +++ b/cms/djangoapps/course_creators/admin.py @@ -91,7 +91,7 @@ def send_user_notification_callback(sender, **kwargs): user = kwargs['user'] updated_state = kwargs['state'] - studio_request_email = settings.MITX_FEATURES.get('STUDIO_REQUEST_EMAIL', '') + studio_request_email = settings.FEATURES.get('STUDIO_REQUEST_EMAIL', '') context = {'studio_request_email': studio_request_email} subject = render_to_string('emails/course_creator_subject.txt', context) @@ -118,7 +118,7 @@ def send_admin_notification_callback(sender, **kwargs): """ user = kwargs['user'] - studio_request_email = settings.MITX_FEATURES.get('STUDIO_REQUEST_EMAIL', '') + studio_request_email = settings.FEATURES.get('STUDIO_REQUEST_EMAIL', '') context = {'user_name': user.username, 'user_email': user.email} subject = render_to_string('emails/course_creator_admin_subject.txt', context) diff --git a/cms/djangoapps/course_creators/tests/test_admin.py b/cms/djangoapps/course_creators/tests/test_admin.py index aa293e008eee..4d28f263997e 100644 --- a/cms/djangoapps/course_creators/tests/test_admin.py +++ b/cms/djangoapps/course_creators/tests/test_admin.py @@ -69,7 +69,7 @@ def change_state_and_verify_email(state, is_creator): self.studio_request_email ) - with mock.patch.dict('django.conf.settings.MITX_FEATURES', self.enable_creator_group_patch): + with mock.patch.dict('django.conf.settings.FEATURES', self.enable_creator_group_patch): # User is initially unrequested. self.assertFalse(is_user_in_creator_group(self.user)) @@ -119,7 +119,7 @@ def check_admin_message_state(state, expect_sent_to_admin, expect_sent_to_user): else: self.assertEquals(base_num_emails, len(mail.outbox)) - with mock.patch.dict('django.conf.settings.MITX_FEATURES', self.enable_creator_group_patch): + with mock.patch.dict('django.conf.settings.FEATURES', self.enable_creator_group_patch): # E-mail message should be sent to admin only when new state is PENDING, regardless of what # previous state was (unless previous state was already PENDING). # E-mail message sent to user only on transition into and out of GRANTED state. @@ -159,7 +159,7 @@ def test_change_permission(self): self.assertFalse(self.creator_admin.has_change_permission(self.request)) def test_rate_limit_login(self): - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {'ENABLE_CREATOR_GROUP': True}): + with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_CREATOR_GROUP': True}): post_params = {'username': self.user.username, 'password': 'wrong_password'} # try logging in 30 times, the default limit in the number of failed # login attempts in one 5 minute period before the rate gets limited diff --git a/cms/djangoapps/course_creators/tests/test_views.py b/cms/djangoapps/course_creators/tests/test_views.py index 95c50ffb76d4..dbd92365b7de 100644 --- a/cms/djangoapps/course_creators/tests/test_views.py +++ b/cms/djangoapps/course_creators/tests/test_views.py @@ -46,7 +46,7 @@ def test_add_unrequested(self): self.assertEqual('unrequested', get_course_creator_status(self.user)) def test_add_granted(self): - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): # Calling add_user_with_status_granted impacts is_user_in_course_group_role. self.assertFalse(is_user_in_creator_group(self.user)) @@ -60,7 +60,7 @@ def test_add_granted(self): self.assertTrue(is_user_in_creator_group(self.user)) def test_update_creator_group(self): - with mock.patch.dict('django.conf.settings.MITX_FEATURES', {"ENABLE_CREATOR_GROUP": True}): + with mock.patch.dict('django.conf.settings.FEATURES', {"ENABLE_CREATOR_GROUP": True}): self.assertFalse(is_user_in_creator_group(self.user)) update_course_creator_group(self.admin, self.user, True) self.assertTrue(is_user_in_creator_group(self.user)) diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index afbdff7d3f0c..67ecfa5689a9 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -87,7 +87,7 @@ def seed(): STATICFILES_FINDERS += ('pipeline.finders.PipelineFinder', ) # Use the auto_auth workflow for creating users and logging them in -MITX_FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True +FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True # HACK # Setting this flag to false causes imports to not load correctly in the lettuce python files diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 1b0c0ef6482f..8853ccf431f6 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -106,7 +106,7 @@ EMAIL_BACKEND = ENV_TOKENS.get('EMAIL_BACKEND', EMAIL_BACKEND) EMAIL_FILE_PATH = ENV_TOKENS.get('EMAIL_FILE_PATH', None) LMS_BASE = ENV_TOKENS.get('LMS_BASE') -# Note that MITX_FEATURES['PREVIEW_LMS_BASE'] gets read in from the environment file. +# Note that FEATURES['PREVIEW_LMS_BASE'] gets read in from the environment file. SITE_NAME = ENV_TOKENS['SITE_NAME'] @@ -138,8 +138,8 @@ TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE) -for feature, value in ENV_TOKENS.get('MITX_FEATURES', {}).items(): - MITX_FEATURES[feature] = value +for feature, value in ENV_TOKENS.get('FEATURES', {}).items(): + FEATURES[feature] = value LOGGING = get_logger_config(LOG_DIR, logging_env=ENV_TOKENS['LOGGING_ENV'], @@ -164,7 +164,7 @@ # Note that this is the Studio key. There is a separate key for the LMS. SEGMENT_IO_KEY = AUTH_TOKENS.get('SEGMENT_IO_KEY') if SEGMENT_IO_KEY: - MITX_FEATURES['SEGMENT_IO'] = ENV_TOKENS.get('SEGMENT_IO', False) + FEATURES['SEGMENT_IO'] = ENV_TOKENS.get('SEGMENT_IO', False) AWS_ACCESS_KEY_ID = AUTH_TOKENS["AWS_ACCESS_KEY_ID"] if AWS_ACCESS_KEY_ID == "": diff --git a/cms/envs/common.py b/cms/envs/common.py index 961a089a14f0..a8c293b57f08 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -2,7 +2,7 @@ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of -MITX_FEATURES[...]. Modules that extend this one can change the feature +FEATURES[...]. Modules that extend this one can change the feature configuration in an environment specific config file and re-calculate those values. @@ -14,7 +14,7 @@ 1. Right now our treatment of static content in general and in particular course-specific static content is haphazard. 2. We should have a more disciplined approach to feature flagging, even if it - just means that we stick them in a dict called MITX_FEATURES. + just means that we stick them in a dict called FEATURES. 3. We need to handle configuration for multiple courses. This could be as multiple sites, but we do need a way to map their data assets. """ @@ -36,7 +36,7 @@ ############################ FEATURE CONFIGURATION ############################# -MITX_FEATURES = { +FEATURES = { 'USE_DJANGO_PIPELINE': True, 'GITHUB_PUSH': False, diff --git a/cms/envs/dev.py b/cms/envs/dev.py index ddf1708c875f..6d47e65f23c4 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -76,7 +76,7 @@ } LMS_BASE = "localhost:8000" -MITX_FEATURES['PREVIEW_LMS_BASE'] = "localhost:8000" +FEATURES['PREVIEW_LMS_BASE'] = "localhost:8000" REPOS = { 'edx4edx': { @@ -178,10 +178,10 @@ DEBUG_TOOLBAR_MONGO_STACKTRACES = False # disable NPS survey in dev mode -MITX_FEATURES['STUDIO_NPS_SURVEY'] = False +FEATURES['STUDIO_NPS_SURVEY'] = False # Enable URL that shows information about the status of variuous services -MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True +FEATURES['ENABLE_SERVICE_STATUS'] = True ############################# SEGMENT-IO ################################## @@ -190,7 +190,7 @@ import os SEGMENT_IO_KEY = os.environ.get('SEGMENT_IO_KEY') if SEGMENT_IO_KEY: - MITX_FEATURES['SEGMENT_IO'] = True + FEATURES['SEGMENT_IO'] = True ##################################################################### diff --git a/cms/envs/dev_ike.py b/cms/envs/dev_ike.py index 6e67f78f3666..95ae33e32897 100644 --- a/cms/envs/dev_ike.py +++ b/cms/envs/dev_ike.py @@ -9,8 +9,8 @@ from .common import * from .dev import * -MITX_FEATURES['AUTH_USE_MIT_CERTIFICATES'] = True +FEATURES['AUTH_USE_MIT_CERTIFICATES'] = True -MITX_FEATURES['USE_DJANGO_PIPELINE'] = False # don't recompile scss +FEATURES['USE_DJANGO_PIPELINE'] = False # don't recompile scss SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') # django 1.4 for nginx ssl proxy diff --git a/cms/envs/dev_shared_preview.py b/cms/envs/dev_shared_preview.py index 119558ba0559..ec488a68bafc 100644 --- a/cms/envs/dev_shared_preview.py +++ b/cms/envs/dev_shared_preview.py @@ -9,4 +9,4 @@ from .dev import * -MITX_FEATURES['PREVIEW_LMS_BASE'] = "preview.localhost:8000" +FEATURES['PREVIEW_LMS_BASE'] = "preview.localhost:8000" diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index e25f092c9a84..fa41d5cef84a 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -24,7 +24,7 @@ ################################# LMS INTEGRATION ############################# LMS_BASE = "localhost:8000" -MITX_FEATURES['PREVIEW_LMS_BASE'] = "preview." + LMS_BASE +FEATURES['PREVIEW_LMS_BASE'] = "preview." + LMS_BASE ################################# CELERY ###################################### diff --git a/cms/envs/test.py b/cms/envs/test.py index ef7133e0bd60..5edea467d36f 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -109,7 +109,7 @@ } LMS_BASE = "localhost:8000" -MITX_FEATURES['PREVIEW_LMS_BASE'] = "preview" +FEATURES['PREVIEW_LMS_BASE'] = "preview" CACHES = { # This is the cache used for most things. Askbot will not work without a @@ -161,9 +161,9 @@ SEGMENT_IO_KEY = '***REMOVED***' # disable NPS survey in test mode -MITX_FEATURES['STUDIO_NPS_SURVEY'] = False +FEATURES['STUDIO_NPS_SURVEY'] = False -MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True +FEATURES['ENABLE_SERVICE_STATUS'] = True # This is to disable a test under the common directory that will not pass when run under CMS -MITX_FEATURES['DISABLE_PASSWORD_RESET_EMAIL_TEST'] = True +FEATURES['DISABLE_PASSWORD_RESET_EMAIL_TEST'] = True diff --git a/cms/templates/index.html b/cms/templates/index.html index 572f40a865b6..6d3627e254c5 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -45,8 +45,8 @@

${_("Page Actions")}

% if course_creator_status=='granted': ${_("New Course")} - % elif course_creator_status=='disallowed_for_this_site' and settings.MITX_FEATURES.get('STUDIO_REQUEST_EMAIL',''): - ${_("Email staff to create course")} + % elif course_creator_status=='disallowed_for_this_site' and settings.FEATURES.get('STUDIO_REQUEST_EMAIL',''): + ${_("Email staff to create course")} % endif @@ -290,10 +290,10 @@

${_('Need help?')}

- % if course_creator_status=='disallowed_for_this_site' and settings.MITX_FEATURES.get('STUDIO_REQUEST_EMAIL',''): + % if course_creator_status=='disallowed_for_this_site' and settings.FEATURES.get('STUDIO_REQUEST_EMAIL',''):

${_('Can I create courses in Studio?')}

-

${_('In order to create courses in Studio, you must')} ${_("contact edX staff to help you create a course")}

+

${_('In order to create courses in Studio, you must')} ${_("contact edX staff to help you create a course")}

% endif diff --git a/cms/templates/widgets/qualaroo.html b/cms/templates/widgets/qualaroo.html index 04d10e08d166..1081c22c08dd 100644 --- a/cms/templates/widgets/qualaroo.html +++ b/cms/templates/widgets/qualaroo.html @@ -1,4 +1,4 @@ -% if settings.MITX_FEATURES.get('STUDIO_NPS_SURVEY'): +% if settings.FEATURES.get('STUDIO_NPS_SURVEY'): - + % if not course: diff --git a/lms/templates/main_django.html b/lms/templates/main_django.html index a20d489d8bbd..9190ddab928f 100644 --- a/lms/templates/main_django.html +++ b/lms/templates/main_django.html @@ -25,7 +25,7 @@ - + diff --git a/lms/templates/mktg_iframe.html b/lms/templates/mktg_iframe.html index 338f49240cbe..ea1b00f1ad61 100644 --- a/lms/templates/mktg_iframe.html +++ b/lms/templates/mktg_iframe.html @@ -8,7 +8,7 @@ <%block name="title"> - + <%static:css group='style-vendor'/> diff --git a/lms/templates/stripped-main.html b/lms/templates/stripped-main.html index 28166dbd972f..f2e8545e968f 100644 --- a/lms/templates/stripped-main.html +++ b/lms/templates/stripped-main.html @@ -24,7 +24,7 @@ - + From fe31e6d0330e17434b5283a2f65d481aac5e1514 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Mon, 2 Dec 2013 14:28:00 -0500 Subject: [PATCH 5/8] Update logging.getLogger() calls to use edx instead of mitx --- common/djangoapps/external_auth/views.py | 2 +- common/djangoapps/student/models.py | 2 +- common/djangoapps/student/views.py | 2 +- common/lib/xmodule/xmodule/capa_module.py | 2 +- common/lib/xmodule/xmodule/combined_open_ended_module.py | 2 +- common/lib/xmodule/xmodule/conditional_module.py | 2 +- common/lib/xmodule/xmodule/graders.py | 2 +- common/lib/xmodule/xmodule/html_module.py | 2 +- common/lib/xmodule/xmodule/modulestore/__init__.py | 2 +- .../open_ended_grading_classes/combined_open_ended_modulev1.py | 2 +- .../xmodule/open_ended_grading_classes/open_ended_module.py | 2 +- .../xmodule/open_ended_grading_classes/openendedchild.py | 3 +-- .../open_ended_grading_classes/self_assessment_module.py | 2 +- common/lib/xmodule/xmodule/randomize_module.py | 2 +- lms/djangoapps/courseware/grades.py | 2 +- lms/djangoapps/courseware/views.py | 2 +- lms/djangoapps/licenses/models.py | 2 +- lms/djangoapps/licenses/views.py | 2 +- lms/djangoapps/lms_migration/migrate.py | 2 +- lms/djangoapps/psychometrics/psychoanalyze.py | 2 +- 20 files changed, 20 insertions(+), 21 deletions(-) diff --git a/common/djangoapps/external_auth/views.py b/common/djangoapps/external_auth/views.py index 9679d09f1763..b0ca7b1a8885 100644 --- a/common/djangoapps/external_auth/views.py +++ b/common/djangoapps/external_auth/views.py @@ -50,7 +50,7 @@ from xmodule.modulestore import Location from xmodule.modulestore.exceptions import ItemNotFoundError -log = logging.getLogger("mitx.external_auth") +log = logging.getLogger("edx.external_auth") AUDIT_LOG = logging.getLogger("audit") SHIBBOLETH_DOMAIN_PREFIX = 'shib:' diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 1ed6126e9b69..734b3a1ec460 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -702,7 +702,7 @@ def update_user_information(sender, instance, created, **kwargs): cc_user = cc.User.from_django_user(instance) cc_user.save() except Exception as e: - log = logging.getLogger("mitx.discussion") + log = logging.getLogger("edx.discussion") log.error(unicode(e)) log.error("update user info to discussion failed for user with id: " + str(instance.id)) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 96ccba46e688..878630272a8e 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -72,7 +72,7 @@ from util.json_request import JsonResponse -log = logging.getLogger("mitx.student") +log = logging.getLogger("edx.student") AUDIT_LOG = logging.getLogger("audit") Article = namedtuple('Article', 'title url author image deck publication publish_date') diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index cf6c2e3dce17..b78e2a4a5019 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -24,7 +24,7 @@ from django.utils.timezone import UTC from django.utils.translation import ugettext as _ -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") # Generate this many different variants of problems with rerandomize=per_student diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 68a0d65617c1..c9b6d562fd33 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -11,7 +11,7 @@ from .fields import Date, Timedelta import textwrap -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") V1_SETTINGS_ATTRIBUTES = [ "display_name", diff --git a/common/lib/xmodule/xmodule/conditional_module.py b/common/lib/xmodule/xmodule/conditional_module.py index b7a48fb82a19..824834337183 100644 --- a/common/lib/xmodule/xmodule/conditional_module.py +++ b/common/lib/xmodule/xmodule/conditional_module.py @@ -15,7 +15,7 @@ from xmodule.modulestore.exceptions import ItemNotFoundError -log = logging.getLogger('mitx.' + __name__) +log = logging.getLogger('edx.' + __name__) class ConditionalFields(object): diff --git a/common/lib/xmodule/xmodule/graders.py b/common/lib/xmodule/xmodule/graders.py index 10ef86ebdc0c..d51e1414c34a 100644 --- a/common/lib/xmodule/xmodule/graders.py +++ b/common/lib/xmodule/xmodule/graders.py @@ -6,7 +6,7 @@ from collections import namedtuple -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") # This is a tuple for holding scores, either from problems or sections. # Section either indicates the name of the problem or the name of the section diff --git a/common/lib/xmodule/xmodule/html_module.py b/common/lib/xmodule/xmodule/html_module.py index 25cebe8e420f..73b5baf2d6c6 100644 --- a/common/lib/xmodule/xmodule/html_module.py +++ b/common/lib/xmodule/xmodule/html_module.py @@ -16,7 +16,7 @@ import textwrap from xmodule.contentstore.content import StaticContent -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") class HtmlFields(object): diff --git a/common/lib/xmodule/xmodule/modulestore/__init__.py b/common/lib/xmodule/xmodule/modulestore/__init__.py index 7ed33e567316..ebec6d6ee8b4 100644 --- a/common/lib/xmodule/xmodule/modulestore/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/__init__.py @@ -13,7 +13,7 @@ from .exceptions import InvalidLocationError, InsufficientSpecificationError from xmodule.errortracker import make_error_tracker -log = logging.getLogger('mitx.' + 'modulestore') +log = logging.getLogger('edx.modulestore') SPLIT_MONGO_MODULESTORE_TYPE = 'split' MONGO_MODULESTORE_TYPE = 'mongo' diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py index 72915eb7b36f..2c02833baa5a 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py @@ -13,7 +13,7 @@ from xmodule.open_ended_grading_classes.peer_grading_service import PeerGradingService, MockPeerGradingService, GradingServiceError from xmodule.open_ended_grading_classes.openendedchild import OpenEndedChild -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") # Set the default number of max attempts. Should be 1 for production # Set higher for debugging/testing diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py index d020987fdf6c..680ed031d123 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/open_ended_module.py @@ -23,7 +23,7 @@ from .combined_open_ended_rubric import CombinedOpenEndedRubric -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") class OpenEndedModule(openendedchild.OpenEndedChild): diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py index 6b98744ccd42..2d6ba8411832 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py @@ -11,11 +11,10 @@ from datetime import datetime from pytz import UTC -import requests from boto.s3.connection import S3Connection from boto.s3.key import Key -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") # Set the default number of max attempts. Should be 1 for production # Set higher for debugging/testing diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py index 45295fd09f77..cb9d1e72c5f0 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py @@ -9,7 +9,7 @@ from .combined_open_ended_rubric import CombinedOpenEndedRubric -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") class SelfAssessmentModule(openendedchild.OpenEndedChild): diff --git a/common/lib/xmodule/xmodule/randomize_module.py b/common/lib/xmodule/xmodule/randomize_module.py index 71d23012d1a4..56b7c079aafb 100644 --- a/common/lib/xmodule/xmodule/randomize_module.py +++ b/common/lib/xmodule/xmodule/randomize_module.py @@ -9,7 +9,7 @@ from xblock.fields import Scope, Integer from xblock.fragment import Fragment -log = logging.getLogger('mitx.' + __name__) +log = logging.getLogger('edx.' + __name__) class RandomizeFields(object): diff --git a/lms/djangoapps/courseware/grades.py b/lms/djangoapps/courseware/grades.py index f17a3486d537..49b67ecc40ac 100644 --- a/lms/djangoapps/courseware/grades.py +++ b/lms/djangoapps/courseware/grades.py @@ -22,7 +22,7 @@ from .models import StudentModule from .module_render import get_module, get_module_for_descriptor -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") def yield_module_descendents(module): diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index db555891c585..4d3e651a95c8 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -38,7 +38,7 @@ from xmodule.course_module import CourseDescriptor import shoppingcart -log = logging.getLogger("mitx.courseware") +log = logging.getLogger("edx.courseware") template_imports = {'urllib': urllib} diff --git a/lms/djangoapps/licenses/models.py b/lms/djangoapps/licenses/models.py index db24126a8e25..f91048d269e2 100644 --- a/lms/djangoapps/licenses/models.py +++ b/lms/djangoapps/licenses/models.py @@ -4,7 +4,7 @@ from student.models import User -log = logging.getLogger("mitx.licenses") +log = logging.getLogger("edx.licenses") class CourseSoftware(models.Model): diff --git a/lms/djangoapps/licenses/views.py b/lms/djangoapps/licenses/views.py index 42ecb9ecf19c..657d6cd0c7ee 100644 --- a/lms/djangoapps/licenses/views.py +++ b/lms/djangoapps/licenses/views.py @@ -16,7 +16,7 @@ from licenses.models import get_courses_licenses, get_or_create_license, get_license -log = logging.getLogger("mitx.licenses") +log = logging.getLogger("edx.licenses") License = namedtuple('License', 'software serial') diff --git a/lms/djangoapps/lms_migration/migrate.py b/lms/djangoapps/lms_migration/migrate.py index 18d9a5101747..d00030bd43c8 100644 --- a/lms/djangoapps/lms_migration/migrate.py +++ b/lms/djangoapps/lms_migration/migrate.py @@ -17,7 +17,7 @@ except ImportError: from django.contrib.csrf.middleware import csrf_exempt -log = logging.getLogger("mitx.lms_migrate") +log = logging.getLogger("edx.lms_migrate") LOCAL_DEBUG = True ALLOWED_IPS = settings.LMS_MIGRATION_ALLOWED_IPS diff --git a/lms/djangoapps/psychometrics/psychoanalyze.py b/lms/djangoapps/psychometrics/psychoanalyze.py index c6e66445a48d..dac10e0b070c 100644 --- a/lms/djangoapps/psychometrics/psychoanalyze.py +++ b/lms/djangoapps/psychometrics/psychoanalyze.py @@ -18,7 +18,7 @@ from courseware.models import StudentModule from pytz import UTC -log = logging.getLogger("mitx.psychometrics") +log = logging.getLogger("edx.psychometrics") #db = "ocwtutor" # for debugging #db = "default" From 2cbf1a45e08a028fd0bb35b8b384a3855fa2c07a Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Mon, 2 Dec 2013 14:30:11 -0500 Subject: [PATCH 6/8] update npm package name to edx --- package.json | 2 +- rakelib/deploy.rake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2213d41f8d3f..31876d5a321a 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "mitx", + "name": "edx", "version": "0.1.0", "dependencies": { "coffee-script": "1.6.X" diff --git a/rakelib/deploy.rake b/rakelib/deploy.rake index 1d0a1b2c4f71..53b457417127 100644 --- a/rakelib/deploy.rake +++ b/rakelib/deploy.rake @@ -1,7 +1,7 @@ # Packaging constants COMMIT = (ENV["GIT_COMMIT"] || `git rev-parse HEAD`).chomp()[0, 10] -PACKAGE_NAME = "mitx" +PACKAGE_NAME = "edx" BRANCH = (ENV["GIT_BRANCH"] || `git symbolic-ref -q HEAD`).chomp().gsub('refs/heads/', '').gsub('origin/', '') desc "Build a properties file used to trigger autodeploy builds" @@ -12,4 +12,4 @@ task :autodeploy_properties do file.puts("UPSTREAM_JOB=#{PACKAGE_NAME}") file.puts("UPSTREAM_REVISION=#{COMMIT}") end -end \ No newline at end of file +end From a114c24f1ab3853970ecf7fea55276ca0596c706 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Mon, 2 Dec 2013 14:50:45 -0500 Subject: [PATCH 7/8] Updated test strings to refer to edX instead of MITx --- cms/djangoapps/auth/tests/test_authz.py | 6 ++-- .../contentstore/features/common.py | 4 +-- .../contentstore/features/course-settings.py | 4 +-- .../features/course-updates.feature | 12 +++---- .../contentstore/features/signup.feature | 6 ++-- .../contentstore/features/textbooks.feature | 4 +-- .../contentstore/features/upload.py | 2 +- .../contentstore/tests/test_checklists.py | 8 ++--- .../contentstore/tests/test_contentstore.py | 36 +++++++++---------- .../contentstore/tests/test_core_caching.py | 4 +-- .../contentstore/tests/test_i18n.py | 2 +- .../contentstore/tests/test_import_export.py | 4 +-- .../contentstore/tests/test_transcripts.py | 2 +- .../tests/test_transcripts_utils.py | 4 +-- .../contentstore/tests/test_utils.py | 16 ++++----- cms/djangoapps/contentstore/tests/utils.py | 2 +- .../course_modes/tests/factories.py | 2 +- .../external_auth/tests/test_shib.py | 24 ++++++------- common/djangoapps/student/tests/tests.py | 2 +- .../combinedopenended/display_spec.coffee | 2 +- .../xmodule/modulestore/tests/factories.py | 4 +-- .../modulestore/tests/test_location.py | 6 ++-- .../tests/test_mixed_modulestore.py | 2 +- .../tests/test_split_modulestore.py | 2 +- .../controller_query_service.py | 4 +-- .../lib/xmodule/xmodule/tests/test_content.py | 8 ++--- .../spec/discussion/content_spec.coffee | 6 ++-- .../view/discussion_content_view_spec.coffee | 4 +-- .../response_comment_show_view_spec.coffee | 2 +- common/test/data/conditional_and_poll/README | 6 ++-- .../courseware/features/courseware.py | 2 +- .../courseware/features/courseware_common.py | 2 +- .../courseware/features/openended.py | 8 ++--- lms/djangoapps/courseware/tests/factories.py | 2 +- .../courseware/tests/test_courses.py | 12 +++---- .../django_comment_client/base/tests.py | 30 ++++++++-------- .../django_comment_client/forum/tests.py | 2 +- lms/djangoapps/instructor/tests/test_api.py | 12 +++---- .../tests/test_legacy_enrollment.py | 6 ++-- .../instructor_task/tests/factories.py | 2 +- .../staff_grading_service.py | 4 +-- .../shoppingcart/tests/test_models.py | 6 ++-- .../shoppingcart/tests/test_views.py | 4 +-- .../verify_student/tests/test_views.py | 4 +-- .../src/staff_grading/staff_grading.coffee | 10 +++--- 45 files changed, 148 insertions(+), 148 deletions(-) diff --git a/cms/djangoapps/auth/tests/test_authz.py b/cms/djangoapps/auth/tests/test_authz.py index 6bbb8d0a4191..543c8ba446ec 100644 --- a/cms/djangoapps/auth/tests/test_authz.py +++ b/cms/djangoapps/auth/tests/test_authz.py @@ -129,7 +129,7 @@ def setUp(self): """ Test case setup """ self.creator = User.objects.create_user('testcreator', 'testcreator+courses@edx.org', 'foo') self.staff = User.objects.create_user('teststaff', 'teststaff+courses@edx.org', 'foo') - self.location = 'i4x', 'mitX', '101', 'course', 'test' + self.location = 'i4x', 'edX', '101', 'course', 'test' def test_add_user_to_course_group(self): """ @@ -181,7 +181,7 @@ def test_get_staff(self): create_all_course_groups(self.creator, self.location) add_user_to_course_group(self.creator, self.staff, self.location, STAFF_ROLE_NAME) - location2 = 'i4x', 'mitX', '103', 'course', 'test2' + location2 = 'i4x', 'edX', '103', 'course', 'test2' staff2 = User.objects.create_user('teststaff2', 'teststaff2+courses@edx.org', 'foo') create_all_course_groups(self.creator, location2) add_user_to_course_group(self.creator, staff2, location2, STAFF_ROLE_NAME) @@ -193,7 +193,7 @@ def test_get_instructor(self): create_all_course_groups(self.creator, self.location) add_user_to_course_group(self.creator, self.staff, self.location, STAFF_ROLE_NAME) - location2 = 'i4x', 'mitX', '103', 'course', 'test2' + location2 = 'i4x', 'edX', '103', 'course', 'test2' creator2 = User.objects.create_user('testcreator2', 'testcreator2+courses@edx.org', 'foo') staff2 = User.objects.create_user('teststaff2', 'teststaff2+courses@edx.org', 'foo') create_all_course_groups(creator2, location2) diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index 4a500c9e1680..583c871521d1 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -132,7 +132,7 @@ def create_studio_user( def fill_in_course_info( name='Robot Super Course', - org='MITx', + org='edX', num='101', run='2013_Spring'): world.css_fill('.new-course-name', name) @@ -166,7 +166,7 @@ def add_course_author(user, course): def create_a_course(): - course = world.CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + course = world.CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') world.scenario_dict['COURSE'] = course user = world.scenario_dict.get("USER") diff --git a/cms/djangoapps/contentstore/features/course-settings.py b/cms/djangoapps/contentstore/features/course-settings.py index 5864539ddd40..49f3a69b33a1 100644 --- a/cms/djangoapps/contentstore/features/course-settings.py +++ b/cms/djangoapps/contentstore/features/course-settings.py @@ -150,7 +150,7 @@ def i_see_new_course_image(_step): images = world.css_find(img_css) assert len(images) == 1 img = images[0] - expected_src = '/c4x/MITx/999/asset/image.jpg' + expected_src = '/c4x/edX/999/asset/image.jpg' # Don't worry about the domain in the URL success_func = lambda _: img['src'].endswith(expected_src) @@ -160,7 +160,7 @@ def i_see_new_course_image(_step): @step('the image URL should be present in the field') def image_url_present(_step): field_css = '#course-image-url' - expected_value = '/c4x/MITx/999/asset/image.jpg' + expected_value = '/c4x/edX/999/asset/image.jpg' assert world.css_value(field_css) == expected_value diff --git a/cms/djangoapps/contentstore/features/course-updates.feature b/cms/djangoapps/contentstore/features/course-updates.feature index 152da9c3499f..e538dba4e143 100644 --- a/cms/djangoapps/contentstore/features/course-updates.feature +++ b/cms/djangoapps/contentstore/features/course-updates.feature @@ -60,22 +60,22 @@ Feature: CMS.Course updates And I go to the course updates page When I add a new update with the text "" # Can only do partial text matches because of the quotes with in quotes (and regexp step matching). - Then I should see the update "/c4x/MITx/999/asset/my_img.jpg" + Then I should see the update "/c4x/edX/999/asset/my_img.jpg" And I change the update from "/static/my_img.jpg" to "" - Then I should see the update "/c4x/MITx/999/asset/modified.jpg" + Then I should see the update "/c4x/edX/999/asset/modified.jpg" And when I reload the page - Then I should see the update "/c4x/MITx/999/asset/modified.jpg" + Then I should see the update "/c4x/edX/999/asset/modified.jpg" Scenario: Static links are rewritten when previewing handouts Given I have opened a new course in Studio And I go to the course updates page When I modify the handout to "
" # Can only do partial text matches because of the quotes with in quotes (and regexp step matching). - Then I see the handout "/c4x/MITx/999/asset/my_img.jpg" + Then I see the handout "/c4x/edX/999/asset/my_img.jpg" And I change the handout from "/static/my_img.jpg" to "" - Then I see the handout "/c4x/MITx/999/asset/modified.jpg" + Then I see the handout "/c4x/edX/999/asset/modified.jpg" And when I reload the page - Then I see the handout "/c4x/MITx/999/asset/modified.jpg" + Then I see the handout "/c4x/edX/999/asset/modified.jpg" Scenario: Users cannot save handouts with bad html until edit or update it properly Given I have opened a new course in Studio diff --git a/cms/djangoapps/contentstore/features/signup.feature b/cms/djangoapps/contentstore/features/signup.feature index d8912c3f6101..a5d787e78ff9 100644 --- a/cms/djangoapps/contentstore/features/signup.feature +++ b/cms/djangoapps/contentstore/features/signup.feature @@ -14,11 +14,11 @@ Feature: CMS.Sign in Scenario: Login with a valid redirect Given I have opened a new course in Studio And I am not logged in - And I visit the url "/course/MITx.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" - And I should see that the path is "/signin?next=/course/MITx.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" + And I visit the url "/course/edX.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" + And I should see that the path is "/signin?next=/course/edX.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" When I fill in and submit the signin form And I wait for "2" seconds - Then I should see that the path is "/course/MITx.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" + Then I should see that the path is "/course/edX.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course" Scenario: Login with an invalid redirect Given I have opened a new course in Studio diff --git a/cms/djangoapps/contentstore/features/textbooks.feature b/cms/djangoapps/contentstore/features/textbooks.feature index 010e4902569c..23c9209aba33 100644 --- a/cms/djangoapps/contentstore/features/textbooks.feature +++ b/cms/djangoapps/contentstore/features/textbooks.feature @@ -19,9 +19,9 @@ Feature: CMS.Textbooks And I upload the textbook "textbook.pdf" And I wait for "2" seconds And I save the textbook - Then I should see a textbook named "Economics" with a chapter path containing "/c4x/MITx/999/asset/textbook.pdf" + Then I should see a textbook named "Economics" with a chapter path containing "/c4x/edX/999/asset/textbook.pdf" And I reload the page - Then I should see a textbook named "Economics" with a chapter path containing "/c4x/MITx/999/asset/textbook.pdf" + Then I should see a textbook named "Economics" with a chapter path containing "/c4x/edX/999/asset/textbook.pdf" Scenario: Create a textbook with multiple chapters Given I have opened a new course in Studio diff --git a/cms/djangoapps/contentstore/features/upload.py b/cms/djangoapps/contentstore/features/upload.py index c68636b58302..703a0f9ade87 100644 --- a/cms/djangoapps/contentstore/features/upload.py +++ b/cms/djangoapps/contentstore/features/upload.py @@ -178,7 +178,7 @@ def open_course_with_locked(step, lock_state): @step(u'Then the asset is (viewable|protected)$') def view_asset(_step, status): - url = django_url('/c4x/MITx/999/asset/asset.html') + url = django_url('/c4x/edX/999/asset/asset.html') if status == 'viewable': expected_text = 'test file' else: diff --git a/cms/djangoapps/contentstore/tests/test_checklists.py b/cms/djangoapps/contentstore/tests/test_checklists.py index 864fe23c8333..8eb8adb016e5 100644 --- a/cms/djangoapps/contentstore/tests/test_checklists.py +++ b/cms/djangoapps/contentstore/tests/test_checklists.py @@ -14,7 +14,7 @@ class ChecklistTestCase(CourseTestCase): def setUp(self): """ Creates the test course. """ super(ChecklistTestCase, self).setUp() - self.course = CourseFactory.create(org='mitX', number='333', display_name='Checklists Course') + self.course = CourseFactory.create(org='edX', number='333', display_name='Checklists Course') self.location = loc_mapper().translate_location(self.course.location.course_id, self.course.location, False, True) self.checklists_url = self.location.url_reverse('checklists/', '') @@ -42,7 +42,7 @@ def test_get_checklists(self): response = self.client.get(self.checklists_url) self.assertContains(response, "Getting Started With Studio") # Verify expansion of action URL happened. - self.assertContains(response, 'course_team/mitX.333.Checklists_Course') + self.assertContains(response, 'course_team/edX.333.Checklists_Course') # Verify persisted checklist does NOT have expanded URL. checklist_0 = self.get_persisted_checklists()[0] self.assertEqual('ManageUsers', get_action_url(checklist_0, 0)) @@ -137,8 +137,8 @@ def test_expansion(checklist, index, stored, expanded): # Verify no side effect in the original list. self.assertEqual(get_action_url(checklist, index), stored) - test_expansion(self.course.checklists[0], 0, 'ManageUsers', '/course_team/mitX.333.Checklists_Course/branch/draft/block/Checklists_Course') - test_expansion(self.course.checklists[1], 1, 'CourseOutline', '/course/mitX.333.Checklists_Course/branch/draft/block/Checklists_Course') + test_expansion(self.course.checklists[0], 0, 'ManageUsers', '/course_team/edX.333.Checklists_Course/branch/draft/block/Checklists_Course') + test_expansion(self.course.checklists[1], 1, 'CourseOutline', '/course/edX.333.Checklists_Course/branch/draft/block/Checklists_Course') test_expansion(self.course.checklists[2], 0, 'http://help.edge.edx.org/', 'http://help.edge.edx.org/') diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index 62c4d6b14528..38c8effcbdbb 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -447,7 +447,7 @@ def tab_matches(tab): def _get_tab_locator(self, course, tab): """ Returns the locator for a given tab. """ - tab_location = 'i4x://MITx/999/static_tab/{0}'.format(tab['url_slug']) + tab_location = 'i4x://edX/999/static_tab/{0}'.format(tab['url_slug']) return loc_mapper().translate_location( course.location.course_id, Location(tab_location), False, True ) @@ -724,7 +724,7 @@ def test_empty_trashcan(self): def test_clone_course(self): course_data = { - 'org': 'MITx', + 'org': 'edX', 'number': '999', 'display_name': 'Robot Super Course', 'run': '2013_Spring' @@ -735,7 +735,7 @@ def test_clone_course(self): import_from_xml(module_store, 'common/test/data/', ['toy']) source_course_id = 'edX/toy/2012_Fall' - dest_course_id = 'MITx/999/2013_Spring' + dest_course_id = 'edX/999/2013_Spring' source_location = CourseDescriptor.id_to_location(source_course_id) dest_location = CourseDescriptor.id_to_location(dest_course_id) @@ -807,7 +807,7 @@ def test_clone_course(self): def test_portable_link_rewrites_during_clone_course(self): course_data = { - 'org': 'MITx', + 'org': 'edX', 'number': '999', 'display_name': 'Robot Super Course', 'run': '2013_Spring' @@ -819,7 +819,7 @@ def test_portable_link_rewrites_during_clone_course(self): import_from_xml(module_store, 'common/test/data/', ['toy']) source_course_id = 'edX/toy/2012_Fall' - dest_course_id = 'MITx/999/2013_Spring' + dest_course_id = 'edX/999/2013_Spring' source_location = CourseDescriptor.id_to_location(source_course_id) dest_location = CourseDescriptor.id_to_location(dest_course_id) @@ -854,9 +854,9 @@ def test_illegal_draft_crud_ops(self): draft_store = modulestore('draft') direct_store = modulestore('direct') - CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') - location = Location('i4x://MITx/999/chapter/neuvo') + location = Location('i4x://edX/999/chapter/neuvo') # Ensure draft mongo store does not allow us to create chapters either directly or via convert to draft self.assertRaises(InvalidVersionError, draft_store.create_and_save_xmodule, location) direct_store.create_and_save_xmodule(location) @@ -866,7 +866,7 @@ def test_illegal_draft_crud_ops(self): # taking advantage of update_children and other functions never checking that the ids are valid self.assertRaises(InvalidVersionError, draft_store.update_children, location, - ['i4x://MITx/999/problem/doesntexist']) + ['i4x://edX/999/problem/doesntexist']) self.assertRaises(InvalidVersionError, draft_store.update_metadata, location, {'due': datetime.datetime.now(UTC)}) @@ -906,7 +906,7 @@ def test_delete_course(self): import_from_xml(module_store, 'common/test/data/', ['toy'], static_content_store=content_store) - location = CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course').location + location = CourseFactory.create(org='edX', course='999', display_name='Robot Super Course').location # get a vertical (and components in it) to put into 'draft' vertical = module_store.get_item(Location(['i4x', 'edX', 'toy', @@ -1389,7 +1389,7 @@ def setUp(self): self.client.login(username=uname, password=password) self.course_data = { - 'org': 'MITx', + 'org': 'edX', 'number': '999', 'display_name': 'Robot Super Course', 'run': '2013_Spring' @@ -1578,13 +1578,13 @@ def test_course_index_view_with_course(self): def test_course_overview_view_with_course(self): """Test viewing the course overview page with an existing course""" - CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') - loc = Location(['i4x', 'MITx', '999', 'course', Location.clean('Robot Super Course'), None]) + loc = Location(['i4x', 'edX', '999', 'course', Location.clean('Robot Super Course'), None]) resp = self._show_course_overview(loc) self.assertContains( resp, - '
', + '
', status_code=200, html=True ) @@ -1606,7 +1606,7 @@ def test_create_item(self): data = parse_json(resp) self.assertRegexpMatches( data['locator'], - r"^MITx.999.Robot_Super_Course/branch/draft/block/chapter([0-9]|[a-f]){3}$" + r"^edX.999.Robot_Super_Course/branch/draft/block/chapter([0-9]|[a-f]){3}$" ) def test_capa_module(self): @@ -1707,7 +1707,7 @@ def delete_item(category, name): def test_import_into_new_course_id(self): module_store = modulestore('direct') - target_location = Location(['i4x', 'MITx', '999', 'course', '2013_Spring']) + target_location = Location(['i4x', 'edX', '999', 'course', '2013_Spring']) course_data = { 'org': target_location.org, @@ -1738,8 +1738,8 @@ def test_import_into_new_course_id(self): self.assertEquals(len(course_module.pdf_textbooks), 1) self.assertEquals(len(course_module.pdf_textbooks[0]["chapters"]), 2) - self.assertEquals(course_module.pdf_textbooks[0]["chapters"][0]["url"], '/c4x/MITx/999/asset/Chapter1.pdf') - self.assertEquals(course_module.pdf_textbooks[0]["chapters"][1]["url"], '/c4x/MITx/999/asset/Chapter2.pdf') + self.assertEquals(course_module.pdf_textbooks[0]["chapters"][0]["url"], '/c4x/edX/999/asset/Chapter1.pdf') + self.assertEquals(course_module.pdf_textbooks[0]["chapters"][1]["url"], '/c4x/edX/999/asset/Chapter2.pdf') # check that URL slug got updated to new course slug self.assertEquals(course_module.wiki_slug, '999') @@ -2004,7 +2004,7 @@ def _course_factory_create_course(): """ Creates a course via the CourseFactory and returns the locator for it. """ - course = CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + course = CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') return loc_mapper().translate_location(course.location.course_id, course.location, False, True) diff --git a/cms/djangoapps/contentstore/tests/test_core_caching.py b/cms/djangoapps/contentstore/tests/test_core_caching.py index 34ed24699d04..abe7c69e1657 100644 --- a/cms/djangoapps/contentstore/tests/test_core_caching.py +++ b/cms/djangoapps/contentstore/tests/test_core_caching.py @@ -15,9 +15,9 @@ def get_id(self): class CachingTestCase(TestCase): # Tests for https://edx.lighthouseapp.com/projects/102637/tickets/112-updating-asset-does-not-refresh-the-cached-copy - unicodeLocation = Location(u'c4x', u'mitX', u'800', u'thumbnail', u'monsters.jpg') + unicodeLocation = Location(u'c4x', u'edX', u'800', u'thumbnail', u'monsters.jpg') # Note that some of the parts are strings instead of unicode strings - nonUnicodeLocation = Location('c4x', u'mitX', u'800', 'thumbnail', 'monsters.jpg') + nonUnicodeLocation = Location('c4x', u'edX', u'800', 'thumbnail', 'monsters.jpg') mockAsset = Content(unicodeLocation, 'my content') def test_put_and_get(self): diff --git a/cms/djangoapps/contentstore/tests/test_i18n.py b/cms/djangoapps/contentstore/tests/test_i18n.py index c7e32a868945..099fc004c0ba 100644 --- a/cms/djangoapps/contentstore/tests/test_i18n.py +++ b/cms/djangoapps/contentstore/tests/test_i18n.py @@ -37,7 +37,7 @@ def setUp(self): self.user.save() self.course_data = { - 'org': 'MITx', + 'org': 'edX', 'number': '999', 'display_name': 'Robot Super Course', } diff --git a/cms/djangoapps/contentstore/tests/test_import_export.py b/cms/djangoapps/contentstore/tests/test_import_export.py index 85df894cd414..95da85e07484 100644 --- a/cms/djangoapps/contentstore/tests/test_import_export.py +++ b/cms/djangoapps/contentstore/tests/test_import_export.py @@ -252,7 +252,7 @@ def test_export_failure_top_level(self): Export failure. """ ItemFactory.create(parent_location=self.course.location, category='aawefawef') - self._verify_export_failure('/course/MITx.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course') + self._verify_export_failure('/course/edX.999.Robot_Super_Course/branch/draft/block/Robot_Super_Course') def test_export_failure_subsection_level(self): """ @@ -263,7 +263,7 @@ def test_export_failure_subsection_level(self): parent_location=vertical.location, category='aawefawef' ) - self._verify_export_failure(u'/unit/MITx.999.Robot_Super_Course/branch/draft/block/foo') + self._verify_export_failure(u'/unit/edX.999.Robot_Super_Course/branch/draft/block/foo') def _verify_export_failure(self, expectedText): """ Export failure helper method. """ diff --git a/cms/djangoapps/contentstore/tests/test_transcripts.py b/cms/djangoapps/contentstore/tests/test_transcripts.py index 4c481383ab5f..2d263c9fe447 100644 --- a/cms/djangoapps/contentstore/tests/test_transcripts.py +++ b/cms/djangoapps/contentstore/tests/test_transcripts.py @@ -31,7 +31,7 @@ class Basetranscripts(CourseTestCase): """Base test class for transcripts tests.""" - org = 'MITx' + org = 'edX' number = '999' def clear_subs_content(self): diff --git a/cms/djangoapps/contentstore/tests/test_transcripts_utils.py b/cms/djangoapps/contentstore/tests/test_transcripts_utils.py index 515fccd675b7..d2cba6d54fb3 100644 --- a/cms/djangoapps/contentstore/tests/test_transcripts_utils.py +++ b/cms/djangoapps/contentstore/tests/test_transcripts_utils.py @@ -77,7 +77,7 @@ def test_generate_subs_decrease_speed_2(self): class TestSaveSubsToStore(ModuleStoreTestCase): """Tests for `save_subs_to_store` function.""" - org = 'MITx' + org = 'edX' number = '999' display_name = 'Test course' @@ -161,7 +161,7 @@ def tearDown(self): class TestDownloadYoutubeSubs(ModuleStoreTestCase): """Tests for `download_youtube_subs` function.""" - org = 'MITx' + org = 'edX' number = '999' display_name = 'Test course' diff --git a/cms/djangoapps/contentstore/tests/test_utils.py b/cms/djangoapps/contentstore/tests/test_utils.py index 928e3b41a6ea..4f47a06bc87a 100644 --- a/cms/djangoapps/contentstore/tests/test_utils.py +++ b/cms/djangoapps/contentstore/tests/test_utils.py @@ -64,27 +64,27 @@ def about_page_no_lms_base_test(self): def get_about_page_link(self): """ create mock course and return the about page link """ - location = 'i4x', 'mitX', '101', 'course', 'test' + location = 'i4x', 'edX', '101', 'course', 'test' return utils.get_lms_link_for_about_page(location) def lms_link_test(self): """ Tests get_lms_link_for_item. """ - location = 'i4x', 'mitX', '101', 'vertical', 'contacting_us' - link = utils.get_lms_link_for_item(location, False, "mitX/101/test") - self.assertEquals(link, "//localhost:8000/courses/mitX/101/test/jump_to/i4x://mitX/101/vertical/contacting_us") - link = utils.get_lms_link_for_item(location, True, "mitX/101/test") + location = 'i4x', 'edX', '101', 'vertical', 'contacting_us' + link = utils.get_lms_link_for_item(location, False, "edX/101/test") + self.assertEquals(link, "//localhost:8000/courses/edX/101/test/jump_to/i4x://edX/101/vertical/contacting_us") + link = utils.get_lms_link_for_item(location, True, "edX/101/test") self.assertEquals( link, - "//preview/courses/mitX/101/test/jump_to/i4x://mitX/101/vertical/contacting_us" + "//preview/courses/edX/101/test/jump_to/i4x://edX/101/vertical/contacting_us" ) # If no course_id is passed in, it is obtained from the location. This is the case for # Studio dashboard. - location = 'i4x', 'mitX', '101', 'course', 'test' + location = 'i4x', 'edX', '101', 'course', 'test' link = utils.get_lms_link_for_item(location) self.assertEquals( link, - "//localhost:8000/courses/mitX/101/test/jump_to/i4x://mitX/101/course/test" + "//localhost:8000/courses/edX/101/test/jump_to/i4x://edX/101/course/test" ) diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index 0e716cc878bb..7e72e6f7d997 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -85,7 +85,7 @@ def setUp(self): self.client.login(username=uname, password=password) self.course = CourseFactory.create( - org='MITx', + org='edX', number='999', display_name='Robot Super Course', ) diff --git a/common/djangoapps/course_modes/tests/factories.py b/common/djangoapps/course_modes/tests/factories.py index 945858fb1f2d..7494faa02517 100644 --- a/common/djangoapps/course_modes/tests/factories.py +++ b/common/djangoapps/course_modes/tests/factories.py @@ -6,7 +6,7 @@ class CourseModeFactory(DjangoModelFactory): FACTORY_FOR = CourseMode - course_id = u'MITx/999/Robot_Super_Course' + course_id = u'edX/999/Robot_Super_Course' mode_slug = 'audit' mode_display_name = 'audit course' min_price = 0 diff --git a/common/djangoapps/external_auth/tests/test_shib.py b/common/djangoapps/external_auth/tests/test_shib.py index fdcf940449e0..ecaac0395a6f 100644 --- a/common/djangoapps/external_auth/tests/test_shib.py +++ b/common/djangoapps/external_auth/tests/test_shib.py @@ -324,7 +324,7 @@ def test_course_specific_login_and_reg(self): """ Tests that the correct course specific login and registration urls work for shib """ - course = CourseFactory.create(org='MITx', number='999', display_name='Robot Super Course') + course = CourseFactory.create(org='edX', number='999', display_name='Robot Super Course') # Test for cases where course is found for domain in ["", "shib:https://idp.stanford.edu/"]: @@ -335,37 +335,37 @@ def test_course_specific_login_and_reg(self): self.store.update_metadata(course.location.url(), metadata) # setting location to test that GET params get passed through - login_request = self.request_factory.get('/course_specific_login/MITx/999/Robot_Super_Course' + - '?course_id=MITx/999/Robot_Super_Course' + + login_request = self.request_factory.get('/course_specific_login/edX/999/Robot_Super_Course' + + '?course_id=edX/999/Robot_Super_Course' + '&enrollment_action=enroll') - _reg_request = self.request_factory.get('/course_specific_register/MITx/999/Robot_Super_Course' + - '?course_id=MITx/999/course/Robot_Super_Course' + + _reg_request = self.request_factory.get('/course_specific_register/edX/999/Robot_Super_Course' + + '?course_id=edX/999/course/Robot_Super_Course' + '&enrollment_action=enroll') - login_response = course_specific_login(login_request, 'MITx/999/Robot_Super_Course') - reg_response = course_specific_register(login_request, 'MITx/999/Robot_Super_Course') + login_response = course_specific_login(login_request, 'edX/999/Robot_Super_Course') + reg_response = course_specific_register(login_request, 'edX/999/Robot_Super_Course') if "shib" in domain: self.assertIsInstance(login_response, HttpResponseRedirect) self.assertEqual(login_response['Location'], reverse('shib-login') + - '?course_id=MITx/999/Robot_Super_Course' + + '?course_id=edX/999/Robot_Super_Course' + '&enrollment_action=enroll') self.assertIsInstance(login_response, HttpResponseRedirect) self.assertEqual(reg_response['Location'], reverse('shib-login') + - '?course_id=MITx/999/Robot_Super_Course' + + '?course_id=edX/999/Robot_Super_Course' + '&enrollment_action=enroll') else: self.assertIsInstance(login_response, HttpResponseRedirect) self.assertEqual(login_response['Location'], reverse('signin_user') + - '?course_id=MITx/999/Robot_Super_Course' + + '?course_id=edX/999/Robot_Super_Course' + '&enrollment_action=enroll') self.assertIsInstance(login_response, HttpResponseRedirect) self.assertEqual(reg_response['Location'], reverse('register_user') + - '?course_id=MITx/999/Robot_Super_Course' + + '?course_id=edX/999/Robot_Super_Course' + '&enrollment_action=enroll') # Now test for non-existent course @@ -405,7 +405,7 @@ def test_enrollment_limit_by_domain(self): metadata['enrollment_domain'] = shib_course.enrollment_domain self.store.update_metadata(shib_course.location.url(), metadata) - open_enroll_course = CourseFactory.create(org='MITx', number='999', display_name='Robot Super Course') + open_enroll_course = CourseFactory.create(org='edX', number='999', display_name='Robot Super Course') open_enroll_course.enrollment_domain = '' metadata = own_metadata(open_enroll_course) metadata['enrollment_domain'] = open_enroll_course.enrollment_domain diff --git a/common/djangoapps/student/tests/tests.py b/common/djangoapps/student/tests/tests.py index f2a9593123ff..c0b68b7ceb37 100644 --- a/common/djangoapps/student/tests/tests.py +++ b/common/djangoapps/student/tests/tests.py @@ -438,7 +438,7 @@ def test_enrollment_by_email(self): def test_enrollment_multiple_classes(self): user = User(username="rusty", email="rusty@fake.edx.org") course_id1 = "edX/Test101/2013" - course_id2 = "MITx/6.003z/2012" + course_id2 = "edX/6.003z/2012" CourseEnrollment.enroll(user, course_id1) self.assert_enrollment_event_was_emitted(user, course_id1) diff --git a/common/lib/xmodule/xmodule/js/spec/combinedopenended/display_spec.coffee b/common/lib/xmodule/xmodule/js/spec/combinedopenended/display_spec.coffee index ef2c3cf0f9ac..393c006b49ce 100644 --- a/common/lib/xmodule/xmodule/js/spec/combinedopenended/display_spec.coffee +++ b/common/lib/xmodule/xmodule/js/spec/combinedopenended/display_spec.coffee @@ -43,7 +43,7 @@ describe 'CombinedOpenEnded', -> expect(@combined.el).toEqual @element it 'get the correct values from data fields', -> - expect(@combined.ajax_url).toEqual '/courses/MITx/6.002x/2012_Fall/modx/i4x://MITx/6.002x/combinedopenended/CombinedOE' + expect(@combined.ajax_url).toEqual '/courses/edX/6.002x/2012_Fall/modx/i4x://edX/6.002x/combinedopenended/CombinedOE' expect(@combined.state).toEqual 'assessing' expect(@combined.task_count).toEqual 2 expect(@combined.task_number).toEqual 1 diff --git a/common/lib/xmodule/xmodule/modulestore/tests/factories.py b/common/lib/xmodule/xmodule/modulestore/tests/factories.py index 5fe0dc8849c9..59763f12a240 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/factories.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/factories.py @@ -35,7 +35,7 @@ class CourseFactory(XModuleFactory): """ Factory for XModule courses. """ - org = 'MITx' + org = 'edX' number = '999' display_name = 'Robot Super Course' @@ -89,7 +89,7 @@ def location(self): @lazy_attribute def parent_location(self): - default_location = Location('i4x://MITx/999/course/Robot_Super_Course') + default_location = Location('i4x://edX/999/course/Robot_Super_Course') try: parent = self.parent # This error is raised if the caller hasn't provided either parent or parent_location diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_location.py b/common/lib/xmodule/xmodule/modulestore/tests/test_location.py index c190559c735d..cf87229493b6 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_location.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_location.py @@ -162,9 +162,9 @@ def test_html_id(): def test_course_id(): - loc = Location('i4x', 'mitX', '103', 'course', 'test2') - assert_equals('mitX/103/test2', loc.course_id) + loc = Location('i4x', 'edX', '103', 'course', 'test2') + assert_equals('edX/103/test2', loc.course_id) - loc = Location('i4x', 'mitX', '103', '_not_a_course', 'test2') + loc = Location('i4x', 'edX', '103', '_not_a_course', 'test2') with assert_raises(InvalidLocationError): loc.course_id diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py index 821a41f137e7..68a4bac0184f 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py @@ -27,7 +27,7 @@ DEFAULT_CLASS = 'xmodule.raw_module.RawDescriptor' RENDER_TEMPLATE = lambda t_n, d, ctx = None, nsp = 'main': '' -IMPORT_COURSEID = 'MITx/999/2013_Spring' +IMPORT_COURSEID = 'edX/999/2013_Spring' XML_COURSEID1 = 'edX/toy/2012_Fall' XML_COURSEID2 = 'edX/simple/2012_Fall' diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py index 92de35e39f78..356536a177f3 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py @@ -53,7 +53,7 @@ class SplitModuleTest(unittest.TestCase): modulestore = None # These version_guids correspond to values hard-coded in fixture files - # used for these tests. The files live in mitx/fixtures/splitmongo_json/* + # used for these tests. The files live in edX/fixtures/splitmongo_json/* GUID_D0 = "1d00000000000000dddd0000" # v12345d GUID_D1 = "1d00000000000000dddd1111" # v12345d1 diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/controller_query_service.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/controller_query_service.py index 3668cd6cc95b..a01a59d5bcff 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/controller_query_service.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/controller_query_service.py @@ -106,11 +106,11 @@ def check_combined_notifications(self, *args, **kwargs): return combined_notifications def get_grading_status_list(self, *args, **kwargs): - grading_status_list = '{"version": 1, "problem_list": [{"problem_name": "Science Question -- Machine Assessed", "grader_type": "NA", "eta_available": true, "state": "Waiting to be Graded", "eta": 259200, "location": "i4x://MITx/oe101x/combinedopenended/Science_SA_ML"}, {"problem_name": "Humanities Question -- Peer Assessed", "grader_type": "NA", "eta_available": true, "state": "Waiting to be Graded", "eta": 259200, "location": "i4x://MITx/oe101x/combinedopenended/Humanities_SA_Peer"}], "success": true}' + grading_status_list = '{"version": 1, "problem_list": [{"problem_name": "Science Question -- Machine Assessed", "grader_type": "NA", "eta_available": true, "state": "Waiting to be Graded", "eta": 259200, "location": "i4x://edX/oe101x/combinedopenended/Science_SA_ML"}, {"problem_name": "Humanities Question -- Peer Assessed", "grader_type": "NA", "eta_available": true, "state": "Waiting to be Graded", "eta": 259200, "location": "i4x://edX/oe101x/combinedopenended/Humanities_SA_Peer"}], "success": true}' return grading_status_list def get_flagged_problem_list(self, *args, **kwargs): - flagged_problem_list = '{"version": 1, "success": false, "error": "No flagged submissions exist for course: MITx/oe101x/2012_Fall"}' + flagged_problem_list = '{"version": 1, "success": false, "error": "No flagged submissions exist for course: edX/oe101x/2012_Fall"}' return flagged_problem_list def take_action_on_flags(self, *args, **kwargs): diff --git a/common/lib/xmodule/xmodule/tests/test_content.py b/common/lib/xmodule/xmodule/tests/test_content.py index 6f5cf8ab8c4f..cb3d1aeda7f9 100644 --- a/common/lib/xmodule/xmodule/tests/test_content.py +++ b/common/lib/xmodule/xmodule/tests/test_content.py @@ -26,13 +26,13 @@ def test_static_url_generation_from_courseid(self): def test_generate_thumbnail_image(self): contentStore = ContentStore() - content = Content(Location(u'c4x', u'mitX', u'800', u'asset', u'monsters__.jpg'), None) + content = Content(Location(u'c4x', u'edX', u'800', u'asset', u'monsters__.jpg'), None) (thumbnail_content, thumbnail_file_location) = contentStore.generate_thumbnail(content) self.assertIsNone(thumbnail_content) - self.assertEqual(Location(u'c4x', u'mitX', u'800', u'thumbnail', u'monsters__.jpg'), thumbnail_file_location) + self.assertEqual(Location(u'c4x', u'edX', u'800', u'thumbnail', u'monsters__.jpg'), thumbnail_file_location) def test_compute_location(self): # We had a bug that __ got converted into a single _. Make sure that substitution of INVALID_CHARS (like space) # still happen. - asset_location = StaticContent.compute_location('mitX', '400', 'subs__1eo_jXvZnE .srt.sjson') - self.assertEqual(Location(u'c4x', u'mitX', u'400', u'asset', u'subs__1eo_jXvZnE_.srt.sjson', None), asset_location) + asset_location = StaticContent.compute_location('edX', '400', 'subs__1eo_jXvZnE .srt.sjson') + self.assertEqual(Location(u'c4x', u'edX', u'400', u'asset', u'subs__1eo_jXvZnE_.srt.sjson', None), asset_location) diff --git a/common/static/coffee/spec/discussion/content_spec.coffee b/common/static/coffee/spec/discussion/content_spec.coffee index 3a7cc3567723..b6075fe05a35 100644 --- a/common/static/coffee/spec/discussion/content_spec.coffee +++ b/common/static/coffee/spec/discussion/content_spec.coffee @@ -2,7 +2,7 @@ describe 'All Content', -> beforeEach -> # TODO: figure out a better way of handling this # It is set up in main.coffee DiscussionApp.start - window.$$course_id = 'mitX/999/test' + window.$$course_id = 'edX/999/test' window.user = new DiscussionUser {id: '567'} describe 'Content', -> @@ -10,7 +10,7 @@ describe 'All Content', -> @content = new Content { id: '01234567', user_id: '567', - course_id: 'mitX/999/test', + course_id: 'edX/999/test', body: 'this is some content', abuse_flaggers: ['123'] } @@ -22,7 +22,7 @@ describe 'All Content', -> @content.initialize expect(Content.contents['01234567']).toEqual @content expect(@content.get 'id').toEqual '01234567' - expect(@content.get 'user_url').toEqual '/courses/mitX/999/test/discussion/forum/users/567' + expect(@content.get 'user_url').toEqual '/courses/edX/999/test/discussion/forum/users/567' expect(@content.get 'children').toEqual [] expect(@content.get 'comments').toEqual(jasmine.any(Comments)) diff --git a/common/static/coffee/spec/discussion/view/discussion_content_view_spec.coffee b/common/static/coffee/spec/discussion/view/discussion_content_view_spec.coffee index 85ab5ec2545d..48e7d955477f 100644 --- a/common/static/coffee/spec/discussion/view/discussion_content_view_spec.coffee +++ b/common/static/coffee/spec/discussion/view/discussion_content_view_spec.coffee @@ -10,7 +10,7 @@ describe "DiscussionContentView", -> + 0

Post Title

- robot + robot less than a minute ago

@@ -26,7 +26,7 @@ describe "DiscussionContentView", -> @thread = new Thread { id: '01234567', user_id: '567', - course_id: 'mitX/999/test', + course_id: 'edX/999/test', body: 'this is a thread', created_at: '2013-04-03T20:08:39Z', abuse_flaggers: ['123'] diff --git a/common/static/coffee/spec/discussion/view/response_comment_show_view_spec.coffee b/common/static/coffee/spec/discussion/view/response_comment_show_view_spec.coffee index f43a8807b6dc..d2af2357e312 100644 --- a/common/static/coffee/spec/discussion/view/response_comment_show_view_spec.coffee +++ b/common/static/coffee/spec/discussion/view/response_comment_show_view_spec.coffee @@ -21,7 +21,7 @@ describe 'ResponseCommentShowView', -> @response = new Comment { id: '01234567', user_id: '567', - course_id: 'mitX/999/test', + course_id: 'edX/999/test', body: 'this is a response', created_at: '2013-04-03T20:08:39Z', abuse_flaggers: ['123'] diff --git a/common/test/data/conditional_and_poll/README b/common/test/data/conditional_and_poll/README index fc95a7c0c923..fa225260d653 100644 --- a/common/test/data/conditional_and_poll/README +++ b/common/test/data/conditional_and_poll/README @@ -1,8 +1,8 @@ -Any place that says "YEAR_SEMESTER" needs to be replaced with something -in the form "2013_Spring". Take note of this name exactly, you'll need to +Any place that says "YEAR_SEMESTER" needs to be replaced with something +in the form "2013_Spring". Take note of this name exactly, you'll need to use it everywhere, precisely - capitalization is very important. -See https://github.com/MITx/mitx/blob/master/doc/xml-format.md for more on all this. +See https://github.com/edx/edx-platform/blob/master/doc/xml-format.md for more on all this. ----------------------- about/: Files that live here will be visible OUTSIDE OF COURSEWARE. diff --git a/lms/djangoapps/courseware/features/courseware.py b/lms/djangoapps/courseware/features/courseware.py index 234f3a84d263..d09c6535075d 100644 --- a/lms/djangoapps/courseware/features/courseware.py +++ b/lms/djangoapps/courseware/features/courseware.py @@ -7,5 +7,5 @@ @step('I visit the courseware URL$') def i_visit_the_course_info_url(step): - url = django_url('/courses/MITx/6.002x/2012_Fall/courseware') + url = django_url('/courses/edX/6.002x/2012_Fall/courseware') world.browser.visit(url) diff --git a/lms/djangoapps/courseware/features/courseware_common.py b/lms/djangoapps/courseware/features/courseware_common.py index aff49d2f9d1d..e6604abbffc3 100644 --- a/lms/djangoapps/courseware/features/courseware_common.py +++ b/lms/djangoapps/courseware/features/courseware_common.py @@ -16,7 +16,7 @@ def i_click_on_the_tab(step, tab_text): @step('I visit the courseware URL$') def i_visit_the_course_info_url(step): - world.visit('/courses/MITx/6.002x/2012_Fall/courseware') + world.visit('/courses/edX/6.002x/2012_Fall/courseware') @step(u'I am on the dashboard page$') diff --git a/lms/djangoapps/courseware/features/openended.py b/lms/djangoapps/courseware/features/openended.py index 92a597f074cb..fb5401a2e5dd 100644 --- a/lms/djangoapps/courseware/features/openended.py +++ b/lms/djangoapps/courseware/features/openended.py @@ -10,9 +10,9 @@ @step('I navigate to an openended question$') def navigate_to_an_openended_question(step): - world.register_by_course_id('MITx/3.091x/2012_Fall') + world.register_by_course_id('edX/3.091x/2012_Fall') world.log_in(email='robot@edx.org', password='test') - problem = '/courses/MITx/3.091x/2012_Fall/courseware/Week_10/Polymer_Synthesis/' + problem = '/courses/edX/3.091x/2012_Fall/courseware/Week_10/Polymer_Synthesis/' world.browser.visit(django_url(problem)) tab_css = 'ol#sequence-list > li > a[data-element="5"]' world.css_click(tab_css) @@ -20,9 +20,9 @@ def navigate_to_an_openended_question(step): @step('I navigate to an openended question as staff$') def navigate_to_an_openended_question_as_staff(step): - world.register_by_course_id('MITx/3.091x/2012_Fall', True) + world.register_by_course_id('edX/3.091x/2012_Fall', True) world.log_in(email='robot@edx.org', password='test') - problem = '/courses/MITx/3.091x/2012_Fall/courseware/Week_10/Polymer_Synthesis/' + problem = '/courses/edX/3.091x/2012_Fall/courseware/Week_10/Polymer_Synthesis/' world.browser.visit(django_url(problem)) tab_css = 'ol#sequence-list > li > a[data-element="5"]' world.css_click(tab_css) diff --git a/lms/djangoapps/courseware/tests/factories.py b/lms/djangoapps/courseware/tests/factories.py index 38ad365011d2..0c9afadf710b 100644 --- a/lms/djangoapps/courseware/tests/factories.py +++ b/lms/djangoapps/courseware/tests/factories.py @@ -119,7 +119,7 @@ class StudentModuleFactory(DjangoModelFactory): module_type = "problem" student = SubFactory(UserFactory) - course_id = "MITx/999/Robot_Super_Course" + course_id = "edX/999/Robot_Super_Course" state = None grade = None max_grade = None diff --git a/lms/djangoapps/courseware/tests/test_courses.py b/lms/djangoapps/courseware/tests/test_courses.py index 8dcab808a351..64903703e696 100644 --- a/lms/djangoapps/courseware/tests/test_courses.py +++ b/lms/djangoapps/courseware/tests/test_courses.py @@ -26,9 +26,9 @@ def test_get_course_by_id_invalid_chars(self): (such as unicode characters, and symbols such as = and ' ') """ with self.assertRaises(Http404): - get_course_by_id('MITx/foobar/statistics=introduction') - get_course_by_id('MITx/foobar/business and management') - get_course_by_id('MITx/foobar/NiñøJoséMaríáßç') + get_course_by_id('edX/foobar/statistics=introduction') + get_course_by_id('edX/foobar/business and management') + get_course_by_id('edX/foobar/NiñøJoséMaríáßç') def test_get_course_invalid_chars(self): """ @@ -37,9 +37,9 @@ def test_get_course_invalid_chars(self): (such as unicode characters, and symbols such as = and ' ') """ with self.assertRaises(ValueError): - get_course('MITx/foobar/statistics=introduction') - get_course('MITx/foobar/business and management') - get_course('MITx/foobar/NiñøJoséMaríáßç') + get_course('edX/foobar/statistics=introduction') + get_course('edX/foobar/business and management') + get_course('edX/foobar/NiñøJoséMaríáßç') @override_settings( MODULESTORE=TEST_DATA_MONGO_MODULESTORE, CMS_BASE=CMS_BASE_TEST diff --git a/lms/djangoapps/django_comment_client/base/tests.py b/lms/djangoapps/django_comment_client/base/tests.py index 513780ecda3c..0afa84d0e1c0 100644 --- a/lms/djangoapps/django_comment_client/base/tests.py +++ b/lms/djangoapps/django_comment_client/base/tests.py @@ -30,7 +30,7 @@ def setUp(self): super(ViewsTestCase, self).setUp() # create a course - self.course = CourseFactory.create(org='MITx', course='999', + self.course = CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') self.course_id = self.course.id # seed the forums permissions and roles @@ -59,10 +59,10 @@ def test_create_thread(self, mock_request): mock_request.return_value.status_code = 200 mock_request.return_value.text = u'{"title":"Hello",\ "body":"this is a post",\ - "course_id":"MITx/999/Robot_Super_Course",\ + "course_id":"edX/999/Robot_Super_Course",\ "anonymous":false,\ "anonymous_to_peers":false,\ - "commentable_id":"i4x-MITx-999-course-Robot_Super_Course",\ + "commentable_id":"i4x-edX-999-course-Robot_Super_Course",\ "created_at":"2013-05-10T18:53:43Z",\ "updated_at":"2013-05-10T18:53:43Z",\ "at_position_list":[],\ @@ -83,19 +83,19 @@ def test_create_thread(self, mock_request): "anonymous": ["false"], "title": ["Hello"] } - url = reverse('create_thread', kwargs={'commentable_id': 'i4x-MITx-999-course-Robot_Super_Course', + url = reverse('create_thread', kwargs={'commentable_id': 'i4x-edX-999-course-Robot_Super_Course', 'course_id': self.course_id}) response = self.client.post(url, data=thread) assert_true(mock_request.called) mock_request.assert_called_with( 'post', - 'http://localhost:4567/api/v1/i4x-MITx-999-course-Robot_Super_Course/threads', + 'http://localhost:4567/api/v1/i4x-edX-999-course-Robot_Super_Course/threads', data={ 'body': u'this is a post', 'anonymous_to_peers': False, 'user_id': 1, 'title': u'Hello', - 'commentable_id': u'i4x-MITx-999-course-Robot_Super_Course', - 'anonymous': False, 'course_id': u'MITx/999/Robot_Super_Course', + 'commentable_id': u'i4x-edX-999-course-Robot_Super_Course', + 'anonymous': False, 'course_id': u'edX/999/Robot_Super_Course', }, params={'request_id': ANY}, headers={'X-Edx-Api-Key': 'PUT_YOUR_API_KEY_HERE'}, @@ -107,10 +107,10 @@ def test_flag_thread(self, mock_request): mock_request.return_value.status_code = 200 mock_request.return_value.text = u'{"title":"Hello",\ "body":"this is a post",\ - "course_id":"MITx/999/Robot_Super_Course",\ + "course_id":"edX/999/Robot_Super_Course",\ "anonymous":false,\ "anonymous_to_peers":false,\ - "commentable_id":"i4x-MITx-999-course-Robot_Super_Course",\ + "commentable_id":"i4x-edX-999-course-Robot_Super_Course",\ "created_at":"2013-05-10T18:53:43Z",\ "updated_at":"2013-05-10T18:53:43Z",\ "at_position_list":[],\ @@ -167,10 +167,10 @@ def test_un_flag_thread(self, mock_request): mock_request.return_value.status_code = 200 mock_request.return_value.text = u'{"title":"Hello",\ "body":"this is a post",\ - "course_id":"MITx/999/Robot_Super_Course",\ + "course_id":"edX/999/Robot_Super_Course",\ "anonymous":false,\ "anonymous_to_peers":false,\ - "commentable_id":"i4x-MITx-999-course-Robot_Super_Course",\ + "commentable_id":"i4x-edX-999-course-Robot_Super_Course",\ "created_at":"2013-05-10T18:53:43Z",\ "updated_at":"2013-05-10T18:53:43Z",\ "at_position_list":[],\ @@ -226,10 +226,10 @@ def test_un_flag_thread(self, mock_request): def test_flag_comment(self, mock_request): mock_request.return_value.status_code = 200 mock_request.return_value.text = u'{"body":"this is a comment",\ - "course_id":"MITx/999/Robot_Super_Course",\ + "course_id":"edX/999/Robot_Super_Course",\ "anonymous":false,\ "anonymous_to_peers":false,\ - "commentable_id":"i4x-MITx-999-course-Robot_Super_Course",\ + "commentable_id":"i4x-edX-999-course-Robot_Super_Course",\ "created_at":"2013-05-10T18:53:43Z",\ "updated_at":"2013-05-10T18:53:43Z",\ "at_position_list":[],\ @@ -282,10 +282,10 @@ def test_flag_comment(self, mock_request): def test_un_flag_comment(self, mock_request): mock_request.return_value.status_code = 200 mock_request.return_value.text = u'{"body":"this is a comment",\ - "course_id":"MITx/999/Robot_Super_Course",\ + "course_id":"edX/999/Robot_Super_Course",\ "anonymous":false,\ "anonymous_to_peers":false,\ - "commentable_id":"i4x-MITx-999-course-Robot_Super_Course",\ + "commentable_id":"i4x-edX-999-course-Robot_Super_Course",\ "created_at":"2013-05-10T18:53:43Z",\ "updated_at":"2013-05-10T18:53:43Z",\ "at_position_list":[],\ diff --git a/lms/djangoapps/django_comment_client/forum/tests.py b/lms/djangoapps/django_comment_client/forum/tests.py index e8ebdb3e0038..30d7ce37c0bb 100644 --- a/lms/djangoapps/django_comment_client/forum/tests.py +++ b/lms/djangoapps/django_comment_client/forum/tests.py @@ -27,7 +27,7 @@ def setUp(self): super(ViewsExceptionTestCase, self).setUp() # create a course - self.course = CourseFactory.create(org='MITx', course='999', + self.course = CourseFactory.create(org='edX', course='999', display_name='Robot Super Course') # Patch the comment client user save method so it does not try diff --git a/lms/djangoapps/instructor/tests/test_api.py b/lms/djangoapps/instructor/tests/test_api.py index 016b5bc39c95..a59ffee7f738 100644 --- a/lms/djangoapps/instructor/tests/test_api.py +++ b/lms/djangoapps/instructor/tests/test_api.py @@ -374,7 +374,7 @@ def test_enroll_with_email(self): "at edx.org by a member of the course staff. " "The course should now appear on your edx.org dashboard.\n\n" "To start accessing course materials, please visit " - "https://edx.org/courses/MITx/999/Robot_Super_Course\n\n----\n" + "https://edx.org/courses/edX/999/Robot_Super_Course\n\n----\n" "This email was automatically sent from edx.org to NotEnrolled Student" ) @@ -396,7 +396,7 @@ def test_enroll_with_email_not_registered(self): "To finish your registration, please visit https://edx.org/register and fill out the registration form " "making sure to use robot-not-an-email-yet@robot.org in the E-mail field.\n" "Once you have registered and activated your account, " - "visit https://edx.org/courses/MITx/999/Robot_Super_Course/about to join the course.\n\n----\n" + "visit https://edx.org/courses/edX/999/Robot_Super_Course/about to join the course.\n\n----\n" "This email was automatically sent from edx.org to robot-not-an-email-yet@robot.org" ) @@ -575,7 +575,7 @@ def test_enroll_with_email_not_registered_with_shib(self, mock_uses_shib): self.assertEqual( mail.outbox[0].body, "Dear student,\n\nYou have been invited to join Robot Super Course at edx.org by a member of the course staff.\n\n" - "To access the course visit https://edx.org/courses/MITx/999/Robot_Super_Course/about and register for the course.\n\n----\n" + "To access the course visit https://edx.org/courses/edX/999/Robot_Super_Course/about and register for the course.\n\n----\n" "This email was automatically sent from edx.org to robot-not-an-email-yet@robot.org" ) @@ -598,7 +598,7 @@ def test_enroll_with_email_not_registered_with_shib_autoenroll(self, mock_uses_s self.assertEqual( mail.outbox[0].body, "Dear student,\n\nYou have been invited to join Robot Super Course at edx.org by a member of the course staff.\n\n" - "To access the course visit https://edx.org/courses/MITx/999/Robot_Super_Course and login.\n\n----\n" + "To access the course visit https://edx.org/courses/edX/999/Robot_Super_Course and login.\n\n----\n" "This email was automatically sent from edx.org to robot-not-an-email-yet@robot.org" ) @@ -1418,8 +1418,8 @@ def test_split_input_list_unicode(self): self.assertEqual(_split_input_list(scary_unistuff), [scary_unistuff]) def test_msk_from_problem_urlname(self): - args = ('MITx/6.002x/2013_Spring', 'L2Node1') - output = 'i4x://MITx/6.002x/problem/L2Node1' + args = ('edX/6.002x/2013_Spring', 'L2Node1') + output = 'i4x://edX/6.002x/problem/L2Node1' self.assertEqual(_msk_from_problem_urlname(*args), output) @raises(ValueError) diff --git a/lms/djangoapps/instructor/tests/test_legacy_enrollment.py b/lms/djangoapps/instructor/tests/test_legacy_enrollment.py index f8c8f5559fba..37f7cb35af84 100644 --- a/lms/djangoapps/instructor/tests/test_legacy_enrollment.py +++ b/lms/djangoapps/instructor/tests/test_legacy_enrollment.py @@ -221,7 +221,7 @@ def test_enrollment_email_on(self): "at edx.org by a member of the course staff. " "The course should now appear on your edx.org dashboard.\n\n" "To start accessing course materials, please visit " - "https://edx.org/courses/MITx/999/Robot_Super_Course\n\n" + "https://edx.org/courses/edX/999/Robot_Super_Course\n\n" "----\nThis email was automatically sent from edx.org to Autoenrolled Test" ) @@ -322,7 +322,7 @@ def test_enrollment_email_on_shib_on(self, mock_uses_shib): "at edx.org by a member of the course staff. " "The course should now appear on your edx.org dashboard.\n\n" "To start accessing course materials, please visit " - "https://edx.org/courses/MITx/999/Robot_Super_Course\n\n" + "https://edx.org/courses/edX/999/Robot_Super_Course\n\n" "----\nThis email was automatically sent from edx.org to ShibTest Enrolled" ) @@ -335,7 +335,7 @@ def test_enrollment_email_on_shib_on(self, mock_uses_shib): "Dear student,\n\nYou have been invited to join " "Robot Super Course at edx.org by a member of the " "course staff.\n\n" - "To access the course visit https://edx.org/courses/MITx/999/Robot_Super_Course and login.\n\n" + "To access the course visit https://edx.org/courses/edX/999/Robot_Super_Course and login.\n\n" "----\nThis email was automatically sent from edx.org to " "student5_1@test.com" ) diff --git a/lms/djangoapps/instructor_task/tests/factories.py b/lms/djangoapps/instructor_task/tests/factories.py index e54c007a817a..1610d527fef6 100644 --- a/lms/djangoapps/instructor_task/tests/factories.py +++ b/lms/djangoapps/instructor_task/tests/factories.py @@ -10,7 +10,7 @@ class InstructorTaskFactory(DjangoModelFactory): FACTORY_FOR = InstructorTask task_type = 'rescore_problem' - course_id = "MITx/999/Robot_Super_Course" + course_id = "edX/999/Robot_Super_Course" task_input = json.dumps({}) task_key = None task_id = None diff --git a/lms/djangoapps/open_ended_grading/staff_grading_service.py b/lms/djangoapps/open_ended_grading/staff_grading_service.py index ba8009ece3c3..2536e4917d27 100644 --- a/lms/djangoapps/open_ended_grading/staff_grading_service.py +++ b/lms/djangoapps/open_ended_grading/staff_grading_service.py @@ -49,10 +49,10 @@ def get_problem_list(self, course_id, grader_id): self.cnt += 1 return json.dumps({'success': True, 'problem_list': [ - json.dumps({'location': 'i4x://MITx/3.091x/problem/open_ended_demo1', + json.dumps({'location': 'i4x://edX/3.091x/problem/open_ended_demo1', 'problem_name': "Problem 1", 'num_graded': 3, 'num_pending': 5, 'min_for_ml': 10}), - json.dumps({'location': 'i4x://MITx/3.091x/problem/open_ended_demo2', + json.dumps({'location': 'i4x://edX/3.091x/problem/open_ended_demo2', 'problem_name': "Problem 2", 'num_graded': 1, 'num_pending': 5, 'min_for_ml': 10}) ]}) diff --git a/lms/djangoapps/shoppingcart/tests/test_models.py b/lms/djangoapps/shoppingcart/tests/test_models.py index cf01204942d9..b1d0fc7836b6 100644 --- a/lms/djangoapps/shoppingcart/tests/test_models.py +++ b/lms/djangoapps/shoppingcart/tests/test_models.py @@ -243,9 +243,9 @@ def test_order_item_generate_receipt_instructions(self): class PaidCourseRegistrationTest(ModuleStoreTestCase): def setUp(self): self.user = UserFactory.create() - self.course_id = "MITx/999/Robot_Super_Course" + self.course_id = "edX/999/Robot_Super_Course" self.cost = 40 - self.course = CourseFactory.create(org='MITx', number='999', display_name='Robot Super Course') + self.course = CourseFactory.create(org='edX', number='999', display_name='Robot Super Course') self.course_mode = CourseMode(course_id=self.course_id, mode_slug="honor", mode_display_name="honor cert", @@ -292,7 +292,7 @@ def test_generate_receipt_instructions(self): """ Add 2 courses to the order and make sure the instruction_set only contains 1 element (no dups) """ - course2 = CourseFactory.create(org='MITx', number='998', display_name='Robot Duper Course') + course2 = CourseFactory.create(org='edX', number='998', display_name='Robot Duper Course') course_mode2 = CourseMode(course_id=course2.id, mode_slug="honor", mode_display_name="honor cert", diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index 0d23dc041904..7e4c6d2381b1 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -42,9 +42,9 @@ def setUp(self): self.user = UserFactory.create() self.user.set_password('password') self.user.save() - self.course_id = "MITx/999/Robot_Super_Course" + self.course_id = "edX/999/Robot_Super_Course" self.cost = 40 - self.course = CourseFactory.create(org='MITx', number='999', display_name='Robot Super Course') + self.course = CourseFactory.create(org='edX', number='999', display_name='Robot Super Course') self.course_mode = CourseMode(course_id=self.course_id, mode_slug="honor", mode_display_name="honor cert", diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index c14f41d87b1b..58f88eea0d37 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -1,8 +1,8 @@ """ -verify_student/start?course_id=MITx/6.002x/2013_Spring # create - /upload_face?course_id=MITx/6.002x/2013_Spring +verify_student/start?course_id=edX/6.002x/2013_Spring # create + /upload_face?course_id=edX/6.002x/2013_Spring /upload_photo_id /confirm # mark_ready() diff --git a/lms/static/coffee/src/staff_grading/staff_grading.coffee b/lms/static/coffee/src/staff_grading/staff_grading.coffee index 80487f24ee34..fe7567822b73 100644 --- a/lms/static/coffee/src/staff_grading/staff_grading.coffee +++ b/lms/static/coffee/src/staff_grading/staff_grading.coffee @@ -109,12 +109,12 @@ The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for t # should get back a list of problem_ids, problem_names, num_graded, min_for_ml else if cmd == 'get_problem_list' @mock_cnt = 1 - response = + response = success: true problem_list: [ - {location: 'i4x://MITx/3.091x/problem/open_ended_demo1', \ + {location: 'i4x://edX/3.091x/problem/open_ended_demo1', \ problem_name: "Problem 1", num_graded: 3, num_pending: 5, min_for_ml: 10}, - {location: 'i4x://MITx/3.091x/problem/open_ended_demo2', \ + {location: 'i4x://edX/3.091x/problem/open_ended_demo2', \ problem_name: "Problem 2", num_graded: 1, num_pending: 5, min_for_ml: 10} ] else @@ -123,7 +123,7 @@ The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for t error: 'Unknown command ' + cmd if @mock_cnt % 5 == 0 - response = + response = success: true message: 'No more submissions' @@ -132,7 +132,7 @@ The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for t response = success: false error: 'An error for testing' - + return response From 01eb9ed4cc4a7fd5cd44c3fa089403b8c96c49d8 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Mon, 2 Dec 2013 14:51:04 -0500 Subject: [PATCH 8/8] Updating tests, comments for MITx -> edX transition Also whitespace changes --- .../management/commands/clone_course.py | 2 +- .../management/commands/delete_course.py | 4 +- cms/djangoapps/contentstore/tests/utils.py | 2 +- cms/djangoapps/contentstore/views/item.py | 2 +- cms/djangoapps/contentstore/views/tabs.py | 2 +- cms/envs/common.py | 6 +-- cms/envs/dev.py | 4 +- cms/envs/test.py | 4 +- common/djangoapps/static_replace/__init__.py | 2 +- .../commands/create_random_users.py | 2 +- .../student/management/commands/get_grades.py | 2 +- common/djangoapps/student/models.py | 8 ++-- common/djangoapps/terrain/browser.py | 2 +- common/djangoapps/xmodule_modifiers.py | 2 +- common/lib/capa/capa/xqueue_interface.py | 2 +- common/lib/sample-post.py | 6 +-- .../sandbox-packages/loncapa/loncapa_check.py | 2 +- .../xmodule/xmodule/contentstore/content.py | 4 +- .../lib/xmodule/xmodule/contentstore/mongo.py | 4 +- common/lib/xmodule/xmodule/gst_module.py | 2 +- .../js/fixtures/combined-open-ended.html | 30 +++++++------- .../xmodule/modulestore/tests/django_utils.py | 2 +- .../openendedchild.py | 1 + common/test/data/conditional_and_poll/README | 20 +++++----- .../test/data/splitmongo_json/structures.json | 36 ++++++++--------- common/test/data/word_cloud/README | 26 ++++++------ .../conditional_module/conditional_module.rst | 14 +++---- docs/developers/Makefile | 10 ++--- docs/internal/development.md | 8 ++-- docs/internal/discussion.md | 8 ++-- docs/internal/mongo.md | 14 +++---- docs/internal/overview.md | 2 - docs/internal/remote_gradebook.md | 14 +++---- i18n/config.py | 10 ++--- i18n/generate.py | 4 +- i18n/make_dummy.py | 4 +- lms/djangoapps/bulk_email/admin.py | 2 +- .../management/commands/cert_whitelist.py | 6 +-- lms/djangoapps/course_wiki/utils.py | 6 +-- lms/djangoapps/courseware/tests/test_tabs.py | 6 +-- lms/djangoapps/dashboard/views.py | 6 +-- lms/djangoapps/django_comment_client/utils.py | 2 +- .../management/commands/compute_grades.py | 2 +- .../management/commands/dump_grades.py | 2 +- .../commands/generate_serial_numbers.py | 2 +- .../commands/import_serial_numbers.py | 2 +- lms/envs/cms/mixed_dev.py | 2 +- lms/envs/common.py | 8 ++-- lms/envs/dev.py | 24 +++++------ lms/envs/dev_ike.py | 2 +- lms/envs/dev_int.py | 10 ++--- lms/envs/devgroups/courses.py | 6 +-- lms/envs/devgroups/m_6002.py | 2 +- lms/envs/devplus.py | 2 +- lms/envs/edx4edx_aws.py | 4 +- lms/envs/static.py | 6 +-- lms/envs/test.py | 8 ++-- .../src/instructor_dashboard/analytics.coffee | 6 +-- .../src/staff_grading/staff_grading.coffee | 40 +++++++++---------- lms/templates/dashboard.html | 2 +- .../discussion/_underscore_templates.html | 18 ++++----- .../instructor_dashboard_2/send_email.html | 4 +- .../instructor_dashboard_2/student_admin.html | 2 +- lms/templates/press.json | 12 +++--- lms/templates/static_templates/faq.html | 2 +- lms/templates/widgets/segment-io.html | 2 +- proxy/nginx.conf | 6 +-- requirements/edx/local.txt | 2 +- scripts/runone.py | 4 +- scripts/setup-test-dirs.sh | 16 ++++---- 70 files changed, 246 insertions(+), 247 deletions(-) diff --git a/cms/djangoapps/contentstore/management/commands/clone_course.py b/cms/djangoapps/contentstore/management/commands/clone_course.py index 5ad0da09d8f4..04f0c890879d 100644 --- a/cms/djangoapps/contentstore/management/commands/clone_course.py +++ b/cms/djangoapps/contentstore/management/commands/clone_course.py @@ -11,7 +11,7 @@ # -# To run from command line: rake cms:clone SOURCE_LOC=MITx/111/Foo1 DEST_LOC=MITx/135/Foo3 +# To run from command line: rake cms:clone SOURCE_LOC=edX/111/Foo1 DEST_LOC=edX/135/Foo3 # class Command(BaseCommand): """Clone a MongoDB-backed course to another location""" diff --git a/cms/djangoapps/contentstore/management/commands/delete_course.py b/cms/djangoapps/contentstore/management/commands/delete_course.py index 085fce5fe5d8..2f2aba12e5b3 100644 --- a/cms/djangoapps/contentstore/management/commands/delete_course.py +++ b/cms/djangoapps/contentstore/management/commands/delete_course.py @@ -7,7 +7,7 @@ # -# To run from command line: rake cms:delete_course LOC=MITx/111/Foo1 +# To run from command line: rake cms:delete_course LOC=edX/111/Foo1 # class Command(BaseCommand): help = '''Delete a MongoDB backed course''' @@ -23,7 +23,7 @@ def handle(self, *args, **options): commit = args[1] == 'commit' if commit: - print 'Actually going to delete the course from DB....' + print('Actually going to delete the course from DB....') if query_yes_no("Deleting course {0}. Confirm?".format(course_id), default="no"): if query_yes_no("Are you sure. This action cannot be undone!", default="no"): diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index 7e72e6f7d997..7d19fa109e4d 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -111,7 +111,7 @@ def createNonStaffAuthedUserClient(self): client = Client() client.login(username=uname, password=password) return client, nonstaff - + def populateCourse(self): """ Add 2 chapters, 4 sections, 8 verticals, 16 problems to self.course (branching 2) diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index 0a85eb7765cd..ff0596d1d077 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -67,7 +67,7 @@ def xblock_handler(request, tag=None, course_id=None, branch=None, version_guid= to None! Absent ones will be left alone. :nullout: which metadata fields to set to None :graderType: change how this unit is graded - :publish: can be one of three values, 'make_public, 'make_private', or 'create_draft' + :publish: can be one of three values, 'make_public, 'make_private', or 'create_draft' The JSON representation on the updated xblock (minus children) is returned. if xblock locator is not specified, create a new xblock instance. The json playload can contain diff --git a/cms/djangoapps/contentstore/views/tabs.py b/cms/djangoapps/contentstore/views/tabs.py index cf0ab42ffb4a..0cbfb0ac96b6 100644 --- a/cms/djangoapps/contentstore/views/tabs.py +++ b/cms/djangoapps/contentstore/views/tabs.py @@ -40,7 +40,7 @@ def initialize_course_tabs(course): {"type": "discussion", "name": _("Discussion")}, {"type": "wiki", "name": _("Wiki")}, {"type": "progress", "name": _("Progress")}, - ] + ] modulestore('direct').update_metadata(course.location.url(), own_metadata(course)) diff --git a/cms/envs/common.py b/cms/envs/common.py index 1040dc410531..41ef87b3addd 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -67,11 +67,11 @@ ############################# SET PATH INFORMATION ############################# -PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /mitx/cms +PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx/cms REPO_ROOT = PROJECT_ROOT.dirname() COMMON_ROOT = REPO_ROOT / "common" LMS_ROOT = REPO_ROOT / "lms" -ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /mitx is in +ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /edX is in GITHUB_REPO_ROOT = ENV_ROOT / "data" @@ -230,7 +230,7 @@ USE_L10N = True # Localization strings (e.g. django.po) are under this directory -LOCALE_PATHS = (REPO_ROOT + '/conf/locale',) # mitx/conf/locale/ +LOCALE_PATHS = (REPO_ROOT + '/conf/locale',) # edx/conf/locale/ # Messages MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' diff --git a/cms/envs/dev.py b/cms/envs/dev.py index 6d47e65f23c4..0ec471629523 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -71,7 +71,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': ENV_ROOT / "db" / "mitx.db", + 'NAME': ENV_ROOT / "db" / "edX.db", } } @@ -108,7 +108,7 @@ # In staging/prod envs, the sessions also live here. 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - 'LOCATION': 'mitx_loc_mem_cache', + 'LOCATION': 'edx_loc_mem_cache', 'KEY_FUNCTION': 'util.memcache.safe_key', }, diff --git a/cms/envs/test.py b/cms/envs/test.py index 5edea467d36f..6485f7233dfa 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -4,7 +4,7 @@ /envroot/ /db # This is where it'll write the database file - /mitx # The location of this repo + /edx # The location of this repo /log # Where we're going to write log files """ @@ -117,7 +117,7 @@ # In staging/prod envs, the sessions also live here. 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - 'LOCATION': 'mitx_loc_mem_cache', + 'LOCATION': 'edx_loc_mem_cache', 'KEY_FUNCTION': 'util.memcache.safe_key', }, diff --git a/common/djangoapps/static_replace/__init__.py b/common/djangoapps/static_replace/__init__.py index bd0102272ce9..a7be81f73074 100644 --- a/common/djangoapps/static_replace/__init__.py +++ b/common/djangoapps/static_replace/__init__.py @@ -119,7 +119,7 @@ def replace_static_url(match): # if we're running with a MongoBacked store course_namespace is not None, then use studio style urls elif (not static_asset_path) and course_id and modulestore().get_modulestore_type(course_id) != XML_MODULESTORE_TYPE: # first look in the static file pipeline and see if we are trying to reference - # a piece of static content which is in the mitx repo (e.g. JS associated with an xmodule) + # a piece of static content which is in the edX repo (e.g. JS associated with an xmodule) exists_in_staticfiles_storage = False try: diff --git a/common/djangoapps/student/management/commands/create_random_users.py b/common/djangoapps/student/management/commands/create_random_users.py index db4bb796cc71..93537e521510 100644 --- a/common/djangoapps/student/management/commands/create_random_users.py +++ b/common/djangoapps/student/management/commands/create_random_users.py @@ -22,7 +22,7 @@ class Command(BaseCommand): Examples: create_random_users.py 1 - create_random_users.py 10 MITx/6.002x/2012_Fall + create_random_users.py 10 edX/6.002x/2012_Fall create_random_users.py 100 HarvardX/CS50x/2012 """ diff --git a/common/djangoapps/student/management/commands/get_grades.py b/common/djangoapps/student/management/commands/get_grades.py index e24fef26e3b1..0a24a2423d05 100644 --- a/common/djangoapps/student/management/commands/get_grades.py +++ b/common/djangoapps/student/management/commands/get_grades.py @@ -40,7 +40,7 @@ class Command(BaseCommand): Example: sudo -u www-data SERVICE_VARIANT=lms /opt/edx/bin/django-admin.py get_grades \ - -c MITx/Chi6.00intro/A_Taste_of_Python_Programming -o /tmp/20130813-6.00x.csv \ + -c edX/Chi6.00intro/A_Taste_of_Python_Programming -o /tmp/20130813-6.00x.csv \ --settings=lms.envs.aws --pythonpath=/opt/wwc/edx-platform """ diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 734b3a1ec460..bf61fb033d9f 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -137,7 +137,7 @@ class UserProfile(models.Model): * All fields are replicated into relevant Course databases Some of the fields are legacy ones that were captured during the initial - MITx fall prototype. + edX fall prototype. """ class Meta: @@ -675,9 +675,9 @@ def remove_user_from_group(user, group): utg.users.remove(User.objects.get(username=user)) utg.save() -default_groups = {'email_future_courses': 'Receive e-mails about future MITx courses', - 'email_helpers': 'Receive e-mails about how to help with MITx', - 'mitx_unenroll': 'Fully unenrolled -- no further communications', +default_groups = {'email_future_courses': 'Receive e-mails about future edX courses', + 'email_helpers': 'Receive e-mails about how to help with edX', + 'edX_unenroll': 'Fully unenrolled -- no further communications', '6002x_unenroll': 'Took and dropped 6002x'} diff --git a/common/djangoapps/terrain/browser.py b/common/djangoapps/terrain/browser.py index 8c18c40a79cc..96550994447d 100644 --- a/common/djangoapps/terrain/browser.py +++ b/common/djangoapps/terrain/browser.py @@ -155,7 +155,7 @@ def initial_setup(server): def reset_data(scenario): """ Clean out the django test database defined in the - envs/acceptance.py file: mitx_all/db/test_mitx.db + envs/acceptance.py file: edx/db/test_edX.db """ LOGGER.debug("Flushing the test database...") call_command('flush', interactive=False, verbosity=0) diff --git a/common/djangoapps/xmodule_modifiers.py b/common/djangoapps/xmodule_modifiers.py index c03ddfd69544..34acc401d5d7 100644 --- a/common/djangoapps/xmodule_modifiers.py +++ b/common/djangoapps/xmodule_modifiers.py @@ -171,7 +171,7 @@ def add_histogram(user, block, view, frag, context): # pylint: disable=unused-a # doesn't like symlinks) filepath = filename data_dir = osfs.root_path.rsplit('/')[-1] - giturl = block.giturl or 'https://github.com/MITx' + giturl = block.giturl or 'https://github.com/edX' edit_link = "%s/%s/tree/master/%s" % (giturl, data_dir, filepath) else: edit_link = False diff --git a/common/lib/capa/capa/xqueue_interface.py b/common/lib/capa/capa/xqueue_interface.py index 81a221961dc3..098cf87856e1 100644 --- a/common/lib/capa/capa/xqueue_interface.py +++ b/common/lib/capa/capa/xqueue_interface.py @@ -27,7 +27,7 @@ def make_xheader(lms_callback_url, lms_key, queue_name): Xqueue header is a JSON-serialized dict: { 'lms_callback_url': url to which xqueue will return the request (string), 'lms_key': secret key used by LMS to protect its state (string), - 'queue_name': designate a specific queue within xqueue server, e.g. 'MITx-6.00x' (string) + 'queue_name': designate a specific queue within xqueue server, e.g. 'edX-6.00x' (string) } """ return json.dumps({ diff --git a/common/lib/sample-post.py b/common/lib/sample-post.py index d035d40709ee..51b43d743164 100644 --- a/common/lib/sample-post.py +++ b/common/lib/sample-post.py @@ -31,8 +31,8 @@ def prompt(msg, default=None, safe=False): location = 'i4x://HarvardX/PH207x/problem/ex_practice_2' #server = prompt('Server (no trailing slash)', 'http://127.0.0.1:8000') -#course_id = prompt('Course id', 'MITx/7012x/2013_Spring') -#location = prompt('problem location', 'i4x://MITx/7012x/problem/example_upload_answer') +#course_id = prompt('Course id', 'edX/7012x/2013_Spring') +#location = prompt('problem location', 'i4x://edX/7012x/problem/example_upload_answer') value = prompt('value to upload') username = prompt('username on server', 'victor@edx.org') @@ -60,7 +60,7 @@ def prompt(msg, default=None, safe=False): url = '/'.join([server, 'courses', course_id, 'modx', location, 'problem_check']) data = {'input_{0}_2_1'.format(location.replace('/','-').replace(':','').replace('--','-')): value} -#data = {'input_i4x-MITx-7012x-problem-example_upload_answer_2_1': value} +#data = {'input_i4x-edX-7012x-problem-example_upload_answer_2_1': value} print "Posting to '{0}': {1}".format(url, data) diff --git a/common/lib/sandbox-packages/loncapa/loncapa_check.py b/common/lib/sandbox-packages/loncapa/loncapa_check.py index 2cd591520e99..65cddf82e1c7 100644 --- a/common/lib/sandbox-packages/loncapa/loncapa_check.py +++ b/common/lib/sandbox-packages/loncapa/loncapa_check.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# File: mitx/lib/loncapa/loncapa_check.py +# File: edX/lib/loncapa/loncapa_check.py # # Python functions which duplicate the standard comparison functions available to LON-CAPA problems. # Used in translating LON-CAPA problems to i4x problem specification language. diff --git a/common/lib/xmodule/xmodule/contentstore/content.py b/common/lib/xmodule/xmodule/contentstore/content.py index 887e64a16a0c..75ff1d26d8ac 100644 --- a/common/lib/xmodule/xmodule/contentstore/content.py +++ b/common/lib/xmodule/xmodule/contentstore/content.py @@ -184,12 +184,12 @@ def get_all_content_for_course(self, location, start=0, maxresults=-1, sort=None {u'displayname': u'profile.jpg', u'chunkSize': 262144, u'length': 85374, u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 183000), u'contentType': u'image/jpeg', u'_id': {u'category': u'asset', u'name': u'profile.jpg', u'course': u'6.002x', u'tag': u'c4x', - u'org': u'MITx', u'revision': None}, u'md5': u'36dc53519d4b735eb6beba51cd686a0e'}, + u'org': u'edX', u'revision': None}, u'md5': u'36dc53519d4b735eb6beba51cd686a0e'}, {u'displayname': u'profile.thumbnail.jpg', u'chunkSize': 262144, u'length': 4073, u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 196000), u'contentType': u'image/jpeg', u'_id': {u'category': u'asset', u'name': u'profile.thumbnail.jpg', u'course': u'6.002x', u'tag': u'c4x', - u'org': u'MITx', u'revision': None}, u'md5': u'ff1532598830e3feac91c2449eaa60d6'}, + u'org': u'edX', u'revision': None}, u'md5': u'ff1532598830e3feac91c2449eaa60d6'}, .... diff --git a/common/lib/xmodule/xmodule/contentstore/mongo.py b/common/lib/xmodule/xmodule/contentstore/mongo.py index 11e61e1106ed..e7165272c1a7 100644 --- a/common/lib/xmodule/xmodule/contentstore/mongo.py +++ b/common/lib/xmodule/xmodule/contentstore/mongo.py @@ -151,12 +151,12 @@ def _get_all_content_for_course(self, location, get_thumbnails=False, start=0, m {u'displayname': u'profile.jpg', u'chunkSize': 262144, u'length': 85374, u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 183000), u'contentType': u'image/jpeg', u'_id': {u'category': u'asset', u'name': u'profile.jpg', u'course': u'6.002x', u'tag': u'c4x', - u'org': u'MITx', u'revision': None}, u'md5': u'36dc53519d4b735eb6beba51cd686a0e'}, + u'org': u'edX', u'revision': None}, u'md5': u'36dc53519d4b735eb6beba51cd686a0e'}, {u'displayname': u'profile.thumbnail.jpg', u'chunkSize': 262144, u'length': 4073, u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 196000), u'contentType': u'image/jpeg', u'_id': {u'category': u'asset', u'name': u'profile.thumbnail.jpg', u'course': u'6.002x', u'tag': u'c4x', - u'org': u'MITx', u'revision': None}, u'md5': u'ff1532598830e3feac91c2449eaa60d6'}, + u'org': u'edX', u'revision': None}, u'md5': u'ff1532598830e3feac91c2449eaa60d6'}, .... diff --git a/common/lib/xmodule/xmodule/gst_module.py b/common/lib/xmodule/xmodule/gst_module.py index ef69130f84be..5112e63f6a86 100644 --- a/common/lib/xmodule/xmodule/gst_module.py +++ b/common/lib/xmodule/xmodule/gst_module.py @@ -128,7 +128,7 @@ def substitute_controls(self, html_string): html_string with their divs. Html_string is content of tag inside tag. Documentation on how information in tag is organized and processed is located in: - mitx/docs/build/html/graphical_slider_tool.html. + edx/docs/build/html/graphical_slider_tool.html. Args: html_string: content of tag, with controls as xml tags, diff --git a/common/lib/xmodule/xmodule/js/fixtures/combined-open-ended.html b/common/lib/xmodule/xmodule/js/fixtures/combined-open-ended.html index ae2c195a85ad..6d3f65b92430 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/combined-open-ended.html +++ b/common/lib/xmodule/xmodule/js/fixtures/combined-open-ended.html @@ -1,6 +1,6 @@
-
+

Problem 1

Status

@@ -60,53 +60,53 @@

Problem

- + Edit / - QA + })" id="i4x_edX_6_002x_combinedopenended_CombinedOE_xqa_log">QA
-