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
34034aa6
Commit
34034aa6
authored
Jul 29, 2016
by
Amir Qayyum Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made ccx id unicode in app
parent
d5fcb609
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
lms/djangoapps/ccx/api/v0/views.py
+1
-1
lms/djangoapps/ccx/tasks.py
+1
-1
lms/djangoapps/ccx/views.py
+5
-5
No files found.
lms/djangoapps/ccx/api/v0/views.py
View file @
34034aa6
...
...
@@ -492,7 +492,7 @@ class CCXListView(GenericAPIView):
make_user_coach
(
coach
,
master_course_key
)
# pull the ccx course key
ccx_course_key
=
CCXLocator
.
from_course_locator
(
master_course_object
.
id
,
ccx_course_object
.
id
)
ccx_course_key
=
CCXLocator
.
from_course_locator
(
master_course_object
.
id
,
unicode
(
ccx_course_object
.
id
)
)
# enroll the coach in the newly created ccx
email_params
=
get_email_params
(
master_course_object
,
...
...
lms/djangoapps/ccx/tasks.py
View file @
34034aa6
...
...
@@ -33,7 +33,7 @@ def send_ccx_course_published(course_key):
course_key
=
CourseLocator
.
from_string
(
course_key
)
for
ccx
in
CustomCourseForEdX
.
objects
.
filter
(
course_id
=
course_key
):
try
:
ccx_key
=
CCXLocator
.
from_course_locator
(
course_key
,
ccx
.
id
)
ccx_key
=
CCXLocator
.
from_course_locator
(
course_key
,
unicode
(
ccx
.
id
)
)
except
InvalidKeyError
:
log
.
info
(
'Attempt to publish course with deprecated id. Course:
%
s. CCX:
%
s'
,
course_key
,
ccx
.
id
)
continue
...
...
lms/djangoapps/ccx/views.py
View file @
34034aa6
...
...
@@ -133,7 +133,7 @@ def dashboard(request, course, ccx=None):
if
ccx
:
url
=
reverse
(
'ccx_coach_dashboard'
,
kwargs
=
{
'course_id'
:
CCXLocator
.
from_course_locator
(
course
.
id
,
ccx
.
id
)}
kwargs
=
{
'course_id'
:
CCXLocator
.
from_course_locator
(
course
.
id
,
unicode
(
ccx
.
id
)
)}
)
return
redirect
(
url
)
...
...
@@ -218,7 +218,7 @@ def create_ccx(request, course, ccx=None):
for
vertical
in
sequential
.
get_children
():
override_field_for_ccx
(
ccx
,
vertical
,
hidden
,
True
)
ccx_id
=
CCXLocator
.
from_course_locator
(
course
.
id
,
ccx
.
id
)
ccx_id
=
CCXLocator
.
from_course_locator
(
course
.
id
,
unicode
(
ccx
.
id
)
)
url
=
reverse
(
'ccx_coach_dashboard'
,
kwargs
=
{
'course_id'
:
ccx_id
})
...
...
@@ -373,7 +373,7 @@ def set_grading_policy(request, course, ccx=None):
url
=
reverse
(
'ccx_coach_dashboard'
,
kwargs
=
{
'course_id'
:
CCXLocator
.
from_course_locator
(
course
.
id
,
ccx
.
id
)}
kwargs
=
{
'course_id'
:
CCXLocator
.
from_course_locator
(
course
.
id
,
unicode
(
ccx
.
id
)
)}
)
return
redirect
(
url
)
...
...
@@ -474,7 +474,7 @@ def ccx_invite(request, course, ccx=None):
identifiers_raw
=
request
.
POST
.
get
(
'student-ids'
)
identifiers
=
_split_input_list
(
identifiers_raw
)
email_students
=
'email-students'
in
request
.
POST
course_key
=
CCXLocator
.
from_course_locator
(
course
.
id
,
ccx
.
id
)
course_key
=
CCXLocator
.
from_course_locator
(
course
.
id
,
unicode
(
ccx
.
id
)
)
email_params
=
get_email_params
(
course
,
auto_enroll
=
True
,
course_key
=
course_key
,
display_name
=
ccx
.
display_name
)
ccx_students_enrolling_center
(
action
,
identifiers
,
email_students
,
course_key
,
email_params
,
ccx
.
coach
)
...
...
@@ -497,7 +497,7 @@ def ccx_student_management(request, course, ccx=None):
student_id
=
request
.
POST
.
get
(
'student-id'
,
''
)
email_students
=
'email-students'
in
request
.
POST
identifiers
=
[
student_id
]
course_key
=
CCXLocator
.
from_course_locator
(
course
.
id
,
ccx
.
id
)
course_key
=
CCXLocator
.
from_course_locator
(
course
.
id
,
unicode
(
ccx
.
id
)
)
email_params
=
get_email_params
(
course
,
auto_enroll
=
True
,
course_key
=
course_key
,
display_name
=
ccx
.
display_name
)
errors
=
ccx_students_enrolling_center
(
action
,
identifiers
,
email_students
,
course_key
,
email_params
,
ccx
.
coach
)
...
...
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