Commit 51a0befc by Victor Shnayder

Add a hide_progress_tab course policy flag

- for internal cs50 until we have grade integration set up (only really needed for external version)
parent 4f782aac
......@@ -242,6 +242,13 @@ class CourseDescriptor(SequenceDescriptor):
return self.metadata.get('discussion_link', None)
@property
def hide_progress_tab(self):
"""TODO: same as above, intended to let internal CS50 hide the progress tab
until we get grade integration set up."""
# Explicit comparison to True because we always want to return a bool.
return self.metadata.get('hide_progress_tab') == True
@property
def title(self):
return self.display_name
......
......@@ -103,6 +103,7 @@ class XmlDescriptor(XModuleDescriptor):
xml_attribute_map = {
# type conversion: want True/False in python, "true"/"false" in xml
'graded': bool_map,
'hide_progress_tab': bool_map,
}
......
......@@ -48,7 +48,7 @@ def url_class(url):
% if settings.WIKI_ENABLED:
<li class="wiki"><a href="${reverse('course_wiki', args=[course.id])}" class="${url_class('wiki')}">Wiki</a></li>
% endif
% if user.is_authenticated():
% if user.is_authenticated() and not course.hide_progress_tab:
<li class="profile"><a href="${reverse('progress', args=[course.id])}" class="${url_class('progress')}">Progress</a></li>
% endif
% if staff_access:
......
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