Repository: oppia/oppia

Issue:
Collection editor page title isn't similar to the collection title.
<!--
  - Thanks for taking the time to report a bug in the Oppia project.
  - Before filing a new issue, please do a quick search to check that it hasn't
  - already been filed on the [issue tracker](https://github.com/oppia/oppia/issues)._
  -->

**Describe the bug**
In collection-editor page title is never being passed to the template: https://github.com/oppia/oppia/blob/develop/core/templates/dev/head/pages/collection_editor/collection_editor.html#L4
so if you test it, regardless of the name of the collection, the browser title is "Untitled Collection - Oppia Editor". On git blame, it looks like https://github.com/oppia/oppia/pull/3126/files#diff-974a2e9766128d912e24f870f8fad7d0L115 removed it but missed on replacing it's usage. 

**To Reproduce**
Steps to reproduce the behavior:
 1. Go to the admin page and assign collection editor role to your username.
 2. Click on create the button from library/splash page
 3. Select create collection
 4. Add one exploration to collection and change the collection name from settings.
 5. Save sraft and refresh.

**Observed behavior**
Title of the page is always the same "Untitled collection".

**Expected behavior**
Title of the bage should be the title of the collection.
**Screenshots**
![image](https://user-images.githubusercontent.com/16653571/44134983-b6361b2a-a084-11e8-83ba-9ca1c75ac3c1.png)

**Desktop (please complete the following information):**
 - OS: Ubuntu 14.04
 - Browser Chrome 

**Additional context**
Originally reported by @nalinbhardwaj 


Discussion:
Also, note that the old method to do this(passing the `title` from backend) only changes the title on a page refresh(so if one makes an untitled set and names it, it won't show up until page refresh). Perhaps, the more appropriate way to set it is somewhat similar to [`collection_editor_navbar_breadcrumb_directive.html#L4`](https://github.com/oppia/oppia/blob/51f2ed8593e13ebe063d222b804aadbff3e2074c/core/templates/dev/head/pages/collection_editor/collection_editor_navbar_breadcrumb_directive.html#L4).
@nalinbhardwaj, your comment looks similar to #1970!
Hi! I would like to work on this issue.
@abhaygupta97, any updates? Thanks!
@apb7 I am bit busy with exams right now. Will start working on it as soon as I am free.

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
@@ -66,6 +66,7 @@ def get(self, collection_id):
             'SHOW_COLLECTION_NAVIGATION_TAB_STATS': (
                 feconf.SHOW_COLLECTION_NAVIGATION_TAB_STATS),
             'TAG_REGEX': feconf.TAG_REGEX,
+            'title': collection.title,
         })
 
         self.render_template('pages/collection_editor/collection_editor.html')


Test patch:
diff --git a/core/controllers/collection_editor_test.py b/core/controllers/collection_editor_test.py
--- a/core/controllers/collection_editor_test.py
+++ b/core/controllers/collection_editor_test.py
@@ -178,6 +178,13 @@ def test_editable_collection_handler_put_can_access(self):
 
         self.assertEqual(self.COLLECTION_ID, json_response['collection']['id'])
         self.assertEqual(2, json_response['collection']['version'])
+
+        # Check that title is changed.
+        response = self.get_html_response(
+            '%s/%s' % (
+                feconf.COLLECTION_EDITOR_URL_PREFIX,
+                self.COLLECTION_ID))
+        response.mustcontain(self.json_dict['change_list'][0]['new_value'])
         self.logout()
 
     def test_collection_rights_handler(self):