forked from oppia/oppia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate remaining constants into individual files. (oppia#6996)
* Services * Interactions * Removed exceptional directories from linter * Modified CODEOWNERS * Add requires * Fix lint * Fix lint * Update CODEOWNERS * Revert package lock
- Loading branch information
1 parent
f9a5dec
commit 7ad9d06
Showing
23 changed files
with
189 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
core/templates/dev/head/domain/story_viewer/story-viewer-domain.constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2018 The Oppia Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS-IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/** | ||
* @fileoverview Constants for story viewer domain. | ||
*/ | ||
|
||
oppia.constant( | ||
'STORY_DATA_URL_TEMPLATE', '/story_data_handler/<story_id>'); | ||
|
||
oppia.constant( | ||
'STORY_NODE_COMPLETION_URL_TEMPLATE', | ||
'/story_node_completion_handler/<story_id>/<node_id>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Copyright 2018 The Oppia Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS-IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/** | ||
* @fileoverview Constants for shared services across Oppia. | ||
*/ | ||
|
||
oppia.constant('PAGE_CONTEXT', { | ||
EXPLORATION_EDITOR: 'editor', | ||
EXPLORATION_PLAYER: 'learner', | ||
QUESTION_EDITOR: 'question_editor', | ||
QUESTION_PLAYER: 'question_player', | ||
OTHER: 'other' | ||
}); | ||
|
||
oppia.constant('EXPLORATION_EDITOR_TAB_CONTEXT', { | ||
EDITOR: 'editor', | ||
PREVIEW: 'preview' | ||
}); | ||
|
||
oppia.constant( | ||
'EXPLORATION_FEATURES_URL', '/explorehandler/features/<exploration_id>'); | ||
|
||
oppia.constant( | ||
'FETCH_ISSUES_URL', '/issuesdatahandler/<exploration_id>'); | ||
|
||
oppia.constant( | ||
'FETCH_PLAYTHROUGH_URL', | ||
'/playthroughdatahandler/<exploration_id>/<playthrough_id>'); | ||
|
||
oppia.constant( | ||
'RESOLVE_ISSUE_URL', '/resolveissuehandler/<exploration_id>'); | ||
|
||
oppia.constant( | ||
'STORE_PLAYTHROUGH_URL', | ||
'/explorehandler/store_playthrough/<exploration_id>'); | ||
|
||
// Enables recording playthroughs from learner sessions. | ||
oppia.constant('EARLY_QUIT_THRESHOLD_IN_SECS', 45); | ||
oppia.constant('NUM_INCORRECT_ANSWERS_THRESHOLD', 3); | ||
oppia.constant('NUM_REPEATED_CYCLES_THRESHOLD', 3); | ||
oppia.constant('CURRENT_ACTION_SCHEMA_VERSION', 1); | ||
oppia.constant('CURRENT_ISSUE_SCHEMA_VERSION', 1); | ||
|
||
// Whether to enable the promo bar functionality. This does not actually turn on | ||
// the promo bar, as that is gated by a config value (see config_domain). This | ||
// merely avoids checking for whether the promo bar is enabled for every Oppia | ||
// page visited. | ||
oppia.constant('ENABLE_PROMO_BAR', true); | ||
|
||
oppia.constant('RTE_COMPONENT_SPECS', richTextComponents); | ||
|
||
oppia.constant('SEARCH_DATA_URL', '/searchhandler/data'); | ||
|
||
oppia.constant( | ||
'STATE_ANSWER_STATS_URL', | ||
'/createhandler/state_answer_stats/<exploration_id>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2018 The Oppia Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS-IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/** | ||
* @fileoverview Constants for classfiers extensions. | ||
*/ | ||
|
||
oppia.constant('PythonProgramTokenType', { | ||
COMMENT: 'COMMENT', | ||
NL: 'NL', | ||
STRING: 'STRING', | ||
INDENT: 'INDENT', | ||
DEDENT: 'DEDENT', | ||
ENDMARKER: 'ENDMARKER', | ||
NUMBER: 'NUMBER', | ||
NAME: 'NAME', | ||
OP: 'OP', | ||
ERRORTOKEN: 'ERRORTOKEN' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.