From a09a4febcea771c86c35b7557af4d12a4004437a Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Fri, 1 Mar 2013 15:30:22 -0500 Subject: [PATCH] Fix category generation --- cms/djangoapps/contentstore/views.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index eb807aa129..ccd1e3d638 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -66,11 +66,11 @@ from cms.djangoapps.models.settings.course_metadata import CourseMetadata log = logging.getLogger(__name__) -COMPONENT_TYPES = ['customtag', 'discussion', 'html', 'problem', 'video', 'advanced', 'openended'] +COMPONENT_TYPES = ['customtag', 'discussion', 'html', 'problem', 'video'] ADVANCED_COMPONENT_TYPES = { 'openended' : ['combinedopenended', 'peergrading'], - 'advanced' : ['advanced'] + 'advanced' : ['annotation'] } ADVANCED_COMPONENT_CATEGORY = 'advanced' @@ -301,14 +301,14 @@ def edit_unit(request, location): templates = modulestore().get_items(Location('i4x', 'edx', 'templates')) for template in templates: - if template.location.category in COMPONENT_TYPES: - #This is a hack to create categories for different xmodules - category = template.location.category - for key in ADVANCED_COMPONENT_TYPES: - if template.location.category in ADVANCED_COMPONENT_TYPES[key]: - category = key - break + category = template.location.category + for key in ADVANCED_COMPONENT_TYPES: + if template.location.category in ADVANCED_COMPONENT_TYPES[key]: + category = key + break + if category in COMPONENT_TYPES: + #This is a hack to create categories for different xmodules component_templates[template.location.category].append(( template.display_name, template.location.url(),