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
65dd3cc9
Commit
65dd3cc9
authored
May 06, 2013
by
Steve Strassmann
Browse files
Options
Browse Files
Download
Plain Diff
pull from master
parents
c0278d0f
5e288b60
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
20 deletions
+23
-20
cms/urls.py
+4
-6
common/djangoapps/heartbeat/urls.py
+1
-1
common/lib/capa/capa/responsetypes.py
+13
-3
lms/djangoapps/django_comment_client/base/urls.py
+1
-3
lms/djangoapps/django_comment_client/forum/urls.py
+1
-2
lms/djangoapps/django_comment_client/urls.py
+1
-1
lms/djangoapps/simplewiki/urls.py
+1
-1
lms/urls.py
+1
-3
No files found.
cms/urls.py
View file @
65dd3cc9
...
@@ -6,7 +6,7 @@ from . import one_time_startup
...
@@ -6,7 +6,7 @@ from . import one_time_startup
# from django.contrib import admin
# from django.contrib import admin
# admin.autodiscover()
# admin.autodiscover()
urlpatterns
=
(
''
,
urlpatterns
=
(
''
,
# nopep8
url
(
r'^$'
,
'contentstore.views.howitworks'
,
name
=
'homepage'
),
url
(
r'^$'
,
'contentstore.views.howitworks'
,
name
=
'homepage'
),
url
(
r'^listing'
,
'contentstore.views.index'
,
name
=
'index'
),
url
(
r'^listing'
,
'contentstore.views.index'
,
name
=
'index'
),
url
(
r'^edit/(?P<location>.*?)$'
,
'contentstore.views.edit_unit'
,
name
=
'edit_unit'
),
url
(
r'^edit/(?P<location>.*?)$'
,
'contentstore.views.edit_unit'
,
name
=
'edit_unit'
),
...
@@ -118,17 +118,17 @@ urlpatterns += (
...
@@ -118,17 +118,17 @@ urlpatterns += (
# static/proof-of-concept views
# static/proof-of-concept views
url
(
r'^ux-alerts$'
,
'contentstore.views.ux_alerts'
,
name
=
'ux-alerts'
)
url
(
r'^ux-alerts$'
,
'contentstore.views.ux_alerts'
,
name
=
'ux-alerts'
)
)
)
js_info_dict
=
{
js_info_dict
=
{
'domain'
:
'djangojs'
,
'domain'
:
'djangojs'
,
'packages'
:
(
'cms'
,),
'packages'
:
(
'cms'
,),
}
}
urlpatterns
+=
(
urlpatterns
+=
(
# Serve catalog of localized strings to be rendered by Javascript
# Serve catalog of localized strings to be rendered by Javascript
url
(
r'^jsi18n/$'
,
'django.views.i18n.javascript_catalog'
,
js_info_dict
),
url
(
r'^jsi18n/$'
,
'django.views.i18n.javascript_catalog'
,
js_info_dict
),
)
)
if
settings
.
ENABLE_JASMINE
:
if
settings
.
ENABLE_JASMINE
:
...
@@ -140,5 +140,3 @@ urlpatterns = patterns(*urlpatterns)
...
@@ -140,5 +140,3 @@ urlpatterns = patterns(*urlpatterns)
# Custom error pages
# Custom error pages
handler404
=
'contentstore.views.render_404'
handler404
=
'contentstore.views.render_404'
handler500
=
'contentstore.views.render_500'
handler500
=
'contentstore.views.render_500'
common/djangoapps/heartbeat/urls.py
View file @
65dd3cc9
from
django.conf.urls
import
*
from
django.conf.urls
import
*
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
# nopep8
url
(
r'^$'
,
'heartbeat.views.heartbeat'
,
name
=
'heartbeat'
),
url
(
r'^$'
,
'heartbeat.views.heartbeat'
,
name
=
'heartbeat'
),
)
)
common/lib/capa/capa/responsetypes.py
View file @
65dd3cc9
...
@@ -1851,6 +1851,19 @@ class FormulaResponse(LoncapaResponse):
...
@@ -1851,6 +1851,19 @@ class FormulaResponse(LoncapaResponse):
'formularesponse: undefined variable in given=
%
s'
%
given
)
'formularesponse: undefined variable in given=
%
s'
%
given
)
raise
StudentInputError
(
raise
StudentInputError
(
"Invalid input: "
+
uv
.
message
+
" not permitted in answer"
)
"Invalid input: "
+
uv
.
message
+
" not permitted in answer"
)
except
ValueError
as
ve
:
if
'factorial'
in
ve
.
message
:
# This is thrown when fact() or factorial() is used in a formularesponse answer
# that tests on negative and/or non-integer inputs
# ve.message will be: `factorial() only accepts integral values` or `factorial() not defined for negative values`
log
.
debug
(
'formularesponse: factorial function used in response that tests negative and/or non-integer inputs. given={0}'
.
format
(
given
))
raise
StudentInputError
(
"factorial function not permitted in answer for this problem. Provided answer was: {0}"
.
format
(
given
))
# If non-factorial related ValueError thrown, handle it the same as any other Exception
log
.
debug
(
'formularesponse: error {0} in formula'
.
format
(
ve
))
raise
StudentInputError
(
"Invalid input: Could not parse '
%
s' as a formula"
%
cgi
.
escape
(
given
))
except
Exception
as
err
:
except
Exception
as
err
:
# traceback.print_exc()
# traceback.print_exc()
log
.
debug
(
'formularesponse: error
%
s in formula'
%
err
)
log
.
debug
(
'formularesponse: error
%
s in formula'
%
err
)
...
@@ -1983,7 +1996,6 @@ class ImageResponse(LoncapaResponse):
...
@@ -1983,7 +1996,6 @@ class ImageResponse(LoncapaResponse):
self
.
ielements
=
self
.
inputfields
self
.
ielements
=
self
.
inputfields
self
.
answer_ids
=
[
ie
.
get
(
'id'
)
for
ie
in
self
.
ielements
]
self
.
answer_ids
=
[
ie
.
get
(
'id'
)
for
ie
in
self
.
ielements
]
def
get_score
(
self
,
student_answers
):
def
get_score
(
self
,
student_answers
):
correct_map
=
CorrectMap
()
correct_map
=
CorrectMap
()
expectedset
=
self
.
get_mapped_answers
()
expectedset
=
self
.
get_mapped_answers
()
...
@@ -2075,8 +2087,6 @@ class ImageResponse(LoncapaResponse):
...
@@ -2075,8 +2087,6 @@ class ImageResponse(LoncapaResponse):
return
answers
return
answers
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
...
...
lms/djangoapps/django_comment_client/base/urls.py
View file @
65dd3cc9
from
django.conf.urls.defaults
import
url
,
patterns
from
django.conf.urls.defaults
import
url
,
patterns
import
django_comment_client.base.views
urlpatterns
=
patterns
(
'django_comment_client.base.views'
,
urlpatterns
=
patterns
(
'django_comment_client.base.views'
,
# nopep8
url
(
r'upload$'
,
'upload'
,
name
=
'upload'
),
url
(
r'upload$'
,
'upload'
,
name
=
'upload'
),
url
(
r'users/(?P<user_id>\w+)/update_moderator_status$'
,
'update_moderator_status'
,
name
=
'update_moderator_status'
),
url
(
r'users/(?P<user_id>\w+)/update_moderator_status$'
,
'update_moderator_status'
,
name
=
'update_moderator_status'
),
url
(
r'threads/tags/autocomplete$'
,
'tags_autocomplete'
,
name
=
'tags_autocomplete'
),
url
(
r'threads/tags/autocomplete$'
,
'tags_autocomplete'
,
name
=
'tags_autocomplete'
),
...
...
lms/djangoapps/django_comment_client/forum/urls.py
View file @
65dd3cc9
from
django.conf.urls.defaults
import
url
,
patterns
from
django.conf.urls.defaults
import
url
,
patterns
import
django_comment_client.forum.views
urlpatterns
=
patterns
(
'django_comment_client.forum.views'
,
urlpatterns
=
patterns
(
'django_comment_client.forum.views'
,
# nopep8
url
(
r'users/(?P<user_id>\w+)/followed$'
,
'followed_threads'
,
name
=
'followed_threads'
),
url
(
r'users/(?P<user_id>\w+)/followed$'
,
'followed_threads'
,
name
=
'followed_threads'
),
url
(
r'users/(?P<user_id>\w+)$'
,
'user_profile'
,
name
=
'user_profile'
),
url
(
r'users/(?P<user_id>\w+)$'
,
'user_profile'
,
name
=
'user_profile'
),
url
(
r'^(?P<discussion_id>[\w\-.]+)/threads/(?P<thread_id>\w+)$'
,
'single_thread'
,
name
=
'single_thread'
),
url
(
r'^(?P<discussion_id>[\w\-.]+)/threads/(?P<thread_id>\w+)$'
,
'single_thread'
,
name
=
'single_thread'
),
...
...
lms/djangoapps/django_comment_client/urls.py
View file @
65dd3cc9
from
django.conf.urls.defaults
import
url
,
patterns
,
include
from
django.conf.urls.defaults
import
url
,
patterns
,
include
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
# nopep8
url
(
r'forum/?'
,
include
(
'django_comment_client.forum.urls'
)),
url
(
r'forum/?'
,
include
(
'django_comment_client.forum.urls'
)),
url
(
r''
,
include
(
'django_comment_client.base.urls'
)),
url
(
r''
,
include
(
'django_comment_client.base.urls'
)),
)
)
lms/djangoapps/simplewiki/urls.py
View file @
65dd3cc9
...
@@ -4,7 +4,7 @@ namespace_regex = r"[a-zA-Z\d._-]+"
...
@@ -4,7 +4,7 @@ namespace_regex = r"[a-zA-Z\d._-]+"
article_slug
=
r'/(?P<article_path>'
+
namespace_regex
+
r'/[a-zA-Z\d_-]*)'
article_slug
=
r'/(?P<article_path>'
+
namespace_regex
+
r'/[a-zA-Z\d_-]*)'
namespace
=
r'/(?P<namespace>'
+
namespace_regex
+
r')'
namespace
=
r'/(?P<namespace>'
+
namespace_regex
+
r')'
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
# nopep8
url
(
r'^$'
,
'simplewiki.views.root_redirect'
,
name
=
'wiki_root'
),
url
(
r'^$'
,
'simplewiki.views.root_redirect'
,
name
=
'wiki_root'
),
url
(
r'^view'
+
article_slug
,
'simplewiki.views.view'
,
name
=
'wiki_view'
),
url
(
r'^view'
+
article_slug
,
'simplewiki.views.view'
,
name
=
'wiki_view'
),
url
(
r'^view_revision/(?P<revision_number>[0-9]+)'
+
article_slug
,
'simplewiki.views.view_revision'
,
name
=
'wiki_view_revision'
),
url
(
r'^view_revision/(?P<revision_number>[0-9]+)'
+
article_slug
,
'simplewiki.views.view_revision'
,
name
=
'wiki_view_revision'
),
...
...
lms/urls.py
View file @
65dd3cc9
...
@@ -2,7 +2,6 @@ from django.conf import settings
...
@@ -2,7 +2,6 @@ from django.conf import settings
from
django.conf.urls
import
patterns
,
include
,
url
from
django.conf.urls
import
patterns
,
include
,
url
from
django.contrib
import
admin
from
django.contrib
import
admin
from
django.conf.urls.static
import
static
from
django.conf.urls.static
import
static
from
django.views.generic
import
RedirectView
from
.
import
one_time_startup
from
.
import
one_time_startup
...
@@ -10,10 +9,9 @@ import django.contrib.auth.views
...
@@ -10,10 +9,9 @@ import django.contrib.auth.views
# Uncomment the next two lines to enable the admin:
# Uncomment the next two lines to enable the admin:
if
settings
.
DEBUG
:
if
settings
.
DEBUG
:
from
django.contrib
import
admin
admin
.
autodiscover
()
admin
.
autodiscover
()
urlpatterns
=
(
''
,
urlpatterns
=
(
''
,
# nopep8
# certificate view
# certificate view
url
(
r'^update_certificate$'
,
'certificates.views.update_certificate'
),
url
(
r'^update_certificate$'
,
'certificates.views.update_certificate'
),
...
...
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