diff --git a/lms/envs/common.py b/lms/envs/common.py index 8d3f205cd2..f4e553b72f 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1288,9 +1288,9 @@ GRADES_DOWNLOAD = { } ######################## PROGRESS SUCCESS BUTTON ############################## -# The course id will be appended to the following url -PROGRESS_SUCCESS_BUTTON_URL = 'http:////' -PROGRESS_SUCCESS_BUTTON_TEXT = "Download your certificate" +# The following fields are available in the URL: {course_id} {student_id} +PROGRESS_SUCCESS_BUTTON_URL = 'http:////{course_id}' +PROGRESS_SUCCESS_BUTTON_TEXT_OVERRIDE = None #### PASSWORD POLICY SETTINGS ##### diff --git a/lms/templates/courseware/progress.html b/lms/templates/courseware/progress.html index a1ef13debf..ad5fa70b18 100644 --- a/lms/templates/courseware/progress.html +++ b/lms/templates/courseware/progress.html @@ -48,15 +48,17 @@ from django.conf import settings

${_("Course Progress for Student '{username}' ({email})").format(username=student.username, email=student.email)}

- %if settings.FEATURES['SHOW_PROGRESS_SUCCESS_BUTTON']: + %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: %endif