Repository: oppia/oppia

Issue:
Collection editor should have a settings page
This is originally from #1462:

There should be a settings tab for editing the title, category, and objective in the same way as the exploration editor. The category should be edited using a drop-down menu of categories.

This functionality cannot be implemented until #1587 is completed.



Discussion:
I will work on it if it's ok. :)

(De-assigning until #1587 is finished.)


Resolving patch:
diff --git a/core/controllers/collection_editor.py b/core/controllers/collection_editor.py
--- a/core/controllers/collection_editor.py
+++ b/core/controllers/collection_editor.py
@@ -122,15 +122,14 @@ def get(self, collection_id):
                 rights_manager.ACTIVITY_TYPE_COLLECTION, collection_id))
 
         self.values.update({
-            'is_private': rights_manager.is_collection_private(collection_id),
             'can_edit': can_edit,
-            'collection_id': collection.id,
-            'title': collection.title,
             'can_unpublish': rights_manager.Actor(
                 self.user_id).can_unpublish(
                     rights_manager.ACTIVITY_TYPE_COLLECTION, collection_id),
-            'SHOW_COLLECTION_NAVIGATION_TAB_SETTINGS': (
-                feconf.SHOW_COLLECTION_NAVIGATION_TAB_SETTINGS),
+            'collection_id': collection.id,
+            'is_private': rights_manager.is_collection_private(collection_id),
+            'nav_mode': feconf.NAV_MODE_CREATE,
+            'title': collection.title,
             'SHOW_COLLECTION_NAVIGATION_TAB_HISTORY': (
                 feconf.SHOW_COLLECTION_NAVIGATION_TAB_HISTORY),
             'SHOW_COLLECTION_NAVIGATION_TAB_FEEDBACK': (
diff --git a/feconf.py b/feconf.py
--- a/feconf.py
+++ b/feconf.py
@@ -445,7 +445,6 @@ def get_empty_ratings():
 # Unfinished features.
 SHOW_TRAINABLE_UNRESOLVED_ANSWERS = False
 ENABLE_STRING_CLASSIFIER = False
-SHOW_COLLECTION_NAVIGATION_TAB_SETTINGS = False
 SHOW_COLLECTION_NAVIGATION_TAB_HISTORY = False
 SHOW_COLLECTION_NAVIGATION_TAB_FEEDBACK = False
 SHOW_COLLECTION_NAVIGATION_TAB_STATS = False


Test patch:
diff --git a/core/controllers/collection_viewer_test.py b/core/controllers/collection_viewer_test.py
--- a/core/controllers/collection_viewer_test.py
+++ b/core/controllers/collection_viewer_test.py
@@ -146,7 +146,7 @@ def test_welcome_collection(self):
 
         playthrough_dict = collection_dict['playthrough_dict']
         self.assertEqual(
-            playthrough_dict['next_exploration_ids'], ['13', '4', '14'])
+            playthrough_dict['next_exploration_ids'], ['13'])
         self.assertEqual(playthrough_dict['completed_exploration_ids'], ['0'])
 
         # Completing the 'Solar System' exploration results in no branching.
@@ -158,7 +158,7 @@ def test_welcome_collection(self):
 
         playthrough_dict = collection_dict['playthrough_dict']
         self.assertEqual(
-            playthrough_dict['next_exploration_ids'], ['4', '14'])
+            playthrough_dict['next_exploration_ids'], ['4'])
         self.assertEqual(
             playthrough_dict['completed_exploration_ids'], ['0', '13'])
 
@@ -172,7 +172,7 @@ def test_welcome_collection(self):
 
         playthrough_dict = collection_dict['playthrough_dict']
         self.assertEqual(
-            playthrough_dict['next_exploration_ids'], ['4', '15'])
+            playthrough_dict['next_exploration_ids'], ['4'])
         self.assertEqual(
             playthrough_dict['completed_exploration_ids'], ['0', '13', '14'])