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
6858affe
Commit
6858affe
authored
Nov 20, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1067 from MITx/bugfix/victor/dashboard
cert bugfix: handle students who don't have a grade
parents
f23cfb5b
34f3457b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
common/djangoapps/student/views.py
+20
-6
No files found.
common/djangoapps/student/views.py
View file @
6858affe
...
...
@@ -149,11 +149,14 @@ def _cert_info(user, course, cert_status):
Implements the logic for cert_info -- split out for testing.
"""
default_status
=
'processing'
default_info
=
{
'status'
:
default_status
,
'show_disabled_download_button'
:
False
,
'show_download_url'
:
False
,
'show_survey_button'
:
False
}
if
cert_status
is
None
:
return
{
'status'
:
default_status
,
'show_disabled_download_button'
:
False
,
'show_download_url'
:
False
,
'show_survey_button'
:
False
}
return
default_info
# simplify the status for the template using this lookup table
template_state
=
{
...
...
@@ -178,10 +181,21 @@ def _cert_info(user, course, cert_status):
d
[
'show_survey_button'
]
=
False
if
status
==
'ready'
:
d
[
'download_url'
]
=
cert_status
[
'download_url'
]
if
'download_url'
not
in
cert_status
:
log
.
warning
(
"User
%
s has a downloadable cert for
%
s, but no download url"
,
user
.
username
,
course
.
id
)
return
default_status
else
:
d
[
'download_url'
]
=
cert_status
[
'download_url'
]
if
status
in
(
'generating'
,
'ready'
,
'notpassing'
):
d
[
'grade'
]
=
cert_status
[
'grade'
]
if
'grade'
not
in
cert_status
:
# Note: as of 11/20/2012, we know there are students in this state-- cs169.1x,
# who need to be regraded (we weren't tracking 'notpassing' at first).
# We can add a log.warning here once we think it shouldn't happen.
return
default_status
else
:
d
[
'grade'
]
=
cert_status
[
'grade'
]
return
d
...
...
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