Repository: oppia/oppia

Issue:
All the Frontend services should be documented with jsdoc.
**This starter issue is currently on hold because we do not have the capacity to support new contributors working on it.**

--------------

We aim to document all the files listed below. 

Each of the below-listed files should have a file overview signifying the purpose of the file, 
and each function should have its meaning, arguments and return statement documented with the help of jsdoc decorators like `@fileoverview`, `@param`, `@return`.

You can go through these services to get some reference:
- graph-input-rules.service.ts
- exploration-html-formatter.service.ts
- graph-utils.service.ts
- alerts.service.ts
- playthrough-issues.service.ts

**Deducing variable's significance and the meaning from the code:**
Try and execute the code by running a dev server locally, and log the variable type (you can use typeof for this) and try to find out the purpose of the variable(what's the variable storing, what is it being used for, what would break if we remove the variable?). To figure out how to execute the code, grep to see what methods call the function, and add console logs to ensure that the code is being executed when you perform the corresponding action in the UI. (As a sanity check, you might also want to ensure that the suspected variable type is consistent with any TypeScript types that are already provided.)

**Overview of the function:**
Finding or deducing the overview or the purpose of the function can be sometimes a bit tricky, some general advice can be to think--

- why is this function even required, what does it helps us achieve. Try to think from the perspective of the person who created the function and try to mimic the thought process of the original author.
- Look at the callers of the function, see all the places where this function is being called at and try to get a better understanding of the function.
- If you are unable to understand the purpose of the function, feel free to reach out to your mentor(always happy to help).

Please go through this [doc](https://docs.google.com/document/d/1jr8X3oqW7WqKxOgsK8b4TxIraODAV23vDJgYso1R7Pk/edit?usp=sharing) for a deeper context.

**Please don't include types in the JSDoc, use the TypeScript annotations for that.**

PR's for reference: [#8773](https://github.com/oppia/oppia/pull/8773)

**To be assigned to a file or for any queries, comment on the thread and tag @nithusha21.** 

The listed services file below needs to be documented:

- [ ] admin-config-tab-backend-api.service.ts
- [ ] admin-data.service.ts
- [ ] admin-router.service.ts @anumehaagrawal
- [ ] admin-task-manager.service.ts @larakhdavies
- [ ] alerts.service.ts
- [ ] angular-name.service.ts @parulpriyedarshani
- [ ] answer-classification.service.ts
- [ ] answer-groups-cache.service.ts
- [ ] assets-backend-api.service.ts
- [ ] audio-pFlayer.service.ts
- [ ] audio-preloader.service.ts
- [ ] audio-translation-language.service.ts @kaylahardie 
- [ ] audio-translation-manager.service.ts
- [ ] autogenerated-audio-player.service.ts @BlakeHan01
- [ ] autoplayed-videos.service.ts @darkpsychic
- [ ] autosave-info-modals.service.ts
- [ ] background-mask.service.ts
- [ ] base-undo-redo.service.ts
- [ ] browser-checker.service.ts
- [ ] change-list.service.ts
- [ ] changes-in-human-readable-form.service.ts
- [ ] classroom-backend-api.service.ts @ReshuKumari 
- [ ] code-normalizer.service.ts
- [ ] collection-creation-backend-api.service.ts
- [ ] collection-creation.service.ts
- [ ] collection-editor-state.service.ts
- [ ] collection-linearizer.service.ts
- [ ] collection-rights-backend-api.service.ts
- [ ] collection-update.service.ts
- [ ] collection-validation.service.ts
- [ ] compare-versions.service.ts
- [ ] compute-graph.service.ts
- [ ] concept-card-backend-api.service.ts
- [ ] construct-translation-ids.service.ts @BlakeHan01
- [ ] context.service.ts
- [ ] contribution-and-review.service.ts @lelouchB
- [ ] contribution-opportunities-backend-api.service.ts
- [ ] contribution-opportunities.service.ts
- [ ] creator-dashboard-backend-api.service.ts
- [ ] csrf-token.service.ts
- [ ] current-interaction.service.ts
- [ ] date-time-format.service.ts @linnhallonqvist
- [ ] debouncer.service.ts
- [ ] debug-info-tracker.service.ts
- [ ] device-info.service.ts
- [ ] document-attribute-customization.service.ts
- [ ] editability.service.ts
- [ ] editable-collection-backend-api.service.ts
- [ ] editable-exploration-backend-api.service.ts
- [ ] editable-question-backend-api.service.ts
- [ ] editable-skill-backend-api.service.ts
- [ ] editable-story-backend-api.service.ts
- [ ] editable-topic-backend-api.service.ts
- [ ] editor-first-time-events.service.ts
- [ ] email-dashboard-data.service.ts
- [ ] exploration-automatic-text-to-speech.service.ts
- [ ] exploration-category.service.ts
- [ ] exploration-correctness-feedback.service.ts
- [ ] exploration-creation.service.ts
- [ ] exploration-data.service.ts
- [ ] exploration-diff.service.ts
- [ ] exploration-embed-button.service.ts
- [ ] exploration-engine.service.ts
- [ ] exploration-features-backend-api.service.ts
- [ ] exploration-features.service.ts @parulpriyedarshani
- [ ] exploration-html-formatter.service.ts
- [ ] exploration-init-state-name.service.ts
- [ ] exploration-language-code.service.ts
- [ ] exploration-objective.service.ts
- [ ] exploration-param-changes.service.ts
- [ ] exploration-param-specs.service.ts
- [ ] exploration-player-state.service.ts
- [ ] exploration-property.service.ts
- [ ] exploration-recommendations.service.ts
- [ ] exploration-rights.service.ts
- [ ] exploration-save.service.ts
- [ ] exploration-states.service.ts
- [ ] exploration-summary-backend-api.service.ts
- [ ] exploration-tags.service.ts @shrutisatish00 
- [ ] exploration-title.service.ts
- [ ] exploration-warnings.service.ts
- [ ] expression-evaluator.service.ts
- [ ] expression-interpolation.service.ts
- [ ] expression-parser.service.ts
- [ ] expression-syntax-tree.service.ts
- [ ] expression-type-parser.service.ts
- [ ] extension-tag-assembler.service.ts
- [ ] extract-image-filenames-from-state.service.ts
- [ ] fatigue-detection.service.ts
- [ ] focus-manager.service.ts
- [ ] generate-content-id.service.ts
- [ ] graph-data.service.ts
- [ ] graph-layout.service.ts
- [ ] guest-collection-progress.service.ts
- [ ] hint-and-solution-modal.service.ts
- [ ] hints-and-solution-manager.service.ts
- [ ] html-escaper.service.ts @tianqi-wu 
- [ ] id-generation.service.ts
- [ ] image-preloader.service.ts
- [ ] image-upload-helper.service.ts
- [ ] improvement-modal.service.ts
- [ ] improvement-task.service.ts
- [ ] improvements-display.service.ts
- [ ] improvements.service.ts
- [ ] interaction-details-cache.service.ts
- [ ] language-util.service.ts
- [ ] learner-action-render.service.ts
- [ ] learner-answer-details-backend-api.service.ts
- [ ] learner-answer-details-data.service.ts
- [ ] learner-answer-info.service.ts
- [ ] learner-dashboard-backend-api.service.ts
- [ ] learner-dashboard-ids-backend-api.service.ts
- [ ] learner-params.service.ts
- [ ] learner-playlist.service.ts
- [ ] learner-view-rating.service.ts
- [ ] local-storage.service.ts
- [ ] logger.service.ts @remigourdon 
- [ ] messenger.service.ts @remigourdon 
- [ ] meta-tag-customization.service.ts
- [ ] navigation.service.ts
- [ ] nested-directives-recursion-timeout-prevention.service.ts
- [ ] number-attempts.service.ts @gp201
- [ ] page-title.service.ts
- [ ] parameter-metadata.service.ts
- [ ] player-correctness-feedback-enabled.service.ts
- [ ] player-position.service.ts @tianqi-wu 
- [ ] player-transcript.service.ts
- [ ] playthrough-issues-backend-api.service.ts
- [ ] playthrough-issues.service.ts
- [ ] playthrough.service.ts
- [ ] prediction-algorithm-registry.service.ts
- [ ] pretest-question-backend-api.service.ts
- [ ] promo-bar.service.ts
- [ ] question-backend-api.service.ts
- [ ] question-creation.service.ts
- [ ] question-player-engine.service.ts
- [ ] question-player-state.service.ts
- [ ] question-suggestion.service.ts
- [ ] question-undo-redo.service.ts
- [ ] question-update.service.ts
- [ ] questions-list.service.ts
- [ ] rating-computation.service.ts
- [ ] read-only-collection-backend-api.service.ts
- [ ] read-only-exploration-backend-api.service.ts
- [ ] refresher-exploration-confirmation-modal.service.ts
- [ ] request-interceptor.service.ts
- [ ] responses.service.ts
- [ ] review-test-backend-api.service.ts
- [ ] review-test-engine.service.ts
- [ ] router.service.ts
- [ ] rte-helper.service.ts
- [ ] schema-default-value.service.ts
- [ ] schema-undefined-last-element.service.ts
- [ ] search-explorations-backend-api.service.ts
- [ ] search.service.ts
- [ ] sidebar-status.service.ts
- [ ] site-analytics.service.ts
- [ ] skill-creation.service.ts
- [ ] skill-editor-routing.service.ts
- [ ] skill-editor-state.service.ts
- [ ] skill-mastery-backend-api.service.ts
- [ ] skill-rights-backend-api.service.ts
- [ ] skill-update.service.ts
- [ ] solution-validity.service.ts
- [ ] solution-verification.service.ts
- [ ] speech-synthesis-chunker.service.ts
- [ ] state-classifier-mapping.service.ts
- [ ] state-content.service.ts
- [ ] state-customization-args.service.ts
- [ ] state-editor.service.ts
- [ ] state-hints.service.ts
- [ ] state-improvement-suggestion.service.ts @bobbychen1999 
- [ ] state-interaction-id.service.ts
- [ ] state-name.service.ts
- [ ] state-param-changes.service.ts
- [ ] state-property.service.ts
- [ ] state-recorded-voiceovers.service.ts
- [ ] state-rules-stats.service.ts
- [ ] state-solicit-answer-details.service.ts
- [ ] state-solution.service.ts
- [ ] state-top-answers-stats-backend-api.service.ts
- [ ] state-top-answers-stats.service.ts
- [ ] state-tutorial-first-time.service.ts @akeeoaobh 
- [ ] state-written-translations.service.ts
- [ ] stats-reporting.service.ts
- [ ] story-creation.service.ts
- [ ] story-editor-state.service.ts @pengcheng95
- [ ] story-update.service.ts
- [ ] story-viewer-backend-api.service.ts
- [ ] subtopic-viewer-backend-api.service.ts
- [ ] suggestion-modal-for-creator-view.service.ts
- [ ] suggestion-modal-for-exploration-editor.service.ts
- [ ] suggestion-modal-for-exploration-player.service.ts
- [ ] suggestion-modal-for-learner-dashboard.service.ts
- [ ] suggestion-modal.service.ts
- [ ] thread-data.service.ts
- [ ] thread-status-display.service.ts
- [ ] topic-creation.service.ts
- [ ] topic-editor-routing.service.ts
- [ ] topic-editor-state.service.ts
- [ ] topic-rights-backend-api.service.ts
- [ ] topic-update.service.ts
- [ ] topic-viewer-backend-api.service.ts
- [ ] topics-and-skills-dashboard-backend-api.service.ts
- [ ] training-data-editor-panel.service.ts
- [ ] training-data.service.ts @felicityzhao99 
- [ ] training-modal.service.ts @varuncj02
- [ ] translate-text.service.ts
- [ ] translation-file-hash-loader.service.ts
- [ ] translation-language.service.ts
- [ ] translation-status.service.ts
- [ ] translation-tab-active-content-id.service.ts
- [ ] translation-tab-active-mode.service.ts
- [ ] undo-redo.service.ts
- [ ] url-interpolation.service.ts @qinghaoyang
- [ ] url.service.ts @tianqi-wu 
- [ ] user-email-preferences.service.ts @felicityzhao99 
- [ ] user-exploration-permissions.service.ts
- [ ] user.service.ts
- [ ] utils.service.ts @rriyaldhi 
- [ ] validators.service.ts
- [ ] version-tree.service.ts
- [ ] voiceover-recording.service.ts
- [ ] window-dimensions.service.ts @asafprivman 
- [ ] window-ref.service.ts @larakhdavies

Note: For a guide on how to access Oppia's webpages, see [this](https://github.com/oppia/oppia/wiki/How-to-access-Oppia-webpages).


Discussion:
Heyy @bansalnitish  Can I take "user-email-preferences.service.ts" and "training-data.services.ts"? Hopefully, it will help me better understand the code and then make more contributions to other topics:)
Hey @felicityzhao99 , I have assigned you both.
> Hey @felicityzhao99 , I have assigned you both.

Cool thanks:)
Any updates @felicityzhao99? Please let us know if you need any help :).
Hi Nitish,
Yea, actually I sent you my confusion several days ago. I really need your
help, could you please check at gitter? I resend it in private!

