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
5d6687d8
Commit
5d6687d8
authored
Nov 05, 2012
by
John Jarvis
Committed by
Carlos Andrés Rocha
Nov 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding error_reason
parent
076619c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
lms/djangoapps/certificates/models.py
+1
-0
lms/djangoapps/certificates/views.py
+14
-0
No files found.
lms/djangoapps/certificates/models.py
View file @
5d6687d8
...
...
@@ -63,6 +63,7 @@ class GeneratedCertificate(models.Model):
auto_now_add
=
True
,
default
=
datetime
.
now
)
modified_date
=
models
.
DateTimeField
(
auto_now
=
True
,
default
=
datetime
.
now
)
error_reason
=
models
.
CharField
(
max_length
=
512
,
blank
=
True
,
default
=
''
)
class
Meta
:
unique_together
=
((
'user'
,
'course_id'
),)
...
...
lms/djangoapps/certificates/views.py
View file @
5d6687d8
...
...
@@ -43,6 +43,20 @@ def update_certificate(request):
if
'error'
in
xqueue_body
:
cert
.
status
=
status
.
error
if
'error_reason'
in
xqueue_body
:
# Hopefully we will record a meaningful error
# here if something bad happened during the
# certificate generation process
#
# example:
# (aamorm BerkeleyX/CS169.1x/2012_Fall)
# <class 'simples3.bucket.S3Error'>:
# HTTP error (reason=error(32, 'Broken pipe'), filename=None) :
# certificate_agent.py:175
cert
.
error_reason
=
xqueue_body
[
'error_reason'
]
else
:
if
cert
.
status
in
[
status
.
generating
,
status
.
regenerating
]:
cert
.
download_uuid
=
xqueue_body
[
'download_uuid'
]
...
...
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