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
da0664c5
Commit
da0664c5
authored
Dec 16, 2015
by
Saleem Latif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add i18n to strings
parent
8b2c4994
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lms/djangoapps/certificates/models.py
+6
-3
No files found.
lms/djangoapps/certificates/models.py
View file @
da0664c5
...
...
@@ -268,7 +268,8 @@ class CertificateGenerationHistory(TimeStampedModel):
"""
Return "regenerated" if record corresponds to Certificate Regeneration task, otherwise returns 'generated'
"""
return
"regenerated"
if
self
.
is_regeneration
else
"generated"
# Translators: This is a past-tense verb that is used for task action messages.
return
_
(
"regenerated"
)
if
self
.
is_regeneration
else
_
(
"generated"
)
def
get_certificate_generation_candidates
(
self
):
"""
...
...
@@ -285,7 +286,8 @@ class CertificateGenerationHistory(TimeStampedModel):
task_input_json
=
json
.
loads
(
task_input
)
except
ValueError
:
# if task input is empty, it means certificates were generated for all learners
return
"All learners"
# Translators: This string represents task was executed for all learners.
return
_
(
"All learners"
)
# get statuses_to_regenerate from task_input convert statuses to human readable strings and return
statuses
=
task_input_json
.
get
(
'statuses_to_regenerate'
,
None
)
...
...
@@ -296,7 +298,8 @@ class CertificateGenerationHistory(TimeStampedModel):
# If students is present in task_input then, certificate generation task was run to
# generate certificates for white listed students otherwise it is for all students.
return
"For exceptions"
if
'students'
in
task_input_json
else
"All learners"
# Translators: This string represents task was executed for students having exceptions.
return
_
(
"For exceptions"
)
if
'students'
in
task_input_json
else
_
(
"All learners"
)
class
Meta
(
object
):
app_label
=
"certificates"
...
...
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