Thanks,
Felicity

On Wed, Feb 26, 2020 at 10:52 PM Nitish Bansal <notifications@github.com>
wrote:

> Any updates @felicityzhao99 <https://github.com/felicityzhao99>? Please
> let us know if you need any help :).
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/oppia/oppia/issues/8668?email_source=notifications&email_token=AHVYNBHO46PXTMBT4Q7RPXLRE5PMDA5CNFSM4KWYSXQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENDFP2A#issuecomment-591812584>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHVYNBBQPXXRO3THNPTPQKLRE5PMDANCNFSM4KWYSXQA>
> .
>

@felicityzhao99 I'd suggest that you can post your query here only, that'd be better.
Yeah, could you please post your query here @felicityzhao99? 

I'm not that active on gitter. Also, more folks will be able to help you out here.
Hi @Showtim3 @bansalnitish sorry for the late reply! I have already finished my tasks and the thing is I can't commit my code:
<img width="570" alt="Screen Shot 2020-03-03 at 10 50 19 PM" src="https://user-images.githubusercontent.com/32212612/75852709-6db64100-5da1-11ea-888b-efc0060fd3b3.png">
Can anyone help with this error? Thanks in advance!
Hey @felicityzhao99, Could you please merge your branch with updated develop? 

Let me know if it still doesn't work.
Hi @bansalnitish, the thing is I can't make commit locally to my feature branch. So if I'm right, you want me to do git merge feature-branch before successfully committed?

