Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
55922f89
Commit
55922f89
authored
Nov 20, 2014
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Plain Diff
hotfix-2014-11-20
parents
25146946
7d36d11b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
52 deletions
+6
-52
cms/static/coffee/spec/main.coffee
+1
-1
cms/static/coffee/spec/main_squire.coffee
+1
-1
cms/static/require-config.js
+1
-1
common/djangoapps/enrollment/tests/test_views.py
+0
-42
common/djangoapps/enrollment/views.py
+1
-5
common/templates/mathjax_include.html
+1
-1
lms/static/js/spec/main.js
+1
-1
No files found.
cms/static/coffee/spec/main.coffee
View file @
55922f89
...
@@ -43,7 +43,7 @@ requirejs.config({
...
@@ -43,7 +43,7 @@ requirejs.config({
"domReady"
:
"xmodule_js/common_static/js/vendor/domReady"
,
"domReady"
:
"xmodule_js/common_static/js/vendor/domReady"
,
"URI"
:
"xmodule_js/common_static/js/vendor/URI.min"
,
"URI"
:
"xmodule_js/common_static/js/vendor/URI.min"
,
"mathjax"
:
"//
edx-static.s3.amazonaws.com/mathjax-MathJax-727332c
/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured"
,
"mathjax"
:
"//
cdn.mathjax.org/mathjax/2.2-latest
/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured"
,
"youtube"
:
"//www.youtube.com/player_api?noext"
,
"youtube"
:
"//www.youtube.com/player_api?noext"
,
"tender"
:
"//edxedge.tenderapp.com/tender_widget"
,
"tender"
:
"//edxedge.tenderapp.com/tender_widget"
,
...
...
cms/static/coffee/spec/main_squire.coffee
View file @
55922f89
...
@@ -38,7 +38,7 @@ requirejs.config({
...
@@ -38,7 +38,7 @@ requirejs.config({
"domReady"
:
"xmodule_js/common_static/js/vendor/domReady"
,
"domReady"
:
"xmodule_js/common_static/js/vendor/domReady"
,
"URI"
:
"xmodule_js/common_static/js/vendor/URI.min"
,
"URI"
:
"xmodule_js/common_static/js/vendor/URI.min"
,
"mathjax"
:
"//
edx-static.s3.amazonaws.com/mathjax-MathJax-727332c
/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured"
,
"mathjax"
:
"//
cdn.mathjax.org/mathjax/2.2-latest
/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured"
,
"youtube"
:
"//www.youtube.com/player_api?noext"
,
"youtube"
:
"//www.youtube.com/player_api?noext"
,
"tender"
:
"//edxedge.tenderapp.com/tender_widget.js"
"tender"
:
"//edxedge.tenderapp.com/tender_widget.js"
...
...
cms/static/require-config.js
View file @
55922f89
...
@@ -69,7 +69,7 @@ require.config({
...
@@ -69,7 +69,7 @@ require.config({
// so that require doesn't fall over
// so that require doesn't fall over
"js/src/tender_fallback"
"js/src/tender_fallback"
],
],
"mathjax"
:
"//
edx-static.s3.amazonaws.com/mathjax-MathJax-727332c
/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured"
,
"mathjax"
:
"//
cdn.mathjax.org/mathjax/2.2-latest
/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured"
,
"youtube"
:
[
"youtube"
:
[
// youtube URL does not end in ".js". We add "?noext" to the path so
// youtube URL does not end in ".js". We add "?noext" to the path so
// that require.js adds the ".js" to the query component of the URL,
// that require.js adds the ".js" to the query component of the URL,
...
...
common/djangoapps/enrollment/tests/test_views.py
View file @
55922f89
...
@@ -87,28 +87,6 @@ class EnrollmentTest(ModuleStoreTestCase, APITestCase):
...
@@ -87,28 +87,6 @@ class EnrollmentTest(ModuleStoreTestCase, APITestCase):
self
.
assertEqual
(
1
,
len
(
data
[
'course_modes'
]))
self
.
assertEqual
(
1
,
len
(
data
[
'course_modes'
]))
self
.
assertEqual
(
'professional'
,
data
[
'course_modes'
][
0
][
'slug'
])
self
.
assertEqual
(
'professional'
,
data
[
'course_modes'
][
0
][
'slug'
])
def
test_unenroll
(
self
):
# Create a course mode.
CourseModeFactory
.
create
(
course_id
=
self
.
course
.
id
,
mode_slug
=
'honor'
,
mode_display_name
=
'Honor'
,
)
# Create an enrollment
resp
=
self
.
_create_enrollment
()
# Deactivate the enrollment in the course and verify the URL we get sent to
resp
=
self
.
client
.
post
(
reverse
(
'courseenrollment'
,
kwargs
=
{
'course_id'
:
(
unicode
(
self
.
course
.
id
))}
),
{
'deactivate'
:
True
})
self
.
assertEqual
(
resp
.
status_code
,
status
.
HTTP_200_OK
)
data
=
json
.
loads
(
resp
.
content
)
self
.
assertEqual
(
unicode
(
self
.
course
.
id
),
data
[
'course'
][
'course_id'
])
self
.
assertEqual
(
'honor'
,
data
[
'mode'
])
self
.
assertFalse
(
data
[
'is_active'
])
def
test_user_not_authenticated
(
self
):
def
test_user_not_authenticated
(
self
):
# Log out, so we're no longer authenticated
# Log out, so we're no longer authenticated
self
.
client
.
logout
()
self
.
client
.
logout
()
...
@@ -133,26 +111,6 @@ class EnrollmentTest(ModuleStoreTestCase, APITestCase):
...
@@ -133,26 +111,6 @@ class EnrollmentTest(ModuleStoreTestCase, APITestCase):
resp
=
self
.
client
.
post
(
reverse
(
'courseenrollment'
,
kwargs
=
{
'course_id'
:
(
unicode
(
self
.
course
.
id
))}))
resp
=
self
.
client
.
post
(
reverse
(
'courseenrollment'
,
kwargs
=
{
'course_id'
:
(
unicode
(
self
.
course
.
id
))}))
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
def
test_unenroll_not_enrolled_in_course
(
self
):
# Deactivate the enrollment in the course and verify the URL we get sent to
resp
=
self
.
client
.
post
(
reverse
(
'courseenrollment'
,
kwargs
=
{
'course_id'
:
(
unicode
(
self
.
course
.
id
))}
),
{
'deactivate'
:
True
})
self
.
assertEqual
(
resp
.
status_code
,
status
.
HTTP_400_BAD_REQUEST
)
def
test_invalid_enrollment_mode
(
self
):
# Request an enrollment with verified mode, which does not exist for this course.
resp
=
self
.
client
.
post
(
reverse
(
'courseenrollment'
,
kwargs
=
{
'course_id'
:
(
unicode
(
self
.
course
.
id
))}),
{
'mode'
:
'verified'
}
)
self
.
assertEqual
(
resp
.
status_code
,
status
.
HTTP_400_BAD_REQUEST
)
data
=
json
.
loads
(
resp
.
content
)
self
.
assertEqual
(
unicode
(
self
.
course
.
id
),
data
[
'course_id'
])
self
.
assertEqual
(
'honor'
,
data
[
'course_modes'
][
0
][
'slug'
])
def
test_with_invalid_course_id
(
self
):
def
test_with_invalid_course_id
(
self
):
# Create an enrollment
# Create an enrollment
resp
=
self
.
client
.
post
(
reverse
(
'courseenrollment'
,
kwargs
=
{
'course_id'
:
'entirely/fake/course'
}))
resp
=
self
.
client
.
post
(
reverse
(
'courseenrollment'
,
kwargs
=
{
'course_id'
:
'entirely/fake/course'
}))
...
...
common/djangoapps/enrollment/views.py
View file @
55922f89
...
@@ -108,11 +108,7 @@ def get_course_enrollment(request, course_id=None):
...
@@ -108,11 +108,7 @@ def get_course_enrollment(request, course_id=None):
"""
"""
try
:
try
:
if
'mode'
in
request
.
DATA
:
if
course_id
and
request
.
method
==
'POST'
:
return
Response
(
api
.
update_enrollment
(
request
.
user
.
username
,
course_id
,
request
.
DATA
[
'mode'
]))
elif
'deactivate'
in
request
.
DATA
:
return
Response
(
api
.
deactivate_enrollment
(
request
.
user
.
username
,
course_id
))
elif
course_id
and
request
.
method
==
'POST'
:
return
Response
(
api
.
add_enrollment
(
request
.
user
.
username
,
course_id
))
return
Response
(
api
.
add_enrollment
(
request
.
user
.
username
,
course_id
))
else
:
else
:
return
Response
(
api
.
get_enrollment
(
request
.
user
.
username
,
course_id
))
return
Response
(
api
.
get_enrollment
(
request
.
user
.
username
,
course_id
))
...
...
common/templates/mathjax_include.html
View file @
55922f89
...
@@ -33,4 +33,4 @@
...
@@ -33,4 +33,4 @@
<!-- This must appear after all mathjax-config blocks, so it is after the imports from the other templates.
<!-- This must appear after all mathjax-config blocks, so it is after the imports from the other templates.
It can't be run through static.url because MathJax uses crazy url introspection to do lazy loading of
It can't be run through static.url because MathJax uses crazy url introspection to do lazy loading of
MathJax extension libraries -->
MathJax extension libraries -->
<script
type=
"text/javascript"
src=
"https://
edx-static.s3.amazonaws.com/mathjax-MathJax-727332c
/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"
></script>
<script
type=
"text/javascript"
src=
"https://
cdn.mathjax.org/mathjax/2.2-latest
/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"
></script>
lms/static/js/spec/main.js
View file @
55922f89
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
'jasmine.async'
:
'xmodule_js/common_static/js/vendor/jasmine.async'
,
'jasmine.async'
:
'xmodule_js/common_static/js/vendor/jasmine.async'
,
'draggabilly'
:
'xmodule_js/common_static/js/vendor/draggabilly.pkgd'
,
'draggabilly'
:
'xmodule_js/common_static/js/vendor/draggabilly.pkgd'
,
'domReady'
:
'xmodule_js/common_static/js/vendor/domReady'
,
'domReady'
:
'xmodule_js/common_static/js/vendor/domReady'
,
'mathjax'
:
'//
edx-static.s3.amazonaws.com/mathjax-MathJax-727332c
/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured'
,
'mathjax'
:
'//
cdn.mathjax.org/mathjax/2.2-latest
/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured'
,
'youtube'
:
'//www.youtube.com/player_api?noext'
,
'youtube'
:
'//www.youtube.com/player_api?noext'
,
'tender'
:
'//edxedge.tenderapp.com/tender_widget'
,
'tender'
:
'//edxedge.tenderapp.com/tender_widget'
,
'coffee/src/ajax_prefix'
:
'xmodule_js/common_static/coffee/src/ajax_prefix'
,
'coffee/src/ajax_prefix'
:
'xmodule_js/common_static/coffee/src/ajax_prefix'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment