Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove voiceover from exp schema #20675

Draft
wants to merge 39 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f003882
Adds conversions function for exploration migration.
Nik-09 Apr 19, 2024
71a0266
Removes recorded voiceover fields from exploration states backend
Nik-09 Apr 22, 2024
d000747
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Jun 8, 2024
68b14ad
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Jun 9, 2024
a930682
Fixes merge conflict
Nik-09 Jul 8, 2024
17f95f4
Removed recorded voiceover from exploration
Nik-09 Jul 9, 2024
d9e5a91
Removes feature flag
Nik-09 Jul 9, 2024
2214f8b
Removes voice artist models and UI
Nik-09 Jul 10, 2024
7f21430
Removes audio translation service files and uses.
Nik-09 Jul 14, 2024
d62e948
Fixes merge conflict
Nik-09 Jul 15, 2024
e7a8ac4
Fixes backend tests
Nik-09 Jul 15, 2024
16eacbc
Fixes backend tests
Nik-09 Jul 15, 2024
9fb7eca
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Jul 16, 2024
49380f3
Fixes frontend tests
Nik-09 Jul 21, 2024
439c490
Fixes merge conflict and frontend test
Nik-09 Jul 29, 2024
79c333b
Fixes frontend tests
Nik-09 Jul 29, 2024
7de0993
Fixes frontend tests
Nik-09 Aug 1, 2024
a348168
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Aug 1, 2024
827700f
Fixes lint issues
Nik-09 Aug 1, 2024
789cb77
Fixes lint issues
Nik-09 Aug 3, 2024
7519f17
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Aug 3, 2024
77ce7d1
Fixes merge conflict
Nik-09 Aug 7, 2024
23661e3
Fixes typescript checks
Nik-09 Aug 8, 2024
ff67301
Fixes merge conflict
Nik-09 Aug 18, 2024
4acb589
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Sep 4, 2024
8072d16
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Sep 21, 2024
3ea710d
Fixes frontend tests
Nik-09 Sep 23, 2024
a06d486
Fixes merge conflicts
Nik-09 Sep 30, 2024
c8a2218
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Oct 7, 2024
7f34239
Fixes merge conflict
Nik-09 Oct 30, 2024
11942df
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Nov 2, 2024
e89e16c
Fixes frontend tests
Nik-09 Nov 7, 2024
a8ab730
Fixes merge conflict
Nik-09 Nov 11, 2024
fc155ba
Reverts unnecessary changes.
Nik-09 Nov 24, 2024
bd34115
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Nov 24, 2024
95d39fa
Merge branch 'develop' of https://github.com/oppia/oppia into remove_…
Nik-09 Dec 1, 2024
c49c609
Fixes backend and lint checks
Nik-09 Dec 1, 2024
a87e250
Fixes merge conflict
Nik-09 Dec 10, 2024
446684c
Merge branch 'develop' into remove_voiceover_from_exp_schema
seanlip Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes merge conflict
  • Loading branch information
