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
69333759
Commit
69333759
authored
Jan 22, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly parse url for grading controller
parent
e6dd07a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
lms/djangoapps/courseware/tabs.py
+3
-4
lms/djangoapps/open_ended_grading/open_ended_util.py
+7
-0
lms/djangoapps/open_ended_grading/views.py
+4
-1
No files found.
lms/djangoapps/courseware/tabs.py
View file @
69333759
...
...
@@ -24,6 +24,7 @@ from static_replace import replace_urls
from
open_ended_grading.peer_grading_service
import
PeerGradingService
from
open_ended_grading.staff_grading_service
import
StaffGradingService
from
open_ended_grading.controller_query_service
import
ControllerQueryService
from
open_ended_grading
import
open_ended_util
from
student.models
import
unique_id_for_user
from
models
import
StudentModule
import
datetime
...
...
@@ -158,10 +159,8 @@ def _peer_grading(tab, user, course, active_page):
def
_combined_open_ended_grading
(
tab
,
user
,
course
,
active_page
):
if
user
.
is_authenticated
:
link
=
reverse
(
'open_ended_problems'
,
args
=
[
course
.
id
])
peer_grading_url
=
settings
.
PEER_GRADING_INTERFACE
split_url
=
peer_grading_url
.
split
(
"/"
)
controller_url
=
"http://"
+
split_url
[
2
]
+
"/grading_controller"
log
.
debug
(
controller_url
)
controller_url
=
open_ended_util
.
get_controller_url
()
controller_qs
=
ControllerQueryService
(
controller_url
)
student_id
=
unique_id_for_user
(
user
)
course_id
=
course
.
id
...
...
lms/djangoapps/open_ended_grading/open_ended_util.py
0 → 100644
View file @
69333759
from
django.conf
import
settings
def
get_controller_url
():
peer_grading_url
=
settings
.
PEER_GRADING_INTERFACE
split_url
=
peer_grading_url
.
split
(
"/"
)
controller_url
=
"http://"
+
split_url
[
2
]
+
"/grading_controller"
return
controller_url
lms/djangoapps/open_ended_grading/views.py
View file @
69333759
...
...
@@ -19,6 +19,8 @@ import json
from
.staff_grading
import
StaffGrading
from
student.models
import
unique_id_for_user
import
open_ended_util
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -28,7 +30,8 @@ if settings.MOCK_PEER_GRADING:
else
:
peer_gs
=
PeerGradingService
(
settings
.
PEER_GRADING_INTERFACE
)
controller_qs
=
ControllerQueryService
(
settings
.
PEER_GRADING_INTERFACE
)
controller_url
=
open_ended_util
.
get_controller_url
()
controller_qs
=
ControllerQueryService
(
controller_url
)
"""
Reverses the URL from the name and the course id, and then adds a trailing slash if
...
...
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