'unresolved_answers': {}, } def get_value_generators_js(): """Return a string that concatenates the JS for all value generators.""" all_value_generators = ( value_generators_domain.Registry.get_all_generator_classes()) value_generators_js = '' for _, generator_cls in all_value_generators.iteritems(): value_generators_js += generator_cls.get_js_template() return value_generators_js VALUE_GENERATORS_JS = config_domain.ComputedProperty( 'value_generators_js', {'type': 'unicode'}, 'JavaScript code for the value generators', get_value_generators_js) MODERATOR_REQUEST_FORUM_URL_DEFAULT_VALUE = ( 'https://moderator/request/forum/url') MODERATOR_REQUEST_FORUM_URL = config_domain.ConfigProperty( 'moderator_request_forum_url', {'type': 'unicode'}, 'A link to the forum for nominating explorations to be featured ' 'in the gallery', default_value=MODERATOR_REQUEST_FORUM_URL_DEFAULT_VALUE) def _require_valid_version(version_from_payload, exploration_version): """Check that the payload version matches the given exploration version.""" if version_from_payload is None: raise base.BaseHandler.InvalidInputException(
'before_end_head_tag_hook', { 'type': 'unicode', 'ui_config': { 'rows': 7, }, }, 'Code to insert just before the closing </head> tag in all pages.', '') BEFORE_END_BODY_TAG_HOOK = config_domain.ConfigProperty( 'before_end_body_tag_hook', { 'type': 'unicode', 'ui_config': { 'rows': 7, }, }, 'Code to insert just before the closing </body> tag in all pages.', '') OBJECT_EDITORS_JS = config_domain.ComputedProperty( 'object_editors_js', {'type': 'unicode'}, 'JavaScript code for the object editors', obj_services.get_all_object_editor_js_templates) SIDEBAR_MENU_ADDITIONAL_LINKS = config_domain.ConfigProperty( 'sidebar_menu_additional_links', { 'type': 'list', 'items': { 'type': 'dict', 'properties': [{ 'name': 'name', 'description': 'Text of the menu item', 'schema': { 'type': 'unicode' }, }, {
# The maximum number of exploration history snapshots to show by default. DEFAULT_NUM_SNAPSHOTS = 30 def get_value_generators_js(): """Return a string that concatenates the JS for all value generators.""" all_value_generators = ( value_generators_domain.Registry.get_all_generator_classes()) value_generators_js = '' for _, generator_cls in all_value_generators.iteritems(): value_generators_js += generator_cls.get_js_template() return value_generators_js VALUE_GENERATORS_JS = config_domain.ComputedProperty( 'value_generators_js', 'UnicodeString', 'JavaScript code for the value generators', get_value_generators_js) OBJECT_EDITORS_JS = config_domain.ComputedProperty( 'object_editors_js', 'UnicodeString', 'JavaScript code for the object editors', obj_services.get_all_object_editor_js_templates) EDITOR_PAGE_ANNOUNCEMENT = config_domain.ConfigProperty( 'editor_page_announcement', 'Html', 'A persistent announcement to display on top of all editor pages.', default_value='') MODERATOR_REQUEST_FORUM_URL = config_domain.ConfigProperty( 'moderator_request_forum_url', 'UnicodeString', 'A link to the forum for nominating explorations for release.', default_value='https://moderator/request/forum/url')