Nik-09 committed Dec 10, 2024
commit a87e250f150ddc6ad9ef8da2897a26d5fdc20652
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
}
},
{
// We exclude spec files to the no-testonly check
// We exclude spec files from the no-testonly check
"files": ["*spec.js", "*spec.ts"],
"rules": {
"oppia/no-testonly": "off"
Expand Down
13 changes: 1 addition & 12 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,6 @@
/scripts/run_typescript_checks*.py @oppia/dev-workflow-reviewers


# Answer classification team.
/core/controllers/classifier*.py @oppia/ml
/core/domain/classifier*.py @oppia/ml
/proto_files/ @oppia/ml
/core/templates/domain/classifier/ @oppia/ml
/core/templates/services/classifier-data-backend-api.service*.ts @oppia/ml
/extensions/classifiers/ @oppia/ml
/buf.yaml @oppia/ml
/buf.gen.yaml @oppia/ml


# App Feedback Reporting project
/core/domain/app_feedback_report_*.py @oppia/web-android-compatibility-reviewers
/core/controllers/incoming_app_feedback_report*.py @oppia/web-android-compatibility-reviewers
Expand Down Expand Up @@ -234,6 +223,7 @@
/core/templates/components/stale-tab-info/ @oppia/lace-frontend-reviewers
/core/templates/components/unsaved-changes-status-info/ @oppia/lace-frontend-reviewers
/core/templates/components/version-diff-visualization/ @oppia/lace-frontend-reviewers
/core/templates/domain/classifier/ @oppia/lace-frontend-reviewers
/core/templates/domain/editor/ @oppia/lace-frontend-reviewers
/core/templates/domain/entity_editor_browser_tabs_info/ @oppia/lace-frontend-reviewers
/core/templates/domain/exploration/ @oppia/lace-frontend-reviewers
Expand Down Expand Up @@ -525,7 +515,6 @@
/core/templates/pages/login-page/ @oppia/lace-frontend-reviewers
/core/templates/pages/logout-page/ @oppia/lace-frontend-reviewers
/core/templates/app-events/ @oppia/lace-frontend-reviewers
/core/templates/services/app.service*.ts @oppia/lace-frontend-reviewers
/core/templates/services/contextual/document-attribute-customization.service*.ts @oppia/lace-frontend-reviewers
/core/templates/services/contextual/meta-tag-customization.service*.ts @oppia/lace-frontend-reviewers
/core/templates/services/interaction-rules-registry.service*.ts @oppia/lace-frontend-reviewers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
# We avoid using ../ or absolute paths because unzip treats these as
# security issues and will refuse to follow them.
run: |
zip -rqy build_files.zip oppia/third_party oppia_tools oppia/build oppia/webpack_bundles oppia/proto_files oppia/app.yaml oppia/assets/hashes.json oppia/proto_files oppia/extensions/classifiers/proto/* oppia/backend_prod_files oppia/dist
zip -rqy build_files.zip oppia/third_party oppia_tools oppia/build oppia/webpack_bundles oppia/app.yaml oppia/assets/hashes.json oppia/backend_prod_files oppia/dist
working-directory: /home/runner/work/oppia
- name: Upload build files artifact
uses: actions/upload-artifact@v4
Expand Down
8 changes: 4 additions & 4 deletions app_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ handlers:
upload: extensions/(interactions|rich_text_components)/(.*)/directives/(.*\.(html))
secure: always
expiration: "0"
# Serve PNG images for interactions, rich_text_components, objects, classifiers,
# Serve PNG images for interactions, rich_text_components, objects,
# and custom ckeditor plugins under extensions in dev mode. This regex allows
# us to recursively serve PNG images scripts under the five specified
# directories. "\1" and "\2" insert capture groups from the url pattern.
- url: /extensions/(interactions|rich_text_components|objects|classifiers|ckeditor_plugins)/(.*\.(png))$
- url: /extensions/(interactions|rich_text_components|objects|ckeditor_plugins)/(.*\.(png))$
static_files: extensions/\1/\2
upload: extensions/(interactions|rich_text_components|objects|classifiers|ckeditor_plugins)/(.*\.(png))$
upload: extensions/(interactions|rich_text_components|objects|ckeditor_plugins)/(.*\.(png))$
secure: always
expiration: "0"
- url: /extensions/ckeditor_plugins/(.*\.(js))$
Expand Down Expand Up @@ -181,7 +181,7 @@ env_variables:
DATASTORE_HOST: "http://localhost:8089"
DATASTORE_PROJECT_ID: "dev-project-id"
DATASTORE_USE_PROJECT_ID_AS_APP_ID: "true"
SECRETS: "{\"ANDROID_BUILD_SECRET\": \"android-build-secret\", \"VM_ID\": \"vm_default\", \"SHARED_SECRET_KEY\": \"1a2b3c4e\"}"
SECRETS: "{\"ANDROID_BUILD_SECRET\": \"android-build-secret\"}"
# These environment variables control GRPC logging verbosity. See
# https://stackoverflow.com/a/78803598.
GRPC_VERBOSITY: "ERROR"
Expand Down
8 changes: 4 additions & 4 deletions app_dev_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ handlers:
upload: extensions/(interactions|rich_text_components)/(.*)/directives/(.*\.(html))
secure: always
expiration: "0"
# Serve PNG images for interactions, rich_text_components, objects, classifiers,
# Serve PNG images for interactions, rich_text_components, objects,
# and custom ckeditor plugins under extensions in dev mode. This regex allows
# us to recursively serve PNG images scripts under the five specified
# directories. "\1" and "\2" insert capture groups from the url pattern.
- url: /extensions/(interactions|rich_text_components|objects|classifiers|ckeditor_plugins)/(.*\.(png))$
- url: /extensions/(interactions|rich_text_components|objects|ckeditor_plugins)/(.*\.(png))$
static_files: extensions/\1/\2
upload: extensions/(interactions|rich_text_components|objects|classifiers|ckeditor_plugins)/(.*\.(png))$
upload: extensions/(interactions|rich_text_components|objects|ckeditor_plugins)/(.*\.(png))$
secure: always
expiration: "0"
- url: /extensions/ckeditor_plugins/(.*\.(js))$
Expand Down Expand Up @@ -188,7 +188,7 @@ env_variables:
DATASTORE_HOST: "http://datastore:8089"
DATASTORE_PROJECT_ID: "dev-project-id"
DATASTORE_USE_PROJECT_ID_AS_APP_ID: "true"
SECRETS: "{\"ANDROID_BUILD_SECRET\": \"android-build-secret\", \"VM_ID\": \"vm_default\", \"SHARED_SECRET_KEY\": \"1a2b3c4e\"}"
SECRETS: "{\"ANDROID_BUILD_SECRET\": \"android-build-secret\"}"
# These environment variables control GRPC logging verbosity. See
# https://stackoverflow.com/a/78803598.
GRPC_VERBOSITY: "ERROR"
Expand Down
16 changes: 16 additions & 0 deletions assets/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6841,6 +6841,22 @@ export default {
"TITLE": "I18N_ERROR_PAGE_ROOT_BROWSER_TAB_TITLE",
"META": []
},
"ERROR_IFRAMED": {
"ROUTE": "error/iframed",
"TITLE": "Error Iframed - Oppia",
"META": [
{
"PROPERTY_TYPE": "itemprop",
"PROPERTY_VALUE": "description",
"CONTENT": "Error Iframed Page"
},
{
"PROPERTY_TYPE": "property",
"PROPERTY_VALUE": "og:description",
"CONTENT": "Error Iframed Page"
}
]
},
"EXPLORATION_PLAYER": {
"ROUTE": "explore/:exploration_id",
"TITLE": "",
Expand Down
3 changes: 3 additions & 0 deletions assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,9 @@
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_ADD_BUTTON": "Add a goal",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_HEADING": "<[username]>'s Goals",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_INSTRUCTIONS": "Choose up to 5 topics of your interest, and then complete all chapters on the selected topics to achieve your learning goals.",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_LIST_NODE_TITLE": "Chapter <[number]>: <[title]>",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_LIST_STORY_PROGRESS": "<[current]> OF <[total]> CHAPTERS COMPLETED",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_LIST_STORY_TITLE": "<[title]>",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_MODAL_CANCEL": "Cancel",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_MODAL_HEADING": "Add or edit a goal",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_MODAL_INSTRUCTIONS": "You can select up to 5 goals at a time",
Expand Down
3 changes: 3 additions & 0 deletions assets/i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,9 @@
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_ADD_BUTTON": "Button text for adding a goal in the goals section in the learner dashboard",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_HEADING": "Heading text for the goals section in the learner dashboard",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_INSTRUCTIONS": "Instruction text on how to add goals for the goals section in the learner dashboard",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_LIST_NODE_TITLE": "Node title for story dropdown in goals tab of learner dashboard",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_LIST_STORY_PROGRESS": "Status of chapters completed for story in goals tab of learner dashboard",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_LIST_STORY_TITLE": "Story title for story dropdown in goals tab of learner dashboard",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_MODAL_CANCEL": "Text for cancel button in modal to add goals for the goals section in the learner dashboard",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_MODAL_HEADING": "Heading text in modal to add goals for the goals section in the learner dashboard",
"I18N_LEARNER_DASHBOARD_GOALS_SECTION_MODAL_INSTRUCTIONS": "Instructions in modal to add goals for the goals section in the learner dashboard",
Expand Down
11 changes: 0 additions & 11 deletions buf.gen.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions buf.yaml

This file was deleted.

90 changes: 88 additions & 2 deletions core/controllers/access_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@
from core.constants import constants
from core.controllers import acl_decorators
from core.controllers import base
from core.controllers import editor
from core.controllers import reader
from core.domain import blog_services
from core.domain import classroom_config_services
from core.domain import feature_flag_services
from core.domain import learner_group_services
from core.domain import user_services

from typing import Dict, TypedDict

from typing import Dict, Optional, TypedDict

# TODO(#13605): Refactor access validation handlers to follow a single handler
# pattern.


class ClassroomAccessValidationHandlerNormalizedRequestDict(TypedDict):
"""Dict representation of ClassroomAccessValidationHandler's
normalized_request dictionary.
Expand Down Expand Up @@ -344,6 +346,90 @@ def get(self, learner_group_id: str) -> None:
raise self.NotFoundException


class ExplorationPlayerPageNormalizedRequestDict(TypedDict):
"""Dict representation of ExplorationPage's
normalized_request dictionary.
"""

v: Optional[int]
parent: Optional[str]
iframed: Optional[bool]
collection_id: Optional[str]


class ExplorationPlayerAccessValidationPage(
base.BaseHandler[
Dict[str, str], ExplorationPlayerPageNormalizedRequestDict
]
):
"""Page describing a single exploration."""

URL_PATH_ARGS_SCHEMAS = {
'exploration_id': {
'schema': editor.SCHEMA_FOR_EXPLORATION_ID
}
}
HANDLER_ARGS_SCHEMAS = {
'GET': {
'v': {
'schema': {
'type': 'int',
'validators': [{
'id': 'is_at_least',
# Version must be greater than zero.
'min_value': 1
}]
},
'default_value': None
},
'parent': {
'schema': {
'type': 'basestring'
},
'default_value': None
},
'iframed': {
'schema': {
'type': 'bool'
},
'default_value': None
},
'collection_id': {
'schema': {
'type': 'basestring',
'validators': [{
'id': 'is_regex_matched',
'regex_pattern': constants.ENTITY_ID_REGEX
}]
},
'default_value': None
}
}
}

@acl_decorators.can_play_exploration
def get(self, exploration_id: str) -> None:
"""Handles GET requests.

Args:
exploration_id: str. The ID of the exploration.
"""
assert self.normalized_request is not None
version = self.normalized_request.get('v')

# Note: this is an optional argument and will be None when the
# exploration is being played outside the context of a collection or if
# the 'parent' parameter is present.
if self.normalized_request.get('parent'):
collection_id = None
else:
collection_id = self.normalized_request.get('collection_id')

if not reader._does_exploration_exist( # pylint: disable=protected-access
exploration_id, version, collection_id):
raise self.NotFoundException


class CreateLearnerGroupPageAccessValidationHandler(
base.BaseHandler[Dict[str, str], Dict[str, str]]
):
Expand Down
84 changes: 84 additions & 0 deletions core/controllers/access_validators_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,90 @@ def test_release_coordinator_passes_validation(self) -> None:
ACCESS_VALIDATION_HANDLER_PREFIX)


class ExplorationPlayerAccessValidationPageTests(
test_utils.GenericTestBase):
"""Test for exploration player access validation."""

def setUp(self) -> None:
"""Complete the signup process for self.RELEASE_COORDINATOR_EMAIL."""
super().setUp()
self.signup(self.OWNER_EMAIL, self.OWNER_USERNAME)
self.owner_id = self.get_user_id_from_email(self.OWNER_EMAIL)
self.signup(self.EDITOR_EMAIL, self.EDITOR_USERNAME)
self.editor_id = self.get_user_id_from_email(self.EDITOR_EMAIL)
self.editor = user_services.get_user_actions_info(self.editor_id)

self.exploration = self.save_new_valid_exploration(
'asaB1nm2UGVI', self.editor_id, title=self.UNICODE_TEST_STRING,
category=self.UNICODE_TEST_STRING)

self.publish_exploration(self.editor_id, self.exploration.id)

def test_exploration_player_page_with_invalid_id(self) -> None:
self.get_html_response(
'%s/can_access_exploration_player_page/invalid' % (
ACCESS_VALIDATION_HANDLER_PREFIX),
expected_status_int=404)

def test_exploration_player_page_with_valid_id(self) -> None:
self.get_html_response(
'%s/can_access_exploration_player_page/%s' % (
ACCESS_VALIDATION_HANDLER_PREFIX,
self.exploration.id),
expected_status_int=200)

def test_exploration_player_page_raises_error_with_invalid_exploration_version( # pylint: disable=line-too-long
self) -> None:

self.get_html_response(
'%s/can_access_exploration_player_page/%s' % (
ACCESS_VALIDATION_HANDLER_PREFIX,
self.exploration.id), params={
'v': 10,
}, expected_status_int=404
)

def test_exploration_player_page_with_valid_exploration_version(
self) -> None:

self.get_html_response(
'%s/can_access_exploration_player_page/%s' % (
ACCESS_VALIDATION_HANDLER_PREFIX,
self.exploration.id), params={
'v': self.exploration.version,
'parent': True,
}, expected_status_int=200
)

def test_handler_raises_error_with_invaild_collection(self) -> None:
self.login(self.OWNER_EMAIL)

self.get_html_response(
'%s/can_access_exploration_player_page/%s' % (
ACCESS_VALIDATION_HANDLER_PREFIX,
self.exploration.id), params={
'v': self.exploration.version,
'collection_id': 'aZ9_______12'
}, expected_status_int=404
)
self.logout()

def test_handler_with_valid_collection(self) -> None:
self.login(self.OWNER_EMAIL)
col_id = 'aZ9_______12'
self.save_new_valid_collection(col_id, self.owner_id)

self.get_html_response(
'%s/can_access_exploration_player_page/%s' % (
ACCESS_VALIDATION_HANDLER_PREFIX,
self.exploration.id), params={
'v': self.exploration.version,
'collection_id': col_id
}, expected_status_int=200
)
self.logout()


class DiagnosticTestPlayerPageAccessValidationHandlerTests(
test_utils.GenericTestBase):
"""Test for diagnostic test player access validation."""
Expand Down
Loading
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.