Repository: oppia/oppia

Issue:
Change page title to use the new PageTitleService
<!--
  - Thanks for taking the time to propose a new feature for 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)._
  -->

# Explanation
The aim of this is to make all pages use the new **PageTitleService** which was created in #6539 
This will help minimize the use of jinja constructs in the codebase and ultimately aid in static serving.

If you would like to work on this issue, pick a page from the list below and add your name in parenthesis to it. 
Once the pr is merged, you can tick the box.

## Page List
- [x]  collection_editor.html **@jamesjay4199**
- [x]  collection_player.html **@jamesjay4199**
- [x]  error.html **@jamesjay4199**
- [x]  exploration_editor.html **@jamesjay4199**
- [x]  exploration_player.html **@jamesjay4199**
- [x]  library.html **@jamesjay4199**
- [x]  story_editor.html **@jamesjay4199**
- [x]  topic_editor.html **@jamesjay4199**
- [x]  topic_viewer.html **@jamesjay4199**




Discussion:

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
@@ -56,17 +56,13 @@ class CollectionEditorPage(CollectionEditorHandler):
     def get(self, collection_id):
         """Handles GET requests."""
 
-        collection = collection_services.get_collection_by_id(
-            collection_id, strict=False)
-
         self.values.update({
-            'collection_id': collection.id,
+            'collection_id': collection_id,
             'SHOW_COLLECTION_NAVIGATION_TAB_HISTORY': (
                 feconf.SHOW_COLLECTION_NAVIGATION_TAB_HISTORY),
             'SHOW_COLLECTION_NAVIGATION_TAB_STATS': (
                 feconf.SHOW_COLLECTION_NAVIGATION_TAB_STATS),
             'TAG_REGEX': feconf.TAG_REGEX,
-            'title': collection.title,
             'INTERACTION_SPECS': interaction_registry.Registry.get_all_specs(),
         })
 
diff --git a/core/controllers/editor.py b/core/controllers/editor.py
--- a/core/controllers/editor.py
+++ b/core/controllers/editor.py
@@ -102,9 +102,8 @@ def get(self, exploration_id):
                 iframe_restriction=None)
             return
 
-        (exploration, exploration_rights) = (
-            exp_services.get_exploration_and_exploration_rights_by_id(
-                exploration_id))
+        exploration_rights = rights_manager.get_exploration_rights(
+            exploration_id)
 
         visualizations_html = visualization_registry.Registry.get_full_html()
 
@@ -151,7 +150,6 @@ def get(self, exploration_id):
             'meta_description': feconf.CREATE_PAGE_DESCRIPTION,
             'value_generators_js': jinja2.utils.Markup(
                 get_value_generators_js()),
-            'title': exploration.title,
             'visualizations_html': jinja2.utils.Markup(visualizations_html),
             'INVALID_PARAMETER_NAMES': feconf.INVALID_PARAMETER_NAMES,
             'SHOW_TRAINABLE_UNRESOLVED_ANSWERS': (


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
@@ -226,12 +226,6 @@ 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):