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
5edae3ed
Commit
5edae3ed
authored
Apr 25, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2780 from FiloSottile/progress_success_button
Show a success button at the top of the Progress page
parents
b38a9236
1ce7a245
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
lms/envs/common.py
+9
-0
lms/static/sass/course/_profile.scss
+18
-0
lms/templates/courseware/progress.html
+16
-0
No files found.
lms/envs/common.py
View file @
5edae3ed
...
...
@@ -243,6 +243,10 @@ FEATURES = {
# Turn off Advanced Security by default
'ADVANCED_SECURITY'
:
False
,
# Show a "Download your certificate" on the Progress page if the lowest
# nonzero grade cutoff is met
'SHOW_PROGRESS_SUCCESS_BUTTON'
:
False
,
}
# Used for A/B testing
...
...
@@ -1289,6 +1293,11 @@ GRADES_DOWNLOAD = {
'ROOT_PATH'
:
'/tmp/edx-s3/grades'
,
}
######################## PROGRESS SUCCESS BUTTON ##############################
# The following fields are available in the URL: {course_id} {student_id}
PROGRESS_SUCCESS_BUTTON_URL
=
'http://<domain>/<path>/{course_id}'
PROGRESS_SUCCESS_BUTTON_TEXT_OVERRIDE
=
None
#### PASSWORD POLICY SETTINGS #####
PASSWORD_MIN_LENGTH
=
None
...
...
lms/static/sass/course/_profile.scss
View file @
5edae3ed
...
...
@@ -148,6 +148,24 @@
}
}
#course-success
{
margin-bottom
:
30px
;
text-align
:
center
;
>
a
{
@include
button
(
simple
,
$button-color
);
@include
box-sizing
(
border-box
);
border-radius
:
3px
;
font
:
normal
15px
/
1
.6rem
$sans-serif
;
letter-spacing
:
0
;
padding
:
5px
18px
6px
;
text-align
:
center
;
&
:hover
,
&
:focus
{
text-decoration
:
none
;
}
}
}
#grade-detail-graph
{
min-height
:
400px
;
width
:
100%
;
...
...
lms/templates/courseware/progress.html
View file @
5edae3ed
...
...
@@ -48,6 +48,22 @@ from django.conf import settings
<h1>
${_("Course Progress for Student '{username}' ({email})").format(username=student.username, email=student.email)}
</h1>
</header>
%if settings.FEATURES.get("SHOW_PROGRESS_SUCCESS_BUTTON"):
<
%
SUCCESS_BUTTON_URL =
settings.PROGRESS_SUCCESS_BUTTON_URL.format(
course_id=
course.id,
student_id=
student.id)
nonzero_cutoffs =
[cutoff
for
cutoff
in
course
.
grade_cutoffs
.
values
()
if
cutoff
>
0]
success_cutoff = min(nonzero_cutoffs) if nonzero_cutoffs else None
%>
%if success_cutoff and grade_summary['percent'] > success_cutoff:
<div
id=
"course-success"
>
<a
href=
"${SUCCESS_BUTTON_URL}"
>
${settings.PROGRESS_SUCCESS_BUTTON_TEXT_OVERRIDE or _("Download your certificate")}
</a>
</div>
%endif
%endif
%if not course.disable_progress_graph:
<div
id=
"grade-detail-graph"
aria-hidden=
"true"
></div>
%endif
...
...
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