diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index e3856e40ab..7ad349cf65 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -1,5 +1,6 @@ from .utils import get_course_location_for_item, get_lms_link_for_item, \ compute_unit_state, get_date_display, UnitState +# to install PIL on MacOSX: 'easy_install http://dist.repoze.org/PIL-1.1.6.tar.gz' from PIL import Image from auth.authz import INSTRUCTOR_ROLE_NAME, STAFF_ROLE_NAME, \ create_all_course_groups, get_user_by_email, add_user_to_course_group, \ @@ -42,8 +43,7 @@ import shutil import sys import tarfile import time -from contentstore.course_info_model import get_course_updates,\ - update_course_updates, delete_course_update +from contentstore import course_info_model # to install PIL on MacOSX: 'easy_install http://dist.repoze.org/PIL-1.1.6.tar.gz' @@ -924,7 +924,7 @@ def course_info(request, org, course, name, provided_id=None): 'active_tab': 'courseinfo-tab', 'context_course': course_module, 'url_base' : "/" + org + "/" + course + "/", - 'course_updates' : json.dumps(get_course_updates(location)) + 'course_updates' : json.dumps(course_info_model.get_course_updates(location)) }) @expect_json @@ -947,14 +947,14 @@ def course_info_updates(request, org, course, provided_id=None): real_method = request.method if request.method == 'GET': - return HttpResponse(json.dumps(get_course_updates(location)), mimetype="application/json") + return HttpResponse(json.dumps(course_info_model.get_course_updates(location)), mimetype="application/json") elif real_method == 'POST': # new instance (unless django makes PUT a POST): updates are coming as POST. Not sure why. - return HttpResponse(json.dumps(update_course_updates(location, request.POST, provided_id)), mimetype="application/json") + return HttpResponse(json.dumps(course_info_model.update_course_updates(location, request.POST, provided_id)), mimetype="application/json") elif real_method == 'PUT': - return HttpResponse(json.dumps(update_course_updates(location, request.POST, provided_id)), mimetype="application/json") + return HttpResponse(json.dumps(course_info_model.update_course_updates(location, request.POST, provided_id)), mimetype="application/json") elif real_method == 'DELETE': # coming as POST need to pull from Request Header X-HTTP-Method-Override DELETE - return HttpResponse(json.dumps(delete_course_update(location, request.POST, provided_id)), mimetype="application/json") + return HttpResponse(json.dumps(course_info_model.delete_course_update(location, request.POST, provided_id)), mimetype="application/json") @login_required @ensure_csrf_cookie diff --git a/cms/static/sass/_mixins.scss b/cms/static/sass/_mixins.scss deleted file mode 120000 index 0c1b1f5b81..0000000000 --- a/cms/static/sass/_mixins.scss +++ /dev/null @@ -1 +0,0 @@ -../../../common/static/sass/_mixins.scss \ No newline at end of file diff --git a/cms/static/sass/_mixins.scss b/cms/static/sass/_mixins.scss new file mode 100644 index 0000000000..58a92d1ee6 --- /dev/null +++ b/cms/static/sass/_mixins.scss @@ -0,0 +1,24 @@ +@function em($pxval, $base: 16) { + @return #{$pxval / $base}em; +} + +// Line-height +@function lh($amount: 1) { + @return $body-line-height * $amount; +} + +@mixin hide-text(){ + text-indent: -9999px; + overflow: hidden; + display: block; +} + +@mixin vertically-and-horizontally-centered ( $height, $width ) { + left: 50%; + margin-left: -$width / 2; + //margin-top: -$height / 2; + min-height: $height; + min-width: $width; + position: absolute; + top: 150px; +} diff --git a/cms/static/sass/bourbon b/cms/static/sass/bourbon deleted file mode 120000 index 6f53a8b404..0000000000 --- a/cms/static/sass/bourbon +++ /dev/null @@ -1 +0,0 @@ -../../../common/static/sass/bourbon/ \ No newline at end of file diff --git a/cms/urls.py b/cms/urls.py index 4c2f2b361e..5f14400f06 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -35,9 +35,9 @@ urlpatterns = ('', url(r'^(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)/remove_user$', 'contentstore.views.remove_user', name='remove_user'), url(r'^(?P[^/]+)/(?P[^/]+)/info/(?P[^/]+)$', 'contentstore.views.course_info', name='course_info'), - # ??? Is the following necessary or will the one below work w/ id=None if not sent? - # url(r'^(?P[^/]+)/(?P[^/]+)/course_info/updates$', 'contentstore.views.course_info_updates', name='course_info'), url(r'^(?P[^/]+)/(?P[^/]+)/course_info/updates/(?P.*)$', 'contentstore.views.course_info_updates', name='course_info'), + url(r'^(?P[^/]+)/(?P[^/]+)/settings/(?P[^/]+)$', 'contentstore.views.course_settings', name='course_settings'), + url(r'^(?P[^/]+)/(?P[^/]+)/course_settings/updates/(?P.*)$', 'contentstore.views.course_settings_updates', name='course_settings'), url(r'^pages/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.static_pages', name='static_pages'), url(r'^edit_static/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.edit_static', name='edit_static'), diff --git a/common/test/data/graded/course.xml b/common/test/data/graded/course.xml deleted file mode 120000 index 49041310f6..0000000000 --- a/common/test/data/graded/course.xml +++ /dev/null @@ -1 +0,0 @@ -roots/2012_Fall.xml \ No newline at end of file diff --git a/common/test/data/graded/course.xml b/common/test/data/graded/course.xml new file mode 100644 index 0000000000..b046a28d3b --- /dev/null +++ b/common/test/data/graded/course.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/common/test/data/self_assessment/course.xml b/common/test/data/self_assessment/course.xml deleted file mode 120000 index 49041310f6..0000000000 --- a/common/test/data/self_assessment/course.xml +++ /dev/null @@ -1 +0,0 @@ -roots/2012_Fall.xml \ No newline at end of file diff --git a/common/test/data/self_assessment/course.xml b/common/test/data/self_assessment/course.xml new file mode 100644 index 0000000000..ea7d5c420d --- /dev/null +++ b/common/test/data/self_assessment/course.xml @@ -0,0 +1 @@ + diff --git a/common/test/data/test_start_date/course.xml b/common/test/data/test_start_date/course.xml deleted file mode 120000 index 49041310f6..0000000000 --- a/common/test/data/test_start_date/course.xml +++ /dev/null @@ -1 +0,0 @@ -roots/2012_Fall.xml \ No newline at end of file diff --git a/common/test/data/test_start_date/course.xml b/common/test/data/test_start_date/course.xml new file mode 100644 index 0000000000..30dd5e0180 --- /dev/null +++ b/common/test/data/test_start_date/course.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/common/test/data/toy/course.xml b/common/test/data/toy/course.xml deleted file mode 120000 index 49041310f6..0000000000 --- a/common/test/data/toy/course.xml +++ /dev/null @@ -1 +0,0 @@ -roots/2012_Fall.xml \ No newline at end of file diff --git a/common/test/data/toy/course.xml b/common/test/data/toy/course.xml new file mode 100644 index 0000000000..b71528809b --- /dev/null +++ b/common/test/data/toy/course.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/lms/static/images/edge-on-edx-logo.png b/lms/static/images/edge-on-edx-logo.png deleted file mode 120000 index af5121d3f4..0000000000 --- a/lms/static/images/edge-on-edx-logo.png +++ /dev/null @@ -1 +0,0 @@ -../../../common/static/images/edge-logo-small.png \ No newline at end of file diff --git a/lms/static/images/edge-on-edx-logo.png b/lms/static/images/edge-on-edx-logo.png new file mode 100644 index 0000000000..41bd7127f5 Binary files /dev/null and b/lms/static/images/edge-on-edx-logo.png differ diff --git a/lms/static/sass/base/_mixins.scss b/lms/static/sass/base/_mixins.scss deleted file mode 120000 index 61597bb5eb..0000000000 --- a/lms/static/sass/base/_mixins.scss +++ /dev/null @@ -1 +0,0 @@ -../../../../common/static/sass/_mixins.scss \ No newline at end of file diff --git a/lms/static/sass/base/_mixins.scss b/lms/static/sass/base/_mixins.scss new file mode 100644 index 0000000000..58a92d1ee6 --- /dev/null +++ b/lms/static/sass/base/_mixins.scss @@ -0,0 +1,24 @@ +@function em($pxval, $base: 16) { + @return #{$pxval / $base}em; +} + +// Line-height +@function lh($amount: 1) { + @return $body-line-height * $amount; +} + +@mixin hide-text(){ + text-indent: -9999px; + overflow: hidden; + display: block; +} + +@mixin vertically-and-horizontally-centered ( $height, $width ) { + left: 50%; + margin-left: -$width / 2; + //margin-top: -$height / 2; + min-height: $height; + min-width: $width; + position: absolute; + top: 150px; +} diff --git a/lms/static/sass/bourbon b/lms/static/sass/bourbon deleted file mode 120000 index 6f53a8b404..0000000000 --- a/lms/static/sass/bourbon +++ /dev/null @@ -1 +0,0 @@ -../../../common/static/sass/bourbon/ \ No newline at end of file