Merge pull request #1080 from MITx/feature/jarv/dashboard-grades
Feature/jarv/dashboard grades
This commit is contained in:
@@ -149,6 +149,10 @@ class CourseDescriptor(SequenceDescriptor):
|
||||
def grade_cutoffs(self):
|
||||
return self._grading_policy['GRADE_CUTOFFS']
|
||||
|
||||
@property
|
||||
def lowest_passing_grade(self):
|
||||
return min(self._grading_policy['GRADE_CUTOFFS'].values())
|
||||
|
||||
@property
|
||||
def tabs(self):
|
||||
"""
|
||||
@@ -292,7 +296,7 @@ class CourseDescriptor(SequenceDescriptor):
|
||||
return False
|
||||
except:
|
||||
log.exception("Error parsing discussion_blackouts for course {0}".format(self.id))
|
||||
|
||||
|
||||
return True
|
||||
|
||||
@property
|
||||
|
||||
@@ -246,13 +246,14 @@
|
||||
% if cert_status['status'] == 'processing':
|
||||
<p class="message-copy">Final course details are being wrapped up at
|
||||
this time. Your final standing will be available shortly.</p>
|
||||
% elif cert_status['status'] in ('generating', 'ready'):
|
||||
<p class="message-copy">You have received a grade of
|
||||
<span class="grade-value">${cert_status['grade']}</span>
|
||||
in this course.</p>
|
||||
% elif cert_status['status'] == 'notpassing':
|
||||
<p class="message-copy">You did not complete the necessary requirements for
|
||||
completion of this course.</p>
|
||||
% elif cert_status['status'] in ('generating', 'ready', 'notpassing'):
|
||||
<p class="message-copy">Your final grade:
|
||||
<span class="grade-value">${"{0:.0f}%".format(float(cert_status['grade'])*100)}</span>.
|
||||
% if cert_status['status'] == 'notpassing':
|
||||
Grade required for a certificate: <span class="grade-value">
|
||||
${"{0:.0f}%".format(float(course.lowest_passing_grade)*100)}</span>.
|
||||
% endif
|
||||
</p>
|
||||
% endif
|
||||
|
||||
% if cert_status['show_disabled_download_button'] or cert_status['show_download_url'] or cert_status['show_survey_button']:
|
||||
|
||||
Reference in New Issue
Block a user