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
4c3c8a9a
Commit
4c3c8a9a
authored
May 21, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix certificate requests
parent
9dc48c00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
lms/djangoapps/certificates/queue.py
+1
-1
lms/djangoapps/certificates/views.py
+5
-5
No files found.
lms/djangoapps/certificates/queue.py
View file @
4c3c8a9a
...
...
@@ -178,7 +178,7 @@ class XQueueCertInterface(object):
self
.
request
.
user
=
student
self
.
request
.
session
=
{}
course_name
=
course
.
display_name
or
course_id
course_name
=
course
.
display_name
or
course_id
.
to_deprecated_string
()
is_whitelisted
=
self
.
whitelist
.
filter
(
user
=
student
,
course_id
=
course_id
,
whitelist
=
True
)
.
exists
()
grade
=
grades
.
grade
(
student
,
self
.
request
,
course
)
enrollment_mode
=
CourseEnrollment
.
enrollment_mode_for_user
(
student
,
course_id
)
...
...
lms/djangoapps/certificates/views.py
View file @
4c3c8a9a
...
...
@@ -31,13 +31,13 @@ def request_certificate(request):
xqci
=
XQueueCertInterface
()
username
=
request
.
user
.
username
student
=
User
.
objects
.
get
(
username
=
username
)
course_
id
=
request
.
POST
.
get
(
'course_id'
)
course
=
modulestore
()
.
get_
instance
(
course_id
,
CourseDescriptor
.
id_to_location
(
course_id
)
,
depth
=
2
)
course_
key
=
SlashSeparatedCourseKey
.
from_deprecated_string
(
request
.
POST
.
get
(
'course_id'
)
)
course
=
modulestore
()
.
get_
course
(
course_key
,
depth
=
2
)
status
=
certificate_status_for_student
(
student
,
course_
id
)[
'status'
]
status
=
certificate_status_for_student
(
student
,
course_
key
)[
'status'
]
if
status
in
[
CertificateStatuses
.
unavailable
,
CertificateStatuses
.
notpassing
,
CertificateStatuses
.
error
]:
logger
.
info
(
'Grading and certification requested for user {} in course {} via /request_certificate call'
.
format
(
username
,
course_
id
))
status
=
xqci
.
add_cert
(
student
,
course_
id
,
course
=
course
)
logger
.
info
(
'Grading and certification requested for user {} in course {} via /request_certificate call'
.
format
(
username
,
course_
key
))
status
=
xqci
.
add_cert
(
student
,
course_
key
,
course
=
course
)
return
HttpResponse
(
json
.
dumps
({
'add_status'
:
status
}),
mimetype
=
'application/json'
)
return
HttpResponse
(
json
.
dumps
({
'add_status'
:
'ERRORANONYMOUSUSER'
}),
mimetype
=
'application/json'
)
...
...
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