Also, I'm guessing it's yaml problem? or do I need to refork?

Thanks so much for your help!
Could you do git status and check that changes are just related to the files that you've changed?

No, you don't need to refork.
Hi @bansalnitish 
<img width="563" alt="Screen Shot 2020-03-04 at 1 06 13 AM" src="https://user-images.githubusercontent.com/32212612/75862978-9bf14c00-5db4-11ea-8da4-6caabfd9b939.png">
Yea, I think it's the right file that I wanna commit. Not sure what's happened.

Also, one more question, do you know where is the related front-end page of training-data.service.ts? I check the path: core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data.service.ts and think it's in the exploration-editor-page and click the editor tab
![image](https://user-images.githubusercontent.com/32212612/75863357-2d60be00-5db5-11ea-929d-e28ad64b4bd7.png)
but what's the training panel? Also why the editor tab always got an introduction error?

Sorry for these bunch of questions, it actually confused me a lot. I'm looking forward to seeing your message and fix them tomorrow. Good night:)
Hi @Showtim3, could you please tell me where the training-data.service.ts been used?
@Showtim3 @bansalnitish PTAL
Also wanna ask how to set you all as the PR assignee and what kind of label do I need to mention?

Resolving patch:
diff --git a/scripts/create_expression_parser.py b/scripts/create_expression_parser.py
--- a/scripts/create_expression_parser.py
+++ b/scripts/create_expression_parser.py
@@ -18,9 +18,7 @@
 from __future__ import unicode_literals  # pylint: disable=import-only-modules
 
 import argparse
-import fileinput
 import os
-import re
 import subprocess
 
 import python_utils


Test patch: