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
803b0c4f
Commit
803b0c4f
authored
Jul 17, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Callback uses userid rather than username
parent
269468ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lms/djangoapps/courseware/module_render.py
+3
-3
lms/urls.py
+1
-1
No files found.
lms/djangoapps/courseware/module_render.py
View file @
803b0c4f
...
...
@@ -210,7 +210,7 @@ def get_module(user, request, location, student_module_cache, position=None):
# Setup system context for module instance
ajax_url
=
settings
.
MITX_ROOT_URL
+
'/modx/'
+
descriptor
.
location
.
url
()
+
'/'
xqueue_callback_url
=
settings
.
MITX_ROOT_URL
+
'/xqueue/'
+
user
.
username
+
'/'
+
descriptor
.
location
.
url
()
+
'/'
xqueue_callback_url
=
settings
.
MITX_ROOT_URL
+
'/xqueue/'
+
str
(
user
.
id
)
+
'/'
+
descriptor
.
location
.
url
()
+
'/'
def
_get_module
(
location
):
(
module
,
_
,
_
,
_
)
=
get_module
(
user
,
request
,
location
,
student_module_cache
,
position
)
...
...
@@ -330,7 +330,7 @@ def add_histogram(module):
from
django.views.decorators.csrf
import
csrf_exempt
from
django.contrib.auth.models
import
User
@csrf_exempt
def
xqueue_callback
(
request
,
user
name
,
id
,
dispatch
):
def
xqueue_callback
(
request
,
user
id
,
id
,
dispatch
):
# Parse xqueue response
get
=
request
.
POST
.
copy
()
try
:
...
...
@@ -340,7 +340,7 @@ def xqueue_callback(request, username, id, dispatch):
raise
Exception
(
msg
)
# Retrieve target StudentModule
user
=
User
.
objects
.
get
(
username
=
username
)
user
=
User
.
objects
.
get
(
id
=
userid
)
student_module_cache
=
StudentModuleCache
(
user
,
modulestore
()
.
get_item
(
id
))
instance
,
instance_module
,
shared_module
,
module_type
=
get_module
(
request
.
user
,
request
,
id
,
student_module_cache
)
...
...
lms/urls.py
View file @
803b0c4f
...
...
@@ -55,7 +55,7 @@ if settings.COURSEWARE_ENABLED:
url
(
r'^masquerade/'
,
include
(
'masquerade.urls'
)),
url
(
r'^jumpto/(?P<probname>[^/]+)/$'
,
'courseware.views.jump_to'
),
url
(
r'^modx/(?P<id>.*?)/(?P<dispatch>[^/]*)$'
,
'courseware.module_render.modx_dispatch'
),
#reset_problem'),
url
(
r'^xqueue/(?P<user
name
>[^/]*)/(?P<id>.*?)/(?P<dispatch>[^/]*)$'
,
'courseware.module_render.xqueue_callback'
),
url
(
r'^xqueue/(?P<user
id
>[^/]*)/(?P<id>.*?)/(?P<dispatch>[^/]*)$'
,
'courseware.module_render.xqueue_callback'
),
url
(
r'^change_setting$'
,
'student.views.change_setting'
),
url
(
r'^s/(?P<template>[^/]*)$'
,
'static_template_view.views.auth_index'
),
url
(
r'^book/(?P<page>[^/]*)$'
,
'staticbook.views.index'
),
...
...
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