Suppress grade on dashboard (#22471)

Learners should not be able to view final grade before course end
date.Suppress the grade achieved so far till course end date on
dashboard.

PROD-701
This commit is contained in:
Zainab Amir
2019-12-12 17:22:58 +05:00
committed by GitHub
parent 9cb4c8276f
commit 3e426ccecc
3 changed files with 54 additions and 17 deletions

View File

@@ -4,6 +4,7 @@
from django.utils.translation import ugettext as _
from openedx.core.djangolib.markup import HTML, Text
from course_modes.models import CourseMode
from util.course import should_display_grade
%>
<%namespace name='static' file='../static_content.html'/>
@@ -44,9 +45,11 @@ else:
</div>
% else:
<div class="message message-status ${status_css_class} is-shown">
<p class="message-copy">${_("Your final grade:")}
<span class="grade-value">${"{0:.0f}%".format(float(cert_status['grade'])*100)}</span>.
<p class="message-copy">
% if should_display_grade(course_overview.end):
${_("Your final grade:")}
<span class="grade-value">${"{0:.0f}%".format(float(cert_status['grade'])*100)}</span>.
% endif
% if cert_status['status'] == 'notpassing':
% if enrollment.mode != 'audit':
${_("Grade required for a {cert_name_short}:").format(cert_name_short=cert_name_short)}