CAT-SOOP API: catsoop.base_context
Many of the variables in this file are special variables that affect the way the page is rendered (these special variables can be overwritten by early loads or late loads at lower levels).
Members
-
catsoop.base_context.cs_attributions (
set)Special: additional attributions, displayed just above the footer.
-
catsoop.base_context.cs_auth_type (
str)Special: Which authentication type to use (
'login'to use a form,'cert'to read client certificates,'openid_connect'to use OpenID Connect, or some other value for a course-specific or other custom authentication type).
-
catsoop.base_context.cs_base_color (
str)Special: The base color to use to customize the main theme, hexadecimal format.
-
catsoop.base_context.cs_base_logo_text (
str)Special: Text representing the CAT-SOOP Logo
-
catsoop.base_context.cs_bottom_menu (
str)Special: Additional menu space
-
catsoop.base_context.cs_check_image (
str)A URI pointing to an image to be used for the "check" (correct) image.
-
catsoop.base_context.cs_checker_global_timeout (
int)Special: The absolute maximum length (in seconds) that a checker should be allowed to run before being killed. This trumps any limits set by a particular question so that if there is, for example, an infinite loop in a checker's code, it will still be killed eventually.
-
catsoop.base_context.cs_checker_parallel_checks (
int)Special: The number of checks the checker should run simultaneously.
-
catsoop.base_context.cs_checker_server_port (
int)Special: The local port on which the websocket server should run
-
catsoop.base_context.cs_checker_websocket (
str)Special: The location to which the browser should connect to the checker's "reporter" process.
-
catsoop.base_context.cs_content (
str)Special: The content of the page
-
catsoop.base_context.cs_content_header (
str)Special: The text to be displayed at the top of the "content" block.
-
catsoop.base_context.cs_course (
NoneType)The course associated with the given request (should not be manually set)
-
catsoop.base_context.cs_cross_image (
str)A URI pointing to an image to be used for the "cross" (incorrect) image.
-
catsoop.base_context.cs_dark_mode_default_settings (
dict)Special: Default values to use for dark mode settings
-
catsoop.base_context.cs_dark_mode_invert_images (
bool)Special: Boolean flag controlling whether images are inverted in dark mode by default
-
catsoop.base_context.cs_dark_mode_invert_videos (
bool)Special: Boolean flag controlling whether videos are inverted in dark mode by default
-
catsoop.base_context.cs_dark_mode_javascript (
str)Special: Javascript code for managing dark mode setting (automatically populated, but can be overridden in cs_post_load)
-
catsoop.base_context.cs_data_root (
str)The directory where CAT-SOOP's data files are located (no trailing slash).
-
catsoop.base_context.cs_debug (
function, lines 400-408)Write values to cs_debug_log_location, with a timestamp and an optional tag. If cs_debug_log_location is None, do nothing.
- catsoop.base_context.cs_debug_level (
str)
-
catsoop.base_context.cs_debug_log_location (
str)The filename where the user debug log should be stored (via cs_debug)
- catsoop.base_context.cs_default_course (
str)
-
catsoop.base_context.cs_footer (
str)Special: Footer, displayed in addition to the "powered by CAT-SOOP" link
-
catsoop.base_context.cs_footnotes (
str)Special: A string containing footnotes, if any. Automatically populated by the default handler.
-
catsoop.base_context.cs_fs_root (
str)The directory where CAT-SOOP's source is located (no trailing slash).
-
catsoop.base_context.cs_header (
str)Special: The main header, displayed at the top-left of the page in the base theme.
-
catsoop.base_context.cs_icon_url (
str)Special: A URL pointing to the page's favicon
-
catsoop.base_context.cs_light_color (
NoneType)Special: Light version of the color in the main theme, hexadeciaml format. If value is
None, an appropriate color will be computed based oncs_base_color.
-
catsoop.base_context.cs_loading_image (
str)A URI pointing to an image to be used as a loading icon.
-
catsoop.base_context.cs_log_compression (
bool)Special: Boolean indicating whether log entries should be compressed.
-
catsoop.base_context.cs_log_encryption (
bool)Special: Boolean indicating whether log entries should be encrypted.
- catsoop.base_context.cs_lti_debug_level (
str)
-
catsoop.base_context.cs_main_page_text (
str)Special: Text to be added to the main (information) page when no course is chosen.
-
catsoop.base_context.cs_python_intepreter (
str)Path to python interpreter used for sandboxed python execution of checking code
-
catsoop.base_context.cs_question_type_defaults (
dict)Special: A dictionary mapping question type names to dictionaries containing default values to use for that question type. These values are loaded in before the values in a <question> tag are evaluated.
-
catsoop.base_context.cs_scripts (
str)Special: HTML to import additional scripts; included in the page's
tags
-
catsoop.base_context.cs_side_menu (
str)Special: Additional menu space
- catsoop.base_context.cs_sole_course (
str)
-
catsoop.base_context.cs_subheader (
str)Special: Sub-header, displayed below the main header
-
catsoop.base_context.cs_template (
str)Special: The template file to use to render the page
-
catsoop.base_context.cs_theme (
str)Special: A URL pointing to the page's CSS stylesheet
-
catsoop.base_context.cs_title (
str)Special: The page title, to be displayed in the browser's title bar
-
catsoop.base_context.cs_top_menu (
list)Special: Navigation menu.
The navigation menu is specified as a string (containing raw HTML), or as a list of dictionaries.
Each dictionary should contain two keys:
'text'maps to the text to be displayed, and'link'maps to a URL, or to another list of dictionaries representing a submenu.
In the case where a dictionary is specified, the appropriate HTML for use with the base theme will be generated.
-
catsoop.base_context.cs_ui_config_flags (
dict)Special: user interface configuration flags
-
catsoop.base_context.cs_upload_management (
str)Special: defines how CAT-SOOP should handle file uploads. Must be
'file'or'db'.In
'file'mode, CAT-SOOP will store the uploaded files on disk, under<cs_data_root>/_logs/_uploads.In
'db'mode, CAT-SOOP will store the contents of the files directly in the CAT-SOOP logs.
-
catsoop.base_context.cs_url_root (
str)The URL root (without trailing slash). Going to this URL should lead the user to CAT-SOOP's information page.
-
catsoop.base_context.cs_user_config (
dict)Special: user information data configuration flags (e.g. used for groups)
- catsoop.base_context.cs_version (
str)
-
catsoop.base_context.cs_version_codename (
str)The codename for this version
-
catsoop.base_context.cs_welcome_message (
str)Special: Welcome message displayed next to the title in base theme.
-
catsoop.base_context.cs_wsgi_server (
str)The WSGI server to use. Currently, must be 'cheroot' or 'uwsgi'
-
catsoop.base_context.cs_wsgi_server_max_processes (
int)Special: The maximum number of worker processes the UWSGI server should have running
-
catsoop.base_context.cs_wsgi_server_min_processes (
int)Special: The minimum number of worker processes the UWSGI server should have running
-
catsoop.base_context.cs_wsgi_server_port (
int)Special: The local port on which the WSGI server should run.
-
catsoop.base_context.cs_wsgi_server_worker_max_requests (
NoneType)Special: Force UWSGI to restart workers after serving this many requests. Defaults to None (the option is not set when starting UWSGI), but can be set to an integer instead.