Commit 6604eedb by Sarina Canelake

Merge pull request #6683 from mitocw/bdero/instructor-dashboard-gitlogs-link

Add gitlogs link to instructor dashboard
parents 15030438 24862edf
...@@ -241,6 +241,9 @@ def _section_course_info(course, access): ...@@ -241,6 +241,9 @@ def _section_course_info(course, access):
message = _("Enrollment data is now available in {dashboard_link}.").format(dashboard_link=dashboard_link) message = _("Enrollment data is now available in {dashboard_link}.").format(dashboard_link=dashboard_link)
section_data['enrollment_message'] = message section_data['enrollment_message'] = message
if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD'):
section_data['detailed_gitlogs_url'] = reverse('gitlogs_detail', kwargs={'course_id': unicode(course_key)})
try: try:
advance = lambda memo, (letter, score): "{}: {}, ".format(letter, score) + memo advance = lambda memo, (letter, score): "{}: {}, ".format(letter, score) + memo
section_data['grade_cutoffs'] = reduce(advance, course.grade_cutoffs.items(), "")[:-2] section_data['grade_cutoffs'] = reduce(advance, course.grade_cutoffs.items(), "")[:-2]
......
...@@ -70,12 +70,21 @@ ...@@ -70,12 +70,21 @@
<b>${_("No")}</b> <b>${_("No")}</b>
%endif %endif
</li> </li>
<li class="field text is-not-editable" id="field-grade-cutoffs"> <li class="field text is-not-editable" id="field-grade-cutoffs">
<label for="start-date">${_("Grade Cutoffs:")}</label> <label for="start-date">${_("Grade Cutoffs:")}</label>
<b>${ section_data['grade_cutoffs'] }</b> <b>${ section_data['grade_cutoffs'] }</b>
</li> </li>
</ul> </ul>
%if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD', ''):
<p>
## Translators: git is a version-control system; see http://git-scm.com/about
${_("View detailed Git import logs for this course {link_start}by clicking here{link_end}.").format(
link_start='<a href="{}">'.format(section_data['detailed_gitlogs_url']),
link_end='</a>'
)}
</p>
%endif
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment