Fix hint-problem tab bug TNL-2542

Revert the removal of hint templates.
Move the 'tab' attribute in the new-problem yaml
files out one level, out of the 'metadata' section.
This commit is contained in:
Nick Parlante
2015-06-25 15:08:15 -07:00
parent 05972a608e
commit 98730f3141
7 changed files with 279 additions and 2 deletions

View File

@@ -282,8 +282,8 @@ def get_component_templates(courselike, library=False):
tab = 'common'
if template['metadata'].get('markdown') is None:
tab = 'advanced'
# Then the problem can override that with a tab: setting
tab = template['metadata'].get('tab', tab)
# Then the problem can override that with a tab: attribute (note: not nested in metadata)
tab = template.get('tab', tab)
templates_for_category.append(
create_template_dict(

View File

@@ -3,6 +3,9 @@
<li class="current">
<a class="link-tab" href="#tab1"><%= gettext("Common Problem Types") %></a>
</li>
<li>
<a class="link-tab" href="#tab2"><%= gettext("Common Problems with Hints and Feedback") %></a>
</li>
<li>
<a class="link-tab" href="#tab3"><%= gettext("Advanced") %></a>
</li>