def test_mark_collection_as_incomplete(self): self.assertEqual(self._get_all_incomplete_collection_ids(self.user_id), []) # Add a collection to the incomplete list of the learner. learner_progress_services.mark_collection_as_incomplete( self.user_id, self.COL_ID_0) self.assertEqual(self._get_all_incomplete_collection_ids(self.user_id), [self.COL_ID_0]) # Adding a collection again has no effect. learner_progress_services.mark_collection_as_incomplete( self.user_id, self.COL_ID_0) self.assertEqual(self._get_all_incomplete_collection_ids(self.user_id), [self.COL_ID_0]) # If a collection has been completed, it is not added to the incomplete # list. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_1) learner_progress_services.mark_collection_as_incomplete( self.user_id, self.COL_ID_1) self.assertEqual(self._get_all_incomplete_collection_ids(self.user_id), [self.COL_ID_0]) # Test that a collection created by the user is not added to the # incomplete list. learner_progress_services.mark_collection_as_incomplete( self.user_id, self.COL_ID_2) self.assertEqual(self._get_all_incomplete_collection_ids(self.user_id), [self.COL_ID_0])
def post(self, exploration_id): """Handles POST requests.""" # This will be None if the exploration is not being played within the # context of a collection. collection_id = self.payload.get('collection_id') user_id = self.user_id event_services.CompleteExplorationEventHandler.record( exploration_id, self.payload.get('version'), self.payload.get('state_name'), self.payload.get('session_id'), self.payload.get('client_time_spent_in_secs'), self.payload.get('params'), feconf.PLAY_TYPE_NORMAL) if user_id: learner_progress_services.mark_exploration_as_completed( user_id, exploration_id) if user_id and collection_id: collection_services.record_played_exploration_in_collection_context( user_id, collection_id, exploration_id) collections_left_to_complete = ( collection_services. get_next_exploration_ids_to_complete_by_user( # pylint: disable=line-too-long user_id, collection_id)) if not collections_left_to_complete: learner_progress_services.mark_collection_as_completed( user_id, collection_id) else: learner_progress_services.mark_collection_as_incomplete( user_id, collection_id) self.render_json(self.values)
def test_mark_collection_as_completed(self): self.assertEqual(self._get_all_completed_collection_ids(self.user_id), []) # Add a collection to the completed list. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_0) self.assertEqual(self._get_all_completed_collection_ids(self.user_id), [self.COL_ID_0]) # Completing a collection again has no effect. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_0) self.assertEqual(self._get_all_completed_collection_ids(self.user_id), [self.COL_ID_0]) # Add a collection to the incomplete list. learner_progress_services.mark_collection_as_incomplete( self.user_id, self.COL_ID_1) self.assertEqual(self._get_all_incomplete_collection_ids(self.user_id), [self.COL_ID_1]) # If the collection is present in the incomplete list, on completion # it is removed from the incomplete list and added to the complete # list. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_1) self.assertEqual(self._get_all_incomplete_collection_ids(self.user_id), []) self.assertEqual(self._get_all_completed_collection_ids(self.user_id), [self.COL_ID_0, self.COL_ID_1]) # Add a collection to the learner playlist of the learner. learner_playlist_services.mark_collection_to_be_played_later( self.user_id, self.COL_ID_3) self.assertEqual( learner_playlist_services. get_all_collection_ids_in_learner_playlist( # pylint: disable=line-too-long self.user_id), [self.COL_ID_3]) # Test that on adding a collection to the completed list, it gets # removed from the learner playlist. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_3) self.assertEqual(self._get_all_completed_collection_ids(self.user_id), [self.COL_ID_0, self.COL_ID_1, self.COL_ID_3]) self.assertEqual( learner_playlist_services. get_all_collection_ids_in_learner_playlist( # pylint: disable=line-too-long self.user_id), []) # Test that a collection created by the user is not added to the # completed list. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_2) self.assertEqual(self._get_all_completed_collection_ids(self.user_id), [self.COL_ID_0, self.COL_ID_1, self.COL_ID_3])
def test_can_see_completed_collections(self): self.login(self.VIEWER_EMAIL) response = self.get_json(feconf.LEARNER_DASHBOARD_DATA_URL) self.assertEqual(len(response['completed_collections_list']), 0) self.save_new_default_collection( self.COL_ID_1, self.owner_id, title=self.COL_TITLE_1) self.publish_collection(self.owner_id, self.COL_ID_1) learner_progress_services.mark_collection_as_completed( self.viewer_id, self.COL_ID_1) response = self.get_json(feconf.LEARNER_DASHBOARD_DATA_URL) self.assertEqual(len(response['completed_collections_list']), 1) self.assertEqual( response['completed_collections_list'][0]['id'], self.COL_ID_1) self.logout()
def test_get_all_completed_collection_ids(self): self.assertEqual( learner_progress_services.get_all_completed_collection_ids( self.user_id), []) # Add a collection to the completed list. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_0) self.assertEqual( learner_progress_services.get_all_completed_collection_ids( self.user_id), [self.COL_ID_0]) # Add another collection. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_1) self.assertEqual( learner_progress_services.get_all_completed_collection_ids( self.user_id), [self.COL_ID_0, self.COL_ID_1])
def test_get_ids_of_activities_in_learner_dashboard(self): # Add activities to the completed section. learner_progress_services.mark_exploration_as_completed( self.user_id, self.EXP_ID_0) learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_0) # Add activities to the incomplete section. state_name = 'state name' version = 1 learner_progress_services.mark_exploration_as_incomplete( self.user_id, self.EXP_ID_1, state_name, version) learner_progress_services.mark_collection_as_incomplete( self.user_id, self.COL_ID_1) # Add activities to the playlist section. learner_progress_services.add_exp_to_learner_playlist( self.user_id, self.EXP_ID_3) learner_progress_services.add_collection_to_learner_playlist( self.user_id, self.COL_ID_3) # Get the ids of all the activities. activity_ids = ( learner_progress_services.get_learner_dashboard_activities( # pylint: disable=line-too-long self.user_id)) self.assertEqual(activity_ids.completed_exploration_ids, [self.EXP_ID_0]) self.assertEqual(activity_ids.completed_collection_ids, [self.COL_ID_0]) self.assertEqual(activity_ids.incomplete_exploration_ids, [self.EXP_ID_1]) self.assertEqual(activity_ids.incomplete_collection_ids, [self.COL_ID_1]) self.assertEqual(activity_ids.exploration_playlist_ids, [self.EXP_ID_3]) self.assertEqual(activity_ids.collection_playlist_ids, [self.COL_ID_3])
def test_mark_collection_as_completed(self): self.assertEqual(self._get_all_completed_collection_ids(self.user_id), []) # Add a collection to the completed list. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_0) self.assertEqual(self._get_all_completed_collection_ids(self.user_id), [self.COL_ID_0]) # Completing a collection again has no effect. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_0) self.assertEqual(self._get_all_completed_collection_ids(self.user_id), [self.COL_ID_0]) # Add a collection to the incomplete list. learner_progress_services.mark_collection_as_incomplete( self.user_id, self.COL_ID_1) self.assertEqual(self._get_all_incomplete_collection_ids(self.user_id), [self.COL_ID_1]) # If the collection is present in the incomplete list, on completion # it is removed from the incomplete list and added to the complete # list. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_1) self.assertEqual(self._get_all_incomplete_collection_ids(self.user_id), []) self.assertEqual(self._get_all_completed_collection_ids(self.user_id), [self.COL_ID_0, self.COL_ID_1]) # Test that a collection created by the user is not added to the # completed list. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_2) self.assertEqual(self._get_all_completed_collection_ids(self.user_id), [self.COL_ID_0, self.COL_ID_1])
def test_get_learner_dashboard_ids(self): self.login(self.VIEWER_EMAIL) self.save_new_default_exploration( self.EXP_ID_1, self.owner_id, title=self.EXP_TITLE_1) self.publish_exploration(self.owner_id, self.EXP_ID_1) self.save_new_default_exploration( self.EXP_ID_2, self.owner_id, title=self.EXP_TITLE_2) self.publish_exploration(self.owner_id, self.EXP_ID_2) self.save_new_default_exploration( self.EXP_ID_3, self.owner_id, title=self.EXP_TITLE_3) self.publish_exploration(self.owner_id, self.EXP_ID_3) self.save_new_default_collection( self.COL_ID_1, self.owner_id, title=self.COL_TITLE_1) self.publish_collection(self.owner_id, self.COL_ID_1) self.save_new_default_collection( self.COL_ID_2, self.owner_id, title=self.COL_TITLE_2) self.publish_collection(self.owner_id, self.COL_ID_2) self.save_new_default_collection( self.COL_ID_3, self.owner_id, title=self.COL_TITLE_3) self.publish_collection(self.owner_id, self.COL_ID_3) state_name = 'state_name' version = 1 learner_progress_services.mark_exploration_as_completed( self.viewer_id, self.EXP_ID_1) learner_progress_services.mark_exploration_as_incomplete( self.viewer_id, self.EXP_ID_2, state_name, version) learner_progress_services.add_exp_to_learner_playlist( self.viewer_id, self.EXP_ID_3) learner_progress_services.mark_collection_as_completed( self.viewer_id, self.COL_ID_1) learner_progress_services.mark_collection_as_incomplete( self.viewer_id, self.COL_ID_2) learner_progress_services.add_collection_to_learner_playlist( self.viewer_id, self.COL_ID_3) response = self.get_json(feconf.LEARNER_DASHBOARD_IDS_DATA_URL) learner_dashboard_activity_ids = ( response['learner_dashboard_activity_ids']) self.assertEqual( learner_dashboard_activity_ids['completed_exploration_ids'], [self.EXP_ID_1]) self.assertEqual( learner_dashboard_activity_ids['incomplete_exploration_ids'], [self.EXP_ID_2]) self.assertEqual( learner_dashboard_activity_ids['exploration_playlist_ids'], [self.EXP_ID_3]) self.assertEqual( learner_dashboard_activity_ids['completed_collection_ids'], [self.COL_ID_1]) self.assertEqual( learner_dashboard_activity_ids['incomplete_collection_ids'], [self.COL_ID_2]) self.assertEqual( learner_dashboard_activity_ids['collection_playlist_ids'], [self.COL_ID_3])
def test_get_learner_dashboard_ids(self): self.login(self.VIEWER_EMAIL) self.save_new_default_exploration(self.EXP_ID_1, self.owner_id, title=self.EXP_TITLE_1) self.publish_exploration(self.owner_id, self.EXP_ID_1) self.save_new_default_exploration(self.EXP_ID_2, self.owner_id, title=self.EXP_TITLE_2) self.publish_exploration(self.owner_id, self.EXP_ID_2) self.save_new_default_exploration(self.EXP_ID_3, self.owner_id, title=self.EXP_TITLE_3) self.publish_exploration(self.owner_id, self.EXP_ID_3) self.save_new_default_collection(self.COL_ID_1, self.owner_id, title=self.COL_TITLE_1) self.publish_collection(self.owner_id, self.COL_ID_1) self.save_new_default_collection(self.COL_ID_2, self.owner_id, title=self.COL_TITLE_2) self.publish_collection(self.owner_id, self.COL_ID_2) self.save_new_default_collection(self.COL_ID_3, self.owner_id, title=self.COL_TITLE_3) self.publish_collection(self.owner_id, self.COL_ID_3) self.save_new_topic(self.TOPIC_ID_1, self.owner_id, name=self.TOPIC_NAME_1, url_fragment='topic-one', description='A new topic', canonical_story_ids=[], additional_story_ids=[], uncategorized_skill_ids=[], subtopics=[self.subtopic_0], next_subtopic_id=1) self.save_new_story(self.STORY_ID_1, self.owner_id, self.TOPIC_ID_1) topic_services.add_canonical_story(self.owner_id, self.TOPIC_ID_1, self.STORY_ID_1) topic_services.publish_story(self.TOPIC_ID_1, self.STORY_ID_1, self.admin_id) topic_services.publish_topic(self.TOPIC_ID_1, self.admin_id) self.save_new_topic(self.TOPIC_ID_2, self.owner_id, name=self.TOPIC_NAME_2, url_fragment='topic-two', description='A new topic', canonical_story_ids=[], additional_story_ids=[], uncategorized_skill_ids=[], subtopics=[self.subtopic_1], next_subtopic_id=1) self.save_new_story(self.STORY_ID_2, self.owner_id, self.TOPIC_ID_2) topic_services.add_canonical_story(self.owner_id, self.TOPIC_ID_2, self.STORY_ID_2) topic_services.publish_story(self.TOPIC_ID_2, self.STORY_ID_2, self.admin_id) topic_services.publish_topic(self.TOPIC_ID_2, self.admin_id) self.save_new_topic(self.TOPIC_ID_3, self.owner_id, name=self.TOPIC_NAME_3, url_fragment='topic-three', description='A new topic', canonical_story_ids=[], additional_story_ids=[], uncategorized_skill_ids=[], subtopics=[self.subtopic_1], next_subtopic_id=1) self.save_new_story(self.STORY_ID_3, self.owner_id, self.TOPIC_ID_3) topic_services.add_canonical_story(self.owner_id, self.TOPIC_ID_3, self.STORY_ID_3) topic_services.publish_story(self.TOPIC_ID_3, self.STORY_ID_3, self.admin_id) topic_services.publish_topic(self.TOPIC_ID_3, self.admin_id) state_name = 'state_name' version = 1 learner_progress_services.mark_exploration_as_completed( self.viewer_id, self.EXP_ID_1) learner_progress_services.mark_exploration_as_incomplete( self.viewer_id, self.EXP_ID_2, state_name, version) learner_progress_services.add_exp_to_learner_playlist( self.viewer_id, self.EXP_ID_3) learner_progress_services.mark_collection_as_completed( self.viewer_id, self.COL_ID_1) learner_progress_services.mark_collection_as_incomplete( self.viewer_id, self.COL_ID_2) learner_progress_services.add_collection_to_learner_playlist( self.viewer_id, self.COL_ID_3) learner_progress_services.mark_story_as_completed( self.viewer_id, self.STORY_ID_1) learner_progress_services.mark_topic_as_learnt(self.viewer_id, self.TOPIC_ID_1) learner_progress_services.record_topic_started(self.viewer_id, self.TOPIC_ID_2) learner_progress_services.validate_and_add_topic_to_learn_goal( self.viewer_id, self.TOPIC_ID_3) response = self.get_json(feconf.LEARNER_DASHBOARD_IDS_DATA_URL) learner_dashboard_activity_ids = ( response['learner_dashboard_activity_ids']) self.assertEqual( learner_dashboard_activity_ids['completed_exploration_ids'], [self.EXP_ID_1]) self.assertEqual( learner_dashboard_activity_ids['incomplete_exploration_ids'], [self.EXP_ID_2]) self.assertEqual( learner_dashboard_activity_ids['exploration_playlist_ids'], [self.EXP_ID_3]) self.assertEqual( learner_dashboard_activity_ids['completed_collection_ids'], [self.COL_ID_1]) self.assertEqual( learner_dashboard_activity_ids['incomplete_collection_ids'], [self.COL_ID_2]) self.assertEqual( learner_dashboard_activity_ids['collection_playlist_ids'], [self.COL_ID_3]) self.assertEqual(learner_dashboard_activity_ids['completed_story_ids'], [self.STORY_ID_1]) self.assertEqual(learner_dashboard_activity_ids['learnt_topic_ids'], [self.TOPIC_ID_1]) self.assertEqual( learner_dashboard_activity_ids['partially_learnt_topic_ids'], [self.TOPIC_ID_2]) self.assertEqual(learner_dashboard_activity_ids['topic_ids_to_learn'], [self.TOPIC_ID_3])
def test_add_collection_to_learner_playlist(self): self.login(self.VIEWER_EMAIL) response = self.testapp.get(feconf.LEARNER_DASHBOARD_URL) csrf_token = self.get_csrf_token_from_response(response) # Add one collection to the playlist. self.post_json( '%s/%s/%s' % (feconf.LEARNER_PLAYLIST_DATA_URL, constants.ACTIVITY_TYPE_COLLECTION, self.COL_ID_1), {}, csrf_token) self.assertEqual( learner_playlist_services. get_all_collection_ids_in_learner_playlist( # pylint: disable=line-too-long self.viewer_id), [self.COL_ID_1]) # Add another exploration. self.post_json( '%s/%s/%s' % (feconf.LEARNER_PLAYLIST_DATA_URL, constants.ACTIVITY_TYPE_COLLECTION, self.COL_ID_2), {}, csrf_token) self.assertEqual( learner_playlist_services. get_all_collection_ids_in_learner_playlist( # pylint: disable=line-too-long self.viewer_id), [self.COL_ID_1, self.COL_ID_2]) # User rearranges the explorations. 'exp title 2' is shifted to the # first position. payload = {'index': 0} self.post_json( '%s/%s/%s' % (feconf.LEARNER_PLAYLIST_DATA_URL, constants.ACTIVITY_TYPE_COLLECTION, self.COL_ID_2), payload, csrf_token) self.assertEqual( learner_playlist_services. get_all_collection_ids_in_learner_playlist( # pylint: disable=line-too-long self.viewer_id), [self.COL_ID_2, self.COL_ID_1]) # If an exploration belongs to the incomplete list or completed list, it # should not be added. Here we test for the completed case. learner_progress_services.mark_collection_as_completed( self.viewer_id, self.COL_ID_3) response = self.post_json( '%s/%s/%s' % (feconf.LEARNER_PLAYLIST_DATA_URL, constants.ACTIVITY_TYPE_COLLECTION, self.COL_ID_3), {}, csrf_token) self.assertEqual(response['belongs_to_completed_or_incomplete_list'], True) self.assertEqual( learner_playlist_services. get_all_collection_ids_in_learner_playlist( # pylint: disable=line-too-long self.viewer_id), [self.COL_ID_2, self.COL_ID_1]) # If a collection belongs to one of the subscribed collections, # it should not be added to the learner playlist. response = self.post_json( '%s/%s/%s' % (feconf.LEARNER_PLAYLIST_DATA_URL, constants.ACTIVITY_TYPE_COLLECTION, self.COL_ID_4), {}, csrf_token) self.assertEqual(response['belongs_to_subscribed_activities'], True) self.assertEqual( learner_playlist_services. get_all_collection_ids_in_learner_playlist( # pylint: disable=line-too-long self.viewer_id), [self.COL_ID_2, self.COL_ID_1]) # Now we begin testing of not exceeding the limit of activities in the # learner playlist. # Add feconf.MAX_LEARNER_PLAYLIST_ACTIVITY_COUNT - 2 activities to reach # the maximum limit. for exp_id in range(5, feconf.MAX_LEARNER_PLAYLIST_ACTIVITY_COUNT + 3): response = self.post_json( '%s/%s/%s' % (feconf.LEARNER_PLAYLIST_DATA_URL, constants.ACTIVITY_TYPE_COLLECTION, 'col_id_%s' % exp_id), {}, csrf_token) # Now if we try and add an activity we should get a message saying we # are exceeding the limit. response = self.post_json( '%s/%s/%s' % (feconf.LEARNER_PLAYLIST_DATA_URL, constants.ACTIVITY_TYPE_COLLECTION, 'exp_id_%s' % str(feconf.MAX_LEARNER_PLAYLIST_ACTIVITY_COUNT + 3)), {}, csrf_token) self.assertEqual(response['playlist_limit_exceeded'], True) self.logout()
def test_get_activity_progress(self): # Add activities to the completed section. learner_progress_services.mark_exploration_as_completed( self.user_id, self.EXP_ID_0) learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_0) # Add activities to the incomplete section. state_name = 'state name' version = 1 learner_progress_services.mark_exploration_as_incomplete( self.user_id, self.EXP_ID_1, state_name, version) learner_progress_services.mark_collection_as_incomplete( self.user_id, self.COL_ID_1) # Add activities to the playlist section. learner_progress_services.add_exp_to_learner_playlist( self.user_id, self.EXP_ID_3) learner_progress_services.add_collection_to_learner_playlist( self.user_id, self.COL_ID_3) # Get the progress of the user. activity_progress = learner_progress_services.get_activity_progress( self.user_id) incomplete_exp_summaries = ( activity_progress[0].incomplete_exp_summaries) incomplete_collection_summaries = ( activity_progress[0].incomplete_collection_summaries) completed_exp_summaries = ( activity_progress[0].completed_exp_summaries) completed_collection_summaries = ( activity_progress[0].completed_collection_summaries) exploration_playlist_summaries = ( activity_progress[0].exploration_playlist_summaries) collection_playlist_summaries = ( activity_progress[0].collection_playlist_summaries) self.assertEqual(len(incomplete_exp_summaries), 1) self.assertEqual(len(incomplete_collection_summaries), 1) self.assertEqual(len(completed_exp_summaries), 1) self.assertEqual(len(completed_collection_summaries), 1) self.assertEqual(len(exploration_playlist_summaries), 1) self.assertEqual(len(collection_playlist_summaries), 1) self.assertEqual(incomplete_exp_summaries[0].title, 'Sillat Suomi') self.assertEqual(incomplete_collection_summaries[0].title, 'Introduce Oppia') self.assertEqual(completed_exp_summaries[0].title, 'Bridges in England') self.assertEqual(completed_collection_summaries[0].title, 'Bridges') self.assertEqual(exploration_playlist_summaries[0].title, 'Welcome Oppia') self.assertEqual(collection_playlist_summaries[0].title, 'Welcome Oppia Collection') # Delete an exploration in the completed section. exp_services.delete_exploration(self.owner_id, self.EXP_ID_0) # Delete an exploration in the incomplete section. exp_services.delete_exploration(self.owner_id, self.EXP_ID_1) # Delete an exploration in the playlist section. exp_services.delete_exploration(self.owner_id, self.EXP_ID_3) # Add an exploration to a collection that has already been completed. collection_services.update_collection( self.owner_id, self.COL_ID_0, [{ 'cmd': collection_domain.CMD_ADD_COLLECTION_NODE, 'exploration_id': self.EXP_ID_2 }], 'Add new exploration') # Get the progress of the user. activity_progress = learner_progress_services.get_activity_progress( self.user_id) # Check that the exploration is no longer present in the incomplete # section. self.assertEqual(len(activity_progress[0].incomplete_exp_summaries), 0) # Check that the dashboard records the exploration deleted in the # completed section. self.assertEqual(activity_progress[1]['completed_explorations'], 1) # Check that the dashboard records the exploration deleted in the # incomplete section. self.assertEqual(activity_progress[1]['incomplete_explorations'], 1) # Check that the dashboard records the exploration deleted in the # playlist section. self.assertEqual(activity_progress[1]['exploration_playlist'], 1) incomplete_collection_summaries = ( activity_progress[0].incomplete_collection_summaries) # Check that the collection to which a new exploration has been added # has been moved to the incomplete section. self.assertEqual(len(incomplete_collection_summaries), 2) self.assertEqual(incomplete_collection_summaries[1].title, 'Bridges') # Check that the dashboard has recorded the change in the collection. self.assertEqual(activity_progress[2], ['Bridges']) # Now suppose the user has completed the collection. It should be added # back to the completed section. learner_progress_services.mark_collection_as_completed( self.user_id, self.COL_ID_0) # Delete a collection in the completed section. collection_services.delete_collection(self.owner_id, self.COL_ID_0) # Delete a collection in the incomplete section. collection_services.delete_collection(self.owner_id, self.COL_ID_1) # Delete a collection in the playlist section. collection_services.delete_collection(self.owner_id, self.COL_ID_3) # Get the progress of the user. activity_progress = learner_progress_services.get_activity_progress( self.user_id) # Check that the dashboard records the collection deleted in the # completed section. self.assertEqual(activity_progress[1]['completed_collections'], 1) # Check that the dashboard records the collection deleted in the # incomplete section. self.assertEqual(activity_progress[1]['incomplete_collections'], 1) # Check that the dashboard records the collection deleted in the # playlist section. self.assertEqual(activity_progress[1]['collection_playlist'], 1)