-

${_("Welcome, {0}!".format(user.username))}

+

${_("Welcome, {0}!").format(user.username)}

%if len(courses) > 0:
@@ -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/js/transcripts/messages/transcripts-uploaded.underscore b/cms/templates/js/transcripts/messages/transcripts-uploaded.underscore index c17d83f71078..9895d7fea8bb 100644 --- a/cms/templates/js/transcripts/messages/transcripts-uploaded.underscore +++ b/cms/templates/js/transcripts/messages/transcripts-uploaded.underscore @@ -10,7 +10,7 @@ - "> + "> <%= gettext("Download to Edit") %>
diff --git a/cms/templates/settings_advanced.html b/cms/templates/settings_advanced.html index 0735992a9a1a..566e281291bc 100644 --- a/cms/templates/settings_advanced.html +++ b/cms/templates/settings_advanced.html @@ -64,7 +64,7 @@

${_("Manual Policy Definition")}

- ${_("Manually Edit Course Policy Values (JSON Key / Value pairs)")} + ${_("Manually Edit Course Policy Values (JSON Key / Value pairs, use " not ')")}

${_("Warning: Do not modify these policies unless you are familiar with their purpose.")}

diff --git a/cms/templates/signup.html b/cms/templates/signup.html index d9a733ae4712..422c152b503f 100644 --- a/cms/templates/signup.html +++ b/cms/templates/signup.html @@ -60,7 +60,9 @@

${_("Sign Up for edX Studio")}

  • - +
  • diff --git a/cms/templates/textbooks.html b/cms/templates/textbooks.html index 238834da2287..a8d73319ecf1 100644 --- a/cms/templates/textbooks.html +++ b/cms/templates/textbooks.html @@ -23,14 +23,7 @@ CMS.URL.LMS_BASE = "${settings.LMS_BASE}" require(["js/models/section", "js/collections/textbook", "js/views/list_textbooks"], function(Section, TextbookCollection, ListTextbooksView) { - window.section = new Section({ - name: "${course.display_name_with_default | h}", - url_name: "${course.location.name | h}", - org: "${course.location.org | h}", - num: "${course.location.course | h}", - revision: "${course.location.revision | h}" - }); - var textbooks = new TextbookCollection(${json.dumps(course.pdf_textbooks)}, {parse: true}); + var textbooks = new TextbookCollection(${json.dumps(textbooks)}, {parse: true}); var tbView = new ListTextbooksView({collection: textbooks}); $(function() { diff --git a/cms/templates/widgets/footer.html b/cms/templates/widgets/footer.html index db7d5fb3f857..bd7d0c6073f1 100644 --- a/cms/templates/widgets/footer.html +++ b/cms/templates/widgets/footer.html @@ -1,25 +1,25 @@ <%! from django.core.urlresolvers import reverse %> <%! from django.utils.translation import ugettext as _ %> - +
    diff --git a/lms/templates/sysadmin_dashboard_gitlogs.html b/lms/templates/sysadmin_dashboard_gitlogs.html new file mode 100644 index 000000000000..d7709c675d73 --- /dev/null +++ b/lms/templates/sysadmin_dashboard_gitlogs.html @@ -0,0 +1,125 @@ +<%inherit file="/main.html" /> +<%! from django.core.urlresolvers import reverse %> +<%! from django.utils.translation import ugettext as _ %> +<%namespace name='static' file='/static_content.html'/> + +<%block name="headextra"> + <%static:css group='style-course'/> + + + + + +
    +
    + +
    +

    ${_('Sysadmin Dashboard')}

    +
    +

    + ${_('Users')} + ${_('Courses')} + ${_('Staffing and Enrollment')} + ${_('Git Logs')} +

    +
    + +
    + + + +

    ${_('Git Logs')}

    + +%if course_id is None: + + + + + + + + + + %for cil in cilset[:10]: + + + + + + %endfor + +
    ${_('Date')}${_('Course ID')}${_('Git Action')}
    ${cil.created}${cil.course_id}${cil.git_log}
    + +%else: + +

    ${_('Recent git load activity for')} ${course_id}

    + %if error_msg: +

    ${_('Error')}:

    +

    ${error_msg}

    + %endif + + + + + + + + + + + % for cil in cilset[:2]: + + + + + + + + + + % endfor + +
    ${_('Date')}${_('Course ID')}${_('git action')}
    ${cil.created}${cil.course_id}${cil.git_log}
    +
    ${cil.import_log | h}
    +
    + +% endif + +
    +
    +
    diff --git a/lms/templates/widgets/segment-io.html b/lms/templates/widgets/segment-io.html index 87dc0eebe074..3c6728bb16b6 100644 --- a/lms/templates/widgets/segment-io.html +++ b/lms/templates/widgets/segment-io.html @@ -1,4 +1,4 @@ -% if settings.MITX_FEATURES.get('SEGMENT_IO_LMS'): +% if settings.FEATURES.get('SEGMENT_IO_LMS'): <%! from django.core.urlresolvers import reverse %> <%! import waffle %> @@ -29,4 +29,4 @@ }; -% endif \ No newline at end of file +% endif diff --git a/lms/urls.py b/lms/urls.py index 913c686f1bea..ca154c21c541 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -6,7 +6,7 @@ import django.contrib.auth.views # Uncomment the next two lines to enable the admin: -if settings.DEBUG or settings.MITX_FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'): +if settings.DEBUG or settings.FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'): admin.autodiscover() urlpatterns = ('', # nopep8 @@ -63,7 +63,7 @@ url(r'^', include('waffle.urls')), ) -# if settings.MITX_FEATURES.get("MULTIPLE_ENROLLMENT_ROLES"): +# if settings.FEATURES.get("MULTIPLE_ENROLLMENT_ROLES"): urlpatterns += ( url(r'^verify_student/', include('verify_student.urls')), url(r'^course_modes/', include('course_modes.urls')), @@ -80,6 +80,12 @@ url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), ) +# sysadmin dashboard, to see what courses are loaded, to delete & load courses +if settings.FEATURES["ENABLE_SYSADMIN_DASHBOARD"]: + urlpatterns += ( + url(r'^sysadmin/', include('dashboard.sysadmin_urls')), + ) + #Semi-static views (these need to be rendered and have the login bar, but don't change) urlpatterns += ( url(r'^404$', 'static_template_view.views.render', @@ -87,7 +93,7 @@ ) # Semi-static views only used by edX, not by themes -if not settings.MITX_FEATURES["USE_CUSTOM_THEME"]: +if not settings.FEATURES["USE_CUSTOM_THEME"]: urlpatterns += ( url(r'^jobs$', 'static_template_view.views.render', {'template': 'jobs.html'}, name="jobs"), @@ -130,7 +136,7 @@ # To allow theme templates to inherit from default templates, # prepend a standard prefix - if settings.MITX_FEATURES["USE_CUSTOM_THEME"]: + if settings.FEATURES["USE_CUSTOM_THEME"]: template = "theme-" + template # Make the assumption that the URL we want is the lowercased @@ -318,13 +324,13 @@ ) # allow course staff to change to student view of courseware - if settings.MITX_FEATURES.get('ENABLE_MASQUERADE'): + if settings.FEATURES.get('ENABLE_MASQUERADE'): urlpatterns += ( url(r'^masquerade/(?P.*)$', 'courseware.masquerade.handle_ajax', name="masquerade-switch"), ) # discussion forums live within courseware, so courseware must be enabled first - if settings.MITX_FEATURES.get('ENABLE_DISCUSSION_SERVICE'): + if settings.FEATURES.get('ENABLE_DISCUSSION_SERVICE'): urlpatterns += ( url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/discussion/', include('django_comment_client.urls')), @@ -339,7 +345,7 @@ 'courseware.views.static_tab', name="static_tab"), ) - if settings.MITX_FEATURES.get('ENABLE_STUDENT_HISTORY_VIEW'): + if settings.FEATURES.get('ENABLE_STUDENT_HISTORY_VIEW'): urlpatterns += ( url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/submission_history/(?P[^/]*)/(?P.*?)$', 'courseware.views.submission_history', @@ -347,7 +353,7 @@ ) -if settings.COURSEWARE_ENABLED and settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BETA_DASHBOARD'): +if settings.COURSEWARE_ENABLED and settings.FEATURES.get('ENABLE_INSTRUCTOR_BETA_DASHBOARD'): urlpatterns += ( url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/instructor_dashboard$', 'instructor.views.instructor_dashboard.instructor_dashboard_2', name="instructor_dashboard_2"), @@ -356,29 +362,29 @@ include('instructor.views.api_urls')) ) -if settings.DEBUG or settings.MITX_FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'): +if settings.DEBUG or settings.FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'): ## Jasmine and admin urlpatterns += (url(r'^admin/', include(admin.site.urls)),) -if settings.MITX_FEATURES.get('AUTH_USE_OPENID'): +if settings.FEATURES.get('AUTH_USE_OPENID'): urlpatterns += ( url(r'^openid/login/$', 'django_openid_auth.views.login_begin', name='openid-login'), url(r'^openid/complete/$', 'external_auth.views.openid_login_complete', name='openid-complete'), url(r'^openid/logo.gif$', 'django_openid_auth.views.logo', name='openid-logo'), ) -if settings.MITX_FEATURES.get('AUTH_USE_SHIB'): +if settings.FEATURES.get('AUTH_USE_SHIB'): urlpatterns += ( url(r'^shib-login/$', 'external_auth.views.shib_login', name='shib-login'), ) -if settings.MITX_FEATURES.get('AUTH_USE_CAS'): +if settings.FEATURES.get('AUTH_USE_CAS'): urlpatterns += ( url(r'^cas-auth/login/$', 'external_auth.views.cas_login', name="cas-login"), url(r'^cas-auth/logout/$', 'django_cas.views.logout', {'next_page': '/'}, name="cas-logout"), ) -if settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD'): +if settings.FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD'): urlpatterns += ( url(r'^course_specific_login/(?P[^/]+/[^/]+/[^/]+)/$', 'external_auth.views.course_specific_login', name='course-specific-login'), @@ -393,7 +399,7 @@ ) -if settings.MITX_FEATURES.get('AUTH_USE_OPENID_PROVIDER'): +if settings.FEATURES.get('AUTH_USE_OPENID_PROVIDER'): urlpatterns += ( url(r'^openid/provider/login/$', 'external_auth.views.provider_login', name='openid-provider-login'), url(r'^openid/provider/login/(?:.+)$', 'external_auth.views.provider_identity', name='openid-provider-login-identity'), @@ -401,7 +407,7 @@ url(r'^openid/provider/xrds/$', 'external_auth.views.provider_xrds', name='openid-provider-xrds') ) -if settings.MITX_FEATURES.get('ENABLE_LMS_MIGRATION'): +if settings.FEATURES.get('ENABLE_LMS_MIGRATION'): urlpatterns += ( url(r'^migrate/modules$', 'lms_migration.migrate.manage_modulestores'), url(r'^migrate/reload/(?P[^/]+)$', 'lms_migration.migrate.manage_modulestores'), @@ -410,23 +416,23 @@ url(r'^gitreload/(?P[^/]+)$', 'lms_migration.migrate.gitreload'), ) -if settings.MITX_FEATURES.get('ENABLE_SQL_TRACKING_LOGS'): +if settings.FEATURES.get('ENABLE_SQL_TRACKING_LOGS'): urlpatterns += ( url(r'^event_logs$', 'track.views.view_tracking_log'), url(r'^event_logs/(?P.+)$', 'track.views.view_tracking_log'), ) -if settings.MITX_FEATURES.get('ENABLE_SERVICE_STATUS'): +if settings.FEATURES.get('ENABLE_SERVICE_STATUS'): urlpatterns += ( url(r'^status/', include('service_status.urls')), ) -if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'): +if settings.FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS'): urlpatterns += ( url(r'^instructor_task_status/$', 'instructor_task.views.instructor_task_status', name='instructor_task_status'), ) -if settings.MITX_FEATURES.get('RUN_AS_ANALYTICS_SERVER_ENABLED'): +if settings.FEATURES.get('RUN_AS_ANALYTICS_SERVER_ENABLED'): urlpatterns += ( url(r'^edinsights_service/', include('edinsights.core.urls')), ) @@ -438,20 +444,20 @@ url(r'^comm/foldit_ops', 'foldit.views.foldit_ops', name="foldit_ops"), ) -if settings.MITX_FEATURES.get('ENABLE_DEBUG_RUN_PYTHON'): +if settings.FEATURES.get('ENABLE_DEBUG_RUN_PYTHON'): urlpatterns += ( url(r'^debug/run_python', 'debug.views.run_python'), ) # Crowdsourced hinting instructor manager. -if settings.MITX_FEATURES.get('ENABLE_HINTER_INSTRUCTOR_VIEW'): +if settings.FEATURES.get('ENABLE_HINTER_INSTRUCTOR_VIEW'): urlpatterns += ( url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/hint_manager$', 'instructor.hint_manager.hint_manager', name="hint_manager"), ) # enable automatic login -if settings.MITX_FEATURES.get('AUTOMATIC_AUTH_FOR_TESTING'): +if settings.FEATURES.get('AUTOMATIC_AUTH_FOR_TESTING'): urlpatterns += ( url(r'^auto_auth$', 'student.views.auto_auth'), ) diff --git a/mongo_indexes.md b/mongo_indexes.md index 513367473772..f42aed9a58d4 100644 --- a/mongo_indexes.md +++ b/mongo_indexes.md @@ -16,6 +16,6 @@ location_map: ============= ``` -ensureIndex({​'_id.org': 1, '_id.course': 1}) -ensureIndex({​'course_id': 1}) +ensureIndex({'_id.org': 1, '_id.course': 1}) +ensureIndex({'course_id': 1}) ``` 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/proxy/nginx.conf b/proxy/nginx.conf index 2b48e17d0377..77d5a6eb8d8e 100644 --- a/proxy/nginx.conf +++ b/proxy/nginx.conf @@ -1,6 +1,6 @@ -# Mapping of +# Mapping of # -# From the /mitx directory: +# From the /edx-platform directory: # /usr/local/Cellar/nginx/1.2.2/sbin/nginx -p `pwd`/ -c nginx.conf worker_processes 1; @@ -49,7 +49,7 @@ http { rewrite ^(.*)/favicon.ico$ /static/images/favicon.ico last; - # Our catchall + # Our catchall location / { proxy_pass http://portal; } diff --git a/rakelib/deploy.rake b/rakelib/deploy.rake deleted file mode 100644 index 1d0a1b2c4f71..000000000000 --- a/rakelib/deploy.rake +++ /dev/null @@ -1,15 +0,0 @@ - -# Packaging constants -COMMIT = (ENV["GIT_COMMIT"] || `git rev-parse HEAD`).chomp()[0, 10] -PACKAGE_NAME = "mitx" -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" -task :autodeploy_properties do - File.open("autodeploy.properties", "w") do |file| - file.puts("UPSTREAM_NOOP=false") - file.puts("UPSTREAM_BRANCH=#{BRANCH}") - file.puts("UPSTREAM_JOB=#{PACKAGE_NAME}") - file.puts("UPSTREAM_REVISION=#{COMMIT}") - end -end \ No newline at end of file diff --git a/rakelib/tests.rake b/rakelib/tests.rake index 130ff3d9fd8d..fb324c080722 100644 --- a/rakelib/tests.rake +++ b/rakelib/tests.rake @@ -21,13 +21,20 @@ def run_tests(system, report_dir, test_id=nil, stop_on_failure=true) # If no test id is provided, we need to limit the test runner # to the Djangoapps we want to test. Otherwise, it will # run tests on all installed packages. + + default_test_id = "#{system}/djangoapps common/djangoapps" + + if system == :lms + default_test_id += " #{system}/lib" + end + if test_id.nil? - test_id = "#{system}/djangoapps common/djangoapps" + test_id = default_test_id # Handle "--failed" as a special case: we want to re-run only # the tests that failed within our Django apps elsif test_id == '--failed' - test_id = "#{system}/djangoapps common/djangoapps --failed" + test_id = "#{default_test_id} --failed" end cmd = django_admin(system, :test, 'test', test_id) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 3bcfe9abe0ea..e8dcb9191b28 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -42,6 +42,7 @@ lazy==1.1 lxml==3.0.1 mako==0.7.3 Markdown==2.2.1 +mongoengine==0.7.10 networkx==1.7 nltk==2.0.4 oauthlib==0.5.1 @@ -92,7 +93,7 @@ transifex-client==0.9.1 # Used for testing coverage==3.7 ddt==0.4.0 -factory_boy==2.0.2 +factory_boy==2.2.1 mock==1.0.1 nosexcover==1.0.7 pep8==1.4.5 diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 798c40f6bd3c..c779abedf3b8 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -7,7 +7,7 @@ # Python libraries to install directly from github # Third-party: --e git+https://github.com/edx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles +-e git+https://github.com/edx/django-staticfiles.git@d89aae2a82f2b#egg=django-staticfiles -e git+https://github.com/edx/django-pipeline.git@88ec8a011e481918fdc9d2682d4017c835acd8be#egg=django-pipeline -e git+https://github.com/edx/django-wiki.git@41815e2ef1b0323f92900f8e60711b0f0c37766b#egg=django-wiki -e git+https://github.com/edx/lettuce.git@503fe2d2599290c45b021d6c424ab5ea899e42be#egg=lettuce diff --git a/requirements/edx/local.txt b/requirements/edx/local.txt index 7941f9fa5e03..8a9568fdd55e 100644 --- a/requirements/edx/local.txt +++ b/requirements/edx/local.txt @@ -1,4 +1,4 @@ -# Python libraries to install that are local to the mitx repo +# Python libraries to install that are local to the edx-platform repo -e common/lib/calc -e common/lib/capa -e common/lib/chem diff --git a/scripts/runone.py b/scripts/runone.py index 19b5f7195b68..e4dcce8dea55 100755 --- a/scripts/runone.py +++ b/scripts/runone.py @@ -5,7 +5,7 @@ import sys # I want this: -# ERROR: test_update_and_fetch (mitx.cms.djangoapps.contentstore.tests.test_course_settings.CourseDetailsViewTest) +# ERROR: test_update_and_fetch (edx-platform.cms.djangoapps.contentstore.tests.test_course_settings.CourseDetailsViewTest) # to become: # test --settings=cms.envs.test --pythonpath=. -s cms/djangoapps/contentstore/tests/test_course_settings.py:CourseDetailsViewTest.test_update_and_fetch @@ -32,9 +32,13 @@ def main(argv): if words[0].endswith(':'): del words[0] - test_method = words[0] - test_path = words[1].split('.') - if test_path[0] == 'mitx': + if len(words) == 1: + test_path, test_method = words[0].rsplit('.', 1) + test_path = test_path.split('.') + else: + test_method = words[0] + test_path = words[1].split('.') + if test_path[0] == 'edx-platform': del test_path[0] test_class = test_path[-1] del test_path[-1] diff --git a/scripts/setup-test-dirs.sh b/scripts/setup-test-dirs.sh index c4db61ec161d..efd18fa493dd 100755 --- a/scripts/setup-test-dirs.sh +++ b/scripts/setup-test-dirs.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Create symlinks from ~/mitx_all/data or $ROOT/data, with root passed as first arg -# to all the test courses in mitx/common/test/data/ +# Create symlinks from ~/edx_all/data or $ROOT/data, with root passed as first arg +# to all the test courses in edx-platform/common/test/data/ # posix compliant sanity check if [ -z $BASH ] || [ $BASH = "/bin/sh" ]; then @@ -9,20 +9,20 @@ echo "Please use the bash interpreter to run this script" exit 1 fi -ROOT="${1:-$HOME/mitx_all}" +ROOT="${1:-$HOME/edx_all}" if [[ ! -d "$ROOT" ]]; then echo "'$ROOT' is not a directory" exit 1 fi -if [[ ! -d "$ROOT/mitx" ]]; then - echo "'$ROOT' is not the root mitx_all directory" +if [[ ! -d "$ROOT/edx-platform" ]]; then + echo "'$ROOT' is not the root edx_all directory" exit 1 fi if [[ ! -d "$ROOT/data" ]]; then - echo "'$ROOT' is not the root mitx_all directory" + echo "'$ROOT' is not the root edx_all directory" exit 1 fi @@ -30,7 +30,7 @@ echo "ROOT is $ROOT" cd $ROOT/data -for course in $(/bin/ls ../mitx/common/test/data/) +for course in $(/bin/ls ../edx-platform/common/test/data/) do # Get rid of the symlink if it already exists if [[ -L "$course" ]]; then @@ -39,7 +39,7 @@ do fi echo "Make link to '$course'" # Create it - ln -s "../mitx/common/test/data/$course" + ln -s "../edx-platform/common/test/data/$course" done # go back to where we came from