diff --git a/CHANGELOG/index.html b/CHANGELOG/index.html index 9a2c69f7c..7c1a1e5b2 100644 --- a/CHANGELOG/index.html +++ b/CHANGELOG/index.html @@ -1889,7 +1889,7 @@
As a library or a CLI, you will be able to read and write from/to the following backends:
* read-only backend
The LRS server currently supports the following backends to store learning traces in xAPI format:
At first, Ralph has been designed as a CLI to batch process your logs using base commands and UNIX standard streams (stdin
, stdout
) to connect them in a pipeline. A base example pipeline may be:
$ ralph read --backend swift my_archive.gzip | \\\n gunzip | \\\n ralph write --backend es\n
In this small pipeline, we stream my_archive.gzip
content from a Swift container to the standard output (using the read
command), uncompress the content (using the gunzip
command), and bulk insert logs in an ElasticSearch index (using the write
command).
As UNIX is beautiful, Ralph offers many powerful possibilities by combining its commands with other standard commands or command line tools.
"},{"location":"#quick_start_guide","title":"Quick start guide","text":"Ralph is distributed as a python package and a Docker image.
If you choose to install ralph
in your native environment (without using Docker), please make sure that Python 3.11 is installed (and your default python distribution).
Ralph package can be installed from PyPI using the pip
tool:
# Create a new virtualenv (optional)\n$ python3.11 -m venv venv\n$ source venv/bin/activate\n\n# Install the full package (in a virtualenv)\n(venv) $ pip install \\\n ralph-malph[backend-es,backend-ldp,backend-lrs,backend-mongo,backend-swift,backend-ws,cli,lrs]\n\n# Install only the core package with the Elasticsearch backend and the LRS (in\n# a virtualenv)\n(venv) $ pip install ralph-malph[backend-es,lrs]\n\n# Test the ralph command (it should be in your PATH)\n(venv) $ ralph --help\n
If you only need to integrate ralph
models in your project, you don\u2019t need to install the backends
, cli
or lrs
extra dependencies, the core package is what you need:
# Install the core library (in a virtualenv)\n(venv) $ pip install ralph-malph\n
Alternatively, Docker users can pull the latest ralph
image and start playing with it:
# Pull latest docker image and get usage\n$ docker run --rm -i fundocker/ralph:latest ralph --help\n\n# Pro tip: define an alias to ease your life\n$ alias ralph=\"docker run --rm -i fundocker/ralph:latest ralph\"\n
Now that ralph
can be run from your system, we invite you to explore available commands.
This project is intended to be community-driven, so please, do not hesitate to get in touch if you have any questions related to our implementation or design decisions.
We try to raise our code quality standards and expect contributors to follow the recommendations from our handbook.
"},{"location":"#license","title":"License","text":"This work is released under the MIT License (see LICENSE).
"},{"location":"CHANGELOG/","title":"Changelog","text":"All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
"},{"location":"CHANGELOG/#unreleased","title":"Unreleased","text":""},{"location":"CHANGELOG/#added","title":"Added","text":"EdX
to xAPI
converters for enrollment eventsdatabase
and storage
backends under the unified data
backend interface [BC]query_statements
and query_statements_by_ids
backends methods under the unified lrs
backend interface [BC]ralph
APIGET /statements
now has \u201cmine\u201d option which matches statements that have an authority field matching that of the userpush
to write
and fetch
to read
[BC]fastapi
to 0.103.2
more-itertools
to 10.1.0
sentry_sdk
to 1.32.0
uvicorn
to 0.23.2
context.contextActivities.category
field is now mandatory in the video and virtual classroom profiles. [BC]LRSHTTP
methods must not be used in asyncio
events loop (BC)max_statements
option to AsyncLRSHTTP
id
, timestamp
, stored
and authority
statementId
and voidedStatementId
to snake_case, with camelCase alias, in LRSStatementsQuery
RALPH_LRS_RESTRICT_BY_AUTHORITY
option making ?mine=True
implicitschool
, course
, module
context extensions in Edx to xAPI base convertername
field in VideoActivity
xAPI model mistakenly used in video
profilefastapi
to 0.100.0
sentry_sdk
to 1.28.1
uvicorn
to 0.23.0
activity
parameter in GET /statements
clickhouse
backendGeneral improvement for the Helm Chart:
downloaded
verb)async_lrs
backendlrs
backendfastapi
to 0.97.0
sentry_sdk
to 1.25.1
client_options
to a dedicated pydantic modelhttpx
to 0.24.1
/statements
GET query agent
filteringcachetools
to 5.3.1
verb
.display
field no longer mandatory in xAPI models and for convertersentry_sdk
to 1.22.2
uvicorn
to 0.22.0
/statements
GET
method returns a code 400 with certain parameters as per the xAPI specificationmore
IRL building in LRS /statements
GET requestshttpx
to 0.24.0
fastapi
to 0.95.1
sentry_sdk
to 1.19.1
uvicorn
to 0.21.1
sentry_sdk
to 1.16.0
fastapi
to 0.92.0
sentry_sdk
to 1.15.0
extensions
fields3.7
+auth
subcommand to generate required credentials file for the LRS--version
optionfastapi
to 0.89.1
httpx
to 0.23.3
sentry_sdk
to 1.14.0
uvicorn
to 0.20.0
ca_certs
path for the ES backend client option (LRS)https://handbook.openfun.fr
fastapi
to 0.87.0
post
endpoint for statements implementing the LRS specget
method (used in the fetch
command)python-dotenv
dependencyhost
and port
options for the runserver
cli commandstatus
checkinghealth
LRS routerpython-legacy
handler for mkdocstrings
packageclick
to 8.1.3
elasticsearch
to 8.3.3
fastapi
to 0.79.1
ovh
to 1.0.0
pydantic
to 1.9.2
pymongo
to 4.2.0
python-keystoneclient
to 5.0.0
python-swiftclient
to 4.0.1
requests
to 2.28.1
sentry_sdk
to 1.9.5
uvicorn
to 0.18.2
websockets
to 10.3
pyyaml
dependency (BC)ws
websocket stream backend (compatible with the fetch
command)jq
, curl
and wget
in the fundocker/ralph
Docker imagerunserver
command with basic auth and a Whoami
routeget
endpoint for statements implementing the LRS specuvicorn
to 0.17.4
elasticsearch
to 7.17.0
sentry_sdk
to 1.5.5
fastapi
to 0.73.0
pyparsing
to 3.0.7
pydantic
to 1.9.0
python-keystoneclient
to 4.4.0
python-swiftclient
to 3.13.0
pyyaml
to 6.0
requests
to 2.27.1
websockets
to 10.1
elasticsearch
to 7.13.3
interacted
pydantic modelsterminated
pydantic modelscompleted
pydantic modelsseeked
pydantic modelsinitialized
pydantic modelspaused
pydantic modelsconvert
command to transform edX events to xAPI formatviewed
andpage_close
eventsplayed
pydantic modelsviewed
and page terminated
pydantic modelsvalidate
command to lint edX events using pydantic models--es-op-type
optionelasticsearch
to 7.13.2
python-swiftclient
to 3.12.0
click
to 8.0.1
click-option-group
to 0.5.3
pydantic
to 1.8.2
sentry_sdk
to 1.1.0
version
immutable field in DC selectorpandas
is no longer requiredpush
command --ignore-errors
option to ignore ES bulk import errorspyyaml
to 5.4.1
pandas
to 1.2.1
click_log
is no longer required as we are able to configure loggingMIT License
Copyright (c) 2020-present France Universit\u00e9 Num\u00e9rique
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"},{"location":"api/","title":"API Server","text":"Ralph comes with an API server that aims to implement the Learning Record Store (LRS) specification (still a work in progress).
"},{"location":"api/#getting_started","title":"Getting started","text":"The API server supports the following authentication methods:
The default method for securing Ralph API server is with HTTP basic authentication.
The API server can be started up with the following command:
$ ralph runserver --backend es\n
The --backend
(or -b
) option specifies which database backend to use for LRS data storage and retrieval. See Ralph\u2019s backends documentation for more details.
However, before you can start your API server and make requests against it, you need to set up your credentials.
"},{"location":"api/#creating_a_credentials_file","title":"Creating a credentials file","text":"The credentials file is expected to be a valid JSON file. Its location is specified by the RALPH_AUTH_FILE
configuration value. By default, ralph
will look for the auth.json
file in the application directory (see click documentation for details).
The expected format is a list of entries (JSON objects) each containing the username, the user\u2019s bcrypt
hashed+salted password, scopes they can access, and an agent
object used to represent the user in the LRS. The agent
is constrained by LRS specifications, and must use one of four valid Inverse Functional Identifiers.
[\n {\n \"username\": \"john.doe@example.com\",\n \"hash\": \"$2b$12$yBXrzIuRIk6yaft5KUgVFOIPv0PskCCh9PXmF2t7pno.qUZ5LK0D2\",\n \"scopes\": [\"example_scope\"],\n \"agent\": {\n \"mbox\": \"mailto:john.doe@example.com\"\n }\n },\n {\n \"username\": \"simon.says@example.com\",\n \"hash\": \"$2b$12$yBXrzIuRIk6yaft5KUgVFOIPv0PskCCh9PXmF2t7pno.qUZ5LK0D2\",\n \"scopes\": [\"second_scope\", \"third_scope\"],\n \"agent\": {\n \"account\": {\n \"name\": \"simonsAccountName\",\n \"homePage\": \"http://www.exampleHomePage.com\"\n }\n }\n }\n]\n
To create a new user credentials, Ralph\u2019s CLI provides a dedicated command:
$ ralph auth \\\n --username janedoe \\\n --password supersecret \\\n --scope janedoe_scope \\\n --agent-ifi-mbox mailto:janedoe@example.com \\\n # or --agent-ifi-mbox-sha1sum ebd31e95054c018b10727ccffd2ef2ec3a016ee9 \\\n # or --agent-ifi-openid \"http://jane.openid.example.org/\" \\\n # or --agent-ifi-account exampleAccountname http://www.exampleHomePage.com \\\n -w\n
This command updates your credentials file with the new janedoe
user.
Note that running this command requires that you installed Ralph with the CLI optional dependencies, e.g. pip install ralph-malph[cli]
(which we highly recommend).
The first request that can be answered by the ralph API server is a whoami
request, which checks if the user is authenticated and returns their username and permission scopes.
Use curl to get http://localhost:8100/whoami
:
$ curl http://localhost:8100/whoami\n< HTTP/1.1 401 Unauthorized\n< {\"error\":\"Not authenticated\"}\n
Send your username and password to the API server through HTTP Basic Auth:
$ curl --user john.doe@example.com:PASSWORD http://localhost:8100/whoami\n< HTTP/1.1 200 OK\n< {\"scopes\":[\"example_scope\"], \"agent\": {\"mbox\": \"mailto:john.doe@example.com\"}}\n
"},{"location":"api/#openid_connect_authentication","title":"OpenID Connect authentication","text":"Ralph LRS API server supports OpenID Connect (OIDC) on top of OAuth 2.0 for authentication and authorization.
To enable OIDC auth, you should set the RALPH_RUNSERVER_AUTH_BACKEND
environment variable as follows:
RALPH_RUNSERVER_AUTH_BACKEND=oidc\n
and you should define the RALPH_RUNSERVER_AUTH_OIDC_ISSUER_URI
environment variable with your identity provider\u2019s Issuer Identifier URI as follows: RALPH_RUNSERVER_AUTH_OIDC_ISSUER_URI=http://{provider_host}:{provider_port}/auth/realms/{realm_name}\n
This address must be accessible to the LRS on startup as it will perform OIDC Discovery to retrieve public keys and other information about the OIDC environment.
It is also strongly recommended that you set the optional RALPH_RUNSERVER_AUTH_OIDC_AUDIENCE
environment variable to the origin address of the LRS itself (ex. \u201chttp://localhost:8100\u201d) to enable verification that a given token was issued specifically for the LRS.
OIDC support is currently developed and tested against Keycloak but may work with other identity providers that implement the specification.
The Learning analytics playground repository contains a Docker Compose file and configuration for a demo instance of Keycloak with a ralph
client.
The first request that can be answered by the ralph API server is a whoami
request, which checks if the user is authenticated and returns their username and permission scopes.
Use curl to get http://localhost:8100/whoami
:
$ curl http://localhost:8100/whoami\n< HTTP/1.1 401 Unauthorized\n< {\"detail\":\"Could not validate credentials\"}\n
With the Keycloak instance running, use curl to get access token from Keycloak: curl --request POST 'http://localhost:8080/auth/realms/fun-mooc/protocol/openid-connect/token' \\\n--header 'Content-Type: application/x-www-form-urlencoded' \\\n--data-urlencode 'client_id=ralph' \\\n--data-urlencode 'client_secret=super-secret' \\\n--data-urlencode 'username=ralph_admin' \\\n--data-urlencode 'password=funfunfun' \\\n--data-urlencode 'grant_type=password'\n
which outputs (tokens truncated for example purpose):
{ \n \"access_token\":\"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSTWlLM\",\n \"expires_in\":300,\n \"refresh_expires_in\":1800,\n \"refresh_token\":\"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4MDc5NjExM\",\n \"token_type\":\"Bearer\",\n \"not-before-policy\":0,\n \"session_state\":\"22a36735-e35f-496b-a243-152d32ebff45\",\n \"scope\":\"profile email\"\n}\n
Send the access token to the API server as a Bearer header:
$ curl http://localhost:8100/whoami --header \"Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSTWlLM\"\n< HTTP/1.1 200 OK\n< {\"username\":\"ralph_admin\",\"scopes\":[\"all\"]}\n
"},{"location":"api/#security","title":"Security","text":"By default, all authenticated users have full read and write access to the server. You may use the options below to restrict behavior.
"},{"location":"api/#filtering_results_by_authority_multitenancy","title":"Filtering results by authority (multitenancy)","text":"In Ralph, all incoming statements are assigned an authority
(or ownership) derived from the user that makes the call. You may restrict read access to users \u201cown\u201d statements (thus enabling multitenancy) by setting the following environment variable:
RALPH_LRS_RESTRICT_BY_AUTHORITY = True # Default: False\n
WARNING: Two accounts with different credentials may share the same authority
meaning they can access the same statements. It is the administrators responsability to ensure that authority
is properly assigned.
NB: If not using \u201cscopes\u201d, or for users with limited \u201cscopes\u201d, using this option will make the use of option ?mine=True
implicit when fetching statement.
(Work In Progress)
"},{"location":"api/#forwarding_statements","title":"Forwarding statements","text":"Ralph\u2019s API server can be configured to forward xAPI statements it receives to other LRSes.
To configure statement forwarding, you need to create a .env
file in the current directory and define the RALPH_XAPI_FORWARDINGS
variable or define the RALPH_XAPI_FORWARDINGS
environment variable.
The value of the RALPH_XAPI_FORWARDINGS
variable should be a JSON encoded list of dictionaries where each dictionary defines a forwarding configuration and consists of the following key/value pairs:
is_active
boolean
Specifies whether or not this forwarding configuration should take effect. url
URL
Specifies the endpoint URL where forwarded statements should be send. basic_username
string
Specifies the basic auth username. basic_password
string
Specifies the basic auth password. max_retries
number
Specifies the number of times a failed forwarding request should be retried. timeout
number
Specifies the duration in seconds of network inactivity leading to a timeout. Note that for a forwarding configuration to be valid it is required that all key/value pairs are defined.
Example of a valid forwarding configuration:
RALPH_XAPI_FORWARDINGS='\n[\n {\n \"is_active\": true,\n \"url\": \"http://lrs1.example.com/xAPI/statements/\",\n \"basic_username\": \"admin1@example.com\",\n \"basic_password\": \"PASSWORD1\",\n \"max_retries\": 1,\n \"timeout\": 5\n },\n {\n \"is_active\": true,\n \"url\": \"http://lrs2.example.com/xAPI/statements/\",\n \"basic_username\": \"admin2@example.com\",\n \"basic_password\": \"PASSWORD2\",\n \"max_retries\": 5,\n \"timeout\": 0.2\n }\n]\n'\n
"},{"location":"api/#sentry_configuration","title":"Sentry configuration","text":"Ralph provides Sentry integration to monitor its LRS server and its CLI. To activate Sentry integration, one should define the following environment variables:
RALPH_SENTRY_DSN={PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}{PATH}/{PROJECT_ID}\nRALPH_EXECUTION_ENVIRONMENT=development\n
The Sentry DSN (Data Source Name) can be found in your project settings from Sentry application. The execution environment should reflect the environment Ralph has been deployed in (e.g. production
).
You may also want to monitor the performance of Ralph by configuring the CLI and LRS traces sample rates:
RALPH_SENTRY_CLI_TRACES_SAMPLE_RATE=0.1\nRALPH_SENTRY_LRS_TRACES_SAMPLE_RATE=0.3\n
Note that a sampling rate of 1.0
means 100% of transactions are sent to sentry and 0.1
only 10%.
If you want to lower noisy transactions (e.g. in a Kubernetes cluster), you can disable health checks related ones:
RALPH_SENTRY_IGNORE_HEALTH_CHECKS=True\n
"},{"location":"api/#additional_configuration","title":"Additional configuration","text":""},{"location":"api/#http_basic_auth_caching","title":"HTTP Basic auth caching","text":"HTTP basic auth implementation uses the secure and standard bcrypt algorithm to hash/salt passwords before storing them. This implementation comes with a performance cost. To speed up requests, credentials are stored in an LRU cache with a Time To Live. To configure this cache, you can define the following environment variables: - the maximum number of entries in the cache. Select a value greater than the maximum number of individual user credentials, for better performance. Defaults to 100.
RALPH_AUTH_CACHE_MAX_SIZE=100\n
- the Time To Live of the cache entries in seconds. Defaults to 3600s. RALPH_AUTH_CACHE_TTL=3600\n
"},{"location":"backends/","title":"Backends","text":"Ralph supports various storage and database backends that can be accessed to read from or write learning events to. Implemented backends are listed below along with their configuration parameters. If your favourite backend is missing to the list, feel free to submit your implementation or get in touch!
"},{"location":"backends/#key_concepts","title":"Key concepts","text":"We distinguish storage from database backends as the semantic and concepts are quite different in terms of code, but those two types of backends can be considered as \u201cbackends\u201d from a Ralph user perspective as the CLI can use both in most of its commands.
Each backend has its own parameters that are required to use it. Those parameters can be set as command line options or environment variables; the later is the recommended solution for sensible data such as service credentials. If we consider the os_username
(OpenStack user name) parameter of the OpenStack Swift backend, it can be set as a command line option using swift
as the option prefix (and replacing underscores in its name by dashes):
$ ralph list --backend swift --swift-os-username johndoe # [...] more options\n
Alternatively, this parameter can be set as an environment variable (in upper case, prefixed by the program name, e.g. RALPH_
):
$ export RALPH_BACKENDS__STORAGE__SWIFT__OS_USERNAME=\"johndoe\"\n$ ralph list --backend swift # [...] more options\n
The general patterns for backend parameters are:
--{{ backend_name }}-{{ parameter | underscore_to_dash }}
for command options, and,RALPH_BACKENDS__{{ backend_type | uppercase }}__{{ backend_name | uppercase }}__{{ parameter | uppercase }}
for environment variables, where the backend_type
is one of DATABASE
, STORAGE
and STREAM
.LDP is a nice service built by OVH on top of Graylog to follow, analyse and store your logs. Learning events (aka tracking logs) can be stored in GELF format using this backend.
For now the LDP backend is read-only as we consider that it is mostly used to collect primary logs and not as a Ralph target. Feel free to get in touch to prove us wrong, or better: submit your proposal for the write
method implementation.
To access OVH\u2019s LDP API, you need to register Ralph as an authorized application and generate an application key, an application secret and a consumer key.
While filling the registration form available at: eu.api.ovh.com/createToken/, be sure to give an appropriate validity time span to your token and allow only GET requests on the /dbaas/logs/*
path.
endpoint
: the API endpoint (e.g. ovh-eu
)application_key
: use generated application keyapplication_secret
: use generated application secretconsumer_key
: use generated consumer keyThe following parameters are required to fetch archives from an LDP account stream:
service_name
: the LDP account name (e.g. ldp-xx-xxxxx
)stream_id
: the identifier of the stream you are querying (e.g. a UUID hex representation: 77ec6e4a-ac15-4bcf-8043-7429bf275e49
)For more information about OVH\u2019s API client parameters, please refer to the project\u2019s documentation: github.com/ovh/python-ovh.
"},{"location":"backends/#openstack_swift","title":"OpenStack Swift","text":"Swift is the OpenStack object storage service. This storage backend is fully supported (read and write operations) to stream and store log archives.
"},{"location":"backends/#backend_parameters_1","title":"Backend parameters","text":"Primarily required parameters correspond to a standard authentication using OpenStack Keystone service:
os_identity_api_version
: keystone API version you will authenticate to (defaults to 3
)os_auth_url
: the authentication URL (defaults to OVH\u2019s Swift https://auth.cloud.ovh.net/
)os_project_domain_name
: the project domain name (defaults to Default
)os_user_domain_name
: the user domain name (defaults to Default
)os_username
: the name of your openstack swift useros_password
: the password of your openstack swift userSecondary parameters are required to work with the target container:
os_storage_url
: the URL of the target containeros_region_name
: the region where your container isos_tenant_name
: the name of the tenant of your containeros_tenant_id
: the identifier of the tenant of your containerS3 is the Amazon Simple Storage Service. This storage backend is fully supported (read and write operations) to stream and store log archives.
"},{"location":"backends/#backend_parameters_2","title":"Backend parameters","text":"Primarily required parameters correspond to a standard authentication with AWS CLI:
access_key_id
: the access key for your AWS accountsecret_access_key
: the secret key for your AWS accountsession_token
: the session key for your AWS account (only needed when you are using temporary credentials).Secondary parameters are required to work with the target bucket:
default_region
: the region where your bucket isbucket_name
: the name of your S3 bucketendpoint_url
: the endpoint of your S3 serverThe file system backend is a dummy template that can be used to develop your own backend. It\u2019s a \u201cdummy\u201d backend as it\u2019s not required in a UNIX Shell context, the ls
and cat
commands used along with UNIX streams will do a better job.
The only required parameter is the path
we want to list or stream content from.
The webSocket backend is read-only and can be used to get real-time events.
If you use OVH\u2019s Logs Data Platform (LDP), you can retrieve a WebSocket URI to test your data stream by following instructions from the official documentation.
"},{"location":"backends/#backend_parameters_4","title":"Backend parameters","text":"ws_uri
: the WebSocket uri (e.g. wss://example.com/websocket
)Elasticsearch backend is mostly used for indexation purpose (as a datalake) but it can also be used to fetch indexed data from it.
"},{"location":"backends/#backend_parameters_5","title":"Backend parameters","text":"Elasticsearch backend parameters required to connect to a cluster are:
hosts
: a list of cluster hosts to connect to (e.g. [\"http://elasticsearch-node:9200\"]
)index
: the elasticsearch index where to get/put documentsclient_options
: a comma separated key=value list of Elasticsearch client optionsThe Elasticsearch client options supported in Ralph are: - ca_certs
: the path to the CA certificate file. - verify_certs
: enable or disable the certificate verification. Note that it should be enabled in production. Default to True
MongoDB backend is mostly used for indexation purpose (as a datalake) but it can also be used to fetch collections of documents from it.
"},{"location":"backends/#backend_parameters_6","title":"Backend parameters","text":"MongoDB backend parameters required to connect to a cluster are:
connection_uri
: the connection URI to connect to (e.g. [\"mongodb://mongo:27017/\"]
)database
: the database to connect tocollection
: the collection to get/put objects toclient_options
: a comma separated key=value list of MongoDB client optionsThe MongoDB client options supported in Ralph are: - document_class
: default class to use for documents returned from queries - tz_aware
: if True, datetime instances returned as values in a document will be timezone aware (otherwise they will be naive)
The ClickHouse backend can be used as a data lake and to fetch collections of documents from it.
"},{"location":"backends/#backend_parameters_7","title":"Backend parameters","text":"ClickHouse parameters required to connect are:
host
: the connection hostname to connect to (e.g. \"clickhouse.yourhost.com\"
)port
: the port to the ClickHouse HTTPS interface (e.g. 8123
)database
: the name of the database to connect toevent_table_name
: the name of the table to write statements toclient_options
: a comma separated key=value list of ClickHouse client optionsSecondary parameters are needed if not using the default ClickHouse user:
username
: the username to connect aspassword
: the password for the given ClickHouse usernameBy default, the following client options are set, if you override the default client options you must also set these:
\"date_time_input_format\": \"best_effort\"
allows RFC date parsing\"allow_experimental_object_type\": 1
allows the JSON data type we use to store statementsThe ClickHouse client options supported in Ralph can be found in these locations: - Python driver specific - General ClickHouse client settings
"},{"location":"backends/#http_backends","title":"HTTP backends","text":""},{"location":"backends/#lrs_and_asynchronous_lrs","title":"LRS and Asynchronous LRS","text":"The LRS backend is used to store and retrieve xAPI statements from various systems mostly used in e-learning infrastructures.
"},{"location":"backends/#backend_parameters_8","title":"Backend parameters","text":"LRS parameters required to connect are:
url
: the URL to connect to the server (e.g. [http://ralph:secret@lrs:8100
])username
: the username to connect aspassword
: the password for the given LRS usernameOptional parameters can be configured if necessary:
headers
: a comma-separated key=value list of LRS server headersThe cli is a stream-based tool to play with your logs.
It offers functionalities to: - Validate or convert learning data in different standards - Read and write learning data to various databases or servers - Manage an instance of a Ralph LRS server
Usage:
ralph [OPTIONS] COMMAND [ARGS]...\n
Options:
-v, --verbosity LVL Either CRITICAL, ERROR, WARNING, INFO (default) or\n DEBUG\n --version Show the version and exit.\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-auth","title":"ralph auth","text":"Generate credentials for LRS HTTP basic authentication.
Usage:
ralph auth [OPTIONS]\n
Options:
-u, --username TEXT The user for which we generate credentials.\n [required]\n -p, --password TEXT The password to encrypt for this user. Will\n be prompted if missing. [required]\n -s, --scope TEXT The user scope(s). This option can be\n provided multiple times. [required]\n -M, --agent-ifi-mbox TEXT The mbox Inverse Functional Identifier of\n the associated agent.\n -S, --agent-ifi-mbox-sha1sum TEXT\n The mbox-sha1sum Inverse Functional\n Identifier of the associated agent.\n -O, --agent-ifi-openid TEXT The openid Inverse Functional Identifier of\n the associated agent.\n -A, --agent-ifi-account TEXT...\n Input \"{name} {homePage}\". The account\n Inverse Functional Identifier of the\n associated agent.\n -N, --agent-name TEXT The name of the associated agent.\n -w, --write-to-disk Write new credentials to the LRS\n authentication file.\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-convert","title":"ralph convert","text":"Convert input events to a given format.
Usage:
ralph convert [OPTIONS]\n
Options:
From edX to xAPI converter options: \n -u, --uuid-namespace TEXT The UUID namespace to use for the `ID` field\n generation\n -p, --platform-url TEXT The `actor.account.homePage` to use in the\n xAPI statements [required]\n -f, --from [edx] Input events format to convert [required]\n -t, --to [xapi] Output events format [required]\n -I, --ignore-errors Continue writing regardless of raised errors\n -F, --fail-on-unknown Stop converting at first unknown event\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-extract","title":"ralph extract","text":"Extract input events from a container format using a dedicated parser.
Usage:
ralph extract [OPTIONS]\n
Options:
-p, --parser [gelf|es] Container format parser used to extract events\n [required]\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-list","title":"ralph list","text":"List available documents from a configured data backend.
Usage:
ralph list [OPTIONS]\n
Options:
-b, --backend [async_es|async_mongo|clickhouse|es|fs|ldp|mongo|s3|swift]\n Backend [required]\n async_es backend: \n --async-es-allow-yellow-status / --no-async-es-allow-yellow-status\n --async-es-client-options KEY=VALUE,KEY=VALUE\n --async-es-default-chunk-size INTEGER\n --async-es-default-index TEXT\n --async-es-hosts VALUE1,VALUE2,VALUE3\n --async-es-locale-encoding TEXT\n --async-es-point-in-time-keep-alive TEXT\n --async-es-refresh-after-write TEXT\n async_mongo backend: \n --async-mongo-client-options KEY=VALUE,KEY=VALUE\n --async-mongo-connection-uri TEXT\n --async-mongo-default-chunk-size INTEGER\n --async-mongo-default-collection TEXT\n --async-mongo-default-database TEXT\n --async-mongo-locale-encoding TEXT\n clickhouse backend: \n --clickhouse-client-options KEY=VALUE,KEY=VALUE\n --clickhouse-database TEXT\n --clickhouse-default-chunk-size INTEGER\n --clickhouse-event-table-name TEXT\n --clickhouse-host TEXT\n --clickhouse-locale-encoding TEXT\n --clickhouse-password TEXT\n --clickhouse-port INTEGER\n --clickhouse-username TEXT\n es backend: \n --es-allow-yellow-status / --no-es-allow-yellow-status\n --es-client-options KEY=VALUE,KEY=VALUE\n --es-default-chunk-size INTEGER\n --es-default-index TEXT\n --es-hosts VALUE1,VALUE2,VALUE3\n --es-locale-encoding TEXT\n --es-point-in-time-keep-alive TEXT\n --es-refresh-after-write TEXT\n fs backend: \n --fs-default-chunk-size INTEGER\n --fs-default-directory-path PATH\n --fs-default-query-string TEXT\n --fs-locale-encoding TEXT\n ldp backend: \n --ldp-application-key TEXT\n --ldp-application-secret TEXT\n --ldp-consumer-key TEXT\n --ldp-default-stream-id TEXT\n --ldp-endpoint TEXT\n --ldp-request-timeout TEXT\n --ldp-service-name TEXT\n mongo backend: \n --mongo-client-options KEY=VALUE,KEY=VALUE\n --mongo-connection-uri TEXT\n --mongo-default-chunk-size INTEGER\n --mongo-default-collection TEXT\n --mongo-default-database TEXT\n --mongo-locale-encoding TEXT\n s3 backend: \n --s3-access-key-id TEXT\n --s3-default-bucket-name TEXT\n --s3-default-chunk-size INTEGER\n --s3-default-region TEXT\n --s3-endpoint-url TEXT\n --s3-locale-encoding TEXT\n --s3-secret-access-key TEXT\n --s3-session-token TEXT\n swift backend: \n --swift-auth-url TEXT\n --swift-default-container TEXT\n --swift-identity-api-version TEXT\n --swift-locale-encoding TEXT\n --swift-object-storage-url TEXT\n --swift-password TEXT\n --swift-project-domain-name TEXT\n --swift-region-name TEXT\n --swift-tenant-id TEXT\n --swift-tenant-name TEXT\n --swift-username TEXT\n --swift-user-domain-name TEXT\n -t, --target TEXT Container to list events from\n -n, --new / -a, --all List not fetched (or all) documents\n -D, --details / -I, --ids Get documents detailed output (JSON)\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-read","title":"ralph read","text":"Read an archive or records from a configured backend.
Usage:
ralph read [OPTIONS] [ARCHIVE]\n
Options:
-b, --backend [async_es|async_mongo|clickhouse|es|fs|ldp|lrs|mongo|s3|swift|ws]\n Backend [required]\n async_es backend: \n --async-es-allow-yellow-status / --no-async-es-allow-yellow-status\n --async-es-client-options KEY=VALUE,KEY=VALUE\n --async-es-default-chunk-size INTEGER\n --async-es-default-index TEXT\n --async-es-hosts VALUE1,VALUE2,VALUE3\n --async-es-locale-encoding TEXT\n --async-es-point-in-time-keep-alive TEXT\n --async-es-refresh-after-write TEXT\n async_mongo backend: \n --async-mongo-client-options KEY=VALUE,KEY=VALUE\n --async-mongo-connection-uri TEXT\n --async-mongo-default-chunk-size INTEGER\n --async-mongo-default-collection TEXT\n --async-mongo-default-database TEXT\n --async-mongo-locale-encoding TEXT\n clickhouse backend: \n --clickhouse-client-options KEY=VALUE,KEY=VALUE\n --clickhouse-database TEXT\n --clickhouse-default-chunk-size INTEGER\n --clickhouse-event-table-name TEXT\n --clickhouse-host TEXT\n --clickhouse-locale-encoding TEXT\n --clickhouse-password TEXT\n --clickhouse-port INTEGER\n --clickhouse-username TEXT\n es backend: \n --es-allow-yellow-status / --no-es-allow-yellow-status\n --es-client-options KEY=VALUE,KEY=VALUE\n --es-default-chunk-size INTEGER\n --es-default-index TEXT\n --es-hosts VALUE1,VALUE2,VALUE3\n --es-locale-encoding TEXT\n --es-point-in-time-keep-alive TEXT\n --es-refresh-after-write TEXT\n fs backend: \n --fs-default-chunk-size INTEGER\n --fs-default-directory-path PATH\n --fs-default-query-string TEXT\n --fs-locale-encoding TEXT\n ldp backend: \n --ldp-application-key TEXT\n --ldp-application-secret TEXT\n --ldp-consumer-key TEXT\n --ldp-default-stream-id TEXT\n --ldp-endpoint TEXT\n --ldp-request-timeout TEXT\n --ldp-service-name TEXT\n lrs backend: \n --lrs-base-url TEXT\n --lrs-headers KEY=VALUE,KEY=VALUE\n --lrs-password TEXT\n --lrs-statements-endpoint TEXT\n --lrs-status-endpoint TEXT\n --lrs-username TEXT\n mongo backend: \n --mongo-client-options KEY=VALUE,KEY=VALUE\n --mongo-connection-uri TEXT\n --mongo-default-chunk-size INTEGER\n --mongo-default-collection TEXT\n --mongo-default-database TEXT\n --mongo-locale-encoding TEXT\n s3 backend: \n --s3-access-key-id TEXT\n --s3-default-bucket-name TEXT\n --s3-default-chunk-size INTEGER\n --s3-default-region TEXT\n --s3-endpoint-url TEXT\n --s3-locale-encoding TEXT\n --s3-secret-access-key TEXT\n --s3-session-token TEXT\n swift backend: \n --swift-auth-url TEXT\n --swift-default-container TEXT\n --swift-identity-api-version TEXT\n --swift-locale-encoding TEXT\n --swift-object-storage-url TEXT\n --swift-password TEXT\n --swift-project-domain-name TEXT\n --swift-region-name TEXT\n --swift-tenant-id TEXT\n --swift-tenant-name TEXT\n --swift-username TEXT\n --swift-user-domain-name TEXT\n ws backend: \n --ws-uri TEXT\n -c, --chunk-size INTEGER Get events by chunks of size #\n -t, --target TEXT Endpoint from which to read events (e.g.\n `/statements`)\n -q, --query '{\"KEY\": \"VALUE\", \"KEY\": \"VALUE\"}'\n Query object as a JSON string (database and\n HTTP backends ONLY)\n -i, --ignore_errors BOOLEAN Ignore errors during the encoding operation.\n [default: False]\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-runserver","title":"ralph runserver","text":"Run the API server for the development environment.
Starts uvicorn programmatically for convenience and documentation.
Usage:
ralph runserver [OPTIONS]\n
Options:
-b, --backend [async_es|async_mongo|clickhouse|es|fs|mongo]\n Backend [required]\n async_es backend: \n --async-es-allow-yellow-status / --no-async-es-allow-yellow-status\n --async-es-client-options KEY=VALUE,KEY=VALUE\n --async-es-default-chunk-size INTEGER\n --async-es-default-index TEXT\n --async-es-hosts VALUE1,VALUE2,VALUE3\n --async-es-locale-encoding TEXT\n --async-es-point-in-time-keep-alive TEXT\n --async-es-refresh-after-write TEXT\n async_mongo backend: \n --async-mongo-client-options KEY=VALUE,KEY=VALUE\n --async-mongo-connection-uri TEXT\n --async-mongo-default-chunk-size INTEGER\n --async-mongo-default-collection TEXT\n --async-mongo-default-database TEXT\n --async-mongo-locale-encoding TEXT\n clickhouse backend: \n --clickhouse-client-options KEY=VALUE,KEY=VALUE\n --clickhouse-database TEXT\n --clickhouse-default-chunk-size INTEGER\n --clickhouse-event-table-name TEXT\n --clickhouse-host TEXT\n --clickhouse-ids-chunk-size INTEGER\n --clickhouse-locale-encoding TEXT\n --clickhouse-password TEXT\n --clickhouse-port INTEGER\n --clickhouse-username TEXT\n es backend: \n --es-allow-yellow-status / --no-es-allow-yellow-status\n --es-client-options KEY=VALUE,KEY=VALUE\n --es-default-chunk-size INTEGER\n --es-default-index TEXT\n --es-hosts VALUE1,VALUE2,VALUE3\n --es-locale-encoding TEXT\n --es-point-in-time-keep-alive TEXT\n --es-refresh-after-write TEXT\n fs backend: \n --fs-default-chunk-size INTEGER\n --fs-default-directory-path PATH\n --fs-default-lrs-file TEXT\n --fs-default-query-string TEXT\n --fs-locale-encoding TEXT\n mongo backend: \n --mongo-client-options KEY=VALUE,KEY=VALUE\n --mongo-connection-uri TEXT\n --mongo-default-chunk-size INTEGER\n --mongo-default-collection TEXT\n --mongo-default-database TEXT\n --mongo-locale-encoding TEXT\n -h, --host TEXT LRS server host name\n -p, --port INTEGER LRS server port\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-validate","title":"ralph validate","text":"Validate input events of given format.
Usage:
ralph validate [OPTIONS]\n
Options:
-f, --format [edx|xapi] Input events format to validate [required]\n -I, --ignore-errors Continue validating regardless of raised errors\n -F, --fail-on-unknown Stop validating at first unknown event\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-write","title":"ralph write","text":"Write an archive to a configured backend.
Usage:
ralph write [OPTIONS]\n
Options:
-b, --backend [async_es|async_mongo|clickhouse|es|fs|ldp|lrs|mongo|s3|swift]\n Backend [required]\n async_es backend: \n --async-es-allow-yellow-status / --no-async-es-allow-yellow-status\n --async-es-client-options KEY=VALUE,KEY=VALUE\n --async-es-default-chunk-size INTEGER\n --async-es-default-index TEXT\n --async-es-hosts VALUE1,VALUE2,VALUE3\n --async-es-locale-encoding TEXT\n --async-es-point-in-time-keep-alive TEXT\n --async-es-refresh-after-write TEXT\n async_mongo backend: \n --async-mongo-client-options KEY=VALUE,KEY=VALUE\n --async-mongo-connection-uri TEXT\n --async-mongo-default-chunk-size INTEGER\n --async-mongo-default-collection TEXT\n --async-mongo-default-database TEXT\n --async-mongo-locale-encoding TEXT\n clickhouse backend: \n --clickhouse-client-options KEY=VALUE,KEY=VALUE\n --clickhouse-database TEXT\n --clickhouse-default-chunk-size INTEGER\n --clickhouse-event-table-name TEXT\n --clickhouse-host TEXT\n --clickhouse-locale-encoding TEXT\n --clickhouse-password TEXT\n --clickhouse-port INTEGER\n --clickhouse-username TEXT\n es backend: \n --es-allow-yellow-status / --no-es-allow-yellow-status\n --es-client-options KEY=VALUE,KEY=VALUE\n --es-default-chunk-size INTEGER\n --es-default-index TEXT\n --es-hosts VALUE1,VALUE2,VALUE3\n --es-locale-encoding TEXT\n --es-point-in-time-keep-alive TEXT\n --es-refresh-after-write TEXT\n fs backend: \n --fs-default-chunk-size INTEGER\n --fs-default-directory-path PATH\n --fs-default-query-string TEXT\n --fs-locale-encoding TEXT\n ldp backend: \n --ldp-application-key TEXT\n --ldp-application-secret TEXT\n --ldp-consumer-key TEXT\n --ldp-default-stream-id TEXT\n --ldp-endpoint TEXT\n --ldp-request-timeout TEXT\n --ldp-service-name TEXT\n lrs backend: \n --lrs-base-url TEXT\n --lrs-headers KEY=VALUE,KEY=VALUE\n --lrs-password TEXT\n --lrs-statements-endpoint TEXT\n --lrs-status-endpoint TEXT\n --lrs-username TEXT\n mongo backend: \n --mongo-client-options KEY=VALUE,KEY=VALUE\n --mongo-connection-uri TEXT\n --mongo-default-chunk-size INTEGER\n --mongo-default-collection TEXT\n --mongo-default-database TEXT\n --mongo-locale-encoding TEXT\n s3 backend: \n --s3-access-key-id TEXT\n --s3-default-bucket-name TEXT\n --s3-default-chunk-size INTEGER\n --s3-default-region TEXT\n --s3-endpoint-url TEXT\n --s3-locale-encoding TEXT\n --s3-secret-access-key TEXT\n --s3-session-token TEXT\n swift backend: \n --swift-auth-url TEXT\n --swift-default-container TEXT\n --swift-identity-api-version TEXT\n --swift-locale-encoding TEXT\n --swift-object-storage-url TEXT\n --swift-password TEXT\n --swift-project-domain-name TEXT\n --swift-region-name TEXT\n --swift-tenant-id TEXT\n --swift-tenant-name TEXT\n --swift-username TEXT\n --swift-user-domain-name TEXT\n -c, --chunk-size INTEGER Get events by chunks of size #\n -f, --force Overwrite existing archives or records\n -I, --ignore-errors Continue writing regardless of raised errors\n -s, --simultaneous With HTTP backend, POST all chunks\n simultaneously (instead of sequentially)\n -m, --max-num-simultaneous INTEGER\n The maximum number of chunks to send at\n once, when using `--simultaneous`. Use `-1`\n to not set a limit.\n -t, --target TEXT The target container to write into\n --help Show this message and exit.\n
"},{"location":"contribute/","title":"Contribute","text":""},{"location":"contribute/#ralphs_core","title":"Ralph\u2019s core","text":"To start playing with ralph
, you should build it using the bootstrap
Make target:
$ make bootstrap\n
Once the project has been bootstrapped, you may want to edit generated .env
file to set up available backends parameters that will be injected in the running container as environment variables to configure Ralph (see backends documentation):
# Elasticsearch backend\nRALPH_ES_HOSTS=http://elasticsearch:9200\nRALPH_ES_INDEX=statements\nRALPH_ES_TEST_HOSTS=http://elasticsearch:9200\nRALPH_ES_TEST_INDEX=test-index\n\n# [...]\n
Note that lines starting with a #
are considered as commented and thus will have no effect while running Ralph.
Now you can start playing the CLI:
$ bin/ralph --help\n
To lint your code, either use the lint
meta target or one of the linting tools we use:
# Run all linters\n$ make lint\n\n# Run pylint\n$ make lint-pylint\n\n# List available linters\n$ make help | grep lint-\n
To run tests on your code, either use the test
Make target or the bin/pytest
script to pass specific arguments to the test runner:
# Run all tests\n$ make test\n\n# Run pytest with options\n$ bin/pytest -x -k mixins\n\n# Run pytest with options and more debugging logs\n$ bin/pytest -x -vvv -s --log-level=DEBUG -k mixins\n
"},{"location":"contribute/#working_with_local_backends","title":"Working with local backends","text":"Not all backends are accessible in a local environment development; for now only elasticsearch
and swift
services are accessible as docker containers (see docker-compose.yml
services).
To configure those backends, we provide default parameters in the .env.dist
template, you can copy/paste them in your .env
file (and uncomment them so that they are properly injected in running containers).
In order to run the Elasticsearch backend locally on GNU/Linux operating systems, ensure that your virtual memory limits are not too low and increase them (temporally) if needed by typing this command from your terminal (as root
or using sudo
):
sysctl -w vm.max_map_count=262144
Reference: https://www.elastic.co/guide/en/elasticsearch/reference/master/vm-max-map-count.html
Once configured, start available backends using:
$ make run-[BACKEND]\n
Substitute [BACKEND]
by the backend name, e.g. es
for Elasticsearch or swift
for OpenStack Swift:
# Start Elasticsearch local backend\n$ make run-es\n# Start Swift local backend\n$ make run-swift\n# Start all local backends\n$ make run-all\n
Now that you have started at least the elasticsearch
and swift
backends, it\u2019s time to play with them:
# Store a JSON file in the Swift backend\n$ echo '{\"id\": 1, \"foo\": \"bar\"}' | \\\n ./bin/ralph write -b swift -f foo.json\n\n# Check that we have created a new JSON file in the Swift backend\n$ bin/ralph list -b swift\nfoo.json\n\n# Read the content of the JSON file and index it in Elasticsearch\n$ bin/ralph read -b swift foo.json | \\\n bin/ralph write -b es\n\n# Check that we have properly indexed the JSON file in Elasticsearch\n$ bin/ralph read -b es\n{\"id\": 1, \"foo\": \"bar\"}\n
"},{"location":"contribute/#ralphs_tray","title":"Ralph\u2019s tray","text":"Ralph is distributed along with its tray (a deployable package for Kubernetes clusters using Arnold). If you intend to work on this tray, please refer to Arnold\u2019s documentation first.
Dependencies:
v.1.23.5
): This CLI is used to communicate with the running Kubernetes instance you will use.v.5.0.0
): This tool is used to set up and run a lightweight Kubernetes cluster, in order to have a local environment (it is required to complete quickstart instructions below to avoid depending on an existing Kubernetes cluster).k3d
cluster","text":"To create (or run) a local kubernetes cluster, we use k3d
. The cluster\u2019s bootstrapping should be run via:
$ make k3d-cluster\n
Running a k3d-cluster locally supposes that the 80 and 443 ports of your machine are available, so that the ingresses created for your project responds properly. If one or both ports are already used by another service running on your machine, the make k3d-cluster
command may fail.
You can check that your cluster is running using the k3d cluster
command:
$ k3d cluster list\nNAME SERVERS AGENTS LOADBALANCER\nralph 1/1 0/0 true\n
As you can see, we are running a single node cluster called ralph
.
Once your Kubernetes cluster is running, you need to create a standard Arnold project describing applications and environments you need to deploy:
$ make arnold-bootstrap\n
Once bootstrapped, Arnold should have created a group_vars
directory containing the following files:
$ tree group_vars\ngroup_vars\n\u251c\u2500\u2500 common\n\u2514\u2500\u2500 customer\n \u2514\u2500\u2500 ralph\n \u251c\u2500\u2500 development\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 main.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 secrets\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 databases.vault.yml\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 elasticsearch.vault.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 ralph.vault.yml\n \u2514\u2500\u2500 main.yml\n\n5 directories, 5 files\n
To create the LRS credentials file, you need to provide a list of accounts allowed to request the LRS in Ralph\u2019s vault:
# Setup your kubernetes environment\n$ source .k3d-cluster.env.sh\n\n# Decrypt the vault\n$ bin/arnold -d -c ralph -e development -- vault -a ralph decrypt\n
Edit the vault file to add a new account for the foo
user with the bar
password and a relevant scope:
# group_vars/customer/ralph/development/secrets/ralph.vault.yml\n#\n# [...]\n#\n# LRS\nLRS_AUTH:\n - username: \"foo\"\n hash: \"$2b$12$lCggI749U6TrzK7Qyr7xGe1KVSAXdPjtkMew.BD6lzIk//T5YSb72\"\n scopes:\n - \"foo_scope\"\n
The password hash has been generated using bcrypt
as explained in the API user guide.
And finally (re-)encrypt Ralph\u2019s vault:
# Encrypt the vault\n$ bin/arnold -d -c ralph -e development -- vault -a ralph encrypt\n
You are now ready to create the related Kubernetes Secret while initializing Arnold project in the next step.
"},{"location":"contribute/#prepare_working_namespace","title":"Prepare working namespace","text":"You are now ready to create required Kubernetes objects to start working on Ralph\u2019s deployment:
$ make arnold-init\n
At this point an Elasticsearch cluster should be running on your Kubernetes cluster:
$ kubectl -n development-ralph get -l app=elasticsearch pod\nNAME READY STATUS RESTARTS AGE\nelasticsearch-node-0 1/1 Running 0 69s\nelasticsearch-node-1 1/1 Running 0 69s\nelasticsearch-node-2 1/1 Running 0 69s\nes-index-template-j-221010-09h25m24s-nx5qz 0/1 Completed 0 49s\n
We are now ready to deploy Ralph to Kubernetes!
"},{"location":"contribute/#deploy_code_repeat","title":"Deploy, code, repeat","text":"To test your local docker image, you need to build it and publish it to the local kubernetes cluster docker registry using the k3d-push
Makefile rule:
$ make k3d-push\n
Note that each time you modify Ralph\u2019s application or its Docker image, you will need to make this update.
Now that your Docker image is published, it\u2019s time to deploy it!
$ make arnold-deploy\n
To test this deployment, let\u2019s try to make an authenticated request to the LRS:
$ curl -sLk \\\n --user foo:bar \\\n \"https://$(\\\n kubectl -n development-ralph \\\n get \\\n ingress/ralph-app-current \\\n -o jsonpath='{.spec.rules[0].host}')/whoami\"\n
And why not send test statements from Potsie\u2019s repository:
$ curl -sL \\\n https://github.com/openfun/potsie/raw/main/fixtures/elasticsearch/lrs.json.gz | \\\n gunzip | \\\n head -n 100 | \\\n jq -s . | \\\n sed \"s/@timestamp/timestamp/g\" | \\\n curl -sLk \\\n --user foo:bar \\\n -X POST \\\n -H \"Content-Type: application/json\" \\\n \"https://$(\\\n kubectl -n development-ralph \\\n get \\\n ingress/ralph-app-current \\\n -o jsonpath='{.spec.rules[0].host}')/xAPI/statements/\" \\\n -d @-\n
This example command requires jq
to serialize the request payload (xAPI statements). When dealing with JSON data, we strongly recommend installing it to manipulate them from the command line.
If you want to run the bin/arnold
script to run specific Arnold commands, you must ensure that your environment is properly set and that Arnold runs in development mode (i.e. using the -d
flag):
$ source .k3d-cluster.env.sh\n$ bin/arnold -d -c ralph -e development -- vault -a ralph view\n
"},{"location":"contribute/#stop_k3d_cluster","title":"Stop k3d
cluster","text":"When finished to work on the Tray, you can stop the k3d
cluster using the k3d-stop
helper:
$ make k3d-stop\n
"},{"location":"models/","title":"Rationale","text":"Ralph can be considered versatile since at some point it is log-content-agnostic: most commands will work as expected without transforming logged events content or format.
But on the other side, Ralph is a tool dedicated to learning events processing so we\u2019ve implemented key features related to learning events validation and conversion. For now, we mostly focus on two learning events standards: Open edX and xAPI.
Data validation and serialisation/de-serialisation are achieved using pydantics models that are documented in the following subsections:
edX pydantic models.
"},{"location":"models/edx/#ralph.models.edx.base","title":"base
","text":"Base event model definitions.
"},{"location":"models/edx/#ralph.models.edx.base.AbstractBaseEventField","title":" AbstractBaseEventField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for core event
fields.
The base model does not have any attributes as event field does not have common sub-fields.
Source code inralph/models/edx/base.py
class AbstractBaseEventField(BaseModelWithConfig):\n \"\"\"Pydantic model for core `event` fields.\n\n The base model does not have any attributes as event field does not have common\n sub-fields.\n \"\"\"\n
"},{"location":"models/edx/#ralph.models.edx.base.BaseContextField","title":" BaseContextField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for core context
field.
Attributes:
Name Type Descriptioncourse_user_tags
Dict of str
Content from user_api_usercoursetag
table. Retrieved with: dict( UserCourseTag.objects.filter( user=request.user.pk, course_id=course_key ).values_list('key', 'value') )
Note: Is only present when a course page is requested. Is an empty dictionary when the user is not logged in or not found in the user_api_usercoursetag
table.
user_id
int or str or None
Consists of the ID of the authenticated user. Retrieved with: request.user.pk
querying the auth_user
table. Note: Is an integer when the user is found in the auth_user
table. Is an empty string when an exception is raised while retrieving the ID. Is None
when the user is not logged in.
org_id
str
Consists of the organization name that lists the course. Retrieved with: course_id.org
where course_id
is an opaque_keys.edx.locator.CourseLocator
which is created using the URL of the requested page. Note: Is an empty string when the requested page is not a course page.
course_id
str
Consists of the unique identifier for the visited course page. Retrieved with: course_id.to_deprecated_string()
where course_id
is an opaque_keys.edx.locator.CourseLocator
which is created using the URL of the requested page. Note: Is an empty string when the requested page is not a course page.
path
Path
Consist of the relative URL (without the hostname) of the requested page. Retrieved with: request.META['PATH_INFO']
ralph/models/edx/base.py
class BaseContextField(BaseModelWithConfig):\n \"\"\"Pydantic model for core `context` field.\n\n Attributes:\n course_user_tags (Dict of str): Content from `user_api_usercoursetag` table.\n Retrieved with:\n `dict(\n UserCourseTag.objects.filter(\n user=request.user.pk, course_id=course_key\n ).values_list('key', 'value')\n )`\n Note:\n Is only present when a course page is requested.\n Is an empty dictionary when the user is not logged in or not found in\n the `user_api_usercoursetag` table.\n user_id (int or str or None): Consists of the ID of the authenticated user.\n Retrieved with:\n `request.user.pk` querying the `auth_user` table.\n Note:\n Is an integer when the user is found in the `auth_user` table.\n Is an empty string when an exception is raised while retrieving the ID.\n Is `None` when the user is not logged in.\n org_id (str): Consists of the organization name that lists the course.\n Retrieved with:\n `course_id.org` where `course_id` is an\n `opaque_keys.edx.locator.CourseLocator` which is created using the URL\n of the requested page.\n Note:\n Is an empty string when the requested page is not a course page.\n course_id (str): Consists of the unique identifier for the visited course page.\n Retrieved with:\n `course_id.to_deprecated_string()` where `course_id` is an\n `opaque_keys.edx.locator.CourseLocator` which is created using the URL\n of the requested page.\n Note:\n Is an empty string when the requested page is not a course page.\n path (Path): Consist of the relative URL (without the hostname) of the\n requested page.\n Retrieved with:\n `request.META['PATH_INFO']`\n \"\"\"\n\n course_id: constr(regex=r\"^$|^course-v1:.+\\+.+\\+.+$\") # noqa:F722\n course_user_tags: Optional[Dict[str, str]]\n module: Optional[ContextModuleField]\n org_id: str\n path: Path\n user_id: Union[int, Literal[\"\"], None]\n
"},{"location":"models/edx/#ralph.models.edx.base.BaseEdxModel","title":" BaseEdxModel (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for core statement.
WARNING: it does not define the event
, event_type
and event_source
fields.
Attributes:
Name Type Descriptionusername
str
Consists of the unique username identifying the logged-in user. Retrieved with: request.user.username
querying the auth_user
table. Note: Is an empty string when the user is not logged in. If an exception is raised when retrieving the username from the table then the value is anonymous
. Usernames are made of 2-30 ASCII letters / numbers / underscores (_) / hyphens (-)
ip
IPv4Address or str
Consists of the public IPv4 address of the user. Retrieved with: get_ip(request)
cf. https://github.com/un33k/django-ipware/tree/1.1.0 Note: Can be an empty string if the IP address is not found.
agent
str
Consists of the User-Agent
HTTP request header. Retrieved with: request.META[HTTP_USER_AGENT]
Note: Can be an empty string if the header is not present in the request. Contains information about: Browser name and version Operating system name and version Default language
host
str
Consists of the hostname of the server. Retrieved with: request.META[SERVER_NAME]
referer
Path
Consists of the Referer
HTTP request header. Retrieved with: request.META[HTTP_REFERER]
Note: Can be an empty string if the header is not present in the request. Contains the referring URL (previous URL visited by the user).
accept_language
str
Consists of the Accept-Language
HTTP request header. Retrieved with: request.META[HTTP_ACCEPT_LANGUAGE]
Note: Can be an empty string if the header is not present in the request. Contains the default language settings of the user.
context
BaseContextField
see BaseContextField.
time
datetime
Consists of the UTC time in ISO format at which the event was emitted. Retrieved with: datetime.datetime.utcnow()
page
None
Consists of the value None
Note: In JSON the value is null
instead of None
.
ralph/models/edx/base.py
class BaseEdxModel(BaseModelWithConfig):\n \"\"\"Pydantic model for core statement.\n\n WARNING: it does not define the `event`, `event_type` and `event_source` fields.\n\n Attributes:\n username (str): Consists of the unique username identifying the logged-in user.\n Retrieved with:\n `request.user.username` querying the `auth_user` table.\n Note:\n Is an empty string when the user is not logged in.\n If an exception is raised when retrieving the username from the table\n then the value is `anonymous`.\n Usernames are made of 2-30 ASCII letters / numbers / underscores (_) /\n hyphens (-)\n ip (IPv4Address or str): Consists of the public IPv4 address of the user.\n Retrieved with:\n `get_ip(request)` cf. https://github.com/un33k/django-ipware/tree/1.1.0\n Note:\n Can be an empty string if the IP address is not found.\n agent (str): Consists of the `User-Agent` HTTP request header.\n Retrieved with:\n `request.META[HTTP_USER_AGENT]`\n Note:\n Can be an empty string if the header is not present in the request.\n Contains information about:\n Browser name and version\n Operating system name and version\n Default language\n host (str): Consists of the hostname of the server.\n Retrieved with:\n `request.META[SERVER_NAME]`\n referer (Path): Consists of the `Referer` HTTP request header.\n Retrieved with:\n `request.META[HTTP_REFERER]`\n Note:\n Can be an empty string if the header is not present in the request.\n Contains the referring URL (previous URL visited by the user).\n accept_language (str): Consists of the `Accept-Language` HTTP request header.\n Retrieved with:\n `request.META[HTTP_ACCEPT_LANGUAGE]`\n Note:\n Can be an empty string if the header is not present in the request.\n Contains the default language settings of the user.\n context (BaseContextField): see BaseContextField.\n time (datetime): Consists of the UTC time in ISO format at which the event was\n emitted.\n Retrieved with:\n `datetime.datetime.utcnow()`\n page (None): Consists of the value `None`\n Note:\n In JSON the value is `null` instead of `None`.\n \"\"\"\n\n username: Union[constr(min_length=2, max_length=30), Literal[\"\"]]\n ip: Union[IPv4Address, Literal[\"\"]]\n agent: str\n host: str\n referer: Union[AnyHttpUrl, Literal[\"\"]]\n accept_language: str\n context: BaseContextField\n time: datetime\n page: None\n
"},{"location":"models/edx/#ralph.models.edx.base.BaseModelWithConfig","title":" BaseModelWithConfig (BaseModel)
pydantic-model
","text":"Pydantic model for base configuration shared among all models.
Source code inralph/models/edx/base.py
class BaseModelWithConfig(BaseModel):\n \"\"\"Pydantic model for base configuration shared among all models.\"\"\"\n\n class Config: # pylint: disable=missing-class-docstring # noqa: D106\n extra = \"forbid\"\n
"},{"location":"models/edx/#ralph.models.edx.base.ContextModuleField","title":" ContextModuleField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for context
.module
field.
Attributes:
Name Type Descriptionusage_key
str
Consists of a block ID of the current component.
display_name
str
Consists of a short description or title of the component.
Source code inralph/models/edx/base.py
class ContextModuleField(BaseModelWithConfig):\n \"\"\"Pydantic model for `context`.`module` field.\n\n Attributes:\n usage_key (str): Consists of a block ID of the current component.\n display_name (str): Consists of a short description or title of the component.\n \"\"\"\n\n usage_key: constr(regex=r\"^block-v1:.+\\+.+\\+.+type@.+@[a-f0-9]{32}$\") # noqa:F722\n display_name: str\n original_usage_key: Optional[\n constr(\n regex=r\"^block-v1:.+\\+.+\\+.+type@problem\\+block@[a-f0-9]{32}$\" # noqa:F722\n )\n ]\n original_usage_version: Optional[str]\n
"},{"location":"models/edx/#ralph.models.edx.browser","title":"browser
","text":"Browser event model definitions.
"},{"location":"models/edx/#ralph.models.edx.browser.BaseBrowserModel","title":" BaseBrowserModel (BaseEdxModel)
pydantic-model
","text":"Pydantic model for core browser statements.
This type of event is triggered on (XHR) POST/GET requests to the /event
URL.
Attributes:
Name Type Descriptionevent_source
str
Consists of the value browser
.
page
AnyUrl
Consists of the URL (with hostname) of the visited page. Retrieved with: window.location.href
from the JavaScript front-end.
session
str
Consists of the md5 encrypted Django session key or an empty string.
Source code inralph/models/edx/browser.py
class BaseBrowserModel(BaseEdxModel):\n \"\"\"Pydantic model for core browser statements.\n\n This type of event is triggered on (XHR) POST/GET requests to the `/event` URL.\n\n Attributes:\n event_source (str): Consists of the value `browser`.\n page (AnyUrl): Consists of the URL (with hostname) of the visited page.\n Retrieved with:\n `window.location.href` from the JavaScript front-end.\n session (str): Consists of the md5 encrypted Django session key or an empty\n string.\n \"\"\"\n\n event_source: Literal[\"browser\"]\n page: AnyUrl\n session: Union[constr(regex=r\"^[a-f0-9]{32}$\"), Literal[\"\"]] # noqa: F722\n
"},{"location":"models/edx/#ralph.models.edx.converters","title":"converters
special
","text":""},{"location":"models/edx/#ralph.models.edx.converters.xapi","title":"xapi
special
","text":"edX to xAPI conversion sets.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.base","title":"base
","text":"Base xAPI Converter.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.base.BaseXapiConverter","title":" BaseXapiConverter (BaseConversionSet)
","text":"Base xAPI Converter.
WARNING: The converter may not include the following edX fields: - context.org_id: When org_id
is an empty string. - context.course_id: When course_id
is an empty string.
WARNING: The converter should not include the following edX fields as they may contain sensitive data: username
, referer
, event
, event_source
, ip
, agent
, accept_language:
, context.course_user_tags
.
ralph/models/edx/converters/xapi/base.py
class BaseXapiConverter(BaseConversionSet):\n \"\"\"Base xAPI Converter.\n\n WARNING: The converter may not include the following edX fields:\n - context.org_id: When `org_id` is an empty string.\n - context.course_id: When `course_id` is an empty string.\n\n WARNING: The converter should not include the following edX fields as they may\n contain sensitive data: `username`, `referer`, `event`, `event_source`, `ip`,\n `agent`, `accept_language:`, `context.course_user_tags`.\n \"\"\"\n\n def __init__(self, uuid_namespace: str, platform_url: str):\n \"\"\"Initialize BaseXapiConverter.\"\"\"\n self.platform_url = platform_url\n try:\n self.uuid_namespace = UUID(uuid_namespace)\n except (TypeError, ValueError, AttributeError) as err:\n raise ConfigurationException(\"Invalid UUID namespace\") from err\n super().__init__()\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n return {\n ConversionItem(\n \"id\",\n None,\n lambda event_str: str(uuid5(self.uuid_namespace, event_str)),\n True,\n ),\n ConversionItem(\n \"actor__account__homePage\", transformers=lambda _: self.platform_url\n ),\n ConversionItem(\n \"actor__account__name\",\n \"context__user_id\",\n lambda user_id: str(user_id) if user_id else \"anonymous\",\n ),\n ConversionItem(\"timestamp\", \"time\"),\n }\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.base.BaseXapiConverter.__init__","title":"__init__(self, uuid_namespace, platform_url)
special
","text":"Initialize BaseXapiConverter.
Source code inralph/models/edx/converters/xapi/base.py
def __init__(self, uuid_namespace: str, platform_url: str):\n \"\"\"Initialize BaseXapiConverter.\"\"\"\n self.platform_url = platform_url\n try:\n self.uuid_namespace = UUID(uuid_namespace)\n except (TypeError, ValueError, AttributeError) as err:\n raise ConfigurationException(\"Invalid UUID namespace\") from err\n super().__init__()\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment","title":"enrollment
","text":"Enrollment event xAPI Converter.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentActivatedToLMSRegisteredCourse","title":" EdxCourseEnrollmentActivatedToLMSRegisteredCourse (LMSBaseXapiConverter)
","text":"Convert a common edX edx.course.enrollment.activated
event to xAPI.
ralph/models/edx/converters/xapi/enrollment.py
class EdxCourseEnrollmentActivatedToLMSRegisteredCourse(LMSBaseXapiConverter):\n \"\"\"Convert a common edX `edx.course.enrollment.activated` event to xAPI.\"\"\"\n\n __src__ = EdxCourseEnrollmentActivated\n __dest__ = LMSRegisteredCourse\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentActivatedToLMSRegisteredCourse.__dest__","title":" __dest__ (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS registered to a course
statement.
Example: John is registered to a course.
Attributes:
Name Type Descriptionverb
dict
See RegisteredVerb.
object
dict
See CourseActivity.
context
dict
See LMSRegistrationContext.
Source code inralph/models/edx/converters/xapi/enrollment.py
class LMSRegisteredCourse(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `registered to a course` statement.\n\n Example: John is registered to a course.\n\n Attributes:\n verb (dict): See RegisteredVerb.\n object (dict): See CourseActivity.\n context (dict): See LMSRegistrationContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/registered\",\n object__definition__type=\"http://adlnet.gov/expapi/activities/course\",\n )\n\n verb: RegisteredVerb = RegisteredVerb()\n object: CourseActivity\n context: LMSRegistrationContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentActivatedToLMSRegisteredCourse.__src__","title":" __src__ (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.activated
statement.
The server emits this statement when a student enrolls in a course.
Attributes:
Name Type Descriptionevent
EnrollmentEventField
See EnrollmentEventField.
event_type
str
Consists of the value edx.course.enrollment.activated
.
name
str
Consists of the value edx.course.enrollment.activated
.
ralph/models/edx/converters/xapi/enrollment.py
class EdxCourseEnrollmentActivated(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.activated` statement.\n\n The server emits this statement when a student enrolls in a course.\n\n Attributes:\n event (EnrollmentEventField): See EnrollmentEventField.\n event_type (str): Consists of the value `edx.course.enrollment.activated`.\n name (str): Consists of the value `edx.course.enrollment.activated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.activated\"\n )\n\n event: Union[\n Json[EnrollmentEventField], # pylint: disable=unsubscriptable-object\n EnrollmentEventField,\n ]\n event_type: Literal[\"edx.course.enrollment.activated\"]\n name: Literal[\"edx.course.enrollment.activated\"]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentDeactivatedToLMSUnregisteredCourse","title":" EdxCourseEnrollmentDeactivatedToLMSUnregisteredCourse (LMSBaseXapiConverter)
","text":"Convert a common edX edx.course.enrollment.deactivated
event to xAPI.
ralph/models/edx/converters/xapi/enrollment.py
class EdxCourseEnrollmentDeactivatedToLMSUnregisteredCourse(LMSBaseXapiConverter):\n \"\"\"Convert a common edX `edx.course.enrollment.deactivated` event to xAPI.\"\"\"\n\n __src__ = EdxCourseEnrollmentDeactivated\n __dest__ = LMSUnregisteredCourse\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentDeactivatedToLMSUnregisteredCourse.__dest__","title":" __dest__ (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS unregistered to a course
statement.
Example: John is unregistered to a course.
Attributes:
Name Type Descriptionverb
dict
See UnregisteredVerb.
object
dict
See CourseActivity.
context
dict
See LMSRegistrationContext.
Source code inralph/models/edx/converters/xapi/enrollment.py
class LMSUnregisteredCourse(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `unregistered to a course` statement.\n\n Example: John is unregistered to a course.\n\n Attributes:\n verb (dict): See UnregisteredVerb.\n object (dict): See CourseActivity.\n context (dict): See LMSRegistrationContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://id.tincanapi.com/verb/unregistered\",\n object__definition__type=\"http://adlnet.gov/expapi/activities/course\",\n )\n\n verb: UnregisteredVerb = UnregisteredVerb()\n object: CourseActivity\n context: LMSRegistrationContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentDeactivatedToLMSUnregisteredCourse.__src__","title":" __src__ (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.deactivated
statement.
The server emits this statement when a student unenrolls from a course.
Attributes:
Name Type Descriptionevent
EnrollmentEventField
See EnrollmentEventField.
event_type
str
Consists of the value edx.course.enrollment.deactivated
.
name
str
Consists of the value edx.course.enrollment.deactivated
.
ralph/models/edx/converters/xapi/enrollment.py
class EdxCourseEnrollmentDeactivated(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.deactivated` statement.\n\n The server emits this statement when a student unenrolls from a course.\n\n Attributes:\n event (EnrollmentEventField): See EnrollmentEventField.\n event_type (str): Consists of the value `edx.course.enrollment.deactivated`.\n name (str): Consists of the value `edx.course.enrollment.deactivated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.deactivated\"\n )\n\n event: Union[\n Json[EnrollmentEventField], # pylint: disable=unsubscriptable-object\n EnrollmentEventField,\n ]\n event_type: Literal[\"edx.course.enrollment.deactivated\"]\n name: Literal[\"edx.course.enrollment.deactivated\"]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.LMSBaseXapiConverter","title":" LMSBaseXapiConverter (BaseXapiConverter)
","text":"Base LMS xAPI Converter.
Source code inralph/models/edx/converters/xapi/enrollment.py
class LMSBaseXapiConverter(BaseXapiConverter):\n \"\"\"Base LMS xAPI Converter.\"\"\"\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"object__id\",\n \"event__course_id\",\n lambda course_id: f\"{self.platform_url}/courses/{course_id}/info\",\n ),\n ConversionItem(\n \"context__contextActivities__category\",\n None,\n lambda _: [{\"id\": \"https://w3id.org/xapi/lms\"}],\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.navigational","title":"navigational
","text":"Navigational event xAPI Converter.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.navigational.UIPageCloseToPageTerminated","title":" UIPageCloseToPageTerminated (BaseXapiConverter)
","text":"Convert a common edX page_close
event to xAPI.
Example Statement: John terminated https://www.fun-mooc.fr/ page.
WARNING: The converter does not use the self.platform_url
in the object__id
because the platform_url
is present in the edX\u2019s event page
field.
ralph/models/edx/converters/xapi/navigational.py
class UIPageCloseToPageTerminated(BaseXapiConverter):\n \"\"\"Convert a common edX `page_close` event to xAPI.\n\n Example Statement: John terminated https://www.fun-mooc.fr/ page.\n\n WARNING: The converter does not use the `self.platform_url` in the `object__id`\n because the `platform_url` is present in the edX's event `page` field.\n \"\"\"\n\n __src__ = UIPageClose\n __dest__ = PageTerminated\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union({ConversionItem(\"object__id\", \"page\")})\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.navigational.UIPageCloseToPageTerminated.__dest__","title":" __dest__ (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for page terminated statement.
Example: John terminated the https://www.fun-mooc.fr/ page.
Attributes:
Name Type Descriptionobject
dict
See PageActivity.
verb
dict
See TerminatedVerb.
Source code inralph/models/edx/converters/xapi/navigational.py
class PageTerminated(BaseXapiStatement):\n \"\"\"Pydantic model for page terminated statement.\n\n Example: John terminated the https://www.fun-mooc.fr/ page.\n\n Attributes:\n object (dict): See PageActivity.\n verb (dict): See TerminatedVerb.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://activitystrea.ms/schema/1.0/page\",\n verb__id=\"http://adlnet.gov/expapi/verbs/terminated\",\n )\n\n object: PageActivity\n verb: TerminatedVerb = TerminatedVerb()\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.navigational.UIPageCloseToPageTerminated.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for page_close
statement.
The browser emits this statement when the user navigates to the next page or closes the browser window (when the JavaScript window.onunload
event is called).
Attributes:
Name Type Descriptionevent
str
Consists of the string value {}
.
event_type
str
Consists of the value page_close
.
name
str
Consists of the value page_close
.
ralph/models/edx/converters/xapi/navigational.py
class UIPageClose(BaseBrowserModel):\n \"\"\"Pydantic model for `page_close` statement.\n\n The browser emits this statement when the user navigates to the next page\n or closes the browser window (when the JavaScript `window.onunload` event\n is called).\n\n Attributes:\n event (str): Consists of the string value `{}`.\n event_type (str): Consists of the value `page_close`.\n name (str): Consists of the value `page_close`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"page_close\")\n\n # pylint: disable=unsubscriptable-object\n event: Literal[\"{}\"]\n event_type: Literal[\"page_close\"]\n name: Literal[\"page_close\"]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.server","title":"server
","text":"Server event xAPI Converter.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.server.ServerEventToPageViewed","title":" ServerEventToPageViewed (BaseXapiConverter)
","text":"Convert a common edX server event to xAPI.
Example Statement: John viewed https://www.fun-mooc.fr/ page.
Source code inralph/models/edx/converters/xapi/server.py
class ServerEventToPageViewed(BaseXapiConverter):\n \"\"\"Convert a common edX server event to xAPI.\n\n Example Statement: John viewed https://www.fun-mooc.fr/ page.\n \"\"\"\n\n __src__ = Server\n __dest__ = PageViewed\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"object__id\",\n \"event_type\",\n lambda event_type: self.platform_url + event_type,\n ),\n }\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.server.ServerEventToPageViewed.__dest__","title":" __dest__ (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for page viewed statement.
Example: John viewed the https://www.fun-mooc.fr/ page.
Attributes:
Name Type Descriptionobject
dict
See PageActivity.
verb
dict
See ViewedVerb.
Source code inralph/models/edx/converters/xapi/server.py
class PageViewed(BaseXapiStatement):\n \"\"\"Pydantic model for page viewed statement.\n\n Example: John viewed the https://www.fun-mooc.fr/ page.\n\n Attributes:\n object (dict): See PageActivity.\n verb (dict): See ViewedVerb.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://activitystrea.ms/schema/1.0/page\",\n verb__id=\"http://id.tincanapi.com/verb/viewed\",\n )\n\n object: PageActivity\n verb: ViewedVerb = ViewedVerb()\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.server.ServerEventToPageViewed.__src__","title":" __src__ (BaseServerModel)
pydantic-model
","text":"Pydantic model for common server statement.
This type of event is triggered from the django middleware on each request excluding: /event
, login
, heartbeat
, /segmentio/event
and /performance
.
Attributes:
Name Type Descriptionevent_type
str
Consist of the relative URL (without the hostname) of the requested page. Retrieved with: request.META['PATH_INFO']
event
str
Consist of a JSON string holding the content of the GET or POST request. Retrieved with: json.dumps( { 'GET': dict(request.GET), 'POST': dict(request.POST) } )[:512]
Note: Values for [\u2018password\u2019, \u2018newpassword\u2019, \u2018new_password\u2019, \u2018oldpassword\u2019, \u2018old_password\u2019, \u2018new_password1\u2019, \u2018new_password2\u2019] are replaced by ********
. The JSON string is truncated at 512 characters resulting in invalid JSON.
ralph/models/edx/converters/xapi/server.py
class Server(BaseServerModel):\n \"\"\"Pydantic model for common server statement.\n\n This type of event is triggered from the django middleware on each request\n excluding: `/event`, `login`, `heartbeat`, `/segmentio/event` and `/performance`.\n\n Attributes:\n event_type (str): Consist of the relative URL (without the hostname) of the\n requested page.\n Retrieved with:\n `request.META['PATH_INFO']`\n event (str): Consist of a JSON string holding the content of the GET or POST\n request.\n Retrieved with:\n ```json.dumps(\n {\n 'GET': dict(request.GET),\n 'POST': dict(request.POST)\n }\n )[:512]```\n Note:\n Values for ['password', 'newpassword', 'new_password', 'oldpassword',\n 'old_password', 'new_password1', 'new_password2'] are replaced by\n `********`.\n The JSON string is truncated at 512 characters resulting in invalid\n JSON.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=LazyModelField(\"context__path\")\n )\n\n # pylint: disable=unsubscriptable-object\n event_type: Path\n event: Union[Json[ServerEventField], ServerEventField]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video","title":"video
","text":"Video event xAPI Converter.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UILoadVideoToVideoInitialized","title":" UILoadVideoToVideoInitialized (VideoBaseXapiConverter)
","text":"Convert a common edX load_video
event to xAPI.
ralph/models/edx/converters/xapi/video.py
class UILoadVideoToVideoInitialized(VideoBaseXapiConverter):\n \"\"\"Convert a common edX `load_video` event to xAPI.\"\"\"\n\n __src__ = UILoadVideo\n __dest__ = VideoInitialized\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_LENGTH,\n None,\n # Set the video length to null by default.\n # This information is mandatory in the xAPI template\n # and does not exist in the edX `load_video` event model.\n lambda _: 0.0,\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_USER_AGENT, \"agent\"\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UILoadVideoToVideoInitialized.__dest__","title":" __dest__ (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video initialized statement.
Example: A video has been fully initialized.
Attributes:
Name Type Descriptionverb
dict
See InitializedVerb.
context
dict
See VideoInitializedContext.
Source code inralph/models/edx/converters/xapi/video.py
class VideoInitialized(BaseVideoStatement):\n \"\"\"Pydantic model for video initialized statement.\n\n Example: A video has been fully initialized.\n\n Attributes:\n verb (dict): See InitializedVerb.\n context (dict): See VideoInitializedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/initialized\",\n )\n\n verb: InitializedVerb = InitializedVerb()\n context: VideoInitializedContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UILoadVideoToVideoInitialized.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for load_video
statement.
The browser emits this statement when the video is fully rendered and ready to play.
Attributes:
Name Type Descriptionevent
VideoBaseEventField
See VideoBaseEventField.
event_type
str
Consists of the value load_video
.
name
str
Consists either of the value load_video
or edx.video.loaded
.
ralph/models/edx/converters/xapi/video.py
class UILoadVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `load_video` statement.\n\n The browser emits this statement when the video is fully rendered and ready to\n play.\n\n Attributes:\n event (VideoBaseEventField): See VideoBaseEventField.\n event_type (str): Consists of the value `load_video`.\n name (str): Consists either of the value `load_video` or `edx.video.loaded`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"load_video\")\n\n event: Union[\n Json[VideoBaseEventField], # pylint: disable=unsubscriptable-object\n VideoBaseEventField,\n ]\n event_type: Literal[\"load_video\"]\n name: Literal[\"load_video\", \"edx.video.loaded\"]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPauseVideoToVideoPaused","title":" UIPauseVideoToVideoPaused (VideoBaseXapiConverter)
","text":"Convert a common edX pause_video
event to xAPI.
ralph/models/edx/converters/xapi/video.py
class UIPauseVideoToVideoPaused(VideoBaseXapiConverter):\n \"\"\"Convert a common edX `pause_video` event to xAPI.\"\"\"\n\n __src__ = UIPauseVideo\n __dest__ = VideoPaused\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_TIME,\n \"event__currentTime\",\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_LENGTH,\n None,\n # Set the video length to null by default.\n # This information is mandatory in the xAPI template\n # and does not exist in the edX `pause_video` event model.\n lambda _: 0.0,\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPauseVideoToVideoPaused.__dest__","title":" __dest__ (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video paused statement.
Example: John paused the video or clicked the pause button.
Attributes:
Name Type Descriptionverb
dict
See PausedVerb.
result
dict
See VideoPausedResult.
context
dict
See VideoPausedContext.
Source code inralph/models/edx/converters/xapi/video.py
class VideoPaused(BaseVideoStatement):\n \"\"\"Pydantic model for video paused statement.\n\n Example: John paused the video or clicked the pause button.\n\n Attributes:\n verb (dict): See PausedVerb.\n result (dict): See VideoPausedResult.\n context (dict): See VideoPausedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/paused\",\n )\n\n verb: PausedVerb = PausedVerb()\n result: VideoPausedResult\n context: VideoPausedContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPauseVideoToVideoPaused.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for pause_video
statement.
The browser emits this statement when a user selects the video player\u2019s pause control.
Attributes:
Name Type Descriptionevent
PauseVideoEventField
See PauseVideoEventField.
event_type
str
Consists of the value pause_video
.
name
str
Consists either of the value pause_video
or edx.video.paused
.
ralph/models/edx/converters/xapi/video.py
class UIPauseVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `pause_video` statement.\n\n The browser emits this statement when a user selects the video player's pause\n control.\n\n Attributes:\n event (PauseVideoEventField): See PauseVideoEventField.\n event_type (str): Consists of the value `pause_video`.\n name (str): Consists either of the value `pause_video` or `edx.video.paused`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"pause_video\")\n\n event: Union[\n Json[PauseVideoEventField], # pylint: disable=unsubscriptable-object\n PauseVideoEventField,\n ]\n event_type: Literal[\"pause_video\"]\n name: Optional[Literal[\"pause_video\", \"edx.video.paused\"]]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPlayVideoToVideoPlayed","title":" UIPlayVideoToVideoPlayed (VideoBaseXapiConverter)
","text":"Convert a common edX play_video
event to xAPI.
ralph/models/edx/converters/xapi/video.py
class UIPlayVideoToVideoPlayed(VideoBaseXapiConverter):\n \"\"\"Convert a common edX `play_video` event to xAPI.\"\"\"\n\n __src__ = UIPlayVideo\n __dest__ = VideoPlayed\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_TIME,\n \"event__currentTime\",\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPlayVideoToVideoPlayed.__dest__","title":" __dest__ (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video played statement.
Example: John played the video or clicked the play button.
Attributes:
Name Type Descriptionverb
dict
See PlayedVerb.
result
dict
See VideoPlayedResult.
context
dict
See VideoPlayedContext.
Source code inralph/models/edx/converters/xapi/video.py
class VideoPlayed(BaseVideoStatement):\n \"\"\"Pydantic model for video played statement.\n\n Example: John played the video or clicked the play button.\n\n Attributes:\n verb (dict): See PlayedVerb.\n result (dict): See VideoPlayedResult.\n context (dict): See VideoPlayedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/played\",\n )\n\n verb: PlayedVerb = PlayedVerb()\n result: VideoPlayedResult\n context: VideoPlayedContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPlayVideoToVideoPlayed.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for play_video
statement.
The browser emits this statement when a user selects the video player\u2019s play control.
Attributes:
Name Type Descriptionevent
PlayVideoEventField
See PlayVideoEventField.
event_type
str
Consists of the value play_video
.
name
str
Consists either of the value play_video
or edx.video.played
.
ralph/models/edx/converters/xapi/video.py
class UIPlayVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `play_video` statement.\n\n The browser emits this statement when a user selects the video player's play\n control.\n\n Attributes:\n event (PlayVideoEventField): See PlayVideoEventField.\n event_type (str): Consists of the value `play_video`.\n name (str): Consists either of the value `play_video` or `edx.video.played`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"play_video\")\n\n event: Union[\n Json[PlayVideoEventField], # pylint: disable=unsubscriptable-object\n PlayVideoEventField,\n ]\n event_type: Literal[\"play_video\"]\n name: Optional[Literal[\"play_video\", \"edx.video.played\"]]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UISeekVideoToVideoSeeked","title":" UISeekVideoToVideoSeeked (VideoBaseXapiConverter)
","text":"Convert a common edX seek_video
event to xAPI.
ralph/models/edx/converters/xapi/video.py
class UISeekVideoToVideoSeeked(VideoBaseXapiConverter):\n \"\"\"Convert a common edX `seek_video` event to xAPI.\"\"\"\n\n __src__ = UISeekVideo\n __dest__ = VideoSeeked\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_TIME_FROM,\n \"event__old_time\",\n ),\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_TIME_TO,\n \"event__new_time\",\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UISeekVideoToVideoSeeked.__dest__","title":" __dest__ (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video seeked statement.
!!! example \u201cJohn moved the progress bar forward or backward to a specific time in the\u201d video.
Attributes:
Name Type Descriptionverb
dict
See SeekedVerb.
result
dict
See VideoSeekedResult.
context
dict
See VideoSeekedContext.
Source code inralph/models/edx/converters/xapi/video.py
class VideoSeeked(BaseVideoStatement):\n \"\"\"Pydantic model for video seeked statement.\n\n Example: John moved the progress bar forward or backward to a specific time in the\n video.\n\n Attributes:\n verb (dict): See SeekedVerb.\n result (dict): See VideoSeekedResult.\n context (dict): See VideoSeekedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/seeked\",\n )\n\n verb: SeekedVerb = SeekedVerb()\n result: VideoSeekedResult\n context: VideoSeekedContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UISeekVideoToVideoSeeked.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for seek_video
statement.
The browser emits this statement when a user selects a user interface control to go to a different point in the video file.
Attributes:
Name Type Descriptionevent
SeekVideoEventField
See SeekVideoEventField.
event_type
str
Consists of the value seek_video
.
name
str
Consists either of the value seek_video
or edx.video.position.changed
.
ralph/models/edx/converters/xapi/video.py
class UISeekVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `seek_video` statement.\n\n The browser emits this statement when a user selects a user interface control to go\n to a different point in the video file.\n\n Attributes:\n event (SeekVideoEventField): See SeekVideoEventField.\n event_type (str): Consists of the value `seek_video`.\n name (str): Consists either of the value `seek_video` or\n `edx.video.position.changed`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"seek_video\")\n\n event: Union[\n Json[SeekVideoEventField], # pylint: disable=unsubscriptable-object\n SeekVideoEventField,\n ]\n event_type: Literal[\"seek_video\"]\n name: Optional[Literal[\"seek_video\", \"edx.video.position.changed\"]]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIStopVideoToVideoTerminated","title":" UIStopVideoToVideoTerminated (VideoBaseXapiConverter)
","text":"Convert a common edX stop_video
event to xAPI.
ralph/models/edx/converters/xapi/video.py
class UIStopVideoToVideoTerminated(VideoBaseXapiConverter):\n \"\"\"Convert a common edX `stop_video` event to xAPI.\"\"\"\n\n __src__ = UIStopVideo\n __dest__ = VideoTerminated\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_TIME,\n \"event__currentTime\",\n ),\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_PROGRESS,\n None,\n # Set the video progress to null by default.\n # This information is mandatory in the xAPI template\n # and does not exist in the edX `stop_video` event model.\n lambda _: 0.0,\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_LENGTH,\n None,\n # Set the video length to null by default.\n # This information is mandatory in the xAPI template\n # and does not exist in the edX `stop_video` event model.\n lambda _: 0.0,\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIStopVideoToVideoTerminated.__dest__","title":" __dest__ (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video terminated statement.
Example: John ended a video (quit the player).
Attributes:
Name Type Descriptionverb
dict
See TerminatedVerb.
result
dict
See VideoTerminatedResult.
context
dict
See VideoTerminatedContext.
Source code inralph/models/edx/converters/xapi/video.py
class VideoTerminated(BaseVideoStatement):\n \"\"\"Pydantic model for video terminated statement.\n\n Example: John ended a video (quit the player).\n\n Attributes:\n verb (dict): See TerminatedVerb.\n result (dict): See VideoTerminatedResult.\n context (dict): See VideoTerminatedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/terminated\",\n )\n\n verb: TerminatedVerb = TerminatedVerb()\n result: VideoTerminatedResult\n context: VideoTerminatedContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIStopVideoToVideoTerminated.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for stop_video
statement.
The browser emits this statement when the video player reaches the end of the video file and play automatically stops.
Attributes:
Name Type Descriptionevent
StopVideoEventField
See StopVideoEventField.
event_type
str
Consists of the value stop_video
.
name
str
Consists either of the value stop_video
or edx.video.stopped
.
ralph/models/edx/converters/xapi/video.py
class UIStopVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `stop_video` statement.\n\n The browser emits this statement when the video player reaches the end of the video\n file and play automatically stops.\n\n Attributes:\n event (StopVideoEventField): See StopVideoEventField.\n event_type (str): Consists of the value `stop_video`.\n name (str): Consists either of the value `stop_video` or `edx.video.stopped`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"stop_video\")\n\n event: Union[\n Json[StopVideoEventField], # pylint: disable=unsubscriptable-object\n StopVideoEventField,\n ]\n event_type: Literal[\"stop_video\"]\n name: Optional[Literal[\"stop_video\", \"edx.video.stopped\"]]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.VideoBaseXapiConverter","title":" VideoBaseXapiConverter (BaseXapiConverter)
","text":"Base Video xAPI Converter.
Source code inralph/models/edx/converters/xapi/video.py
class VideoBaseXapiConverter(BaseXapiConverter):\n \"\"\"Base Video xAPI Converter.\"\"\"\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"object__definition__name\",\n \"event__id\",\n lambda id: {LANG_EN_US_DISPLAY: id},\n ),\n ConversionItem(\n \"object__id\",\n None,\n lambda event: self.platform_url\n + \"/xblock/block-v1:\"\n + event[\"context\"][\"course_id\"]\n + \"-course-v1:+type@video+block@\"\n + event[\"event\"][\"id\"],\n ),\n ConversionItem(\n \"context__contextActivities__category\",\n None,\n lambda _: [{\"id\": \"https://w3id.org/xapi/video\"}],\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.enrollment","title":"enrollment
special
","text":""},{"location":"models/edx/#ralph.models.edx.enrollment.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.enrollment.fields.contexts","title":"contexts
","text":"Enrollment event models context fields definitions.
"},{"location":"models/edx/#ralph.models.edx.enrollment.fields.contexts.EdxCourseEnrollmentUpgradeClickedContextField","title":" EdxCourseEnrollmentUpgradeClickedContextField (BaseContextField)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.upgrade_clicked
.context
field.
In addition to the common context member fields, this statement also comprises the mode
context member field.
Attributes:
Name Type Descriptionmode
str
Consists of either the audit
or honor
value. It identifies the enrollment mode when the user clicked Challenge Yourself.
ralph/models/edx/enrollment/fields/contexts.py
class EdxCourseEnrollmentUpgradeClickedContextField(BaseContextField):\n \"\"\"Pydantic model for `edx.course.enrollment.upgrade_clicked`.`context` field.\n\n In addition to the common context member fields, this statement also comprises the\n `mode` context member field.\n\n Attributes:\n mode (str): Consists of either the `audit` or `honor` value. It identifies the\n enrollment mode when the user clicked <kbd>Challenge Yourself</kbd>.\n \"\"\"\n\n mode: Union[Literal[\"audit\"], Literal[\"honor\"]]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.fields.contexts.EdxCourseEnrollmentUpgradeSucceededContextField","title":" EdxCourseEnrollmentUpgradeSucceededContextField (BaseContextField)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.upgrade.succeeded
.context
field.
In addition to the common context member fields, this statement also comprises the mode
context member field.
Attributes:
Name Type Descriptionmode
str
Consists of the verified
value.
ralph/models/edx/enrollment/fields/contexts.py
class EdxCourseEnrollmentUpgradeSucceededContextField(BaseContextField):\n \"\"\"Pydantic model for `edx.course.enrollment.upgrade.succeeded`.`context` field.\n\n In addition to the common context member fields, this statement also comprises the\n `mode` context member field.\n\n Attributes:\n mode (str): Consists of the `verified` value.\n \"\"\"\n\n mode: Literal[\"verified\"]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.fields.events","title":"events
","text":"Enrollment models event field definition.
"},{"location":"models/edx/#ralph.models.edx.enrollment.fields.events.EnrollmentEventField","title":" EnrollmentEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for enrollment event
field.
Note: Only server enrollment statements require an event
field.
Attributes:
Name Type Descriptioncourse_id
str
Consists in the course in which the student was enrolled or unenrolled.
mode
str
Takes either audit
, honor
, professional
or verified
value. It identifies the student\u2019s enrollment mode.
user_id
int
Identifies the student who was enrolled or unenrolled.
Source code inralph/models/edx/enrollment/fields/events.py
class EnrollmentEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for enrollment `event` field.\n\n Note: Only server enrollment statements require an `event` field.\n\n Attributes:\n course_id (str): Consists in the course in which the student was enrolled or\n unenrolled.\n mode (str): Takes either `audit`, `honor`, `professional` or `verified` value.\n It identifies the student\u2019s enrollment mode.\n user_id (int): Identifies the student who was enrolled or unenrolled.\n \"\"\"\n\n course_id: str\n mode: Union[\n Literal[\"audit\"], Literal[\"honor\"], Literal[\"professional\"], Literal[\"verified\"]\n ]\n user_id: Union[int, Literal[\"\"], None]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements","title":"statements
","text":"Enrollment event model definitions.
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements.EdxCourseEnrollmentActivated","title":" EdxCourseEnrollmentActivated (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.activated
statement.
The server emits this statement when a student enrolls in a course.
Attributes:
Name Type Descriptionevent
EnrollmentEventField
See EnrollmentEventField.
event_type
str
Consists of the value edx.course.enrollment.activated
.
name
str
Consists of the value edx.course.enrollment.activated
.
ralph/models/edx/enrollment/statements.py
class EdxCourseEnrollmentActivated(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.activated` statement.\n\n The server emits this statement when a student enrolls in a course.\n\n Attributes:\n event (EnrollmentEventField): See EnrollmentEventField.\n event_type (str): Consists of the value `edx.course.enrollment.activated`.\n name (str): Consists of the value `edx.course.enrollment.activated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.activated\"\n )\n\n event: Union[\n Json[EnrollmentEventField], # pylint: disable=unsubscriptable-object\n EnrollmentEventField,\n ]\n event_type: Literal[\"edx.course.enrollment.activated\"]\n name: Literal[\"edx.course.enrollment.activated\"]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements.EdxCourseEnrollmentDeactivated","title":" EdxCourseEnrollmentDeactivated (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.deactivated
statement.
The server emits this statement when a student unenrolls from a course.
Attributes:
Name Type Descriptionevent
EnrollmentEventField
See EnrollmentEventField.
event_type
str
Consists of the value edx.course.enrollment.deactivated
.
name
str
Consists of the value edx.course.enrollment.deactivated
.
ralph/models/edx/enrollment/statements.py
class EdxCourseEnrollmentDeactivated(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.deactivated` statement.\n\n The server emits this statement when a student unenrolls from a course.\n\n Attributes:\n event (EnrollmentEventField): See EnrollmentEventField.\n event_type (str): Consists of the value `edx.course.enrollment.deactivated`.\n name (str): Consists of the value `edx.course.enrollment.deactivated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.deactivated\"\n )\n\n event: Union[\n Json[EnrollmentEventField], # pylint: disable=unsubscriptable-object\n EnrollmentEventField,\n ]\n event_type: Literal[\"edx.course.enrollment.deactivated\"]\n name: Literal[\"edx.course.enrollment.deactivated\"]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements.EdxCourseEnrollmentModeChanged","title":" EdxCourseEnrollmentModeChanged (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.mode_changed
statement.
The server emits this statement when the process of changing a student\u2019s student_courseenrollment.mode to a different mode is complete.
Attributes:
Name Type Descriptionevent
EnrollmentEventField
See EnrollmentEventField.
event_type
str
Consists of the value edx.course.enrollment.mode_changed
.
name
str
Consists of the value edx.course.enrollment.mode_changed
.
ralph/models/edx/enrollment/statements.py
class EdxCourseEnrollmentModeChanged(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.mode_changed` statement.\n\n The server emits this statement when the process of changing a student\u2019s\n student_courseenrollment.mode to a different mode is complete.\n\n Attributes:\n event (EnrollmentEventField): See EnrollmentEventField.\n event_type (str): Consists of the value `edx.course.enrollment.mode_changed`.\n name (str): Consists of the value `edx.course.enrollment.mode_changed`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.mode_changed\"\n )\n\n event: Union[\n Json[EnrollmentEventField], # pylint: disable=unsubscriptable-object\n EnrollmentEventField,\n ]\n event_type: Literal[\"edx.course.enrollment.mode_changed\"]\n name: Literal[\"edx.course.enrollment.mode_changed\"]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements.EdxCourseEnrollmentUpgradeSucceeded","title":" EdxCourseEnrollmentUpgradeSucceeded (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.upgrade.succeeded
statement.
The server emits this statement when the process of upgrading a student\u2019s student_courseenrollment.mode from audit
or honor
to verified
is complete.
Attributes:
Name Type Descriptioncontext
EdxCourseEnrollmentUpgradeSucceededContextField
See EdxCourseEnrollmentUpgradeSucceededContextField.
event_type
str
Consists of the value edx.course.enrollment.upgrade.succeeded
.
name
str
Consists of the value edx.course.enrollment.upgrade.succeeded
.
ralph/models/edx/enrollment/statements.py
class EdxCourseEnrollmentUpgradeSucceeded(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.upgrade.succeeded` statement.\n\n The server emits this statement when the process of upgrading a student\u2019s\n student_courseenrollment.mode from `audit` or `honor` to `verified` is complete.\n\n Attributes:\n context (EdxCourseEnrollmentUpgradeSucceededContextField):\n See EdxCourseEnrollmentUpgradeSucceededContextField.\n event_type (str): Consists of the value\n `edx.course.enrollment.upgrade.succeeded`.\n name (str): Consists of the value `edx.course.enrollment.upgrade.succeeded`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.upgrade.succeeded\"\n )\n\n context: EdxCourseEnrollmentUpgradeSucceededContextField\n event_type: Literal[\"edx.course.enrollment.upgrade.succeeded\"]\n name: Literal[\"edx.course.enrollment.upgrade.succeeded\"]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements.UIEdxCourseEnrollmentUpgradeClicked","title":" UIEdxCourseEnrollmentUpgradeClicked (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.upgrade_clicked
statement.
The browser emits this statement when a student clicks ChallengeYourself option, and the process of upgrading the student_courseenrollment.mode for the student to verified
begins.
Attributes:
Name Type Descriptioncontext
EdxCourseEnrollmentUpgradeClickedContextField
See EdxCourseEnrollmentUpgradeClickedContextField.
event_type
str
Consists of the value edx.course.enrollment.upgrade_clicked
.
name
str
Consists of the value edx.course.enrollment.upgrade_clicked
.
ralph/models/edx/enrollment/statements.py
class UIEdxCourseEnrollmentUpgradeClicked(BaseBrowserModel):\n \"\"\"Pydantic model for `edx.course.enrollment.upgrade_clicked` statement.\n\n The browser emits this statement when a student clicks <kbd>ChallengeYourself</kbd>\n option, and the process of upgrading the student_courseenrollment.mode for the\n student to `verified` begins.\n\n Attributes:\n context (EdxCourseEnrollmentUpgradeClickedContextField):\n See EdxCourseEnrollmentUpgradeClickedContextField.\n event_type (str): Consists of the value `edx.course.enrollment.upgrade_clicked`.\n name (str): Consists of the value `edx.course.enrollment.upgrade_clicked`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"edx.course.enrollment.upgrade_clicked\"\n )\n\n context: EdxCourseEnrollmentUpgradeClickedContextField\n event_type: Literal[\"edx.course.enrollment.upgrade_clicked\"]\n name: Literal[\"edx.course.enrollment.upgrade_clicked\"]\n
"},{"location":"models/edx/#ralph.models.edx.navigational","title":"navigational
special
","text":""},{"location":"models/edx/#ralph.models.edx.navigational.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.navigational.fields.events","title":"events
","text":"Navigational event field definition.
"},{"location":"models/edx/#ralph.models.edx.navigational.fields.events.NavigationalEventField","title":" NavigationalEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for navigational event
field.
Note: All navigational statements are emitted from the browser.
Attributes:
Name Type Descriptionid
str
Consists of the edX ID of the sequence.
old
int
For seq_goto
, it consists of the index of the unit being jumped to. For seq_next
and seq_prev
, it consists of the index of the unit being navigated to.
new
int
For seq_goto
, it consists of the index of the unit being jumped from. For seq_next
and seq_prev
, it consists of the index of the unit being navigated away from.
ralph/models/edx/navigational/fields/events.py
class NavigationalEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for navigational `event` field.\n\n Note: All navigational statements are emitted from the browser.\n\n Attributes:\n id (str): Consists of the edX ID of the sequence.\n old (int): For `seq_goto`, it consists of the index of the unit being jumped to.\n For `seq_next` and `seq_prev`, it consists of the index of the unit being\n navigated to.\n new (int): For `seq_goto`, it consists of the index of the unit being jumped\n from. For `seq_next` and `seq_prev`, it consists of the index of the unit\n being navigated away from.\n \"\"\"\n\n id: constr(\n regex=(\n r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+type\" # noqa : F722\n r\"@sequential\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n )\n new: int\n old: int\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements","title":"statements
","text":"Navigational event model definitions.
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UIPageClose","title":" UIPageClose (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for page_close
statement.
The browser emits this statement when the user navigates to the next page or closes the browser window (when the JavaScript window.onunload
event is called).
Attributes:
Name Type Descriptionevent
str
Consists of the string value {}
.
event_type
str
Consists of the value page_close
.
name
str
Consists of the value page_close
.
ralph/models/edx/navigational/statements.py
class UIPageClose(BaseBrowserModel):\n \"\"\"Pydantic model for `page_close` statement.\n\n The browser emits this statement when the user navigates to the next page\n or closes the browser window (when the JavaScript `window.onunload` event\n is called).\n\n Attributes:\n event (str): Consists of the string value `{}`.\n event_type (str): Consists of the value `page_close`.\n name (str): Consists of the value `page_close`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"page_close\")\n\n # pylint: disable=unsubscriptable-object\n event: Literal[\"{}\"]\n event_type: Literal[\"page_close\"]\n name: Literal[\"page_close\"]\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UISeqGoto","title":" UISeqGoto (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for seq_goto
statement.
The browser emits this statement when a user jumps between units in a sequence.
Attributes:
Name Type Descriptionevent
obj
Consists of member fields that identify specifics triggered event.
event_type
str
Consists of the value seq_goto
.
name
str
Consists of the value seq_goto
.
ralph/models/edx/navigational/statements.py
class UISeqGoto(BaseBrowserModel):\n \"\"\"Pydantic model for `seq_goto` statement.\n\n The browser emits this statement when a user jumps between units in a sequence.\n\n Attributes:\n event (obj): Consists of member fields that identify specifics triggered event.\n event_type (str): Consists of the value `seq_goto`.\n name (str): Consists of the value `seq_goto`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"seq_goto\")\n\n # pylint: disable=unsubscriptable-object\n event: Union[Json[NavigationalEventField], NavigationalEventField]\n event_type: Literal[\"seq_goto\"]\n name: Literal[\"seq_goto\"]\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UISeqNext","title":" UISeqNext (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for seq_next
statement.
The browser emits this statement when a user navigates to the next unit in a sequence.
Attributes:
Name Type Descriptionevent
obj
Consists of member fields that identify specifics triggered event.
event_type
str
Consists of the value seq_next
.
name
str
Consists of the value seq_next
.
ralph/models/edx/navigational/statements.py
class UISeqNext(BaseBrowserModel):\n \"\"\"Pydantic model for `seq_next` statement.\n\n The browser emits this statement when a user navigates to the next unit in a\n sequence.\n\n Attributes:\n event (obj): Consists of member fields that identify specifics triggered event.\n event_type (str): Consists of the value `seq_next`.\n name (str): Consists of the value `seq_next`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"seq_next\")\n\n # pylint: disable=unsubscriptable-object\n event: Union[Json[NavigationalEventField], NavigationalEventField]\n event_type: Literal[\"seq_next\"]\n name: Literal[\"seq_next\"]\n\n @validator(\"event\")\n @classmethod\n def validate_next_jump_event_field(cls, value):\n \"\"\"Check that event.new is equal to event.old + 1.\"\"\"\n if value.new != value.old + 1:\n raise ValueError(\"event.new - event.old should be equal to 1\")\n\n return value\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UISeqNext.validate_next_jump_event_field","title":"validate_next_jump_event_field(value)
classmethod
","text":"Check that event.new is equal to event.old + 1.
Source code inralph/models/edx/navigational/statements.py
@validator(\"event\")\n@classmethod\ndef validate_next_jump_event_field(cls, value):\n \"\"\"Check that event.new is equal to event.old + 1.\"\"\"\n if value.new != value.old + 1:\n raise ValueError(\"event.new - event.old should be equal to 1\")\n\n return value\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UISeqPrev","title":" UISeqPrev (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for seq_prev
statement.
The browser emits this statement when a user navigates to the previous unit in a sequence.
Attributes:
Name Type Descriptionevent
obj
Consists of member fields that identify specifics triggered event.
event_type
str
Consists of the value seq_prev
.
name
str
Consists of the value seq_prev
.
ralph/models/edx/navigational/statements.py
class UISeqPrev(BaseBrowserModel):\n \"\"\"Pydantic model for `seq_prev` statement.\n\n The browser emits this statement when a user navigates to the previous unit in a\n sequence.\n\n Attributes:\n event (obj): Consists of member fields that identify specifics triggered event.\n event_type (str): Consists of the value `seq_prev`.\n name (str): Consists of the value `seq_prev`.\n\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"seq_prev\")\n\n # pylint: disable=unsubscriptable-object\n event: Union[Json[NavigationalEventField], NavigationalEventField]\n event_type: Literal[\"seq_prev\"]\n name: Literal[\"seq_prev\"]\n\n @validator(\"event\")\n @classmethod\n def validate_prev_jump_event_field(cls, value):\n \"\"\"Check that event.new is equal to event.old - 1.\"\"\"\n if value.new != value.old - 1:\n raise ValueError(\"event.old - event.new should be equal to 1\")\n\n return value\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UISeqPrev.validate_prev_jump_event_field","title":"validate_prev_jump_event_field(value)
classmethod
","text":"Check that event.new is equal to event.old - 1.
Source code inralph/models/edx/navigational/statements.py
@validator(\"event\")\n@classmethod\ndef validate_prev_jump_event_field(cls, value):\n \"\"\"Check that event.new is equal to event.old - 1.\"\"\"\n if value.new != value.old - 1:\n raise ValueError(\"event.old - event.new should be equal to 1\")\n\n return value\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment","title":"open_response_assessment
special
","text":""},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events","title":"events
","text":"Open Response Assessment events model event fields definitions.
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAAssessEventField","title":" ORAAssessEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for assessment event
field.
This field is defined in: - openassessmentblock.peer_assess
- openassessmentblock.self_assess
- openassessmentblock.staff_assess
Attributes:
Name Type Descriptionfeedback
str
Consists of the learner\u2019s comments about the submitted response.
parts
list
see ORAAssessEventPartsField.
rubric
dict
see ORAPeerAssessEventRubricField.
scored_at
datetime
Consists of the timestamp for when the assessment was submitted.
scorer_id
str
Consists of the course-specific anonymized user ID of the learner who submitted the assessment.
score_type
str
Consists of either PE
value for a peer assessment, SE
for a self assessment or ST
for a staff assessment.
submission_uuid
str
Consists of the unique identifier for the submitted response.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAAssessEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for assessment `event` field.\n\n This field is defined in:\n - `openassessmentblock.peer_assess`\n - `openassessmentblock.self_assess`\n - `openassessmentblock.staff_assess`\n\n Attributes:\n feedback (str): Consists of the learner's comments about the submitted response.\n parts (list): see ORAAssessEventPartsField.\n rubric (dict): see ORAPeerAssessEventRubricField.\n scored_at (datetime): Consists of the timestamp for when the assessment was\n submitted.\n scorer_id (str): Consists of the course-specific anonymized user ID of the\n learner who submitted the assessment.\n score_type (str): Consists of either `PE` value for a peer assessment, `SE` for\n a self assessment or `ST` for a staff assessment.\n submission_uuid (str): Consists of the unique identifier for the submitted\n response.\n \"\"\"\n\n feedback: str\n parts: List[ORAAssessEventPartsField]\n rubric: ORAAssessEventRubricField\n scored_at: datetime\n scorer_id: constr(max_length=40)\n score_type: Literal[\"PE\", \"SE\", \"ST\"]\n submission_uuid: UUID\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAAssessEventPartsCriterionField","title":" ORAAssessEventPartsCriterionField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for assessment event
.parts
.criterion
field.
Attributes:
Name Type Descriptionname
str
Consists of the criterion name.
points_possible
int
Consists of the maximum number of points allocated to the criterion.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAAssessEventPartsCriterionField(BaseModelWithConfig):\n \"\"\"Pydantic model for assessment `event`.`parts`.`criterion` field.\n\n Attributes:\n name (str): Consists of the criterion name.\n points_possible (int): Consists of the maximum number of points\n allocated to the criterion.\n \"\"\"\n\n name: str\n points_possible: int\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAAssessEventPartsField","title":" ORAAssessEventPartsField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for assessment event
.parts
field.
Attributes:
Name Type Descriptionoption
str
Consists of the option that the learner selected for it.
criterion
dict
see ORAAssessEventPartsCriterionField.
feedback
str
Consists of feedback comments that the learner could have supplied.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAAssessEventPartsField(BaseModelWithConfig):\n \"\"\"Pydantic model for assessment `event`.`parts` field.\n\n Attributes:\n option (str): Consists of the option that the learner selected for it.\n criterion (dict): see ORAAssessEventPartsCriterionField.\n feedback (str): Consists of feedback comments that the learner could have\n supplied.\n \"\"\"\n\n option: str\n criterion: ORAAssessEventPartsCriterionField\n feedback: Optional[str]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAAssessEventRubricField","title":" ORAAssessEventRubricField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for assessment event
.rubric
field.
This field is defined in: - openassessmentblock.peer_assess
- openassessmentblock.self_assess
- openassessmentblock.staff_assess
Attributes:
Name Type Descriptioncontent_hash
ConstrainedStrValue
Consists of the identifier of the rubric that the learner used to assess the response.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAAssessEventRubricField(BaseModelWithConfig):\n \"\"\"Pydantic model for assessment `event`.`rubric` field.\n\n This field is defined in:\n - `openassessmentblock.peer_assess`\n - `openassessmentblock.self_assess`\n - `openassessmentblock.staff_assess`\n\n Attributes:\n content_hash: Consists of the identifier of the rubric that the learner used to\n assess the response.\n \"\"\"\n\n content_hash: constr(regex=r\"^[a-f0-9]{1,40}$\") # noqa: F722\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORACreateSubmissionEventAnswerField","title":" ORACreateSubmissionEventAnswerField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for openassessmentblock.create_submission
.event
.answer
field.
Attributes:
Name Type Descriptionparts
dict
Consists of a key-value dictionary with all answers text.
file_keys
list
Consists of a list of file identifiers if files are given for answer.
files_description
list
Consists of a list of file descriptions if files are given for answer.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORACreateSubmissionEventAnswerField(BaseModelWithConfig):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessmentblock.create_submission`.`event`.`answer`\n field.\n\n Attributes:\n parts (dict): Consists of a key-value dictionary with all answers text.\n file_keys (list): Consists of a list of file identifiers if files are given for\n answer.\n files_description (list): Consists of a list of file descriptions if files are\n given for answer.\n \"\"\"\n\n parts: List[Dict[Literal[\"text\"], str]]\n file_keys: Optional[List[str]]\n files_descriptions: Optional[List[str]]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORACreateSubmissionEventField","title":" ORACreateSubmissionEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.create_submission
.event
field.
Attributes:
Name Type Descriptionanswer
dict
see ORACreateSubmissionEventAnswerField.
attempt_number
int
Consists of the number of submission attempts. Currently, this value is set to 1.
created_at
datetime
Consists of the timestamp for when the learner submitted the response.
submitted_at
datetime
Consists of the timestamp for when the learner submitted the response. This value is the same as submitted_at
.
submission_uuid
str
Consists of the unique identifier of the response.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORACreateSubmissionEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `openassessmentblock.create_submission`.`event` field.\n\n Attributes:\n answer (dict): see ORACreateSubmissionEventAnswerField.\n attempt_number (int): Consists of the number of submission attempts. Currently,\n this value is set to 1.\n created_at (datetime): Consists of the timestamp for when the learner submitted\n the response.\n submitted_at (datetime): Consists of the timestamp for when the learner\n submitted the response. This value is the same as `submitted_at`.\n submission_uuid (str): Consists of the unique identifier of the response.\n \"\"\"\n\n answer: ORACreateSubmissionEventAnswerField\n attempt_number: int\n created_at: datetime\n submitted_at: datetime\n submission_uuid: UUID\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAGetPeerSubmissionEventField","title":" ORAGetPeerSubmissionEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.get_peer_submission
.event
field.
Attributes:
Name Type Descriptioncourse_id
str
Consists of the course identifier including the assessment.
item_id
str
Consists of the locator string that identifies the problem in the course.
requesting_student_id
str
Consists of the course-specific anonymized user ID of the learner who retrieved the response for peer assessment.
submission_returned_uuid
str
Consists of the unique identifier of the response that was retrieved for assessment. Set to None
if no assessment available.
ralph/models/edx/open_response_assessment/fields/events.py
class ORAGetPeerSubmissionEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `openassessmentblock.get_peer_submission`.`event` field.\n\n Attributes:\n course_id (str): Consists of the course identifier including the assessment.\n item_id (str): Consists of the locator string that identifies the problem in\n the course.\n requesting_student_id (str): Consists of the course-specific anonymized user ID\n of the learner who retrieved the response for peer assessment.\n submission_returned_uuid (str): Consists of the unique identifier of the\n response that was retrieved for assessment. Set to `None` if no assessment\n available.\n \"\"\"\n\n course_id: constr(max_length=255)\n item_id: constr(\n regex=(\n r\"^block-v1:.+\\+.+\\+.+type@openassessment\" # noqa : F722\n r\"+block@[a-f0-9]{32}$\" # noqa : F722\n )\n )\n requesting_student_id: str\n submission_returned_uuid: Union[str, None]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAGetSubmissionForStaffGradingEventField","title":" ORAGetSubmissionForStaffGradingEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.get_submission_for_staff_grading
. event
field.
Attributes:
Name Type Descriptionitem_id
str
Consists of the locator string that identifies the problem in the course.
submission_returned_uuid
str
Consists of the unique identifier of the response that was retrieved for assessment. Set to None
if no assessment available.
requesting_staff_id
str
Consists of the course-specific anonymized user ID of the course team member who is retrieved the response for grading.
type
str
Consists of the type of staff grading that is being performed. Currently, set to full-grade
.
ralph/models/edx/open_response_assessment/fields/events.py
class ORAGetSubmissionForStaffGradingEventField(AbstractBaseEventField):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessmentblock.get_submission_for_staff_grading`.\n `event` field.\n\n Attributes:\n item_id (str): Consists of the locator string that identifies the problem in\n the course.\n submission_returned_uuid (str): Consists of the unique identifier of the\n response that was retrieved for assessment. Set to `None` if no assessment\n available.\n requesting_staff_id (str): Consists of the course-specific anonymized user ID\n of the course team member who is retrieved the response for grading.\n type (str): Consists of the type of staff grading that is being performed.\n Currently, set to `full-grade`.\n \"\"\"\n\n item_id: constr(\n regex=(\n r\"^block-v1:.+\\+.+\\+.+type@openassessment\" # noqa : F722\n r\"+block@[a-f0-9]{32}$\" # noqa : F722\n )\n )\n submission_returned_uuid: Union[str, None]\n requesting_staff_id: str\n type: Literal[\"full-grade\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORASaveSubmissionEventField","title":" ORASaveSubmissionEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.save_submission
.event
field.
Attributes:
Name Type Descriptionsaved_response
str
Consists of a JSON string of the users saved responses. Note: Responses have a length limit of 100000 in the front-end but not in the back-end. Events are truncated at TRACK_MAX_EVENT
which is 50000 by default. Also, the eventtracking.backends.logger.LoggerBackend
silently drops events when they exceed TRACK_MAX_EVENT
.
ralph/models/edx/open_response_assessment/fields/events.py
class ORASaveSubmissionEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `openassessmentblock.save_submission`.`event` field.\n\n Attributes:\n saved_response (str): Consists of a JSON string of the users saved responses.\n Note:\n Responses have a length limit of 100000 in the front-end but not in the\n back-end. Events are truncated at `TRACK_MAX_EVENT` which is 50000 by\n default. Also, the `eventtracking.backends.logger.LoggerBackend`\n silently drops events when they exceed `TRACK_MAX_EVENT`.\n \"\"\"\n\n # pylint: disable=unsubscriptable-object\n saved_response: ORASaveSubmissionEventSavedResponseField\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORASaveSubmissionEventSavedResponseField","title":" ORASaveSubmissionEventSavedResponseField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for openassessmentblock.save_submission
.saved_response
field.
Attributes:
Name Type Descriptiontext
str
Consists of the response text.
file_upload_key
str
Consists of the AWS S3 key that identifies the location of the uploaded file on the Amazon S3 storage service. Only present when responses include an image, .pdf, or other file.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORASaveSubmissionEventSavedResponseField(BaseModelWithConfig):\n \"\"\"Pydantic model for `openassessmentblock.save_submission`.`saved_response` field.\n\n Attributes:\n text (str): Consists of the response text.\n file_upload_key (str): Consists of the AWS S3 key that identifies the location\n of the uploaded file on the Amazon S3 storage service. Only present when\n responses include an image, .pdf, or other file.\n \"\"\"\n\n text: str\n file_upload_key: Optional[str]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAStaffAssessEventField","title":" ORAStaffAssessEventField (ORAAssessEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.staff_assess
.event
field.
Attributes:
Name Type Descriptiontype
str
Consists of the type of staff grading that is being performed. Can be either equal to regrade
in the case of a grade override or full-grade
in the case of an included staff assessment step.
ralph/models/edx/open_response_assessment/fields/events.py
class ORAStaffAssessEventField(ORAAssessEventField):\n \"\"\"Pydantic model for `openassessmentblock.staff_assess`.`event` field.\n\n Attributes:\n type (str): Consists of the type of staff grading that is being performed. Can\n be either equal to `regrade` in the case of a grade override or\n `full-grade` in the case of an included staff assessment step.\n \"\"\"\n\n type: Literal[\"regrade\", \"full-grade\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAStudentTrainingAssessExampleEventField","title":" ORAStudentTrainingAssessExampleEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessment.student_training_assess_example
.event
field.
Attributes:
Name Type Descriptioncorrections
dict
Consists of a set of name/value pairs that identify criteria for which the learner selected a different option than the course team.
options_selected
dict
Consists of a set of name/value pairs that identify the option that the learner selected for each criterion in the rubric.
submission_uuid
str
Consists of the unique identifier of the response.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAStudentTrainingAssessExampleEventField(AbstractBaseEventField):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessment.student_training_assess_example`.`event`\n field.\n\n Attributes:\n corrections (dict): Consists of a set of name/value pairs that identify\n criteria for which the learner selected a different option than the course\n team.\n options_selected (dict): Consists of a set of name/value pairs that identify\n the option that the learner selected for each criterion in the rubric.\n submission_uuid (str): Consists of the unique identifier of the response.\n \"\"\"\n\n corrections: Dict[str, str]\n options_selected: Dict[str, str]\n submission_uuid: UUID\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORASubmitFeedbackOnAssessmentsEventField","title":" ORASubmitFeedbackOnAssessmentsEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.submit_feedback_on_assessments
. event
field.
Attributes:
Name Type Descriptionfeedback_text
str
Consists of the learner\u2019s comments about the assessment process.
options
list
Consists of the label of each checkbox option that the learner selected to evaluate the assessment process.
submission_uuid
str
Consists of the unique identifier for the feedback.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORASubmitFeedbackOnAssessmentsEventField(AbstractBaseEventField):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessmentblock.submit_feedback_on_assessments`.\n `event` field.\n\n Attributes:\n feedback_text (str): Consists of the learner's comments about the assessment\n process.\n options (list): Consists of the label of each checkbox option that the learner\n selected to evaluate the assessment process.\n submission_uuid (str): Consists of the unique identifier for the feedback.\n \"\"\"\n\n feedback_text: str\n options: List[str]\n submission_uuid: UUID\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAUploadFileEventField","title":" ORAUploadFileEventField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for openassessment.upload_file
.event
field.
Attributes:
Name Type DescriptionfileName
str
Consists of the name of the uploaded file.
fileSize
int
Consists of the bytes size of the uploaded file.
fileType
str
Consists of the MIME type of the uploaded file.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAUploadFileEventField(BaseModelWithConfig):\n \"\"\"Pydantic model for `openassessment.upload_file`.`event` field.\n\n Attributes:\n fileName (str): Consists of the name of the uploaded file.\n fileSize (int): Consists of the bytes size of the uploaded file.\n fileType (str): Consists of the MIME type of the uploaded file.\n \"\"\"\n\n fileName: constr(max_length=255)\n fileSize: int\n fileType: str\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements","title":"statements
","text":"Open Response Assessment events model definitions.
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORACreateSubmission","title":" ORACreateSubmission (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.create_submission
statement.
The server emits this statement when a learner submits a response, a peer assessment or a self assessment.
Attributes:
Name Type Descriptionevent
dict
See ORACreateSubmissionEventField.
event_type
str
Consists of the value openassessmentblock.create_submission
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORACreateSubmission(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.create_submission` statement.\n\n The server emits this statement when a learner submits a response, a peer\n assessment or a self assessment.\n\n Attributes:\n event (dict): See ORACreateSubmissionEventField.\n event_type (str): Consists of the value `openassessmentblock.create_submission`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.create_submission\"\n )\n\n event: ORACreateSubmissionEventField\n event_type: Literal[\"openassessmentblock.create_submission\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAGetPeerSubmission","title":" ORAGetPeerSubmission (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.get_peer_submission
statement.
The server emits this statement when a response is delivered to a learner for evaluation.
Attributes:
Name Type Descriptionevent
dict
See ORAGetPeerSubmissionEventField.
event_type
str
Consists of the value openassessmentblock.get_peer_submission
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORAGetPeerSubmission(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.get_peer_submission` statement.\n\n The server emits this statement when a response is delivered to a learner for\n evaluation.\n\n Attributes:\n event (dict): See ORAGetPeerSubmissionEventField.\n event_type (str): Consists of the value\n `openassessmentblock.get_peer_submission`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.get_peer_submission\"\n )\n\n event: ORAGetPeerSubmissionEventField\n event_type: Literal[\"openassessmentblock.get_peer_submission\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAGetSubmissionForStaffGrading","title":" ORAGetSubmissionForStaffGrading (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.get_submission_for_staff_grading
statement.
The server emits this statement when a course team member retrieves a learner\u2019s response for grading.
Attributes:
Name Type Descriptionevent
dict
See ORAGetSubmissionForStaffGradingEventField.
event_type
str
Consists of the value openassessmentblock.get_submission_for_staff_grading
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORAGetSubmissionForStaffGrading(BaseServerModel):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessmentblock.get_submission_for_staff_grading`\n statement.\n\n The server emits this statement when a course team member retrieves a learner's\n response for grading.\n\n Attributes:\n event (dict): See ORAGetSubmissionForStaffGradingEventField.\n event_type (str): Consists of the value\n `openassessmentblock.get_submission_for_staff_grading`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\",\n event_type=\"openassessmentblock.get_submission_for_staff_grading\",\n )\n\n event: ORAGetSubmissionForStaffGradingEventField\n event_type: Literal[\"openassessmentblock.get_submission_for_staff_grading\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAPeerAssess","title":" ORAPeerAssess (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.peer_assess
statement.
The server emits this statement when a learner submits an assessment of a peer\u2019s response.
Attributes:
Name Type Descriptionevent
dict
See ORAAssessEventField.
event_type
str
Consists of the value openassessmentblock.peer_assess
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORAPeerAssess(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.peer_assess` statement.\n\n The server emits this statement when a learner submits an assessment of a\n peer's response.\n\n Attributes:\n event (dict): See ORAAssessEventField.\n event_type (str): Consists of the value `openassessmentblock.peer_assess`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.peer_assess\"\n )\n\n event: ORAAssessEventField\n event_type: Literal[\"openassessmentblock.peer_assess\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORASaveSubmission","title":" ORASaveSubmission (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.save_submission
statement.
The server emits this statement when the user clicks on the Save your progress button to save the current state of the response to an open assessment question.
Attributes:
Name Type Descriptionevent
str
See ORASaveSubmissionEventField.
event_type
str
Consists of the value openassessmentblock.save_submission
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORASaveSubmission(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.save_submission` statement.\n\n The server emits this statement when the user clicks on the\n <kbd>Save your progress</kbd> button to save the current state of the\n response to an open assessment question.\n\n Attributes:\n event (str): See ORASaveSubmissionEventField.\n event_type (str): Consists of the value `openassessmentblock.save_submission`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.save_submission\"\n )\n\n event: ORASaveSubmissionEventField\n event_type: Literal[\"openassessmentblock.save_submission\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORASelfAssess","title":" ORASelfAssess (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.self_assess
statement.
The server emits this statement when a learner submits a self-assessment.
Attributes:
Name Type Descriptionevent
dict
See ORAAssessEventField.
event_type
str
Consists of the value openassessmentblock.self_assess
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORASelfAssess(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.self_assess` statement.\n\n The server emits this statement when a learner submits a self-assessment.\n\n Attributes:\n event (dict): See ORAAssessEventField.\n event_type (str): Consists of the value `openassessmentblock.self_assess`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.self_assess\"\n )\n\n event: ORAAssessEventField\n event_type: Literal[\"openassessmentblock.self_assess\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAStaffAssess","title":" ORAStaffAssess (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.staff_assess
statement.
The server emits this statement when a course team member submits an assessment of a learner\u2019s response.
Attributes:
Name Type Descriptionevent
dict
See ORAStaffAssessEventField.
event_type
str
Consists of the value openassessmentblock.staff_assess
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORAStaffAssess(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.staff_assess` statement.\n\n The server emits this statement when a course team member submits an assessment\n of a learner's response.\n\n Attributes:\n event (dict): See ORAStaffAssessEventField.\n event_type (str): Consists of the value `openassessmentblock.staff_assess`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.staff_assess\"\n )\n\n event: ORAStaffAssessEventField\n event_type: Literal[\"openassessmentblock.staff_assess\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAStudentTrainingAssessExample","title":" ORAStudentTrainingAssessExample (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessment.student_training_assess_example
statement.
The server emits this event when a learner submits an assessment for an example response within a training step.
Attributes:
Name Type Descriptionevent
dict
See ORAStudentTrainingAssessExampleEventField.
event_type
str
Consists of the value openassessment.student_training_assess_example
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORAStudentTrainingAssessExample(BaseServerModel):\n \"\"\"Pydantic model for `openassessment.student_training_assess_example` statement.\n\n The server emits this event when a learner submits an assessment for an example\n response within a training step.\n\n Attributes:\n event (dict): See ORAStudentTrainingAssessExampleEventField.\n event_type (str): Consists of the value\n `openassessment.student_training_assess_example`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\",\n event_type=\"openassessment.student_training_assess_example\",\n )\n\n event: ORAStudentTrainingAssessExampleEventField\n event_type: Literal[\"openassessment.student_training_assess_example\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORASubmitFeedbackOnAssessments","title":" ORASubmitFeedbackOnAssessments (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.submit_feedback_on_assessments
statement.
The server emits this statement when a learner submits a suggestion, opinion or other feedback about the assessment process.
Attributes:
Name Type Descriptionevent
dict
See ORASubmitFeedbackOnAssessmentsEventField.
event_type
str
Consists of the value openassessmentblock.submit_feedback_on_assessments
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORASubmitFeedbackOnAssessments(BaseServerModel):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessmentblock.submit_feedback_on_assessments`\n statement.\n\n The server emits this statement when a learner submits a suggestion, opinion or\n other feedback about the assessment process.\n\n Attributes:\n event (dict): See ORASubmitFeedbackOnAssessmentsEventField.\n event_type (str): Consists of the value\n `openassessmentblock.submit_feedback_on_assessments`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\",\n event_type=\"openassessmentblock.submit_feedback_on_assessments\",\n )\n\n event: ORASubmitFeedbackOnAssessmentsEventField\n event_type: Literal[\"openassessmentblock.submit_feedback_on_assessments\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAUploadFile","title":" ORAUploadFile (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for openassessment.upload_file
statement.
The browser emits this statement when a learner successfully uploads an image, .pdf, or other file as part of a response.
Attributes:
Name Type Descriptionevent
dict
See ORAUploadFileEventField.
event_type
str
Consists of the value openassessment.upload_file
.
name
str
Consists of the value openassessment.upload_file
.
ralph/models/edx/open_response_assessment/statements.py
class ORAUploadFile(BaseBrowserModel):\n \"\"\"Pydantic model for `openassessment.upload_file` statement.\n\n The browser emits this statement when a learner successfully uploads an image,\n .pdf, or other file as part of a response.\n\n Attributes:\n event (dict): See ORAUploadFileEventField.\n event_type (str): Consists of the value `openassessment.upload_file`.\n name (str): Consists of the value `openassessment.upload_file`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"openassessment.upload_file\"\n )\n\n # pylint: disable=unsubscriptable-object\n event: Union[Json[ORAUploadFileEventField], ORAUploadFileEventField]\n event_type: Literal[\"openassessment.upload_file\"]\n name: Literal[\"openassessment.upload_file\"]\n
"},{"location":"models/edx/#ralph.models.edx.peer_instruction","title":"peer_instruction
special
","text":""},{"location":"models/edx/#ralph.models.edx.peer_instruction.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.peer_instruction.fields.events","title":"events
","text":"Peer instruction event field definition.
"},{"location":"models/edx/#ralph.models.edx.peer_instruction.fields.events.PeerInstructionEventField","title":" PeerInstructionEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for peer instruction event
field.
Attributes:
Name Type Descriptionanswer
int
Consists of the index assigned to the answer choice selected by the learner.
rationale
str
Consists of the text entered by the learner to explain why they selected that answer choice.
truncated
bool
True
only if the rationale was longer than 12,500 characters, which is the maximum included in the event.
ralph/models/edx/peer_instruction/fields/events.py
class PeerInstructionEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for peer instruction `event` field.\n\n Attributes:\n answer (int): Consists of the index assigned to the answer choice selected by\n the learner.\n rationale (str): Consists of the text entered by the learner to explain why\n they selected that answer choice.\n truncated (bool): `True` only if the rationale was longer than 12,500\n characters, which is the maximum included in the event.\n \"\"\"\n\n answer: int\n rationale: constr(max_length=12500)\n truncated: bool\n
"},{"location":"models/edx/#ralph.models.edx.peer_instruction.statements","title":"statements
","text":"Peer instruction events model definitions.
"},{"location":"models/edx/#ralph.models.edx.peer_instruction.statements.PeerInstructionAccessed","title":" PeerInstructionAccessed (BaseServerModel)
pydantic-model
","text":"Pydantic model for ubc.peer_instruction.accessed
statement.
The server emits this event when a peer instruction question and its set of answer choices is shown to a learner.
Attributes:
Name Type Descriptionevent_type
str
Consists of the value ubc.peer_instruction.accessed
.
name
str
Consists of the value ubc.peer_instruction.accessed
.
ralph/models/edx/peer_instruction/statements.py
class PeerInstructionAccessed(BaseServerModel):\n \"\"\"Pydantic model for `ubc.peer_instruction.accessed` statement.\n\n The server emits this event when a peer instruction question and its set of answer\n choices is shown to a learner.\n\n Attributes:\n event_type (str): Consists of the value `ubc.peer_instruction.accessed`.\n name (str): Consists of the value `ubc.peer_instruction.accessed`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"ubc.peer_instruction.accessed\"\n )\n\n event_type: Literal[\"ubc.peer_instruction.accessed\"]\n name: Literal[\"ubc.peer_instruction.accessed\"]\n
"},{"location":"models/edx/#ralph.models.edx.peer_instruction.statements.PeerInstructionOriginalSubmitted","title":" PeerInstructionOriginalSubmitted (BaseServerModel)
pydantic-model
","text":"Pydantic model for ubc.peer_instruction.original_submitted
statement.
The server emits this event when learners submit their initial responses. These events record the answer choice the learner selected and the explanation given for why that selection was made.
Attributes:
Name Type Descriptionevent
int
See PeerInstructionEventField.
event_type
str
Consists of the value ubc.peer_instruction.original_submitted
.
name
str
Consists of the value ubc.peer_instruction.original_submitted
.
ralph/models/edx/peer_instruction/statements.py
class PeerInstructionOriginalSubmitted(BaseServerModel):\n \"\"\"Pydantic model for `ubc.peer_instruction.original_submitted` statement.\n\n The server emits this event when learners submit their initial responses. These\n events record the answer choice the learner selected and the explanation given\n for why that selection was made.\n\n Attributes:\n event (int): See PeerInstructionEventField.\n event_type (str): Consists of the value\n `ubc.peer_instruction.original_submitted`.\n name (str): Consists of the value `ubc.peer_instruction.original_submitted`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"ubc.peer_instruction.original_submitted\"\n )\n\n event: Union[\n Json[PeerInstructionEventField], # pylint: disable=unsubscriptable-object\n PeerInstructionEventField,\n ]\n event_type: Literal[\"ubc.peer_instruction.original_submitted\"]\n name: Literal[\"ubc.peer_instruction.original_submitted\"]\n
"},{"location":"models/edx/#ralph.models.edx.peer_instruction.statements.PeerInstructionRevisedSubmitted","title":" PeerInstructionRevisedSubmitted (BaseServerModel)
pydantic-model
","text":"Pydantic model for ubc.peer_instruction.revised_submitted
statement.
The server emits this event when learners submit their revised responses. These events record the answer choice selected by the learner and the explanation for why that selection was made.
Attributes:
Name Type Descriptionevent
int
See PeerInstructionEventField.
event_type
str
Consists of the value ubc.peer_instruction.revised_submitted
.
name
str
Consists of the value ubc.peer_instruction.revised_submitted
.
ralph/models/edx/peer_instruction/statements.py
class PeerInstructionRevisedSubmitted(BaseServerModel):\n \"\"\"Pydantic model for `ubc.peer_instruction.revised_submitted` statement.\n\n The server emits this event when learners submit their revised responses. These\n events record the answer choice selected by the learner and the explanation for\n why that selection was made.\n\n Attributes:\n event (int): See PeerInstructionEventField.\n event_type (str): Consists of the value\n `ubc.peer_instruction.revised_submitted`.\n name (str): Consists of the value `ubc.peer_instruction.revised_submitted`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"ubc.peer_instruction.revised_submitted\"\n )\n\n event: Union[\n Json[PeerInstructionEventField], # pylint: disable=unsubscriptable-object\n PeerInstructionEventField,\n ]\n event_type: Literal[\"ubc.peer_instruction.revised_submitted\"]\n name: Literal[\"ubc.peer_instruction.revised_submitted\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction","title":"problem_interaction
special
","text":""},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events","title":"events
","text":"Problem interaction events model event fields definitions.
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.CorrectMap","title":" CorrectMap (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for problem interaction event
.correct_map
field.
Attributes:
Name Type Descriptionanswervariable
str
Consists of the variable chosen in answer in the case of optionresponse provided with variables.
correctness
str
Consists either of the correct
or incorrect
value.
hint
str
Consists of optional hint.
hint_mode
str
Consists either of the value on_request
or always
value.
msg
str
Consists of extra message response.
npoints
int
Consists of awarded points.
queuestate
json
see QueueStateField.
Source code inralph/models/edx/problem_interaction/fields/events.py
class CorrectMap(BaseModelWithConfig):\n \"\"\"Pydantic model for problem interaction `event`.`correct_map` field.\n\n Attributes:\n answervariable (str): Consists of the variable chosen in answer in the case of\n optionresponse provided with variables.\n correctness (str): Consists either of the `correct` or `incorrect` value.\n hint (str): Consists of optional hint.\n hint_mode (str): Consists either of the value `on_request` or `always` value.\n msg (str): Consists of extra message response.\n npoints (int): Consists of awarded points.\n queuestate (json): see QueueStateField.\n \"\"\"\n\n answervariable: Union[Literal[None], None, str]\n correctness: Union[Literal[\"correct\"], Literal[\"incorrect\"]]\n hint: Optional[str]\n hintmode: Optional[Union[Literal[\"on_request\"], Literal[\"always\"]]]\n msg: str\n npoints: Optional[int]\n queuestate: Optional[QueueState]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.EdxProblemHintDemandhintDisplayedEventField","title":" EdxProblemHintDemandhintDisplayedEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for edx.problem.hint.demandhint_displayed
.event
field.
Attributes:
Name Type Descriptionhint_index
int
Consists of the identifier for the hint that was displayed to the user.
hint_len
int
Consists of the total number of hints defined for this problem.
hint_text
str
Consists of the text of the hint that was displayed to the user.
module_id
str
Consists of the identifier for the problem component for which the user requested the hint.
Source code inralph/models/edx/problem_interaction/fields/events.py
class EdxProblemHintDemandhintDisplayedEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `edx.problem.hint.demandhint_displayed`.`event` field.\n\n Attributes:\n hint_index (int): Consists of the identifier for the hint that was displayed to\n the user.\n hint_len (int): Consists of the total number of hints defined for this problem.\n hint_text (str): Consists of the text of the hint that was displayed to the\n user.\n module_id (str): Consists of the identifier for the problem component for which\n the user requested the hint.\n \"\"\"\n\n hint_index: int\n hint_len: int\n hint_text: str\n module_id: str\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.EdxProblemHintFeedbackDisplayedEventField","title":" EdxProblemHintFeedbackDisplayedEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for edx.problem.hint.feedback_displayed
.event
field.
Attributes:
Name Type Descriptionchoice_all
list
Lists all the answer choices for problems with multiple possible answers defined.
correctness
bool
True
if the student_answer
value is correct, else False
.
hint_label
str
Consists of the feedback message given for the answer correctness.
hints
list
Consists of a text member field with the given feedback string.
module_id
str
Consists of the identifier for the problem component for which the user received the feedback.
problem_part_id
str
Consists of the specific problem for which the user received feedback.
question_type
str
Consists of the XML tag that identifies the problem type.
student_answer
list
Consists of the answer value(s) selected or supplied by the user.
trigger_type
str
Identifies the type of feedback obtained by the student_answer
response. Consists either of single
or compound
value.
ralph/models/edx/problem_interaction/fields/events.py
class EdxProblemHintFeedbackDisplayedEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `edx.problem.hint.feedback_displayed`.`event` field.\n\n Attributes:\n choice_all (list): Lists all the answer choices for problems with multiple\n possible answers defined.\n correctness (bool): `True` if the `student_answer` value is correct, else\n `False`.\n hint_label (str): Consists of the feedback message given for the answer\n correctness.\n hints (list): Consists of a text member field with the given feedback string.\n module_id (str): Consists of the identifier for the problem component for which\n the user received the feedback.\n problem_part_id (str): Consists of the specific problem for which the user\n received feedback.\n question_type (str): Consists of the XML tag that identifies the problem type.\n student_answer (list): Consists of the answer value(s) selected or supplied by\n the user.\n trigger_type (str): Identifies the type of feedback obtained by the\n `student_answer` response. Consists either of `single` or `compound` value.\n \"\"\"\n\n choice_all: Optional[List[str]]\n correctness: bool\n hint_label: str\n hints: List[dict]\n module_id: str\n problem_part_id: str\n question_type: Union[\n Literal[\"stringresponse\"],\n Literal[\"choiceresponse\"],\n Literal[\"multiplechoiceresponse\"],\n Literal[\"numericalresponse\"],\n Literal[\"optionresponse\"],\n ]\n student_answer: List[str]\n trigger_type: Union[Literal[\"single\"], Literal[\"compound\"]]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ProblemCheckEventField","title":" ProblemCheckEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_check
.event
field.
Attributes:
Name Type Descriptionanswers
dict
Consists of a dictionary of problem ID and the corresponding internal answer identifier for each problem.
attempts
int
Consists of the number of times the user attempted to answer the problem.
correct_map
dict
Consists of the evaluation data for each answer.
grade
int
Consists of the current grade value.
max_grade
int
Consists of the maximum possible grade value.
problem_id
str
Consists of the ID of the problem that was checked.
state
json
Consists of the current problem state.
submission
dict
Consists of a dictionary of data about the given answer.
success
str
Consists of either the correct
or incorrect
value.
ralph/models/edx/problem_interaction/fields/events.py
class ProblemCheckEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_check`.`event` field.\n\n Attributes:\n answers (dict): Consists of a dictionary of problem ID and the corresponding\n internal answer identifier for each problem.\n attempts (int): Consists of the number of times the user attempted to answer\n the problem.\n correct_map (dict): Consists of the evaluation data for each answer.\n grade (int): Consists of the current grade value.\n max_grade (int): Consists of the maximum possible grade value.\n problem_id (str): Consists of the ID of the problem that was checked.\n state (json): Consists of the current problem state.\n submission (dict): Consists of a dictionary of data about the given answer.\n success (str): Consists of either the `correct` or `incorrect` value.\n \"\"\"\n\n answers: Dict[\n constr(regex=r\"^[a-f0-9]{32}_[0-9]_[0-9]$\"), # noqa : F722\n Union[List[str], str],\n ]\n attempts: int\n correct_map: Dict[\n constr(regex=r\"^[a-f0-9]{32}_[0-9]_[0-9]$\"), # noqa : F722\n CorrectMap,\n ]\n grade: int\n max_grade: int\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n submission: Dict[\n constr(regex=r\"^[a-f0-9]{32}_[0-9]_[0-9]$\"), # noqa : F722\n SubmissionAnswerField,\n ]\n success: Union[Literal[\"correct\"], Literal[\"incorrect\"]]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ProblemCheckFailEventField","title":" ProblemCheckFailEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_check_fail
.event
field.
Attributes:
Name Type Descriptionanswers
dict
Consists of a dictionary of problem ID and the internal answer identifier for each problem.
failure
str
Consists either of the closed
or unreset
value.
problem_id
str
Consists of the ID of the problem that was checked.
state
dict
Consists of the current problem state.
Source code inralph/models/edx/problem_interaction/fields/events.py
class ProblemCheckFailEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_check_fail`.`event` field.\n\n Attributes:\n answers (dict): Consists of a dictionary of problem ID and the internal answer\n identifier for each problem.\n failure (str): Consists either of the `closed` or `unreset` value.\n problem_id (str): Consists of the ID of the problem that was checked.\n state (dict): Consists of the current problem state.\n \"\"\"\n\n answers: Dict[\n constr(regex=r\"^[a-f0-9]{32}_[0-9]_[0-9]$\"), # noqa : F722\n Union[List[str], str],\n ]\n failure: Union[Literal[\"closed\"], Literal[\"unreset\"]]\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ProblemRescoreEventField","title":" ProblemRescoreEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_rescore
.event
field.
Attributes:
Name Type Descriptionattempts
int
Consists of the number of attempts of rescoring.
correct_map
json
see CorrectMapSubFields.
new_score
int
Consists of the new score obtained after rescoring.
new_total
int
Consists of the new total summed after rescoring.
orig_score
int
Consists of the original scored before rescoring.
problem_id
str
Consists of the ID of the problem being rescored.
state
json
see StateField.
success
str
Consists either of the correct
or incorrect
value.
ralph/models/edx/problem_interaction/fields/events.py
class ProblemRescoreEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_rescore`.`event` field.\n\n Attributes:\n attempts (int): Consists of the number of attempts of rescoring.\n correct_map (json): see CorrectMapSubFields.\n new_score (int): Consists of the new score obtained after rescoring.\n new_total (int): Consists of the new total summed after rescoring.\n orig_score (int): Consists of the original scored before rescoring.\n problem_id (str): Consists of the ID of the problem being rescored.\n state (json): see StateField.\n success (str): Consists either of the `correct` or `incorrect` value.\n \"\"\"\n\n attempts: int\n correct_map: CorrectMap\n new_score: int\n new_total: int\n orig_score: int\n orig_total: int\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n success: Union[Literal[\"correct\"], Literal[\"incorrect\"]]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ProblemRescoreFailEventField","title":" ProblemRescoreFailEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_rescore_fail
.event
field.
Attributes:
Name Type Descriptionfailure
str
Consists either of the closed
or unreset
value.
problem_id
str
Consists of the ID of the problem being checked.
state
json
see StateField.
Source code inralph/models/edx/problem_interaction/fields/events.py
class ProblemRescoreFailEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_rescore_fail`.`event` field.\n\n Attributes:\n failure (str): Consists either of the `closed` or `unreset` value.\n problem_id (str): Consists of the ID of the problem being checked.\n state (json): see StateField.\n \"\"\"\n\n failure: Union[Literal[\"closed\"], Literal[\"unreset\"]]\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.QueueState","title":" QueueState (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for problem interaction event
.correct_map
.queuestate
field.
Attributes:
Name Type Descriptionkey
str
Consists of a secret string.
time
str
Consists of a string dump of a DateTime object in the format \u2018%Y%m%d%H%M%S\u2019.
Source code inralph/models/edx/problem_interaction/fields/events.py
class QueueState(BaseModelWithConfig):\n \"\"\"Pydantic model for problem interaction `event`.`correct_map`.`queuestate` field.\n\n Attributes:\n key (str): Consists of a secret string.\n time (str): Consists of a string dump of a DateTime object in the format\n '%Y%m%d%H%M%S'.\n \"\"\"\n\n key: str\n time: datetime\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ResetProblemEventField","title":" ResetProblemEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for reset_problem
.event
field.
Attributes:
Name Type Descriptionnew_state
json
see StateField.
old_state
json
see StateField.
problem_id
str
Consists of the ID of the problem being reset.
Source code inralph/models/edx/problem_interaction/fields/events.py
class ResetProblemEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `reset_problem`.`event` field.\n\n Attributes:\n new_state (json): see StateField.\n old_state (json): see StateField.\n problem_id (str): Consists of the ID of the problem being reset.\n \"\"\"\n\n new_state: State\n old_state: State\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ResetProblemFailEventField","title":" ResetProblemFailEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for reset_problem_fail
.event
field.
Attributes:
Name Type Descriptionfailure
str
Consists either of closed
or not_done
value.
old_state
json
see StateField.
problem_id
str
Consists of the ID of the problem being reset.
Source code inralph/models/edx/problem_interaction/fields/events.py
class ResetProblemFailEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `reset_problem_fail`.`event` field.\n\n Attributes:\n failure (str): Consists either of `closed` or `not_done` value.\n old_state (json): see StateField.\n problem_id (str): Consists of the ID of the problem being reset.\n \"\"\"\n\n failure: Union[Literal[\"closed\"], Literal[\"not_done\"]]\n old_state: State\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.SaveProblemFailEventField","title":" SaveProblemFailEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for save_problem_fail
.event
field.
Attributes:
Name Type Descriptionanswers
dict
Consists of a dict of the answer string or a list or a dict of the answer strings if multiple choices are allowed.
failure
str
Consists either of closed
or done
value.
problem_id
str
Consists of the ID of the problem being saved.
state
json
see StateField.
Source code inralph/models/edx/problem_interaction/fields/events.py
class SaveProblemFailEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `save_problem_fail`.`event` field.\n\n Attributes:\n answers (dict): Consists of a dict of the answer string or a list or a dict of\n the answer strings if multiple choices are allowed.\n failure (str): Consists either of `closed` or `done` value.\n problem_id (str): Consists of the ID of the problem being saved.\n state (json): see StateField.\n \"\"\"\n\n answers: Dict[str, Union[int, str, list, dict]]\n failure: Union[Literal[\"closed\"], Literal[\"done\"]]\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.SaveProblemSuccessEventField","title":" SaveProblemSuccessEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for save_problem_success
.event
field.
Attributes:
Name Type Descriptionanswers
dict
Consists of a dict of the answer string or a list or a dict of the answer strings if multiple choices are allowed.
problem_id
str
Consists of the ID of the problem being saved.
state
json
see StateField.
Source code inralph/models/edx/problem_interaction/fields/events.py
class SaveProblemSuccessEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `save_problem_success`.`event` field.\n\n Attributes:\n answers (dict): Consists of a dict of the answer string or a list or a dict of\n the answer strings if multiple choices are allowed.\n problem_id (str): Consists of the ID of the problem being saved.\n state (json): see StateField.\n \"\"\"\n\n answers: Dict[str, Union[int, str, list, dict]]\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ShowAnswerEventField","title":" ShowAnswerEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for show_answer
.event
field.
Attributes:
Name Type Descriptionproblem_id
str
Consists of the ID of the problem being shown.
Source code inralph/models/edx/problem_interaction/fields/events.py
class ShowAnswerEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `show_answer`.`event` field.\n\n Attributes:\n problem_id (str): Consists of the ID of the problem being shown.\n \"\"\"\n\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.State","title":" State (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for problem interaction event
.state
field.
Attributes:
Name Type Descriptioncorrect_map
dict
see CorrectMapSubFields.
done
bool
True
if the problem is answered, else False
.
input_state
dict
Consists of the state field given before answering.
seed
int
Consists of the seed element for the current state.
student_answers
dict
Consists of the answer(s) given by the user.
Source code inralph/models/edx/problem_interaction/fields/events.py
class State(BaseModelWithConfig):\n \"\"\"Pydantic model for problem interaction `event`.`state` field.\n\n Attributes:\n correct_map (dict): see CorrectMapSubFields.\n done (bool): `True` if the problem is answered, else `False`.\n input_state (dict): Consists of the state field given before answering.\n seed (int): Consists of the seed element for the current state.\n student_answers (dict): Consists of the answer(s) given by the user.\n \"\"\"\n\n correct_map: Dict[\n constr(regex=r\"^[a-f0-9]{32}_[0-9]_[0-9]$\"), # noqa : F722\n CorrectMap,\n ]\n done: Optional[bool]\n input_state: dict\n seed: int\n student_answers: dict\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.SubmissionAnswerField","title":" SubmissionAnswerField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for problem_check
.event
.submission
field.
Attributes:
Name Type Descriptionanswer
str, list
Consists of the answer string or a list of the answer strings if multiple choices are allowed.
correct
bool
True
if the answer
value is correct, else False
.
input_type
str
Consists of the type of value that the student supplies for the response_type
.
question
str
Consists of the question text.
response_type
str
Consists of the type of problem.
variant
str
Consists of the unique ID of the variant that was presented to this user.
Source code inralph/models/edx/problem_interaction/fields/events.py
class SubmissionAnswerField(BaseModelWithConfig):\n \"\"\"Pydantic model for `problem_check`.`event`.`submission` field.\n\n Attributes:\n answer (str, list): Consists of the answer string or a list of the answer\n strings if multiple choices are allowed.\n correct (bool): `True` if the `answer` value is correct, else `False`.\n input_type (str): Consists of the type of value that the student supplies for\n the `response_type`.\n question (str): Consists of the question text.\n response_type (str): Consists of the type of problem.\n variant (str): Consists of the unique ID of the variant that was presented to\n this user.\n \"\"\"\n\n answer: Union[str, List[str]]\n correct: bool\n input_type: str\n question: str\n response_type: str\n variant: str\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.UIProblemResetEventField","title":" UIProblemResetEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_reset
.event
field.
Attributes:
Name Type Descriptionanswers
str, list
Consists of the answer string or a list of the answer strings if multiple choices are allowed.
Source code inralph/models/edx/problem_interaction/fields/events.py
class UIProblemResetEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_reset`.`event` field.\n\n Attributes:\n answers (str, list): Consists of the answer string or a list of the answer\n strings if multiple choices are allowed.\n \"\"\"\n\n answers: Union[str, List[str]]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.UIProblemShowEventField","title":" UIProblemShowEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_show
.event
field.
Attributes:
Name Type Descriptionproblem
str
Consists of the optional name value that the course creators supply or the system-generated hash code for the problem being shown.
Source code inralph/models/edx/problem_interaction/fields/events.py
class UIProblemShowEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_show`.`event` field.\n\n Attributes:\n problem (str): Consists of the optional name value that the course creators\n supply or the system-generated hash code for the problem being shown.\n \"\"\"\n\n problem: str\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements","title":"statements
","text":"Problem interaction events model definitions.
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.EdxProblemHintDemandhintDisplayed","title":" EdxProblemHintDemandhintDisplayed (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.problem.hint.demandhint_displayed
statement.
The server emits this statement when a user requests a hint for a problem.
Attributes:
Name Type Descriptionevent
dict
See EdxProblemHintDemandhintDisplayedEventField.
event_type
str
Consists of the value edx.problem.hint.demandhint_displayed
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class EdxProblemHintDemandhintDisplayed(BaseServerModel):\n \"\"\"Pydantic model for `edx.problem.hint.demandhint_displayed` statement.\n\n The server emits this statement when a user requests a hint for a problem.\n\n Attributes:\n event (dict): See EdxProblemHintDemandhintDisplayedEventField.\n event_type (str): Consists of the value `edx.problem.hint.demandhint_displayed`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.problem.hint.demandhint_displayed\"\n )\n\n event: EdxProblemHintDemandhintDisplayedEventField\n event_type: Literal[\"edx.problem.hint.demandhint_displayed\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.EdxProblemHintFeedbackDisplayed","title":" EdxProblemHintFeedbackDisplayed (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.problem.hint.feedback_displayed
statement.
The server emits this event when a user receives a hint after answering a problem.
Attributes:
Name Type Descriptionevent
dict
See EdxProblemHintFeedbackDisplayedEventField.
event_type
str
Consists of the value edx.problem.hint.feedback_displayed
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class EdxProblemHintFeedbackDisplayed(BaseServerModel):\n \"\"\"Pydantic model for `edx.problem.hint.feedback_displayed` statement.\n\n The server emits this event when a user receives a hint after answering a problem.\n\n Attributes:\n event (dict): See EdxProblemHintFeedbackDisplayedEventField.\n event_type (str): Consists of the value `edx.problem.hint.feedback_displayed`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.problem.hint.feedback_displayed\"\n )\n\n event: EdxProblemHintFeedbackDisplayedEventField\n event_type: Literal[\"edx.problem.hint.feedback_displayed\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ProblemCheck","title":" ProblemCheck (BaseServerModel)
pydantic-model
","text":"Pydantic model for problem_check
statement.
The server emits this event when a user checks a problem.
Attributes:
Name Type Descriptionevent
dict
See ProblemCheckEventField.
event_type
str
Consists of the value problem_check
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ProblemCheck(BaseServerModel):\n \"\"\"Pydantic model for `problem_check` statement.\n\n The server emits this event when a user checks a problem.\n\n Attributes:\n event (dict): See ProblemCheckEventField.\n event_type (str): Consists of the value `problem_check`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"problem_check\")\n\n event: ProblemCheckEventField\n event_type: Literal[\"problem_check\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ProblemCheckFail","title":" ProblemCheckFail (BaseServerModel)
pydantic-model
","text":"Pydantic model for problem_check_fail
statement.
The server emits this event when a user checks a problem and a failure prevents the problem from being checked successfully.
Attributes:
Name Type Descriptionevent
dict
See ProblemCheckFailEventField.
event_type
str
Consists of the value problem_check_fail
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ProblemCheckFail(BaseServerModel):\n \"\"\"Pydantic model for `problem_check_fail` statement.\n\n The server emits this event when a user checks a problem and a failure prevents the\n problem from being checked successfully.\n\n Attributes:\n event (dict): See ProblemCheckFailEventField.\n event_type (str): Consists of the value `problem_check_fail`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"problem_check_fail\")\n\n event: ProblemCheckFailEventField\n event_type: Literal[\"problem_check_fail\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ProblemRescore","title":" ProblemRescore (BaseServerModel)
pydantic-model
","text":"Pydantic model for problem_rescore
statement.
The server emits this statement when a problem is successfully rescored.
Attributes:
Name Type Descriptionevent
dict
See ProblemRescoreEventField.
event_type
str
Consists of the value problem_rescore
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ProblemRescore(BaseServerModel):\n \"\"\"Pydantic model for `problem_rescore` statement.\n\n The server emits this statement when a problem is successfully rescored.\n\n Attributes:\n event (dict): See ProblemRescoreEventField.\n event_type (str): Consists of the value `problem_rescore`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"problem_rescore\")\n\n event: ProblemRescoreEventField\n event_type: Literal[\"problem_rescore\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ProblemRescoreFail","title":" ProblemRescoreFail (BaseServerModel)
pydantic-model
","text":"Pydantic model for problem_rescore_fail
statement.
The server emits this statement when a problem cannot be successfully rescored.
Attributes:
Name Type Descriptionevent
dict
See ProblemRescoreFailEventField.
event_type
str
Consists of the value problem_rescore_fail
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ProblemRescoreFail(BaseServerModel):\n \"\"\"Pydantic model for `problem_rescore_fail` statement.\n\n The server emits this statement when a problem cannot be successfully rescored.\n\n Attributes:\n event (dict): See ProblemRescoreFailEventField.\n event_type (str): Consists of the value `problem_rescore_fail`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"problem_rescore_fail\")\n\n event: ProblemRescoreFailEventField\n event_type: Literal[\"problem_rescore_fail\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ResetProblem","title":" ResetProblem (BaseServerModel)
pydantic-model
","text":"Pydantic model for reset_problem
statement.
The server emits this statement when a problem has been reset successfully.
Attributes:
Name Type Descriptionevent
dict
See ResetProblemEventField.
event_type
str
Consists of the value reset_problem
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ResetProblem(BaseServerModel):\n \"\"\"Pydantic model for `reset_problem` statement.\n\n The server emits this statement when a problem has been reset successfully.\n\n Attributes:\n event (dict): See ResetProblemEventField.\n event_type (str): Consists of the value `reset_problem`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"reset_problem\")\n\n event: ResetProblemEventField\n event_type: Literal[\"reset_problem\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ResetProblemFail","title":" ResetProblemFail (BaseServerModel)
pydantic-model
","text":"Pydantic model for reset_problem_fail
statement.
The server emits this statement when a problem cannot be reset successfully.
Attributes:
Name Type Descriptionevent
dict
See ResetProblemFailEventField.
event_type
str
Consists of the value reset_problem_fail
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ResetProblemFail(BaseServerModel):\n \"\"\"Pydantic model for `reset_problem_fail` statement.\n\n The server emits this statement when a problem cannot be reset successfully.\n\n Attributes:\n event (dict): See ResetProblemFailEventField.\n event_type (str): Consists of the value `reset_problem_fail`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"reset_problem_fail\")\n\n event: ResetProblemFailEventField\n event_type: Literal[\"reset_problem_fail\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.SaveProblemFail","title":" SaveProblemFail (BaseServerModel)
pydantic-model
","text":"Pydantic model for save_problem_fail
statement.
The server emits this statement when a problem cannot be saved successfully.
Attributes:
Name Type Descriptionevent
dict
See SaveProblemFailEventField.
event_type
str
Consists of the value save_problem_fail
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class SaveProblemFail(BaseServerModel):\n \"\"\"Pydantic model for `save_problem_fail` statement.\n\n The server emits this statement when a problem cannot be saved successfully.\n\n Attributes:\n event (dict): See SaveProblemFailEventField.\n event_type (str): Consists of the value `save_problem_fail`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"save_problem_fail\")\n\n event: SaveProblemFailEventField\n event_type: Literal[\"save_problem_fail\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.SaveProblemSuccess","title":" SaveProblemSuccess (BaseServerModel)
pydantic-model
","text":"Pydantic model for save_problem_success
statement.
The server emits this statement when a problem is saved successfully.
Attributes:
Name Type Descriptionevent
dict
See SaveProblemSuccessEventField.
event_type
str
Consists of the value save_problem_success
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class SaveProblemSuccess(BaseServerModel):\n \"\"\"Pydantic model for `save_problem_success` statement.\n\n The server emits this statement when a problem is saved successfully.\n\n Attributes:\n event (dict): See SaveProblemSuccessEventField.\n event_type (str): Consists of the value `save_problem_success`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"save_problem_success\")\n\n event: SaveProblemSuccessEventField\n event_type: Literal[\"save_problem_success\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ShowAnswer","title":" ShowAnswer (BaseServerModel)
pydantic-model
","text":"Pydantic model for showanswer
statement.
The server emits this statement when the answer to a problem is shown.
Attributes:
Name Type Descriptionevent
dict
See ShowAnswerEventField.
event_type
str
Consists of the value showanswer
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ShowAnswer(BaseServerModel):\n \"\"\"Pydantic model for `showanswer` statement.\n\n The server emits this statement when the answer to a problem is shown.\n\n Attributes:\n event (dict): See ShowAnswerEventField.\n event_type (str): Consists of the value `showanswer`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"showanswer\")\n\n event: ShowAnswerEventField\n event_type: Literal[\"showanswer\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.UIProblemCheck","title":" UIProblemCheck (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for problem_check
statement.
The browser emits this event when a user checks a problem.
Attributes:
Name Type Descriptionevent
str
Consists of values of problem being checked, styled as GET
parameters.
event_type
str
Consists of the value problem_check
.
name
str
Consists of the value problem_check
.
ralph/models/edx/problem_interaction/statements.py
class UIProblemCheck(BaseBrowserModel):\n \"\"\"Pydantic model for `problem_check` statement.\n\n The browser emits this event when a user checks a problem.\n\n Attributes:\n event (str): Consists of values of problem being checked, styled as `GET`\n parameters.\n event_type (str): Consists of the value `problem_check`.\n name (str): Consists of the value `problem_check`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"problem_check\")\n\n event: str\n event_type: Literal[\"problem_check\"]\n name: Literal[\"problem_check\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.UIProblemGraded","title":" UIProblemGraded (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for problem_graded
statement.
The server emits this statement each time a user clicks Check for a problem and it is graded successfully.
Attributes:
Name Type Descriptionevent
list
See ProblemGradedEventField.
event_type
str
Consists of the value problem_graded
.
name
str
Consists of the value problem_graded
.
ralph/models/edx/problem_interaction/statements.py
class UIProblemGraded(BaseBrowserModel):\n \"\"\"Pydantic model for `problem_graded` statement.\n\n The server emits this statement each time a user clicks <kbd>Check</kbd> for a\n problem and it is graded successfully.\n\n Attributes:\n event (list): See ProblemGradedEventField.\n event_type (str): Consists of the value `problem_graded`.\n name (str): Consists of the value `problem_graded`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"problem_graded\")\n\n event: List[Union[str, Literal[None], None]]\n event_type: Literal[\"problem_graded\"]\n name: Literal[\"problem_graded\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.UIProblemReset","title":" UIProblemReset (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for problem_reset
statement.
The browser emits problem_reset events when a user clicks Reset to reset the problem answer.
Attributes:
Name Type Descriptionevent
json
See ProblemResetEventField.
event_type
str
Consists of the value problem_reset
.
name
str
Consists of the value problem_reset
.
ralph/models/edx/problem_interaction/statements.py
class UIProblemReset(BaseBrowserModel):\n \"\"\"Pydantic model for `problem_reset` statement.\n\n The browser emits problem_reset events when a user clicks <kbd>Reset</kbd> to reset\n the problem answer.\n\n Attributes:\n event (json): See ProblemResetEventField.\n event_type (str): Consists of the value `problem_reset`.\n name (str): Consists of the value `problem_reset`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"problem_reset\")\n\n event: Union[\n str,\n Json[UIProblemResetEventField], # pylint: disable=unsubscriptable-object\n UIProblemResetEventField,\n ]\n event_type: Literal[\"problem_reset\"]\n name: Literal[\"problem_reset\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.UIProblemSave","title":" UIProblemSave (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for problem_save
statement.
The browser emits this statement when a user saves a problem.
Attributes:
Name Type Descriptionevent
str
Consists of all the answers saved for the problem.
event_type
str
Consists of the value problem_save
.
name
str
Consists of the value problem_save
.
ralph/models/edx/problem_interaction/statements.py
class UIProblemSave(BaseBrowserModel):\n \"\"\"Pydantic model for `problem_save` statement.\n\n The browser emits this statement when a user saves a problem.\n\n Attributes:\n event (str): Consists of all the answers saved for the problem.\n event_type (str): Consists of the value `problem_save`.\n name (str): Consists of the value `problem_save`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"problem_save\")\n\n event: str\n event_type: Literal[\"problem_save\"]\n name: Literal[\"problem_save\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.UIProblemShow","title":" UIProblemShow (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for problem_show
statement.
The browser emits this statement when the answer clicks Show Answer to show the problem answer.
Attributes:
Name Type Descriptionevent
json
See ProblemShowEventField.
event_type
str
Consists of the value problem_save
.
name
str
Consists of the value problem_save
.
ralph/models/edx/problem_interaction/statements.py
class UIProblemShow(BaseBrowserModel):\n \"\"\"Pydantic model for `problem_show` statement.\n\n The browser emits this statement when the answer clicks <kbd>Show Answer</kbd> to\n show the problem answer.\n\n Attributes:\n event (json): See ProblemShowEventField.\n event_type (str): Consists of the value `problem_save`.\n name (str): Consists of the value `problem_save`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"problem_show\")\n\n event: Union[\n Json[UIProblemShowEventField], # pylint: disable=unsubscriptable-object\n UIProblemShowEventField,\n ]\n event_type: Literal[\"problem_show\"]\n name: Literal[\"problem_show\"]\n
"},{"location":"models/edx/#ralph.models.edx.server","title":"server
","text":"Server event model definitions.
"},{"location":"models/edx/#ralph.models.edx.server.BaseServerModel","title":" BaseServerModel (BaseEdxModel)
pydantic-model
","text":"Pydantic model for core server statement.
Source code inralph/models/edx/server.py
class BaseServerModel(BaseEdxModel):\n \"\"\"Pydantic model for core server statement.\"\"\"\n\n event_source: Literal[\"server\"]\n
"},{"location":"models/edx/#ralph.models.edx.server.Server","title":" Server (BaseServerModel)
pydantic-model
","text":"Pydantic model for common server statement.
This type of event is triggered from the django middleware on each request excluding: /event
, login
, heartbeat
, /segmentio/event
and /performance
.
Attributes:
Name Type Descriptionevent_type
str
Consist of the relative URL (without the hostname) of the requested page. Retrieved with: request.META['PATH_INFO']
event
str
Consist of a JSON string holding the content of the GET or POST request. Retrieved with: json.dumps( { 'GET': dict(request.GET), 'POST': dict(request.POST) } )[:512]
Note: Values for [\u2018password\u2019, \u2018newpassword\u2019, \u2018new_password\u2019, \u2018oldpassword\u2019, \u2018old_password\u2019, \u2018new_password1\u2019, \u2018new_password2\u2019] are replaced by ********
. The JSON string is truncated at 512 characters resulting in invalid JSON.
ralph/models/edx/server.py
class Server(BaseServerModel):\n \"\"\"Pydantic model for common server statement.\n\n This type of event is triggered from the django middleware on each request\n excluding: `/event`, `login`, `heartbeat`, `/segmentio/event` and `/performance`.\n\n Attributes:\n event_type (str): Consist of the relative URL (without the hostname) of the\n requested page.\n Retrieved with:\n `request.META['PATH_INFO']`\n event (str): Consist of a JSON string holding the content of the GET or POST\n request.\n Retrieved with:\n ```json.dumps(\n {\n 'GET': dict(request.GET),\n 'POST': dict(request.POST)\n }\n )[:512]```\n Note:\n Values for ['password', 'newpassword', 'new_password', 'oldpassword',\n 'old_password', 'new_password1', 'new_password2'] are replaced by\n `********`.\n The JSON string is truncated at 512 characters resulting in invalid\n JSON.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=LazyModelField(\"context__path\")\n )\n\n # pylint: disable=unsubscriptable-object\n event_type: Path\n event: Union[Json[ServerEventField], ServerEventField]\n
"},{"location":"models/edx/#ralph.models.edx.server.ServerEventField","title":" ServerEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for common server event
field.
ralph/models/edx/server.py
class ServerEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for common server `event` field.\"\"\"\n\n GET: dict\n POST: dict\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction","title":"textbook_interaction
special
","text":""},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events","title":"events
","text":"Textbook interaction event fields definitions.
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.BookEventField","title":" BookEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for book
.event
field.
Attributes:
Name Type Descriptionchapter
str
Consists of the name of the PDF file.
name
str
Consists of textbook.pdf.page.loaded
if type is set to gotopage
, textbook.pdf.page.navigatednext
if type is set to prevpage
, textbook.pdf.page.navigatednext
if type is set to nextpage
.
new
int
Consists of the destination page number.
old
int
Consists of the original page number. It applies to gotopage
event types only.
type
str
Consists of gotopage
value when a page loads after the student manually enters its number, prevpage
value when the next page button is clicked or nextpage
value when the previous page button is clicked.
ralph/models/edx/textbook_interaction/fields/events.py
class BookEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `book`.`event` field.\n\n Attributes:\n chapter (str): Consists of the name of the PDF file.\n name (str): Consists of `textbook.pdf.page.loaded` if type is set to\n `gotopage`,\n `textbook.pdf.page.navigatednext` if type is set to `prevpage`,\n `textbook.pdf.page.navigatednext` if type is set to `nextpage`.\n new (int): Consists of the destination page number.\n old (int): Consists of the original page number. It applies to `gotopage` event\n types only.\n type (str): Consists of `gotopage` value when a page loads after the student\n manually enters its number, `prevpage` value when the next page button is\n clicked or `nextpage` value when the previous page button is clicked.\n \"\"\"\n\n chapter: constr(\n regex=(\n r\"^\\/asset-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+type@asset\\+block.+$\" # noqa\n )\n )\n name: Union[\n Literal[\"textbook.pdf.page.loaded\"], Literal[\"textbook.pdf.page.navigatednext\"]\n ]\n new: int\n old: Optional[int]\n type: Union[Literal[\"gotopage\"], Literal[\"prevpage\"], Literal[\"nextpage\"]] = Field(\n alias=\"type\"\n )\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookInteractionBaseEventField","title":" TextbookInteractionBaseEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for textbook interaction core event
field.
Attributes:
Name Type Descriptionchapter
str
Consists of the name of the PDF file. It begins with the block_id
value and ends with the .pdf
extension.
page
int
The number of the page that is open when the event is emitted.
Source code inralph/models/edx/textbook_interaction/fields/events.py
class TextbookInteractionBaseEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for textbook interaction core `event` field.\n\n Attributes:\n chapter (str): Consists of the name of the PDF file.\n It begins with the `block_id` value and ends with the `.pdf` extension.\n page (int): The number of the page that is open when the event is emitted.\n \"\"\"\n\n page: int\n chapter: constr(\n regex=(\n r\"^\\/asset-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+type@asset\\+block.+$\" # noqa\n )\n )\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfChapterNavigatedEventField","title":" TextbookPdfChapterNavigatedEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.chapter.navigated
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.chapter.navigated
.
chapter
str
Consists of the name of the PDF file. It begins with the block_id
value and ends with the .pdf
extension.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfChapterNavigatedEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.chapter.navigated`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.chapter.navigated`.\n chapter (str): Consists of the name of the PDF file.\n It begins with the `block_id` value and ends with the `.pdf` extension.\n \"\"\"\n\n name: Literal[\"textbook.pdf.chapter.navigated\"]\n chapter: constr(\n regex=(\n r\"^\\/asset-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+type@asset\\+block.+$\" # noqa\n )\n )\n chapter_title: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfDisplayScaledEventField","title":" TextbookPdfDisplayScaledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.display.scaled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.display.scaled
.
amount
str
Consists of a floating point number string value.
Source code inralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfDisplayScaledEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.display.scaled`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.display.scaled`.\n amount (str): Consists of a floating point number string value.\n \"\"\"\n\n name: Literal[\"textbook.pdf.display.scaled\"]\n amount: float\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfOutlineToggledEventField","title":" TextbookPdfOutlineToggledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.outline.toggled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.outline.toggled
.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfOutlineToggledEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.outline.toggled`.`event` field.\n\n Attribute:\n name (str): Consists of the value `textbook.pdf.outline.toggled`.\n \"\"\"\n\n name: Literal[\"textbook.pdf.outline.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfPageNavigatedEventField","title":" TextbookPdfPageNavigatedEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.page.navigated
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.page.navigated
.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfPageNavigatedEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.page.navigated`.`event` field.\n\n Attribute:\n name (str): Consists of the value `textbook.pdf.page.navigated`.\n \"\"\"\n\n name: Literal[\"textbook.pdf.page.navigated\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfPageScrolledEventField","title":" TextbookPdfPageScrolledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.page.scrolled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.page.scrolled
.
direction
str
Consists either of the up
or down
value.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfPageScrolledEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.page.scrolled`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.page.scrolled`.\n direction (str): Consists either of the `up` or `down` value.\n \"\"\"\n\n name: Literal[\"textbook.pdf.page.scrolled\"]\n direction: Union[Literal[\"up\"], Literal[\"down\"]]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfSearchCaseSensitivityToggledEventField","title":" TextbookPdfSearchCaseSensitivityToggledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.searchcasesensitivity.toggled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.searchcasesensitivity.toggled
.
caseSensitive
bool
Consists either of the true
value if the case sensitive option is selected or false
if this option is not selected.
highlightAll
bool
Consists either of the true
value if the option to highlight all matches is selected or false
if this option is not selected.
query
str
Consists of the value in the search field.
status
str
Consists either of the value not found
for a search string that is unsuccessful or blank for successful search strings.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfSearchCaseSensitivityToggledEventField(\n TextbookInteractionBaseEventField\n):\n \"\"\"Pydantic model for `textbook.pdf.searchcasesensitivity.toggled`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.searchcasesensitivity.toggled`.\n caseSensitive (bool): Consists either of the `true` value if the case sensitive\n option is selected or `false` if this option is not selected.\n highlightAll (bool): Consists either of the `true` value if the option to\n highlight all matches is selected or `false` if this option is not selected.\n query (str): Consists of the value in the search field.\n status (str): Consists either of the value `not found` for a search string that\n is unsuccessful or blank for successful search strings.\n \"\"\"\n\n name: Literal[\"textbook.pdf.searchcasesensitivity.toggled\"]\n caseSensitive: bool\n highlightAll: bool\n query: str\n status: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfSearchExecutedEventField","title":" TextbookPdfSearchExecutedEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.executed
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.search.executed
.
caseSensitive
bool
Consists either of the true
value if the case-sensitive option is selected or false
if this option is not selected.
highlightAll
bool
Consists either of the true
value if the option to highlight all matches is selected or false
if this option is not selected.
query
str
Consists of the value in the search field.
status
str
Consists either of the value not found
for a search string that is unsuccessful or blank for successful search strings.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfSearchExecutedEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.search.executed`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.search.executed`.\n caseSensitive (bool): Consists either of the `true` value if the case-sensitive\n option is selected or `false` if this option is not selected.\n highlightAll (bool): Consists either of the `true` value if the option to\n highlight all matches is selected or `false` if this option is not selected.\n query (str): Consists of the value in the search field.\n status (str): Consists either of the value `not found` for a search string that\n is unsuccessful or blank for successful search strings.\n \"\"\"\n\n name: Literal[\"textbook.pdf.search.executed\"]\n caseSensitive: bool\n highlightAll: bool\n query: str\n status: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfSearchHighlightToggledEventField","title":" TextbookPdfSearchHighlightToggledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.highlight.toggled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.search.highlight.toggled
.
caseSensitive
bool
Consists either of the true
value if the case sensitive option is selected or false
if this option is not selected.
highlightAll
bool
Consists either of the true
value if the option to highlight all matches is selected or false
if this option is not selected.
query
str
Consists of the value in the search field.
status
str
Consists either of the value not found
for a search string that is unsuccessful or blank for successful search strings.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfSearchHighlightToggledEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.search.highlight.toggled`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.search.highlight.toggled`.\n caseSensitive (bool): Consists either of the `true` value if the case sensitive\n option is selected or `false` if this option is not selected.\n highlightAll (bool): Consists either of the `true` value if the option to\n highlight all matches is selected or `false` if this option is not selected.\n query (str): Consists of the value in the search field.\n status (str): Consists either of the value `not found` for a search string that\n is unsuccessful or blank for successful search strings.\n \"\"\"\n\n name: Literal[\"textbook.pdf.search.highlight.toggled\"]\n caseSensitive: bool\n highlightAll: bool\n query: str\n status: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfSearchNavigatedNextEventField","title":" TextbookPdfSearchNavigatedNextEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.navigatednext
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.search.navigatednext
.
caseSensitive
bool
Consists either of the true
value if the case-sensitive option is selected or false
if this option is not selected.
findPrevious(bool)
Consists either of the \u2018true\u2019 value if the user clicks the Find Previous icon or \u2018false\u2019 if the user clicks the Find Next icon.
highlightAll
bool
Consists either of the true
value if the option to highlight all matches is selected or false
if this option is not selected.
query
str
Consists of the value in the search field.
status
str
Consists either of the value not found
for a search string that is unsuccessful or blank for successful search strings.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfSearchNavigatedNextEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.search.navigatednext`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.search.navigatednext`.\n caseSensitive (bool): Consists either of the `true` value if the case-sensitive\n option is selected or `false` if this option is not selected.\n findPrevious(bool): Consists either of the \u2018true\u2019 value if the user clicks the\n Find Previous icon or \u2018false\u2019 if the user clicks the <kbd>Find Next</kbd>\n icon.\n highlightAll (bool): Consists either of the `true` value if the option to\n highlight all matches is selected or `false` if this option is not selected.\n query (str): Consists of the value in the search field.\n status (str): Consists either of the value `not found` for a search string that\n is unsuccessful or blank for successful search strings.\n \"\"\"\n\n name: Literal[\"textbook.pdf.search.navigatednext\"]\n caseSensitive: bool\n findPrevious: bool\n highlightAll: bool\n query: str\n status: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfThumbnailNavigatedEventField","title":" TextbookPdfThumbnailNavigatedEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.thumbnail.navigated
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.thumbnail.navigated
.
thumbnail_title
str
Consists of the name of the thumbnail.
Source code inralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfThumbnailNavigatedEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.thumbnail.navigated`.`event` field.\n\n Attribute:\n name (str): Consists of the value `textbook.pdf.thumbnail.navigated`.\n thumbnail_title (str): Consists of the name of the thumbnail.\n \"\"\"\n\n name: Literal[\"textbook.pdf.thumbnail.navigated\"]\n thumbnail_title: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfThumbnailsToggledEventField","title":" TextbookPdfThumbnailsToggledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.thumbnails.toggled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.thumbnails.toggled
.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfThumbnailsToggledEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.thumbnails.toggled`.`event` field.\n\n Attribute:\n name (str): Consists of the value `textbook.pdf.thumbnails.toggled`.\n \"\"\"\n\n name: Literal[\"textbook.pdf.thumbnails.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfZoomButtonsChangedEventField","title":" TextbookPdfZoomButtonsChangedEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.zoom.buttons.changed
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.zoom.buttons.changed
.
direction
str
Consists of either the in
or out
value.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfZoomButtonsChangedEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.zoom.buttons.changed`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.zoom.buttons.changed`.\n direction (str): Consists of either the `in` or `out` value.\n \"\"\"\n\n name: Literal[\"textbook.pdf.zoom.buttons.changed\"]\n direction: Union[Literal[\"in\"], Literal[\"out\"]]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfZoomMenuChangedEventField","title":" TextbookPdfZoomMenuChangedEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.zoom.menu.changed
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.zoom.menu.changed
.
amount
str
Consists either of the 0.5
, 0.75
, 1
, 1.25
, 1.5
, 2
, 3
, 4
, auto
, custom
, page-actual
, page-fit
, page-width
value.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfZoomMenuChangedEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.zoom.menu.changed`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.zoom.menu.changed`.\n amount (str): Consists either of the `0.5`, `0.75`, `1`, `1.25`, `1.5`, `2`,\n `3`, `4`, `auto`, `custom`, `page-actual`, `page-fit`, `page-width` value.\n \"\"\"\n\n name: Literal[\"textbook.pdf.zoom.menu.changed\"]\n amount: Union[\n Literal[\"0.5\"],\n Literal[\"0.75\"],\n Literal[\"1\"],\n Literal[\"1.25\"],\n Literal[\"1.5\"],\n Literal[\"2\"],\n Literal[\"3\"],\n Literal[\"4\"],\n Literal[\"auto\"],\n Literal[\"custom\"],\n Literal[\"page-actual\"],\n Literal[\"page-fit\"],\n Literal[\"page-width\"],\n ]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements","title":"statements
","text":"Textbook interaction event model definitions.
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UIBook","title":" UIBook (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for book
statement.
The browser emits this statement when a user navigates within the PDF Viewer or the PNG Viewer.
Attributes:
Name Type Descriptionevent
BookEventField
See BookEventField.
event_type
str
Consists of the value book
.
name
str
Consists of the value book
.
ralph/models/edx/textbook_interaction/statements.py
class UIBook(BaseBrowserModel):\n \"\"\"Pydantic model for `book` statement.\n\n The browser emits this statement when a user navigates within the PDF Viewer or the\n PNG Viewer.\n\n Attributes:\n event (BookEventField): See BookEventField.\n event_type (str): Consists of the value `book`.\n name (str): Consists of the value `book`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"book\")\n\n event: Union[\n Json[BookEventField], BookEventField # pylint: disable=unsubscriptable-object\n ]\n event_type: Literal[\"book\"]\n name: Literal[\"book\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfChapterNavigated","title":" UITextbookPdfChapterNavigated (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.chapter.navigated
statement.
The browser emits this statement when a user clicks on a link in the outline to navigate to a chapter.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfChapterNavigatedEventField.
event_type
str
Consists of the value textbook.pdf.chapter.navigated
.
name
str
Consists of the value textbook.pdf.chapter.navigated
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfChapterNavigated(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.chapter.navigated` statement.\n\n The browser emits this statement when a user clicks on a link in the outline to\n navigate to a chapter.\n\n Attributes:\n event (json): See TextbookPdfChapterNavigatedEventField.\n event_type (str): Consists of the value `textbook.pdf.chapter.navigated`.\n name (str): Consists of the value `textbook.pdf.chapter.navigated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.chapter.navigated\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfChapterNavigatedEventField\n ],\n TextbookPdfChapterNavigatedEventField,\n ]\n event_type: Literal[\"textbook.pdf.chapter.navigated\"]\n name: Literal[\"textbook.pdf.chapter.navigated\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfDisplayScaled","title":" UITextbookPdfDisplayScaled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.display.scaled
statement.
The browser emits this statement when the display magnification changes or the first page is shown.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfDisplayScaledEventField.
event_type
str
Consists of the value textbook.pdf.display.scaled
.
name
str
Consists of the value textbook.pdf.display.scaled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfDisplayScaled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.display.scaled` statement.\n\n The browser emits this statement when the display magnification changes or the\n first page is shown.\n\n Attributes:\n event (json): See TextbookPdfDisplayScaledEventField.\n event_type (str): Consists of the value `textbook.pdf.display.scaled`.\n name (str): Consists of the value `textbook.pdf.display.scaled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.display.scaled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfDisplayScaledEventField\n ],\n TextbookPdfDisplayScaledEventField,\n ]\n event_type: Literal[\"textbook.pdf.display.scaled\"]\n name: Literal[\"textbook.pdf.display.scaled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfOutlineToggled","title":" UITextbookPdfOutlineToggled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.outline.toggled
statement.
The browser emits this statement when a user clicks the outline icon to show or hide a list of the book\u2019s chapters.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfOutlineToggledEventField.
event_type
str
Consists of the value textbook.pdf.outline.toggled
.
name
str
Consists of the value textbook.pdf.outline.toggled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfOutlineToggled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.outline.toggled` statement.\n\n The browser emits this statement when a user clicks the outline icon to show or\n hide a list of the book\u2019s chapters.\n\n Attributes:\n event (json): See TextbookPdfOutlineToggledEventField.\n event_type (str): Consists of the value `textbook.pdf.outline.toggled`.\n name (str): Consists of the value `textbook.pdf.outline.toggled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.outline.toggled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfOutlineToggledEventField\n ],\n TextbookPdfOutlineToggledEventField,\n ]\n event_type: Literal[\"textbook.pdf.outline.toggled\"]\n name: Literal[\"textbook.pdf.outline.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfPageNavigated","title":" UITextbookPdfPageNavigated (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.page.navigated
statement.
The browser emits this statement when a user manually enters a page number.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfPageNavigatedEventField.
event_type
str
Consists of the value textbook.pdf.page.navigated
.
name
str
Consists of the value textbook.pdf.page.navigated
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfPageNavigated(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.page.navigated` statement.\n\n The browser emits this statement when a user manually enters a page number.\n\n Attributes:\n event (json): See TextbookPdfPageNavigatedEventField.\n event_type (str): Consists of the value `textbook.pdf.page.navigated`.\n name (str): Consists of the value `textbook.pdf.page.navigated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.page.navigated\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfPageNavigatedEventField\n ],\n TextbookPdfPageNavigatedEventField,\n ]\n event_type: Literal[\"textbook.pdf.page.navigated\"]\n name: Literal[\"textbook.pdf.page.navigated\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfPageScrolled","title":" UITextbookPdfPageScrolled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.page.scrolled
statement.
The browser emits this statement when the user scrolls to the next or previous page and the transition takes less than 50 milliseconds.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfPageScrolledEventField.
event_type
str
Consists of the value textbook.pdf.page.scrolled
.
name
str
Consists of the value textbook.pdf.page.scrolled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfPageScrolled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.page.scrolled` statement.\n\n The browser emits this statement when the user scrolls to the next or previous page\n and the transition takes less than 50 milliseconds.\n\n Attributes:\n event (json): See TextbookPdfPageScrolledEventField.\n event_type (str): Consists of the value `textbook.pdf.page.scrolled`.\n name (str): Consists of the value `textbook.pdf.page.scrolled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.page.scrolled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfPageScrolledEventField\n ],\n TextbookPdfPageScrolledEventField,\n ]\n event_type: Literal[\"textbook.pdf.page.scrolled\"]\n name: Literal[\"textbook.pdf.page.scrolled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfSearchCaseSensitivityToggled","title":" UITextbookPdfSearchCaseSensitivityToggled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.searchcasesensitivity.toggled
statement.
The browser emits this statement when a user selects or clears the Match Case option.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfSearchCaseSensitivityToggledEventField.
event_type
str
Consists of the value textbook.pdf.searchcasesensitivity.toggled
.
name
str
Consists of the value textbook.pdf.searchcasesensitivity.toggled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfSearchCaseSensitivityToggled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.searchcasesensitivity.toggled` statement.\n\n The browser emits this statement when a user selects or clears the\n <kbd>Match Case</kbd> option.\n\n Attributes:\n event (json): See TextbookPdfSearchCaseSensitivityToggledEventField.\n event_type (str): Consists of the value\n `textbook.pdf.searchcasesensitivity.toggled`.\n name (str): Consists of the value `textbook.pdf.searchcasesensitivity.toggled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.searchcasesensitivity.toggled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfSearchCaseSensitivityToggledEventField\n ],\n TextbookPdfSearchCaseSensitivityToggledEventField,\n ]\n event_type: Literal[\"textbook.pdf.searchcasesensitivity.toggled\"]\n name: Literal[\"textbook.pdf.searchcasesensitivity.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfSearchExecuted","title":" UITextbookPdfSearchExecuted (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.executed
statement.
The browser emits this statement when a user searches for a text value in the file.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfSearchExecutedEventField.
event_type
str
Consists of the value textbook.pdf.search.executed
.
name
str
Consists of the value textbook.pdf.search.executed
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfSearchExecuted(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.search.executed` statement.\n\n The browser emits this statement when a user searches for a text value in the file.\n\n Attributes:\n event (json): See TextbookPdfSearchExecutedEventField.\n event_type (str): Consists of the value `textbook.pdf.search.executed`.\n name (str): Consists of the value `textbook.pdf.search.executed`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.search.executed\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfSearchExecutedEventField\n ],\n TextbookPdfSearchExecutedEventField,\n ]\n event_type: Literal[\"textbook.pdf.search.executed\"]\n name: Literal[\"textbook.pdf.search.executed\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfSearchHighlightToggled","title":" UITextbookPdfSearchHighlightToggled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.highlight.toggled
statement.
The browser emits this statement when a user selects or clears the Highlight All option.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfSearchHighlightToggledEventField.
event_type
str
Consists of the value textbook.pdf.search.highlight.toggled
.
name
str
Consists of the value textbook.pdf.search.highlight.toggled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfSearchHighlightToggled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.search.highlight.toggled` statement.\n\n The browser emits this statement when a user selects or clears the\n <kbd>Highlight All</kbd> option.\n\n Attributes:\n event (json): See TextbookPdfSearchHighlightToggledEventField.\n event_type (str): Consists of the value `textbook.pdf.search.highlight.toggled`.\n name (str): Consists of the value `textbook.pdf.search.highlight.toggled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.search.highlight.toggled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfSearchHighlightToggledEventField\n ],\n TextbookPdfSearchHighlightToggledEventField,\n ]\n event_type: Literal[\"textbook.pdf.search.highlight.toggled\"]\n name: Literal[\"textbook.pdf.search.highlight.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfSearchNavigatedNext","title":" UITextbookPdfSearchNavigatedNext (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.navigatednext
statement.
The browser emits this statement when a user clicks on the Find Next or Find Previous icons for an entered search string.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfSearchNavigatedNextEventField.
event_type
str
Consists of the value textbook.pdf.search.navigatednext
.
name
str
Consists of the value textbook.pdf.search.navigatednext
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfSearchNavigatedNext(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.search.navigatednext` statement.\n\n The browser emits this statement when a user clicks on the <kbd>Find Next</kbd> or\n <kbd>Find Previous</kbd> icons for an entered search string.\n\n Attributes:\n event (json): See TextbookPdfSearchNavigatedNextEventField.\n event_type (str): Consists of the value `textbook.pdf.search.navigatednext`.\n name (str): Consists of the value `textbook.pdf.search.navigatednext`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.search.navigatednext\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfSearchNavigatedNextEventField\n ],\n TextbookPdfSearchNavigatedNextEventField,\n ]\n event_type: Literal[\"textbook.pdf.search.navigatednext\"]\n name: Literal[\"textbook.pdf.search.navigatednext\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfThumbnailNavigated","title":" UITextbookPdfThumbnailNavigated (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.thumbnail.navigated
statement.
The browser emits this statement when a user clicks on a thumbnail image to navigate to a page.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfThumbnailNavigatedEventField.
event_type
str
Consists of the value textbook.pdf.thumbnail.navigated
.
name
str
Consists of the value textbook.pdf.thumbnail.navigated
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfThumbnailNavigated(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.thumbnail.navigated` statement.\n\n The browser emits this statement when a user clicks on a thumbnail image to\n navigate to a page.\n\n Attributes:\n event (json): See TextbookPdfThumbnailNavigatedEventField.\n event_type (str): Consists of the value `textbook.pdf.thumbnail.navigated`.\n name (str): Consists of the value `textbook.pdf.thumbnail.navigated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.thumbnail.navigated\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfThumbnailNavigatedEventField\n ],\n TextbookPdfThumbnailNavigatedEventField,\n ]\n event_type: Literal[\"textbook.pdf.thumbnail.navigated\"]\n name: Literal[\"textbook.pdf.thumbnail.navigated\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfThumbnailsToggled","title":" UITextbookPdfThumbnailsToggled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.thumbnails.toggled
statement.
The browser emits this statement when a user clicks on the icon to show or hide page thumbnails.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfThumbnailsToggledEventField.
event_type
str
Consists of the value textbook.pdf.thumbnails.toggled
.
name
str
Consists of the value textbook.pdf.thumbnails.toggled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfThumbnailsToggled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.thumbnails.toggled` statement.\n\n The browser emits this statement when a user clicks on the icon to show or hide\n page thumbnails.\n\n Attributes:\n event (json): See TextbookPdfThumbnailsToggledEventField.\n event_type (str): Consists of the value `textbook.pdf.thumbnails.toggled`.\n name (str): Consists of the value `textbook.pdf.thumbnails.toggled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.thumbnails.toggled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfThumbnailsToggledEventField\n ],\n TextbookPdfThumbnailsToggledEventField,\n ]\n event_type: Literal[\"textbook.pdf.thumbnails.toggled\"]\n name: Literal[\"textbook.pdf.thumbnails.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfZoomButtonsChanged","title":" UITextbookPdfZoomButtonsChanged (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.zoom.buttons.changed
statement.
The browser emits this statement when a user clicks either the Zoom In or Zoom Out icon.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfZoomButtonsChangedEventField.
event_type
str
Consists of the value textbook.pdf.zoom.buttons.changed
.
name
str
Consists of the value textbook.pdf.zoom.buttons.changed
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfZoomButtonsChanged(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.zoom.buttons.changed` statement.\n\n The browser emits this statement when a user clicks either the <kbd>Zoom In</kbd>\n or <kbd>Zoom Out</kbd> icon.\n\n Attributes:\n event (json): See TextbookPdfZoomButtonsChangedEventField.\n event_type (str): Consists of the value `textbook.pdf.zoom.buttons.changed`.\n name (str): Consists of the value `textbook.pdf.zoom.buttons.changed`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.zoom.buttons.changed\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfZoomButtonsChangedEventField\n ],\n TextbookPdfZoomButtonsChangedEventField,\n ]\n event_type: Literal[\"textbook.pdf.zoom.buttons.changed\"]\n name: Literal[\"textbook.pdf.zoom.buttons.changed\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfZoomMenuChanged","title":" UITextbookPdfZoomMenuChanged (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.zoom.menu.changed
statement.
The browser emits this statement when a user selects a magnification setting.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfZoomMenuChangedEventField.
event_type
str
Consists of the value textbook.pdf.zoom.menu.changed
.
name
str
Consists of the value textbook.pdf.zoom.menu.changed
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfZoomMenuChanged(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.zoom.menu.changed` statement.\n\n The browser emits this statement when a user selects a magnification setting.\n\n Attributes:\n event (json): See TextbookPdfZoomMenuChangedEventField.\n event_type (str): Consists of the value `textbook.pdf.zoom.menu.changed`.\n name (str): Consists of the value `textbook.pdf.zoom.menu.changed`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.zoom.menu.changed\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfZoomMenuChangedEventField\n ],\n TextbookPdfZoomMenuChangedEventField,\n ]\n event_type: Literal[\"textbook.pdf.zoom.menu.changed\"]\n name: Literal[\"textbook.pdf.zoom.menu.changed\"]\n
"},{"location":"models/edx/#ralph.models.edx.video","title":"video
special
","text":""},{"location":"models/edx/#ralph.models.edx.video.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.video.fields.events","title":"events
","text":"Video event fields definitions.
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.PauseVideoEventField","title":" PauseVideoEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for pause_video
.event
.
Attributes:
Name Type DescriptioncurrentTime
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class PauseVideoEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `pause_video`.`event`.\n\n Attributes:\n currentTime (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n currentTime: float\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.PlayVideoEventField","title":" PlayVideoEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for play_video
.event
field.
Attributes:
Name Type DescriptioncurrentTime
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class PlayVideoEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `play_video`.`event` field.\n\n Attributes:\n currentTime (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n currentTime: float\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.SeekVideoEventField","title":" SeekVideoEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for seek_video
.event
field.
Attributes:
Name Type Descriptionnew_time
float
Consists of the point in time the actor changed to in a media object during a seek operation.
old_time
float
Consists of the point in time the actor changed from in a media object during a seek operation.
type
str
Consists of the navigational method used to change position within the video, either onCaptionSeek
or onSlideSeek
value.
ralph/models/edx/video/fields/events.py
class SeekVideoEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `seek_video`.`event` field.\n\n Attributes:\n new_time (float): Consists of the point in time the actor changed to in a media\n object during a seek operation.\n old_time (float): Consists of the point in time the actor changed from in a\n media object during a seek operation.\n type (str): Consists of the navigational method used to change position\n within the video, either `onCaptionSeek` or `onSlideSeek` value.\n \"\"\"\n\n new_time: float\n old_time: float\n type: str\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.SpeedChangeVideoEventField","title":" SpeedChangeVideoEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for speed_change_video
.event
field.
Attributes:
Name Type DescriptioncurrentTime
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class SpeedChangeVideoEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `speed_change_video`.`event` field.\n\n Attributes:\n currentTime (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n currentTime: float\n new_speed: Literal[\"0.75\", \"1.0\", \"1.25\", \"1.50\", \"2.0\"]\n old_speed: Literal[\"0.75\", \"1.0\", \"1.25\", \"1.50\", \"2.0\"]\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.StopVideoEventField","title":" StopVideoEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for stop_video
.event
field.
Attributes:
Name Type DescriptioncurrentTime
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class StopVideoEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `stop_video`.`event` field.\n\n Attributes:\n currentTime (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n currentTime: float\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.VideoBaseEventField","title":" VideoBaseEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for video core event
field.
Attributes:
Name Type Descriptioncode
str
Consists of the html5
value for browser-played videos.
id
str
Consists of the additional videos name if given by the course creators, or the system-generated hash code otherwise.
Source code inralph/models/edx/video/fields/events.py
class VideoBaseEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for video core `event` field.\n\n Attributes:\n code (str): Consists of the `html5` value for browser-played\n videos.\n id (str): Consists of the additional videos name if given by the\n course creators, or the system-generated hash code otherwise.\n \"\"\"\n\n class Config: # pylint: disable=missing-class-docstring # noqa: D106\n extra = \"allow\"\n\n code: str\n id: str\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.VideoHideTranscriptEventField","title":" VideoHideTranscriptEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for hide_transcript
.event
field.
Attributes:
Name Type Descriptioncurrent_time
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class VideoHideTranscriptEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `hide_transcript`.`event` field.\n\n Attributes:\n current_time (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n current_time: float\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.VideoShowTranscriptEventField","title":" VideoShowTranscriptEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for show_transcript
.event
field.
Attributes:
Name Type Descriptioncurrent_time
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class VideoShowTranscriptEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `show_transcript`.`event` field.\n\n Attributes:\n current_time (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n current_time: float\n
"},{"location":"models/edx/#ralph.models.edx.video.statements","title":"statements
","text":"Video event model definitions.
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIHideTranscript","title":" UIHideTranscript (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for hide_transcript
statement.
The browser emits this statement when a user selects CC to suppress display of the video transcript.
Attributes:
Name Type Descriptionevent
VideoTranscriptEventField
See VideoTranscriptEventField.
event_type
str
Consists of the value hide_transcript
.
name
str
Consists either of the value hide_transcript
or edx.video.transcript.hidden
.
ralph/models/edx/video/statements.py
class UIHideTranscript(BaseBrowserModel):\n \"\"\"Pydantic model for `hide_transcript` statement.\n\n The browser emits this statement when a user selects <kbd>CC</kbd> to suppress\n display of the video transcript.\n\n Attributes:\n event (VideoTranscriptEventField): See VideoTranscriptEventField.\n event_type (str): Consists of the value `hide_transcript`.\n name (str): Consists either of the value `hide_transcript` or\n `edx.video.transcript.hidden`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"hide_transcript\")\n\n event: Union[\n Json[VideoHideTranscriptEventField], # pylint: disable=unsubscriptable-object\n VideoHideTranscriptEventField,\n ]\n event_type: Literal[\"hide_transcript\"]\n name: Literal[\"hide_transcript\", \"edx.video.transcript.hidden\"]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UILoadVideo","title":" UILoadVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for load_video
statement.
The browser emits this statement when the video is fully rendered and ready to play.
Attributes:
Name Type Descriptionevent
VideoBaseEventField
See VideoBaseEventField.
event_type
str
Consists of the value load_video
.
name
str
Consists either of the value load_video
or edx.video.loaded
.
ralph/models/edx/video/statements.py
class UILoadVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `load_video` statement.\n\n The browser emits this statement when the video is fully rendered and ready to\n play.\n\n Attributes:\n event (VideoBaseEventField): See VideoBaseEventField.\n event_type (str): Consists of the value `load_video`.\n name (str): Consists either of the value `load_video` or `edx.video.loaded`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"load_video\")\n\n event: Union[\n Json[VideoBaseEventField], # pylint: disable=unsubscriptable-object\n VideoBaseEventField,\n ]\n event_type: Literal[\"load_video\"]\n name: Literal[\"load_video\", \"edx.video.loaded\"]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIPauseVideo","title":" UIPauseVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for pause_video
statement.
The browser emits this statement when a user selects the video player\u2019s pause control.
Attributes:
Name Type Descriptionevent
PauseVideoEventField
See PauseVideoEventField.
event_type
str
Consists of the value pause_video
.
name
str
Consists either of the value pause_video
or edx.video.paused
.
ralph/models/edx/video/statements.py
class UIPauseVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `pause_video` statement.\n\n The browser emits this statement when a user selects the video player's pause\n control.\n\n Attributes:\n event (PauseVideoEventField): See PauseVideoEventField.\n event_type (str): Consists of the value `pause_video`.\n name (str): Consists either of the value `pause_video` or `edx.video.paused`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"pause_video\")\n\n event: Union[\n Json[PauseVideoEventField], # pylint: disable=unsubscriptable-object\n PauseVideoEventField,\n ]\n event_type: Literal[\"pause_video\"]\n name: Optional[Literal[\"pause_video\", \"edx.video.paused\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIPlayVideo","title":" UIPlayVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for play_video
statement.
The browser emits this statement when a user selects the video player\u2019s play control.
Attributes:
Name Type Descriptionevent
PlayVideoEventField
See PlayVideoEventField.
event_type
str
Consists of the value play_video
.
name
str
Consists either of the value play_video
or edx.video.played
.
ralph/models/edx/video/statements.py
class UIPlayVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `play_video` statement.\n\n The browser emits this statement when a user selects the video player's play\n control.\n\n Attributes:\n event (PlayVideoEventField): See PlayVideoEventField.\n event_type (str): Consists of the value `play_video`.\n name (str): Consists either of the value `play_video` or `edx.video.played`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"play_video\")\n\n event: Union[\n Json[PlayVideoEventField], # pylint: disable=unsubscriptable-object\n PlayVideoEventField,\n ]\n event_type: Literal[\"play_video\"]\n name: Optional[Literal[\"play_video\", \"edx.video.played\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UISeekVideo","title":" UISeekVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for seek_video
statement.
The browser emits this statement when a user selects a user interface control to go to a different point in the video file.
Attributes:
Name Type Descriptionevent
SeekVideoEventField
See SeekVideoEventField.
event_type
str
Consists of the value seek_video
.
name
str
Consists either of the value seek_video
or edx.video.position.changed
.
ralph/models/edx/video/statements.py
class UISeekVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `seek_video` statement.\n\n The browser emits this statement when a user selects a user interface control to go\n to a different point in the video file.\n\n Attributes:\n event (SeekVideoEventField): See SeekVideoEventField.\n event_type (str): Consists of the value `seek_video`.\n name (str): Consists either of the value `seek_video` or\n `edx.video.position.changed`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"seek_video\")\n\n event: Union[\n Json[SeekVideoEventField], # pylint: disable=unsubscriptable-object\n SeekVideoEventField,\n ]\n event_type: Literal[\"seek_video\"]\n name: Optional[Literal[\"seek_video\", \"edx.video.position.changed\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIShowTranscript","title":" UIShowTranscript (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for show_transcript
statement.
The browser emits this statement when a user selects CC to display the video transcript.
Attributes:
Name Type Descriptionevent
VideoTranscriptEventField
See VideoTranscriptEventField.
event_type
str
Consists of the value show_transcript
.
name
str
Consists either of the value show_transcript
or edx.video.transcript.shown
.
ralph/models/edx/video/statements.py
class UIShowTranscript(BaseBrowserModel):\n \"\"\"Pydantic model for `show_transcript` statement.\n\n The browser emits this statement when a user selects <kbd>CC</kbd> to display the\n video transcript.\n\n Attributes:\n event (VideoTranscriptEventField): See VideoTranscriptEventField.\n event_type (str): Consists of the value `show_transcript`.\n name (str): Consists either of the value `show_transcript` or\n `edx.video.transcript.shown`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"show_transcript\")\n\n event: Union[\n Json[VideoShowTranscriptEventField], # pylint: disable=unsubscriptable-object\n VideoShowTranscriptEventField,\n ]\n event_type: Literal[\"show_transcript\"]\n name: Literal[\"show_transcript\", \"edx.video.transcript.shown\"]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UISpeedChangeVideo","title":" UISpeedChangeVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for speed_change_video
statement.
The browser emits this statement when a user selects a different playing speed for the video.
Attributes:
Name Type Descriptionevent
SpeedChangeVideoEventField
See SpeedChangeVideoEventField.
event_type
str
Consists of the value speed_change_video
.
ralph/models/edx/video/statements.py
class UISpeedChangeVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `speed_change_video` statement.\n\n The browser emits this statement when a user selects a different playing speed for\n the video.\n\n Attributes:\n event (SpeedChangeVideoEventField): See SpeedChangeVideoEventField.\n event_type (str): Consists of the value `speed_change_video`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"speed_change_video\")\n\n event: Union[\n Json[SpeedChangeVideoEventField], # pylint: disable=unsubscriptable-object\n SpeedChangeVideoEventField,\n ]\n event_type: Literal[\"speed_change_video\"]\n name: Optional[Literal[\"speed_change_video\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIStopVideo","title":" UIStopVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for stop_video
statement.
The browser emits this statement when the video player reaches the end of the video file and play automatically stops.
Attributes:
Name Type Descriptionevent
StopVideoEventField
See StopVideoEventField.
event_type
str
Consists of the value stop_video
.
name
str
Consists either of the value stop_video
or edx.video.stopped
.
ralph/models/edx/video/statements.py
class UIStopVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `stop_video` statement.\n\n The browser emits this statement when the video player reaches the end of the video\n file and play automatically stops.\n\n Attributes:\n event (StopVideoEventField): See StopVideoEventField.\n event_type (str): Consists of the value `stop_video`.\n name (str): Consists either of the value `stop_video` or `edx.video.stopped`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"stop_video\")\n\n event: Union[\n Json[StopVideoEventField], # pylint: disable=unsubscriptable-object\n StopVideoEventField,\n ]\n event_type: Literal[\"stop_video\"]\n name: Optional[Literal[\"stop_video\", \"edx.video.stopped\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIVideoHideCCMenu","title":" UIVideoHideCCMenu (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for video_hide_cc_menu
statement.
The browser emits this statement when a user selects a language from the CC menu for a video that has transcripts in multiple languages
Attributes:
Name Type Descriptionevent
VideoBaseEventField
See VideoBaseEventField.
event_type
str
Consists of the value video_hide_cc_menu
.
ralph/models/edx/video/statements.py
class UIVideoHideCCMenu(BaseBrowserModel):\n \"\"\"Pydantic model for `video_hide_cc_menu` statement.\n\n The browser emits this statement when a user selects a language from the CC menu\n for a video that has transcripts in multiple languages\n\n Attributes:\n event (VideoBaseEventField): See VideoBaseEventField.\n event_type (str): Consists of the value `video_hide_cc_menu`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"video_hide_cc_menu\")\n\n event: Union[\n Json[VideoBaseEventField], # pylint: disable=unsubscriptable-object\n VideoBaseEventField,\n ]\n event_type: Literal[\"video_hide_cc_menu\"]\n name: Optional[Literal[\"video_hide_cc_menu\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIVideoShowCCMenu","title":" UIVideoShowCCMenu (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for video_show_cc_menu
statement.
The browser emits this statement when a user selects CC for a video that has transcripts in multiple languages.
Note: This statement is emitted in addition to the show_transcript event.
Attributes:
Name Type Descriptionevent
VideoBaseEventField
See VideoBaseEventField.
event_type
str
Consists of the value video_show_cc_menu
.
ralph/models/edx/video/statements.py
class UIVideoShowCCMenu(BaseBrowserModel):\n \"\"\"Pydantic model for `video_show_cc_menu` statement.\n\n The browser emits this statement when a user selects CC for a video that has\n transcripts in multiple languages.\n\n Note: This statement is emitted in addition to the show_transcript event.\n\n Attributes:\n event (VideoBaseEventField): See VideoBaseEventField.\n event_type (str): Consists of the value `video_show_cc_menu`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"video_show_cc_menu\")\n\n event: Union[\n Json[VideoBaseEventField], # pylint: disable=unsubscriptable-object\n VideoBaseEventField,\n ]\n event_type: Literal[\"video_show_cc_menu\"]\n name: Optional[Literal[\"video_show_cc_menu\"]]\n
"},{"location":"models/xapi/","title":"xAPI events","text":"xAPI pydantic models.
"},{"location":"models/xapi/#ralph.models.xapi.base","title":"base
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.base.agents","title":"agents
","text":"Base xAPI Agent
definitions.
BaseXapiAgentAccount (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for Agent
type account
property.
Attributes:
Name Type DescriptionhomePage
IRI
Consists of the home page of the account\u2019s service provider.
name
str
Consists of the unique id or name of the Actor\u2019s account.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentAccount(BaseModelWithConfig):\n \"\"\"Pydantic model for `Agent` type `account` property.\n\n Attributes:\n homePage (IRI): Consists of the home page of the account's service provider.\n name (str): Consists of the unique id or name of the Actor's account.\n \"\"\"\n\n homePage: IRI\n name: StrictStr\n
"},{"location":"models/xapi/#ralph.models.xapi.base.agents.BaseXapiAgentCommonProperties","title":" BaseXapiAgentCommonProperties (BaseModelWithConfig, ABC)
pydantic-model
","text":"Pydantic model for core Agent
type property.
It defines who performed the action.
Attributes:
Name Type DescriptionobjectType
str
Consists of the value Agent
.
name
str
Consists of the full name of the Agent.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentCommonProperties(BaseModelWithConfig, ABC):\n \"\"\"Pydantic model for core `Agent` type property.\n\n It defines who performed the action.\n\n Attributes:\n objectType (str): Consists of the value `Agent`.\n name (str): Consists of the full name of the Agent.\n \"\"\"\n\n objectType: Optional[Literal[\"Agent\"]]\n name: Optional[StrictStr]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.agents.BaseXapiAgentWithAccount","title":" BaseXapiAgentWithAccount (BaseXapiAgentCommonProperties, BaseXapiAccountIFI)
pydantic-model
","text":"Pydantic model for Agent
type property.
It is defined for agent type with an account IFI.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentWithAccount(BaseXapiAgentCommonProperties, BaseXapiAccountIFI):\n \"\"\"Pydantic model for `Agent` type property.\n\n It is defined for agent type with an account IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.agents.BaseXapiAgentWithMbox","title":" BaseXapiAgentWithMbox (BaseXapiAgentCommonProperties, BaseXapiMboxIFI)
pydantic-model
","text":"Pydantic model for Agent
type property.
It is defined for agent type with a mailto IFI.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentWithMbox(BaseXapiAgentCommonProperties, BaseXapiMboxIFI):\n \"\"\"Pydantic model for `Agent` type property.\n\n It is defined for agent type with a mailto IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.agents.BaseXapiAgentWithMboxSha1Sum","title":" BaseXapiAgentWithMboxSha1Sum (BaseXapiAgentCommonProperties, BaseXapiMboxSha1SumIFI)
pydantic-model
","text":"Pydantic model for Agent
type property.
It is defined for agent type with a hash IFI.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentWithMboxSha1Sum(\n BaseXapiAgentCommonProperties, BaseXapiMboxSha1SumIFI\n):\n \"\"\"Pydantic model for `Agent` type property.\n\n It is defined for agent type with a hash IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.agents.BaseXapiAgentWithOpenId","title":" BaseXapiAgentWithOpenId (BaseXapiAgentCommonProperties, BaseXapiOpenIdIFI)
pydantic-model
","text":"Pydantic model for Agent
type property.
It is defined for agent type with an openID IFI.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentWithOpenId(BaseXapiAgentCommonProperties, BaseXapiOpenIdIFI):\n \"\"\"Pydantic model for `Agent` type property.\n\n It is defined for agent type with an openID IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.attachments","title":"attachments
","text":"Base xAPI Attachments
definitions.
BaseXapiAttachment (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for attachment
property.
Attributes:
Name Type DescriptionusageType
IRI
Identifies the usage of this Attachment.
display
LanguageMap
Consists of the Attachment\u2019s title.
description
LanguageMap
Consists of the Attachment\u2019s description.
contentType
str
Consists of the Attachment\u2019s content type.
length
int
Consists of the length of the Attachment\u2019s data in octets.
sha2
str
Consists of the SHA-2 hash of the Attachment data.
fileUrl
URL
Consists of the URL from which the Attachment can be retrieved.
Source code inralph/models/xapi/base/attachments.py
class BaseXapiAttachment(BaseModelWithConfig):\n \"\"\"Pydantic model for `attachment` property.\n\n Attributes:\n usageType (IRI): Identifies the usage of this Attachment.\n display (LanguageMap): Consists of the Attachment's title.\n description (LanguageMap): Consists of the Attachment's description.\n contentType (str): Consists of the Attachment's content type.\n length (int): Consists of the length of the Attachment's data in octets.\n sha2 (str): Consists of the SHA-2 hash of the Attachment data.\n fileUrl (URL): Consists of the URL from which the Attachment can be retrieved.\n \"\"\"\n\n usageType: IRI\n display: LanguageMap\n description: Optional[LanguageMap]\n contentType: str\n length: int\n sha2: str\n fileUrl: Optional[AnyUrl]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.common","title":"common
","text":"Common for xAPI base definitions.
"},{"location":"models/xapi/#ralph.models.xapi.base.common.IRI","title":" IRI (str)
","text":"Pydantic custom data type validating RFC 3987 IRIs.
Source code inralph/models/xapi/base/common.py
class IRI(str):\n \"\"\"Pydantic custom data type validating RFC 3987 IRIs.\"\"\"\n\n @classmethod\n def __get_validators__(cls): # noqa: D105\n def validate(iri: str):\n \"\"\"Check whether the provided IRI is a valid RFC 3987 IRI.\"\"\"\n parse(iri, rule=\"IRI\")\n return cls(iri)\n\n yield validate\n
"},{"location":"models/xapi/#ralph.models.xapi.base.common.LanguageTag","title":" LanguageTag (str)
","text":"Pydantic custom data type validating RFC 5646 Language tags.
Source code inralph/models/xapi/base/common.py
class LanguageTag(str):\n \"\"\"Pydantic custom data type validating RFC 5646 Language tags.\"\"\"\n\n @classmethod\n def __get_validators__(cls): # noqa: D105\n def validate(tag: str):\n \"\"\"Check whether the provided tag is a valid RFC 5646 Language tag.\"\"\"\n if not tag_is_valid(tag):\n raise TypeError(\"Invalid RFC 5646 Language tag\")\n return cls(tag)\n\n yield validate\n
"},{"location":"models/xapi/#ralph.models.xapi.base.common.MailtoEmail","title":" MailtoEmail (str)
","text":"Pydantic custom data type validating mailto:email
format.
ralph/models/xapi/base/common.py
class MailtoEmail(str):\n \"\"\"Pydantic custom data type validating `mailto:email` format.\"\"\"\n\n @classmethod\n def __get_validators__(cls): # noqa: D105\n def validate(mailto: str):\n \"\"\"Check whether the provided value follows the `mailto:email` format.\"\"\"\n if not mailto.startswith(\"mailto:\"):\n raise TypeError(\"Invalid `mailto:email` value\")\n valid = validate_email(mailto[7:])\n return cls(f\"mailto:{valid[1]}\")\n\n yield validate\n
"},{"location":"models/xapi/#ralph.models.xapi.base.contexts","title":"contexts
","text":"Base xAPI Context
definitions.
BaseXapiContext (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for context
property.
Attributes:
Name Type Descriptionregistration
UUID
The registration that the Statement is associated with.
instructor
dict
The instructor that the Statement relates to.
team
dict
The team that this Statement relates to.
contextActivities
dict
See BaseXapiContextContextActivities.
revision
str
The revision of the activity associated with this Statement.
platform
str
The platform where the learning activity took place.
language
dict
The language in which the experience occurred.
statement
dict
Another Statement giving context for this Statement.
extensions
dict
Consists of a dictionary of other properties as needed.
Source code inralph/models/xapi/base/contexts.py
class BaseXapiContext(BaseModelWithConfig):\n \"\"\"Pydantic model for `context` property.\n\n Attributes:\n registration (UUID): The registration that the Statement is associated with.\n instructor (dict): The instructor that the Statement relates to.\n team (dict): The team that this Statement relates to.\n contextActivities (dict): See BaseXapiContextContextActivities.\n revision (str): The revision of the activity associated with this Statement.\n platform (str): The platform where the learning activity took place.\n language (dict): The language in which the experience occurred.\n statement (dict): Another Statement giving context for this Statement.\n extensions (dict): Consists of a dictionary of other properties as needed.\n \"\"\"\n\n registration: Optional[UUID]\n instructor: Optional[BaseXapiAgent]\n team: Optional[BaseXapiGroup]\n contextActivities: Optional[BaseXapiContextContextActivities]\n revision: Optional[StrictStr]\n platform: Optional[StrictStr]\n language: Optional[LanguageTag]\n statement: Optional[BaseXapiStatementRef]\n extensions: Optional[Dict[IRI, Union[str, int, bool, list, dict, None]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.contexts.BaseXapiContextContextActivities","title":" BaseXapiContextContextActivities (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for context contextActivities
property.
Attributes:
Name Type Descriptionparent
dict or list
An Activity with a direct relation to the statement\u2019s Activity.
grouping
dict or list
An Activity with an indirect relation to the statement\u2019s Activity.
category
dict or list
An Activity used to categorize the Statement.
other
dict or list
A contextActivity that doesn\u2019t fit one of the other properties.
Source code inralph/models/xapi/base/contexts.py
class BaseXapiContextContextActivities(BaseModelWithConfig):\n \"\"\"Pydantic model for context `contextActivities` property.\n\n Attributes:\n parent (dict or list): An Activity with a direct relation to the statement's\n Activity.\n grouping (dict or list): An Activity with an indirect relation to the\n statement's Activity.\n category (dict or list): An Activity used to categorize the Statement.\n other (dict or list): A contextActivity that doesn't fit one of the other\n properties.\n \"\"\"\n\n parent: Optional[Union[BaseXapiActivity, List[BaseXapiActivity]]]\n grouping: Optional[Union[BaseXapiActivity, List[BaseXapiActivity]]]\n category: Optional[Union[BaseXapiActivity, List[BaseXapiActivity]]]\n other: Optional[Union[BaseXapiActivity, List[BaseXapiActivity]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups","title":"groups
","text":"Base xAPI Group
definitions.
BaseXapiAnonymousGroup (BaseXapiGroupCommonProperties)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for Anonymous Group type.
Attributes:
Name Type Descriptionmember
list
Consist of a list of the members of this Group.
Source code inralph/models/xapi/base/groups.py
class BaseXapiAnonymousGroup(BaseXapiGroupCommonProperties):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for Anonymous Group type.\n\n Attributes:\n member (list): Consist of a list of the members of this Group.\n \"\"\"\n\n member: List[BaseXapiAgent]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiGroupCommonProperties","title":" BaseXapiGroupCommonProperties (BaseModelWithConfig, ABC)
pydantic-model
","text":"Pydantic model for core Group
type property.
It is defined for the Group which performed the action.
Attributes:
Name Type DescriptionobjectType
str
Consists of the value Group
.
name
str
Consists of the full name of the Group.
Source code inralph/models/xapi/base/groups.py
class BaseXapiGroupCommonProperties(BaseModelWithConfig, ABC):\n \"\"\"Pydantic model for core `Group` type property.\n\n It is defined for the Group which performed the action.\n\n Attributes:\n objectType (str): Consists of the value `Group`.\n name (str): Consists of the full name of the Group.\n \"\"\"\n\n objectType: Literal[\"Group\"]\n name: Optional[StrictStr]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiIdentifiedGroup","title":" BaseXapiIdentifiedGroup (BaseXapiGroupCommonProperties)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for Identified Group type.
Attributes:
Name Type Descriptionmember
list
Consist of a list of the members of this Group.
Source code inralph/models/xapi/base/groups.py
class BaseXapiIdentifiedGroup(BaseXapiGroupCommonProperties):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for Identified Group type.\n\n Attributes:\n member (list): Consist of a list of the members of this Group.\n \"\"\"\n\n member: Optional[List[BaseXapiAgent]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiIdentifiedGroupWithAccount","title":" BaseXapiIdentifiedGroupWithAccount (BaseXapiIdentifiedGroup, BaseXapiAccountIFI)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for group type with an account IFI.
Source code inralph/models/xapi/base/groups.py
class BaseXapiIdentifiedGroupWithAccount(BaseXapiIdentifiedGroup, BaseXapiAccountIFI):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for group type with an account IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiIdentifiedGroupWithMbox","title":" BaseXapiIdentifiedGroupWithMbox (BaseXapiIdentifiedGroup, BaseXapiMboxIFI)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for group type with a mailto IFI.
Source code inralph/models/xapi/base/groups.py
class BaseXapiIdentifiedGroupWithMbox(BaseXapiIdentifiedGroup, BaseXapiMboxIFI):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for group type with a mailto IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiIdentifiedGroupWithMboxSha1Sum","title":" BaseXapiIdentifiedGroupWithMboxSha1Sum (BaseXapiIdentifiedGroup, BaseXapiMboxSha1SumIFI)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for group type with a hash IFI.
Source code inralph/models/xapi/base/groups.py
class BaseXapiIdentifiedGroupWithMboxSha1Sum(\n BaseXapiIdentifiedGroup, BaseXapiMboxSha1SumIFI\n):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for group type with a hash IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiIdentifiedGroupWithOpenId","title":" BaseXapiIdentifiedGroupWithOpenId (BaseXapiIdentifiedGroup, BaseXapiOpenIdIFI)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for group type with an openID IFI.
Source code inralph/models/xapi/base/groups.py
class BaseXapiIdentifiedGroupWithOpenId(BaseXapiIdentifiedGroup, BaseXapiOpenIdIFI):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for group type with an openID IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.ifi","title":"ifi
","text":"Base xAPI Inverse Functional Identifier
definitions.
BaseXapiAccount (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for IFI account
property.
Attributes:
Name Type DescriptionhomePage
IRI
Consists of the home page of the account\u2019s service provider.
name
str
Consists of the unique id or name of the Actor\u2019s account.
Source code inralph/models/xapi/base/ifi.py
class BaseXapiAccount(BaseModelWithConfig):\n \"\"\"Pydantic model for IFI `account` property.\n\n Attributes:\n homePage (IRI): Consists of the home page of the account's service provider.\n name (str): Consists of the unique id or name of the Actor's account.\n \"\"\"\n\n homePage: IRI\n name: StrictStr\n
"},{"location":"models/xapi/#ralph.models.xapi.base.ifi.BaseXapiAccountIFI","title":" BaseXapiAccountIFI (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for account Inverse Functional Identifier.
Attributes:
Name Type Descriptionaccount
dict
See BaseXapiAccount.
Source code inralph/models/xapi/base/ifi.py
class BaseXapiAccountIFI(BaseModelWithConfig):\n \"\"\"Pydantic model for account Inverse Functional Identifier.\n\n Attributes:\n account (dict): See BaseXapiAccount.\n \"\"\"\n\n account: BaseXapiAccount\n
"},{"location":"models/xapi/#ralph.models.xapi.base.ifi.BaseXapiMboxIFI","title":" BaseXapiMboxIFI (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for mailto Inverse Functional Identifier.
Attributes:
Name Type Descriptionmbox
MailtoEmail
Consists of the Agent\u2019s email address.
Source code inralph/models/xapi/base/ifi.py
class BaseXapiMboxIFI(BaseModelWithConfig):\n \"\"\"Pydantic model for mailto Inverse Functional Identifier.\n\n Attributes:\n mbox (MailtoEmail): Consists of the Agent's email address.\n \"\"\"\n\n mbox: MailtoEmail\n
"},{"location":"models/xapi/#ralph.models.xapi.base.ifi.BaseXapiMboxSha1SumIFI","title":" BaseXapiMboxSha1SumIFI (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for hash Inverse Functional Identifier.
Attributes:
Name Type Descriptionmbox_sha1sum
str
Consists of the SHA1 hash of the Agent\u2019s email address.
Source code inralph/models/xapi/base/ifi.py
class BaseXapiMboxSha1SumIFI(BaseModelWithConfig):\n \"\"\"Pydantic model for hash Inverse Functional Identifier.\n\n Attributes:\n mbox_sha1sum (str): Consists of the SHA1 hash of the Agent's email address.\n \"\"\"\n\n mbox_sha1sum: constr(regex=r\"^[0-9a-f]{40}$\") # noqa:F722\n
"},{"location":"models/xapi/#ralph.models.xapi.base.ifi.BaseXapiOpenIdIFI","title":" BaseXapiOpenIdIFI (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for OpenID Inverse Functional Identifier.
Attributes:
Name Type Descriptionopenid
URI
Consists of an openID that uniquely identifies the Agent.
Source code inralph/models/xapi/base/ifi.py
class BaseXapiOpenIdIFI(BaseModelWithConfig):\n \"\"\"Pydantic model for OpenID Inverse Functional Identifier.\n\n Attributes:\n openid (URI): Consists of an openID that uniquely identifies the Agent.\n \"\"\"\n\n openid: AnyUrl\n
"},{"location":"models/xapi/#ralph.models.xapi.base.objects","title":"objects
","text":"Base xAPI Object
definitions (2).
BaseXapiSubStatement (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for SubStatement
type property.
Attributes:
Name Type Descriptionactor
dict
See BaseXapiAgent and BaseXapiGroup.
verb
dict
See BaseXapiVerb.
object
dict
See BaseXapiUnnestedObject.
objectType
dict
Consists of the value SubStatement
.
ralph/models/xapi/base/objects.py
class BaseXapiSubStatement(BaseModelWithConfig):\n \"\"\"Pydantic model for `SubStatement` type property.\n\n Attributes:\n actor (dict): See BaseXapiAgent and BaseXapiGroup.\n verb (dict): See BaseXapiVerb.\n object (dict): See BaseXapiUnnestedObject.\n objectType (dict): Consists of the value `SubStatement`.\n \"\"\"\n\n actor: Union[BaseXapiAgent, BaseXapiGroup]\n verb: BaseXapiVerb\n object: BaseXapiUnnestedObject\n objectType: Literal[\"SubStatement\"]\n result: Optional[BaseXapiResult]\n context: Optional[BaseXapiContext]\n timestamp: Optional[datetime]\n attachments: Optional[List[BaseXapiAttachment]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.results","title":"results
","text":"Base xAPI Result
definitions.
BaseXapiResult (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for result
property.
Attributes:
Name Type Descriptionscore
dict
See BaseXapiResultScore.
success
bool
Indicates whether the attempt on the Activity was successful.
completion
bool
Indicates whether the Activity was completed.
response
str
Consists of the response for the given Activity.
duration
timedelta
Consists of the duration over which the Statement occurred.
extensions
dict
Consists of a dictionary of other properties as needed.
Source code inralph/models/xapi/base/results.py
class BaseXapiResult(BaseModelWithConfig):\n \"\"\"Pydantic model for `result` property.\n\n Attributes:\n score (dict): See BaseXapiResultScore.\n success (bool): Indicates whether the attempt on the Activity was successful.\n completion (bool): Indicates whether the Activity was completed.\n response (str): Consists of the response for the given Activity.\n duration (timedelta): Consists of the duration over which the Statement\n occurred.\n extensions (dict): Consists of a dictionary of other properties as needed.\n \"\"\"\n\n score: Optional[BaseXapiResultScore]\n success: Optional[StrictBool]\n completion: Optional[StrictBool]\n response: Optional[StrictStr]\n duration: Optional[timedelta]\n extensions: Optional[Dict[IRI, Union[str, int, bool, list, dict, None]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.results.BaseXapiResultScore","title":" BaseXapiResultScore (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for result score
property.
Attributes:
Name Type Descriptionscaled
int
Consists of the normalized score related to the experience.
raw
Decimal
Consists of the non-normalized score achieved by the Actor.
min
Decimal
Consists of the lowest possible score.
max
Decimal
Consists of the highest possible score.
Source code inralph/models/xapi/base/results.py
class BaseXapiResultScore(BaseModelWithConfig):\n \"\"\"Pydantic model for result `score` property.\n\n Attributes:\n scaled (int): Consists of the normalized score related to the experience.\n raw (Decimal): Consists of the non-normalized score achieved by the Actor.\n min (Decimal): Consists of the lowest possible score.\n max (Decimal): Consists of the highest possible score.\n \"\"\"\n\n scaled: Optional[conint(ge=-1, le=1)]\n raw: Optional[Decimal]\n min: Optional[Decimal]\n max: Optional[Decimal]\n\n @root_validator\n @classmethod\n def check_raw_min_max_relation(cls, values):\n \"\"\"Check the relationship `min < raw < max`.\"\"\"\n raw_value = values.get(\"raw\", None)\n min_value = values.get(\"min\", None)\n max_value = values.get(\"max\", None)\n\n if min_value:\n if max_value and min_value > max_value:\n raise ValueError(\"min cannot be greater than max\")\n if raw_value and min_value > raw_value:\n raise ValueError(\"min cannot be greater than raw\")\n if max_value:\n if raw_value and raw_value > max_value:\n raise ValueError(\"raw cannot be greater than max\")\n\n return values\n
"},{"location":"models/xapi/#ralph.models.xapi.base.results.BaseXapiResultScore.check_raw_min_max_relation","title":"check_raw_min_max_relation(values)
classmethod
","text":"Check the relationship min < raw < max
.
ralph/models/xapi/base/results.py
@root_validator\n@classmethod\ndef check_raw_min_max_relation(cls, values):\n \"\"\"Check the relationship `min < raw < max`.\"\"\"\n raw_value = values.get(\"raw\", None)\n min_value = values.get(\"min\", None)\n max_value = values.get(\"max\", None)\n\n if min_value:\n if max_value and min_value > max_value:\n raise ValueError(\"min cannot be greater than max\")\n if raw_value and min_value > raw_value:\n raise ValueError(\"min cannot be greater than raw\")\n if max_value:\n if raw_value and raw_value > max_value:\n raise ValueError(\"raw cannot be greater than max\")\n\n return values\n
"},{"location":"models/xapi/#ralph.models.xapi.base.statements","title":"statements
","text":"Base xAPI Statement
definitions.
BaseXapiStatement (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for base xAPI statements.
Attributes:
Name Type Descriptionid
UUID
Consists of a generated UUID string from the source event string.
actor
dict
Consists of a definition of who performed the action.
verb
dict
Consists of the action between an Actor and an Activity.
object
dict
Consists of a definition of the thing that was acted on.
result
dict
Consists of the outcome related to the Statement.
context
dict
Consists of contextual information for the Statement.
timestamp
datetime
Consists of the timestamp of when the event occurred.
stored
datetime
Consists of the timestamp of when the event was recorded.
authority
dict
Consists of the Actor asserting this Statement is true.
version
str
Consists of the associated xAPI version of the Statement.
attachments
list
Consists of a list of attachments.
Source code inralph/models/xapi/base/statements.py
class BaseXapiStatement(BaseModelWithConfig):\n \"\"\"Pydantic model for base xAPI statements.\n\n Attributes:\n id (UUID): Consists of a generated UUID string from the source event string.\n actor (dict): Consists of a definition of who performed the action.\n verb (dict): Consists of the action between an Actor and an Activity.\n object (dict): Consists of a definition of the thing that was acted on.\n result (dict): Consists of the outcome related to the Statement.\n context (dict): Consists of contextual information for the Statement.\n timestamp (datetime): Consists of the timestamp of when the event occurred.\n stored (datetime): Consists of the timestamp of when the event was recorded.\n authority (dict): Consists of the Actor asserting this Statement is true.\n version (str): Consists of the associated xAPI version of the Statement.\n attachments (list): Consists of a list of attachments.\n \"\"\"\n\n id: Optional[UUID]\n actor: Union[BaseXapiAgent, BaseXapiGroup]\n verb: BaseXapiVerb\n object: BaseXapiObject\n result: Optional[BaseXapiResult]\n context: Optional[BaseXapiContext]\n timestamp: Optional[datetime]\n stored: Optional[datetime]\n authority: Optional[Union[BaseXapiAgent, BaseXapiGroup]]\n version: constr(regex=r\"^1\\.0\\.[0-9]+$\") = \"1.0.0\" # noqa:F722\n attachments: Optional[List[BaseXapiAttachment]]\n\n @root_validator(pre=True)\n @classmethod\n def check_abscence_of_empty_and_invalid_values(cls, values):\n \"\"\"Check the model for empty and invalid values.\n\n Check that the `context` field contains `platform` and `revision` fields\n only if the `object.objectType` property is equal to `Activity`.\n \"\"\"\n for field, value in list(values.items()):\n if value in [None, \"\", {}]:\n raise ValueError(f\"{field}: invalid empty value\")\n if isinstance(value, dict) and field != \"extensions\":\n cls.check_abscence_of_empty_and_invalid_values(value)\n\n context = dict(values.get(\"context\", {}))\n if context:\n platform = context.get(\"platform\", {})\n revision = context.get(\"revision\", {})\n object_type = dict(values[\"object\"]).get(\"objectType\", \"Activity\")\n if (platform or revision) and object_type != \"Activity\":\n raise ValueError(\n \"revision and platform properties can only be used if the \"\n \"Statement's Object is an Activity\"\n )\n return values\n
"},{"location":"models/xapi/#ralph.models.xapi.base.statements.BaseXapiStatement.check_abscence_of_empty_and_invalid_values","title":"check_abscence_of_empty_and_invalid_values(values)
classmethod
","text":"Check the model for empty and invalid values.
Check that the context
field contains platform
and revision
fields only if the object.objectType
property is equal to Activity
.
ralph/models/xapi/base/statements.py
@root_validator(pre=True)\n@classmethod\ndef check_abscence_of_empty_and_invalid_values(cls, values):\n \"\"\"Check the model for empty and invalid values.\n\n Check that the `context` field contains `platform` and `revision` fields\n only if the `object.objectType` property is equal to `Activity`.\n \"\"\"\n for field, value in list(values.items()):\n if value in [None, \"\", {}]:\n raise ValueError(f\"{field}: invalid empty value\")\n if isinstance(value, dict) and field != \"extensions\":\n cls.check_abscence_of_empty_and_invalid_values(value)\n\n context = dict(values.get(\"context\", {}))\n if context:\n platform = context.get(\"platform\", {})\n revision = context.get(\"revision\", {})\n object_type = dict(values[\"object\"]).get(\"objectType\", \"Activity\")\n if (platform or revision) and object_type != \"Activity\":\n raise ValueError(\n \"revision and platform properties can only be used if the \"\n \"Statement's Object is an Activity\"\n )\n return values\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects","title":"unnested_objects
","text":"Base xAPI Object
definitions (1).
BaseXapiActivity (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for Activity
type property.
Attributes:
Name Type Descriptionid
IRI
Consists of an identifier for a single unique Activity.
objectType
str
Consists of the value Activity
.
definition
dict
See BaseXapiActivityDefinition and BaseXapiActivityInteractionDefinition.
Source code inralph/models/xapi/base/unnested_objects.py
class BaseXapiActivity(BaseModelWithConfig):\n \"\"\"Pydantic model for `Activity` type property.\n\n Attributes:\n id (IRI): Consists of an identifier for a single unique Activity.\n objectType (str): Consists of the value `Activity`.\n definition (dict): See BaseXapiActivityDefinition and\n BaseXapiActivityInteractionDefinition.\n \"\"\"\n\n id: IRI\n objectType: Optional[Literal[\"Activity\"]]\n definition: Optional[\n Union[\n BaseXapiActivityDefinition,\n BaseXapiActivityInteractionDefinition,\n ]\n ]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects.BaseXapiActivityDefinition","title":" BaseXapiActivityDefinition (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for Activity
type definition
property.
Attributes:
Name Type Descriptionname
LanguageMap
Consists of the human-readable/visual name of the Activity.
description
LanguageMap
Consists of a description of the Activity.
type
IRI
Consists of the type of the Activity.
moreInfo
URL
Consists of an URL to a document about the Activity.
extensions
dict
Consists of a dictionary of other properties as needed.
Source code inralph/models/xapi/base/unnested_objects.py
class BaseXapiActivityDefinition(BaseModelWithConfig):\n \"\"\"Pydantic model for `Activity` type `definition` property.\n\n Attributes:\n name (LanguageMap): Consists of the human-readable/visual name of the Activity.\n description (LanguageMap): Consists of a description of the Activity.\n type (IRI): Consists of the type of the Activity.\n moreInfo (URL): Consists of an URL to a document about the Activity.\n extensions (dict): Consists of a dictionary of other properties as needed.\n \"\"\"\n\n name: Optional[LanguageMap]\n description: Optional[LanguageMap]\n type: Optional[IRI]\n moreInfo: Optional[AnyUrl]\n extensions: Optional[Dict[IRI, Union[str, int, bool, list, dict, None]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects.BaseXapiActivityInteractionDefinition","title":" BaseXapiActivityInteractionDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for Activity
type definition
property.
It is defined for field with interaction properties.
Attributes:
Name Type DescriptioninteractionType
str
Consists of the type of the interaction.
correctResponsesPattern
list
Consists of a pattern for the correct response.
choices
list
Consists of a list of selectable choices.
scale
list
Consists of a list of the options on the likert
scale.
source
list
Consists of a list of sources to be matched.
target
list
Consists of a list of targets to be matched.
steps
list
Consists of a list of the elements making up the interaction.
Source code inralph/models/xapi/base/unnested_objects.py
class BaseXapiActivityInteractionDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for `Activity` type `definition` property.\n\n It is defined for field with interaction properties.\n\n Attributes:\n interactionType (str): Consists of the type of the interaction.\n correctResponsesPattern (list): Consists of a pattern for the correct response.\n choices (list): Consists of a list of selectable choices.\n scale (list): Consists of a list of the options on the `likert` scale.\n source (list): Consists of a list of sources to be matched.\n target (list): Consists of a list of targets to be matched.\n steps (list): Consists of a list of the elements making up the interaction.\n \"\"\"\n\n interactionType: Literal[\n \"true-false\",\n \"choice\",\n \"fill-in\",\n \"long-fill-in\",\n \"matching\",\n \"performance\",\n \"sequencing\",\n \"likert\",\n \"numeric\",\n \"other\",\n ]\n correctResponsesPattern: Optional[List[StrictStr]]\n choices: Optional[List[BaseXapiInteractionComponent]]\n scale: Optional[List[BaseXapiInteractionComponent]]\n source: Optional[List[BaseXapiInteractionComponent]]\n target: Optional[List[BaseXapiInteractionComponent]]\n steps: Optional[List[BaseXapiInteractionComponent]]\n\n @validator(\"choices\", \"scale\", \"source\", \"target\", \"steps\")\n @classmethod\n def check_unique_ids(cls, value):\n \"\"\"Check the uniqueness of interaction components IDs.\"\"\"\n if len(value) != len({x.id for x in value}):\n raise ValueError(\"Duplicate InteractionComponents are not valid\")\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects.BaseXapiActivityInteractionDefinition.check_unique_ids","title":"check_unique_ids(value)
classmethod
","text":"Check the uniqueness of interaction components IDs.
Source code inralph/models/xapi/base/unnested_objects.py
@validator(\"choices\", \"scale\", \"source\", \"target\", \"steps\")\n@classmethod\ndef check_unique_ids(cls, value):\n \"\"\"Check the uniqueness of interaction components IDs.\"\"\"\n if len(value) != len({x.id for x in value}):\n raise ValueError(\"Duplicate InteractionComponents are not valid\")\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects.BaseXapiInteractionComponent","title":" BaseXapiInteractionComponent (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for an interaction component.
Attributes:
Name Type Descriptionid
str
Consists of an identifier of the interaction component.
description
LanguageMap
Consists of the description of the interaction.
Source code inralph/models/xapi/base/unnested_objects.py
class BaseXapiInteractionComponent(BaseModelWithConfig):\n \"\"\"Pydantic model for an interaction component.\n\n Attributes:\n id (str): Consists of an identifier of the interaction component.\n description (LanguageMap): Consists of the description of the interaction.\n \"\"\"\n\n id: constr(regex=r\"^[^\\s]+$\") # noqa:F722\n description: Optional[LanguageMap]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects.BaseXapiStatementRef","title":" BaseXapiStatementRef (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for StatementRef
type property.
Attributes:
Name Type DescriptionobjectType
str
Consists of the value StatementRef
.
id
UUID
Consists of the UUID of the referenced statement.
Source code inralph/models/xapi/base/unnested_objects.py
class BaseXapiStatementRef(BaseModelWithConfig):\n \"\"\"Pydantic model for `StatementRef` type property.\n\n Attributes:\n objectType (str): Consists of the value `StatementRef`.\n id (UUID): Consists of the UUID of the referenced statement.\n \"\"\"\n\n id: UUID\n objectType: Literal[\"StatementRef\"]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.verbs","title":"verbs
","text":"Base xAPI Verb
definitions.
BaseXapiVerb (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for verb
property.
Attributes:
Name Type Descriptionid
IRI
Consists of an identifier for the verb.
display
LanguageMap
Consists of a human-readable representation of the verb.
Source code inralph/models/xapi/base/verbs.py
class BaseXapiVerb(BaseModelWithConfig):\n \"\"\"Pydantic model for `verb` property.\n\n Attributes:\n id (IRI): Consists of an identifier for the verb.\n display (LanguageMap): Consists of a human-readable representation of the verb.\n \"\"\"\n\n id: IRI\n display: Optional[LanguageMap]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts","title":"concepts
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types","title":"activity_types
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.acrossx_profile","title":"acrossx_profile
","text":"AcrossX Profile
activity types definitions.
MessageActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for message Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see MessageActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/acrossx_profile.py
class MessageActivity(BaseXapiActivity):\n \"\"\"Pydantic model for message `Activity` type.\n\n Attributes:\n definition (dict): see MessageActivityDefinition.\n \"\"\"\n\n definition: MessageActivityDefinition = MessageActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.acrossx_profile.MessageActivityDefinition","title":" MessageActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for message Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value https://w3id.org/xapi/acrossx/activities/message
.
ralph/models/xapi/concepts/activity_types/acrossx_profile.py
class MessageActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for message `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `https://w3id.org/xapi/acrossx/activities/message`.\n \"\"\"\n\n type: Literal[\n \"https://w3id.org/xapi/acrossx/activities/message\"\n ] = \"https://w3id.org/xapi/acrossx/activities/message\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.acrossx_profile.WebpageActivity","title":" WebpageActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for webpage Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see WebpageActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/acrossx_profile.py
class WebpageActivity(BaseXapiActivity):\n \"\"\"Pydantic model for webpage `Activity` type.\n\n Attributes:\n definition (dict): see WebpageActivityDefinition.\n \"\"\"\n\n definition: WebpageActivityDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.acrossx_profile.WebpageActivityDefinition","title":" WebpageActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for webpage Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value https://w3id.org/xapi/acrossx/activities/webpage
.
ralph/models/xapi/concepts/activity_types/acrossx_profile.py
class WebpageActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for webpage `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `https://w3id.org/xapi/acrossx/activities/webpage`.\n \"\"\"\n\n type: Literal[\"https://w3id.org/xapi/acrossx/activities/webpage\"]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.activity_streams_vocabulary","title":"activity_streams_vocabulary
","text":"Activity streams vocabulary
activity types definitions.
FileActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for file Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
See FileActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/activity_streams_vocabulary.py
class FileActivity(BaseXapiActivity):\n \"\"\"Pydantic model for file `Activity` type.\n\n Attributes:\n definition (dict): See FileActivityDefinition.\n \"\"\"\n\n definition: FileActivityDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.activity_streams_vocabulary.FileActivityDefinition","title":" FileActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for file Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://activitystrea.ms/file
.
ralph/models/xapi/concepts/activity_types/activity_streams_vocabulary.py
class FileActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for file `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value `http://activitystrea.ms/file`.\n \"\"\"\n\n type: Literal[\"http://activitystrea.ms/file\"]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.activity_streams_vocabulary.PageActivity","title":" PageActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for page Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
See PageActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/activity_streams_vocabulary.py
class PageActivity(BaseXapiActivity):\n \"\"\"Pydantic model for page `Activity` type.\n\n Attributes:\n definition (dict): See PageActivityDefinition.\n \"\"\"\n\n definition: PageActivityDefinition = PageActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.activity_streams_vocabulary.PageActivityDefinition","title":" PageActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for page Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://activitystrea.ms/schema/1.0/page
.
ralph/models/xapi/concepts/activity_types/activity_streams_vocabulary.py
class PageActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for page `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value `http://activitystrea.ms/schema/1.0/page`.\n \"\"\"\n\n type: Literal[\n \"http://activitystrea.ms/schema/1.0/page\"\n ] = \"http://activitystrea.ms/schema/1.0/page\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.audio","title":"audio
","text":"Audio
activity types definitions.
AudioActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for audio Activity
type.
Attributes:
Name Type Descriptionname
dict
Consists of the dictionary {\"en-US\": <name of the audio>}
.
definition
dict
See audioActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/audio.py
class AudioActivity(BaseXapiActivity):\n \"\"\"Pydantic model for audio `Activity` type.\n\n Attributes:\n name (dict): Consists of the dictionary `{\"en-US\": <name of the audio>}`.\n definition (dict): See audioActivityDefinition.\n \"\"\"\n\n definition: AudioActivityDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.audio.AudioActivityDefinition","title":" AudioActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for audio Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value https://w3id.org/xapi/audio/activity-type/audio
.
ralph/models/xapi/concepts/activity_types/audio.py
class AudioActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for audio `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `https://w3id.org/xapi/audio/activity-type/audio`.\n \"\"\"\n\n type: Literal[\"https://w3id.org/xapi/audio/activity-type/audio\"]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile","title":"scorm_profile
","text":"Scorm Profile
activity types definitions.
CMIInteractionActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for CMI Interaction Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see CMIInteractionActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/scorm_profile.py
class CMIInteractionActivity(BaseXapiActivity):\n \"\"\"Pydantic model for CMI Interaction `Activity` type.\n\n Attributes:\n definition (dict): see CMIInteractionActivityDefinition.\n \"\"\"\n\n definition: CMIInteractionActivityDefinition = CMIInteractionActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.CMIInteractionActivityDefinition","title":" CMIInteractionActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for CMI Interaction Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://adlnet.gov/expapi/activities/cmi.interaction
.
ralph/models/xapi/concepts/activity_types/scorm_profile.py
class CMIInteractionActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for CMI Interaction `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `http://adlnet.gov/expapi/activities/cmi.interaction`.\n \"\"\"\n\n type: Literal[\n \"http://adlnet.gov/expapi/activities/cmi.interaction\"\n ] = \"http://adlnet.gov/expapi/activities/cmi.interaction\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.CourseActivity","title":" CourseActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for course Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see CourseActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/scorm_profile.py
class CourseActivity(BaseXapiActivity):\n \"\"\"Pydantic model for course `Activity` type.\n\n Attributes:\n definition (dict): see CourseActivityDefinition.\n \"\"\"\n\n definition: CourseActivityDefinition = CourseActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.CourseActivityDefinition","title":" CourseActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for course Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://adlnet.gov/expapi/activities/course
.
ralph/models/xapi/concepts/activity_types/scorm_profile.py
class CourseActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for course `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `http://adlnet.gov/expapi/activities/course`.\n \"\"\"\n\n type: Literal[\n \"http://adlnet.gov/expapi/activities/course\"\n ] = \"http://adlnet.gov/expapi/activities/course\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.ModuleActivity","title":" ModuleActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for module Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see ModuleActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/scorm_profile.py
class ModuleActivity(BaseXapiActivity):\n \"\"\"Pydantic model for module `Activity` type.\n\n Attributes:\n definition (dict): see ModuleActivityDefinition.\n \"\"\"\n\n definition: ModuleActivityDefinition = ModuleActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.ModuleActivityDefinition","title":" ModuleActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for module Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://adlnet.gov/expapi/activities/module
.
ralph/models/xapi/concepts/activity_types/scorm_profile.py
class ModuleActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for module `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `http://adlnet.gov/expapi/activities/module`.\n \"\"\"\n\n type: Literal[\n \"http://adlnet.gov/expapi/activities/module\"\n ] = \"http://adlnet.gov/expapi/activities/module\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.ProfileActivity","title":" ProfileActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for profile Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see ProfileActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/scorm_profile.py
class ProfileActivity(BaseXapiActivity):\n \"\"\"Pydantic model for profile `Activity` type.\n\n Attributes:\n definition (dict): see ProfileActivityDefinition.\n \"\"\"\n\n definition: ProfileActivityDefinition = ProfileActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.ProfileActivityDefinition","title":" ProfileActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for profile Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://adlnet.gov/expapi/activities/profile
.
ralph/models/xapi/concepts/activity_types/scorm_profile.py
class ProfileActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for profile `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `http://adlnet.gov/expapi/activities/profile`.\n \"\"\"\n\n type: Literal[\n \"http://adlnet.gov/expapi/activities/profile\"\n ] = \"http://adlnet.gov/expapi/activities/profile\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.tincan_vocabulary","title":"tincan_vocabulary
","text":"Scorm Profile
activity types definitions.
DocumentActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for document Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see DocumentActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/tincan_vocabulary.py
class DocumentActivity(BaseXapiActivity):\n \"\"\"Pydantic model for document `Activity` type.\n\n Attributes:\n definition (dict): see DocumentActivityDefinition.\n \"\"\"\n\n definition: DocumentActivityDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.tincan_vocabulary.DocumentActivityDefinition","title":" DocumentActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for document Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://id.tincanapi.com/activitytype/document
.
ralph/models/xapi/concepts/activity_types/tincan_vocabulary.py
class DocumentActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for document `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `http://id.tincanapi.com/activitytype/document`.\n \"\"\"\n\n type: Literal[\"http://id.tincanapi.com/activitytype/document\"]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.video","title":"video
","text":"Video
activity types definitions.
VideoActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for video Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
See VideoActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/video.py
class VideoActivity(BaseXapiActivity):\n \"\"\"Pydantic model for video `Activity` type.\n\n Attributes:\n definition (dict): See VideoActivityDefinition.\n \"\"\"\n\n definition: VideoActivityDefinition = VideoActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.video.VideoActivityDefinition","title":" VideoActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for video Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value https://w3id.org/xapi/video/activity-type/video
.
ralph/models/xapi/concepts/activity_types/video.py
class VideoActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for video `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `https://w3id.org/xapi/video/activity-type/video`.\n \"\"\"\n\n type: Literal[\n \"https://w3id.org/xapi/video/activity-type/video\"\n ] = \"https://w3id.org/xapi/video/activity-type/video\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.virtual_classroom","title":"virtual_classroom
","text":"Virtual classroom
activity types definitions.
VirtualClassroomActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for virtual classroom Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
See VirtualClassroomActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/virtual_classroom.py
class VirtualClassroomActivity(BaseXapiActivity):\n \"\"\"Pydantic model for virtual classroom `Activity` type.\n\n Attributes:\n definition (dict): See VirtualClassroomActivityDefinition.\n \"\"\"\n\n definition: VirtualClassroomActivityDefinition = (\n VirtualClassroomActivityDefinition()\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.virtual_classroom.VirtualClassroomActivityDefinition","title":" VirtualClassroomActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for virtual classroom Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom
.
ralph/models/xapi/concepts/activity_types/virtual_classroom.py
class VirtualClassroomActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for virtual classroom `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom`.\n \"\"\"\n\n type: Literal[\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ] = \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.constants","title":"constants
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.concepts.constants.acrossx_profile","title":"acrossx_profile
","text":"Constants for AcrossX Profile
xAPI profile.
cmi5_profile
","text":"Constants for cmi5 Profile
xAPI profile.
lms
","text":"Constants for LMS
xAPI profile.
scorm_profile
","text":"Constants for Scorm Profile
xAPI profile.
tincan_vocabulary
","text":"Constants for TinCan Vocabulary
xAPI profile.
video
","text":"Constants for Video
xAPI profile.
verbs
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.acrossx_profile","title":"acrossx_profile
","text":"AcrossX Profile
verbs definitions.
PostedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for posted verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/acrossx/verbs/posted
.
display
dict
Consists of the dictionary {\"en-US\": \"posted\"}
.
ralph/models/xapi/concepts/verbs/acrossx_profile.py
class PostedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for posted `verb`.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/acrossx/verbs/posted`.\n display (dict): Consists of the dictionary `{\"en-US\": \"posted\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/acrossx/verbs/posted\"\n ] = \"https://w3id.org/xapi/acrossx/verbs/posted\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"posted\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.activity_streams_vocabulary","title":"activity_streams_vocabulary
","text":"Activity streams vocabulary
verbs definitions.
JoinVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for join verb.
Attributes:
Name Type Descriptionid
str
Consists of the value http://activitystrea.ms/join
.
display
dict
Consists of the dictionary {\"en-US\": \"joined\"}
.
ralph/models/xapi/concepts/verbs/activity_streams_vocabulary.py
class JoinVerb(BaseXapiVerb):\n \"\"\"Pydantic model for join verb.\n\n Attributes:\n id (str): Consists of the value `http://activitystrea.ms/join`.\n display (dict): Consists of the dictionary `{\"en-US\": \"joined\"}`.\n \"\"\"\n\n id: Literal[\"http://activitystrea.ms/join\"] = \"http://activitystrea.ms/join\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"joined\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.activity_streams_vocabulary.LeaveVerb","title":" LeaveVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for leave verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://activitystrea.ms/leave
.
display
dict
Consists of the dictionary {\"en-US\": \"left\"}
.
ralph/models/xapi/concepts/verbs/activity_streams_vocabulary.py
class LeaveVerb(BaseXapiVerb):\n \"\"\"Pydantic model for leave `verb`.\n\n Attributes:\n id (str): Consists of the value `http://activitystrea.ms/leave`.\n display (dict): Consists of the dictionary `{\"en-US\": \"left\"}`.\n \"\"\"\n\n id: Literal[\"http://activitystrea.ms/leave\"] = \"http://activitystrea.ms/leave\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"left\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.adl_vocabulary","title":"adl_vocabulary
","text":"ADL Vocabulary
verbs definitions.
AnsweredVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for answered verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/answered
.
display
dict
Consists of the dictionary {\"en-US\": \"answered\"}
.
ralph/models/xapi/concepts/verbs/adl_vocabulary.py
class AnsweredVerb(BaseXapiVerb):\n \"\"\"Pydantic model for answered `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/answered`.\n display (dict): Consists of the dictionary `{\"en-US\": \"answered\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/answered\"\n ] = \"http://adlnet.gov/expapi/verbs/answered\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"answered\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.adl_vocabulary.AskedVerb","title":" AskedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for asked verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/asked
.
display
dict
Consists of the dictionary {\"en-US\": \"asked\"}
.
ralph/models/xapi/concepts/verbs/adl_vocabulary.py
class AskedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for asked `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/asked`.\n display (dict): Consists of the dictionary `{\"en-US\": \"asked\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/asked\"\n ] = \"http://adlnet.gov/expapi/verbs/asked\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"asked\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.adl_vocabulary.RegisteredVerb","title":" RegisteredVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for registered verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/registered
.
display
dict
Consists of the dictionary {\"en-US\": \"registered\"}
.
ralph/models/xapi/concepts/verbs/adl_vocabulary.py
class RegisteredVerb(BaseXapiVerb):\n \"\"\"Pydantic model for registered `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/registered`.\n display (dict): Consists of the dictionary `{\"en-US\": \"registered\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/registered\"\n ] = \"http://adlnet.gov/expapi/verbs/registered\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"registered\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.navy_common_reference_profile","title":"navy_common_reference_profile
","text":"Navy Common Reference Profile
verbs definitions.
AccessedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for accessed verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/netc/verbs/accessed
.
display
dict
Consists of the dictionary {\"en-US\": \"accessed\"}
.
ralph/models/xapi/concepts/verbs/navy_common_reference_profile.py
class AccessedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for accessed `verb`.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/netc/verbs/accessed`.\n display (dict): Consists of the dictionary `{\"en-US\": \"accessed\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/netc/verbs/accessed\"\n ] = \"https://w3id.org/xapi/netc/verbs/accessed\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"accessed\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.navy_common_reference_profile.UploadedVerb","title":" UploadedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for uploaded verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/netc/verbs/uploaded
.
display
dict
Consists of the dictionary {\"en-US\": \"uploaded\"}
.
ralph/models/xapi/concepts/verbs/navy_common_reference_profile.py
class UploadedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for uploaded `verb`.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/netc/verbs/uploaded`.\n display (dict): Consists of the dictionary `{\"en-US\": \"uploaded\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/netc/verbs/uploaded\"\n ] = \"https://w3id.org/xapi/netc/verbs/uploaded\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"uploaded\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.scorm_profile","title":"scorm_profile
","text":"Scorm Profile
verbs definitions.
CompletedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for completed verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/completed
.
display
dict
Consists of the dictionary {\"en-US\": \"completed\"}
.
ralph/models/xapi/concepts/verbs/scorm_profile.py
class CompletedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for completed `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/completed`.\n display (dict): Consists of the dictionary `{\"en-US\": \"completed\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/completed\"\n ] = \"http://adlnet.gov/expapi/verbs/completed\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"completed\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.scorm_profile.InitializedVerb","title":" InitializedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for initialized verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/initialized
.
display
Dict
Consists of the dictionary {\"en-US\": \"initialized\"}
.
ralph/models/xapi/concepts/verbs/scorm_profile.py
class InitializedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for initialized `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/initialized`.\n display (Dict): Consists of the dictionary `{\"en-US\": \"initialized\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/initialized\"\n ] = \"http://adlnet.gov/expapi/verbs/initialized\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"initialized\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.scorm_profile.InteractedVerb","title":" InteractedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for interacted verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/interacted
.
display
dict
Consists of the dictionary {\"en-US\": \"interacted\"}
.
ralph/models/xapi/concepts/verbs/scorm_profile.py
class InteractedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for interacted `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/interacted`.\n display (dict): Consists of the dictionary `{\"en-US\": \"interacted\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/interacted\"\n ] = \"http://adlnet.gov/expapi/verbs/interacted\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"interacted\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.scorm_profile.TerminatedVerb","title":" TerminatedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for terminated verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/terminated
.
display
dict
Consists of the dictionary {\"en-US\": \"terminated\"}
.
ralph/models/xapi/concepts/verbs/scorm_profile.py
class TerminatedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for terminated `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/terminated`.\n display (dict): Consists of the dictionary `{\"en-US\": \"terminated\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/terminated\"\n ] = \"http://adlnet.gov/expapi/verbs/terminated\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"terminated\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.tincan_vocabulary","title":"tincan_vocabulary
","text":"TinCan Vocabulary
verbs definitions.
DownloadedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for downloaded verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://id.tincanapi.com/verb/downloaded
.
display
dict
Consists of the dictionary {\"en-US\": \"downloaded\"}
.
ralph/models/xapi/concepts/verbs/tincan_vocabulary.py
class DownloadedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for downloaded `verb`.\n\n Attributes:\n id (str): Consists of the value `http://id.tincanapi.com/verb/downloaded`.\n display (dict): Consists of the dictionary `{\"en-US\": \"downloaded\"}`.\n \"\"\"\n\n id: Literal[\n \"http://id.tincanapi.com/verb/downloaded\"\n ] = \"http://id.tincanapi.com/verb/downloaded\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"downloaded\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.tincan_vocabulary.UnregisteredVerb","title":" UnregisteredVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for unregistered verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://id.tincanapi.com/verb/unregistered
.
display
dict
Consists of the dictionary {\"en-US\": \"unregistered\"}
.
ralph/models/xapi/concepts/verbs/tincan_vocabulary.py
class UnregisteredVerb(BaseXapiVerb):\n \"\"\"Pydantic model for unregistered `verb`.\n\n Attributes:\n id (str): Consists of the value `http://id.tincanapi.com/verb/unregistered`.\n display (dict): Consists of the dictionary `{\"en-US\": \"unregistered\"}`.\n \"\"\"\n\n id: Literal[\n \"http://id.tincanapi.com/verb/unregistered\"\n ] = \"http://id.tincanapi.com/verb/unregistered\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"unregistered\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.tincan_vocabulary.ViewedVerb","title":" ViewedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for viewed verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://id.tincanapi.com/verb/viewed
.
display
dict
Consists of the dictionary {\"en-US\": \"viewed\"}
.
ralph/models/xapi/concepts/verbs/tincan_vocabulary.py
class ViewedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for viewed `verb`.\n\n Attributes:\n id (str): Consists of the value `http://id.tincanapi.com/verb/viewed`.\n display (dict): Consists of the dictionary `{\"en-US\": \"viewed\"}`.\n \"\"\"\n\n id: Literal[\n \"http://id.tincanapi.com/verb/viewed\"\n ] = \"http://id.tincanapi.com/verb/viewed\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"viewed\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.video","title":"video
","text":"Video
verbs definitions.
PausedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for paused verb
field.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/video/verbs/paused
.
display
dict
Consists of the dictionary {\"en-US\": \"paused\"}
.
ralph/models/xapi/concepts/verbs/video.py
class PausedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for paused `verb` field.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/video/verbs/paused`.\n display (dict): Consists of the dictionary `{\"en-US\": \"paused\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/video/verbs/paused\"\n ] = \"https://w3id.org/xapi/video/verbs/paused\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"paused\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.video.PlayedVerb","title":" PlayedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for played verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/video/verbs/played
.
display
dict
Consists of the dictionary {\"en-US\": \"played\"}
.
ralph/models/xapi/concepts/verbs/video.py
class PlayedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for played `verb`.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/video/verbs/played`.\n display (dict): Consists of the dictionary `{\"en-US\": \"played\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/video/verbs/played\"\n ] = \"https://w3id.org/xapi/video/verbs/played\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"played\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.video.SeekedVerb","title":" SeekedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for seeked verb
field.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/video/verbs/seeked
.
display
dict
Consists of the dictionary {\"en-US\": \"seeked\"}
.
ralph/models/xapi/concepts/verbs/video.py
class SeekedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for seeked `verb` field.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/video/verbs/seeked`.\n display (dict): Consists of the dictionary `{\"en-US\": \"seeked\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/video/verbs/seeked\"\n ] = \"https://w3id.org/xapi/video/verbs/seeked\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"seeked\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom","title":"virtual_classroom
","text":"Virtual classroom
verbs definitions.
LoweredHandVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for lowered hand verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/lowered-hand
.
display
dict
Consists of the dictionary {\"en-US\": \"lowered hand\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class LoweredHandVerb(BaseXapiVerb):\n \"\"\"Pydantic model for lowered hand `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/lowered-hand`.\n display (dict): Consists of the dictionary `{\"en-US\": \"lowered hand\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/lowered-hand\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/lowered-hand\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"lowered hand\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.MutedVerb","title":" MutedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for muted verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/muted
.
display
dict
Consists of the dictionary {\"en-US\": \"muted\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class MutedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for muted `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/muted`.\n display (dict): Consists of the dictionary `{\"en-US\": \"muted\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/muted\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/muted\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"muted\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.RaisedHandVerb","title":" RaisedHandVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for raised hand verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/raised-hand
.
display
dict
Consists of the dictionary {\"en-US\": \"raised hand\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class RaisedHandVerb(BaseXapiVerb):\n \"\"\"Pydantic model for raised hand `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/raised-hand`.\n display (dict): Consists of the dictionary `{\"en-US\": \"raised hand\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/raised-hand\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/raised-hand\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"raised hand\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.SharedScreenVerb","title":" SharedScreenVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for shared screen verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/shared-screen
.
display
dict
Consists of the dictionary {\"en-US\": \"shared screen\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class SharedScreenVerb(BaseXapiVerb):\n \"\"\"Pydantic model for shared screen `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/shared-screen`.\n display (dict): Consists of the dictionary `{\"en-US\": \"shared screen\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/shared-screen\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/shared-screen\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"shared screen\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.StartedCameraVerb","title":" StartedCameraVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for started camera verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/started-camera
.
display
dict
Consists of the dictionary {\"en-US\": \"started camera\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class StartedCameraVerb(BaseXapiVerb):\n \"\"\"Pydantic model for started camera `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/started-camera`.\n display (dict): Consists of the dictionary `{\"en-US\": \"started camera\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/started-camera\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/started-camera\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"started camera\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.StoppedCameraVerb","title":" StoppedCameraVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for stopped camera verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/stopped-camera
.
display
dict
Consists of the dictionary {\"en-US\": \"stopped camera\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class StoppedCameraVerb(BaseXapiVerb):\n \"\"\"Pydantic model for stopped camera `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/stopped-camera`.\n display (dict): Consists of the dictionary `{\"en-US\": \"stopped camera\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/stopped-camera\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/stopped-camera\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"stopped camera\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.UnmutedVerb","title":" UnmutedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for unmuted verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/unmuted
.
display
dict
Consists of the dictionary {\"en-US\": \"unmuted\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class UnmutedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for unmuted `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/unmuted`.\n display (dict): Consists of the dictionary `{\"en-US\": \"unmuted\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/unmuted\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/unmuted\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"unmuted\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.UnsharedScreenVerb","title":" UnsharedScreenVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for unshared screen verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/unshared-screen
.
display
dict
Consists of the dictionary {\"en-US\": \"unshared screen\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class UnsharedScreenVerb(BaseXapiVerb):\n \"\"\"Pydantic model for unshared screen `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/unshared-screen`.\n display (dict): Consists of the dictionary `{\"en-US\": \"unshared screen\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/unshared-screen\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/unshared-screen\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"unshared screen\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.config","title":"config
","text":"Base xAPI model configuration.
"},{"location":"models/xapi/#ralph.models.xapi.config.BaseExtensionModelWithConfig","title":" BaseExtensionModelWithConfig (BaseModel)
pydantic-model
","text":"Pydantic model for extension configuration shared among all models.
Source code inralph/models/xapi/config.py
class BaseExtensionModelWithConfig(BaseModel):\n \"\"\"Pydantic model for extension configuration shared among all models.\"\"\"\n\n class Config: # pylint: disable=missing-class-docstring # noqa: D106\n extra = Extra.allow\n min_anystr_length = 0\n
"},{"location":"models/xapi/#ralph.models.xapi.config.BaseModelWithConfig","title":" BaseModelWithConfig (BaseModel)
pydantic-model
","text":"Pydantic model for base configuration shared among all models.
Source code inralph/models/xapi/config.py
class BaseModelWithConfig(BaseModel):\n \"\"\"Pydantic model for base configuration shared among all models.\"\"\"\n\n class Config: # pylint: disable=missing-class-docstring # noqa: D106\n extra = Extra.forbid\n min_anystr_length = 1\n
"},{"location":"models/xapi/#ralph.models.xapi.constants","title":"constants
","text":"Constants for xAPI specifications.
"},{"location":"models/xapi/#ralph.models.xapi.lms","title":"lms
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.lms.contexts","title":"contexts
","text":"LMS xAPI events context fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSCommonContext","title":" LMSCommonContext (LMSContext)
pydantic-model
","text":"Pydantic model for LMS common context
property.
Attributes:
Name Type Descriptionextensions
dict
See LMSCommonContextExtensions.
Source code inralph/models/xapi/lms/contexts.py
class LMSCommonContext(LMSContext):\n \"\"\"Pydantic model for LMS common `context` property.\n\n Attributes:\n extensions (dict): See LMSCommonContextExtensions.\n \"\"\"\n\n extensions: Optional[LMSCommonContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSCommonContextExtensions","title":" LMSCommonContextExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for common LMS statements context
.extensions
property.
This model is used for downloaded a video
, downloaded a document
, downloaded an audio
, downloaded a file
, uploaded a video
, uploaded a document
and uploaded an audio
, uploaded a file
statement templates.
Attributes:
Name Type Descriptionsession_id
uuid
ID of the active session.
Source code inralph/models/xapi/lms/contexts.py
class LMSCommonContextExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for common LMS statements `context`.`extensions` property.\n\n This model is used for `downloaded a video`, `downloaded a document`,\n `downloaded an audio`, `downloaded a file`, `uploaded a video`,\n `uploaded a document` and `uploaded an audio`, `uploaded a file`\n statement templates.\n\n Attributes:\n session_id (uuid): ID of the active session.\n \"\"\"\n\n session_id: Optional[UUID] = Field(alias=CONTEXT_EXTENSION_SESSION_ID)\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSContext","title":" LMSContext (BaseXapiContext)
pydantic-model
","text":"Pydantic model for LMS base context
property.
Attributes:
Name Type DescriptioncontextActivities
dict
see LMSContextContextActivities.
Source code inralph/models/xapi/lms/contexts.py
class LMSContext(BaseXapiContext):\n \"\"\"Pydantic model for LMS base `context` property.\n\n Attributes:\n contextActivities (dict): see LMSContextContextActivities.\n \"\"\"\n\n contextActivities: LMSContextContextActivities\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSContextContextActivities","title":" LMSContextContextActivities (BaseXapiContextContextActivities)
pydantic-model
","text":"Pydantic model for LMS context
.contextActivities
property.
Attributes:
Name Type Descriptioncategory
dict or list
see LMSProfileActivity.
Source code inralph/models/xapi/lms/contexts.py
class LMSContextContextActivities(BaseXapiContextContextActivities):\n \"\"\"Pydantic model for LMS `context`.`contextActivities` property.\n\n Attributes:\n category (dict or list): see LMSProfileActivity.\n \"\"\"\n\n category: Union[\n LMSProfileActivity, List[Union[LMSProfileActivity, BaseXapiActivity]]\n ]\n\n @validator(\"category\")\n @classmethod\n def check_presence_of_profile_activity_category(\n cls,\n value: Union[\n LMSProfileActivity, List[Union[LMSProfileActivity, BaseXapiActivity]]\n ],\n ):\n \"\"\"Check that the category list contains a `LMSProfileActivity`.\"\"\"\n if isinstance(value, LMSProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, LMSProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `LMSProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSContextContextActivities.check_presence_of_profile_activity_category","title":"check_presence_of_profile_activity_category(value)
classmethod
","text":"Check that the category list contains a LMSProfileActivity
.
ralph/models/xapi/lms/contexts.py
@validator(\"category\")\n@classmethod\ndef check_presence_of_profile_activity_category(\n cls,\n value: Union[\n LMSProfileActivity, List[Union[LMSProfileActivity, BaseXapiActivity]]\n ],\n):\n \"\"\"Check that the category list contains a `LMSProfileActivity`.\"\"\"\n if isinstance(value, LMSProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, LMSProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `LMSProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSDownloadedAudioContext","title":" LMSDownloadedAudioContext (LMSContext)
pydantic-model
","text":"Pydantic model for LMS downloaded audio context
property.
Attributes:
Name Type Descriptionextensions
dict
See LMSDownloadedAudioContextExtensions.
Source code inralph/models/xapi/lms/contexts.py
class LMSDownloadedAudioContext(LMSContext):\n \"\"\"Pydantic model for LMS downloaded audio `context` property.\n\n Attributes:\n extensions (dict): See LMSDownloadedAudioContextExtensions.\n \"\"\"\n\n extensions: Optional[LMSDownloadedAudioContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSDownloadedAudioContextExtensions","title":" LMSDownloadedAudioContextExtensions (LMSCommonContextExtensions)
pydantic-model
","text":"Pydantic model for LMS downloaded audio context
.extensions
property.
Attributes:
Name Type Descriptionlength
float
Length of the audio.
Source code inralph/models/xapi/lms/contexts.py
class LMSDownloadedAudioContextExtensions(LMSCommonContextExtensions):\n \"\"\"Pydantic model for LMS downloaded audio `context`.`extensions` property.\n\n Attributes:\n length (float): Length of the audio.\n \"\"\"\n\n length: Optional[NonNegativeFloat] = Field(alias=CONTEXT_EXTENSION_LENGTH)\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSDownloadedVideoContext","title":" LMSDownloadedVideoContext (LMSContext)
pydantic-model
","text":"Pydantic model for LMS downloaded video context
property.
Attributes:
Name Type Descriptionextensions
dict
See LMSDownloadedVideoContextExtensions.
Source code inralph/models/xapi/lms/contexts.py
class LMSDownloadedVideoContext(LMSContext):\n \"\"\"Pydantic model for LMS downloaded video `context` property.\n\n Attributes:\n extensions (dict): See LMSDownloadedVideoContextExtensions.\n \"\"\"\n\n extensions: Optional[LMSDownloadedVideoContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSDownloadedVideoContextExtensions","title":" LMSDownloadedVideoContextExtensions (LMSCommonContextExtensions)
pydantic-model
","text":"Pydantic model for LMS downloaded video context
.extensions
property.
Attributes:
Name Type Descriptionlength
float
Length of the video.
quality
int
Video resolution or quality of the video.
Source code inralph/models/xapi/lms/contexts.py
class LMSDownloadedVideoContextExtensions(LMSCommonContextExtensions):\n \"\"\"Pydantic model for LMS downloaded video `context`.`extensions` property.\n\n Attributes:\n length (float): Length of the video.\n quality (int): Video resolution or quality of the video.\n \"\"\"\n\n length: Optional[condecimal(ge=0, decimal_places=3)] = Field(\n alias=CONTEXT_EXTENSION_LENGTH\n )\n quality: Optional[PositiveInt] = Field(alias=CONTEXT_EXTENSION_QUALITY)\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSProfileActivity","title":" LMSProfileActivity (ProfileActivity)
pydantic-model
","text":"Pydantic model for LMS profile
activity type.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/lms
.
ralph/models/xapi/lms/contexts.py
class LMSProfileActivity(ProfileActivity):\n \"\"\"Pydantic model for LMS `profile` activity type.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/lms`.\n \"\"\"\n\n id: Literal[\"https://w3id.org/xapi/lms\"] = \"https://w3id.org/xapi/lms\"\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSRegistrationContext","title":" LMSRegistrationContext (LMSContext)
pydantic-model
","text":"Pydantic model for LMS registration statements context
property.
This model is used for registered to a course
and unregistered to a course
statement templates.
Attributes:
Name Type Descriptionextensions
dict
see LMSRegistrationContextExtensions.
Source code inralph/models/xapi/lms/contexts.py
class LMSRegistrationContext(LMSContext):\n \"\"\"Pydantic model for LMS registration statements `context` property.\n\n This model is used for `registered to a course` and\n `unregistered to a course` statement templates.\n\n Attributes:\n extensions (dict): see LMSRegistrationContextExtensions.\n \"\"\"\n\n extensions: Optional[LMSRegistrationContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSRegistrationContextExtensions","title":" LMSRegistrationContextExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for LMS registration context
.extensions
property.
Attributes:
Name Type Descriptionstarting_date
datetime
Starting date of the activity, formatted according to the normal format of ISO 8601.
ending_date
datetime
Ending date of the activity, formatted according to the normal format of ISO 8601.
role
str
Role of the actor. For example: admin
, manager
, teacher
, guest
, learner
or staff
.
ralph/models/xapi/lms/contexts.py
class LMSRegistrationContextExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for LMS registration `context`.`extensions` property.\n\n Attributes:\n starting_date (datetime): Starting date of the activity, formatted according to\n the normal format of ISO 8601.\n ending_date (datetime): Ending date of the activity, formatted according to the\n normal format of ISO 8601.\n role (str): Role of the actor. For example: `admin`, `manager`, `teacher`,\n `guest`, `learner` or `staff`.\n \"\"\"\n\n starting_date: Optional[datetime] = Field(alias=CONTEXT_EXTENSION_STARTING_DATE)\n ending_date: Optional[datetime] = Field(alias=CONTEXT_EXTENSION_ENDING_DATE)\n role: Optional[str] = Field(alias=CONTEXT_EXTENSION_ROLE)\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects","title":"objects
","text":"LMS xAPI events object fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSFileObject","title":" LMSFileObject (FileActivity)
pydantic-model
","text":"Pydantic model for LMS file object
property.
Attributes:
Name Type Descriptiondefinition
dict
see LMSFileObjectDefinition.
Source code inralph/models/xapi/lms/objects.py
class LMSFileObject(FileActivity):\n \"\"\"Pydantic model for LMS file `object` property.\n\n Attributes:\n definition (dict): see LMSFileObjectDefinition.\n \"\"\"\n\n definition: LMSFileObjectDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSFileObjectDefinition","title":" LMSFileObjectDefinition (FileActivityDefinition)
pydantic-model
","text":"Pydantic model for LMS file object
.definition
property.
Attributes:
Name Type Descriptionextensions
dict
see LMSFileObjectDefinitionExtensions.
Source code inralph/models/xapi/lms/objects.py
class LMSFileObjectDefinition(FileActivityDefinition):\n \"\"\"Pydantic model for LMS file `object`.`definition` property.\n\n Attributes:\n extensions (dict): see LMSFileObjectDefinitionExtensions.\n \"\"\"\n\n extensions: Optional[LMSFileObjectDefinitionExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSFileObjectDefinitionExtensions","title":" LMSFileObjectDefinitionExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for LMS file object
.definition
.extensions
property.
Attributes:
Name Type Descriptiontype
str
Characterisation of the MIME type of the file.
Source code inralph/models/xapi/lms/objects.py
class LMSFileObjectDefinitionExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for LMS file `object`.`definition`.`extensions` property.\n\n Attributes:\n type (str): Characterisation of the MIME type of the file.\n \"\"\"\n\n type: str = Field(alias=ACTIVITY_EXTENSIONS_TYPE)\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSPageObject","title":" LMSPageObject (WebpageActivity)
pydantic-model
","text":"Pydantic model for LMS page object
property.
Attributes:
Name Type Descriptiondefinition
dict
see LMSPageObjectDefinition.
Source code inralph/models/xapi/lms/objects.py
class LMSPageObject(WebpageActivity):\n \"\"\"Pydantic model for LMS page `object` property.\n\n Attributes:\n definition (dict): see LMSPageObjectDefinition.\n \"\"\"\n\n definition: LMSPageObjectDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSPageObjectDefinition","title":" LMSPageObjectDefinition (WebpageActivityDefinition)
pydantic-model
","text":"Pydantic model for LMS page object
.definition
property.
Attributes:
Name Type Descriptionextensions
dict
see LMSPageObjectDefinitionExtensions.
Source code inralph/models/xapi/lms/objects.py
class LMSPageObjectDefinition(WebpageActivityDefinition):\n \"\"\"Pydantic model for LMS page `object`.`definition` property.\n\n Attributes:\n extensions (dict): see LMSPageObjectDefinitionExtensions.\n \"\"\"\n\n extensions: Optional[LMSPageObjectDefinitionExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSPageObjectDefinitionExtensions","title":" LMSPageObjectDefinitionExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for LMS page object
.definition
.extensions
property.
Attributes:
Name Type Descriptiontype
str
Characterisation of the page. Can be either course
, course_list
, user_space
value.
ralph/models/xapi/lms/objects.py
class LMSPageObjectDefinitionExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for LMS page `object`.`definition`.`extensions` property.\n\n Attributes:\n type (str): Characterisation of the page. Can be either `course`,\n `course_list`, `user_space` value.\n \"\"\"\n\n type: Optional[Literal[\"course\", \"course_list\", \"user_space\"]] = Field(\n alias=ACTIVITY_EXTENSIONS_TYPE\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements","title":"statements
","text":"LMS xAPI event definitions.
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.BaseLMSStatement","title":" BaseLMSStatement (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for LMS core statements.
Attributes:
Name Type Descriptiontimestamp
datetime
Timestamp of when the event occurred.
Source code inralph/models/xapi/lms/statements.py
class BaseLMSStatement(BaseXapiStatement):\n \"\"\"Pydantic model for LMS core statements.\n\n Attributes:\n timestamp (datetime): Timestamp of when the event occurred.\n \"\"\"\n\n timestamp: datetime\n context: LMSContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSAccessedFile","title":" LMSAccessedFile (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS accessed a file
statement.
Example: John has accessed a file such as a pdf, doc, txt, ppt, xls, csv, etc\u2026
Attributes:
Name Type Descriptionverb
dict
See AccessedVerb.
object
dict
See LMSFileObject.
Source code inralph/models/xapi/lms/statements.py
class LMSAccessedFile(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `accessed a file` statement.\n\n Example: John has accessed a file such as a pdf, doc, txt, ppt, xls, csv, etc...\n\n Attributes:\n verb (dict): See AccessedVerb.\n object (dict): See LMSFileObject.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/netc/verbs/accessed\",\n object__definition__type=\"http://activitystrea.ms/file\",\n )\n\n verb: AccessedVerb = AccessedVerb()\n object: LMSFileObject\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSAccessedPage","title":" LMSAccessedPage (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS accessed a page
statement.
Example: John has accessed a page of an LMS or a website.
Attributes:
Name Type Descriptionverb
dict
See AccessedVerb.
object
dict
See LMSPageObject.
Source code inralph/models/xapi/lms/statements.py
class LMSAccessedPage(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `accessed a page` statement.\n\n Example: John has accessed a page of an LMS or a website.\n\n Attributes:\n verb (dict): See AccessedVerb.\n object (dict): See LMSPageObject.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/netc/verbs/accessed\",\n object__definition__type=\"https://w3id.org/xapi/acrossx/activities/webpage\",\n )\n\n verb: AccessedVerb = AccessedVerb()\n object: LMSPageObject\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSDownloadedAudio","title":" LMSDownloadedAudio (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS downloaded an audio
statement.
Example: John downloaded (rather than played) an audio.
Attributes:
Name Type Descriptionverb
dict
See DownloadedVerb.
object
dict
See AudioActivity.
context
dict
see LMSDownloadedAudioContext.
Source code inralph/models/xapi/lms/statements.py
class LMSDownloadedAudio(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `downloaded an audio` statement.\n\n Example: John downloaded (rather than played) an audio.\n\n Attributes:\n verb (dict): See DownloadedVerb.\n object (dict): See AudioActivity.\n context (dict): see LMSDownloadedAudioContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/audio/activity-type/audio\",\n verb__id=\"http://id.tincanapi.com/verb/downloaded\",\n )\n\n object: AudioActivity\n verb: DownloadedVerb = DownloadedVerb()\n context: LMSDownloadedAudioContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSDownloadedDocument","title":" LMSDownloadedDocument (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS downloaded a document
statement.
Example: John downloaded (rather than accessed or opened) a document.
Attributes:
Name Type Descriptionverb
dict
See DownloadedVerb.
object
dict
See DocumentActivity.
context
dict
see LMSCommonContext.
Source code inralph/models/xapi/lms/statements.py
class LMSDownloadedDocument(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `downloaded a document` statement.\n\n Example: John downloaded (rather than accessed or opened) a document.\n\n Attributes:\n verb (dict): See DownloadedVerb.\n object (dict): See DocumentActivity.\n context (dict): see LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://id.tincanapi.com/activitytype/document\",\n verb__id=\"http://id.tincanapi.com/verb/downloaded\",\n )\n\n object: DocumentActivity\n verb: DownloadedVerb = DownloadedVerb()\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSDownloadedFile","title":" LMSDownloadedFile (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS downloaded a file
statement.
Example: John has uploaded a file such as a pdf, doc, txt, ppt, xls, csv, etc\u2026
Attributes:
Name Type Descriptionverb
dict
See DownloadedVerb.
object
dict
See LMSFileObject.
context
dict
see LMSCommonContext.
Source code inralph/models/xapi/lms/statements.py
class LMSDownloadedFile(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `downloaded a file` statement.\n\n Example: John has uploaded a file such as a pdf, doc, txt, ppt, xls, csv, etc...\n\n Attributes:\n verb (dict): See DownloadedVerb.\n object (dict): See LMSFileObject.\n context (dict): see LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://id.tincanapi.com/verb/downloaded\",\n object__definition__type=\"http://activitystrea.ms/file\",\n )\n\n verb: DownloadedVerb = DownloadedVerb()\n object: LMSFileObject\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSDownloadedVideo","title":" LMSDownloadedVideo (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS downloaded a video
statement.
Example: John downloaded (rather than played) a video.
Attributes:
Name Type Descriptionverb
dict
See DownloadedVerb.
object
dict
See VideoActivity.
context
dict
See LMSDownloadedVideoContext.
Source code inralph/models/xapi/lms/statements.py
class LMSDownloadedVideo(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `downloaded a video` statement.\n\n Example: John downloaded (rather than played) a video.\n\n Attributes:\n verb (dict): See DownloadedVerb.\n object (dict): See VideoActivity.\n context (dict): See LMSDownloadedVideoContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://id.tincanapi.com/verb/downloaded\",\n )\n\n object: VideoActivity\n verb: DownloadedVerb = DownloadedVerb()\n context: LMSDownloadedVideoContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSRegisteredCourse","title":" LMSRegisteredCourse (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS registered to a course
statement.
Example: John is registered to a course.
Attributes:
Name Type Descriptionverb
dict
See RegisteredVerb.
object
dict
See CourseActivity.
context
dict
See LMSRegistrationContext.
Source code inralph/models/xapi/lms/statements.py
class LMSRegisteredCourse(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `registered to a course` statement.\n\n Example: John is registered to a course.\n\n Attributes:\n verb (dict): See RegisteredVerb.\n object (dict): See CourseActivity.\n context (dict): See LMSRegistrationContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/registered\",\n object__definition__type=\"http://adlnet.gov/expapi/activities/course\",\n )\n\n verb: RegisteredVerb = RegisteredVerb()\n object: CourseActivity\n context: LMSRegistrationContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSUnregisteredCourse","title":" LMSUnregisteredCourse (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS unregistered to a course
statement.
Example: John is unregistered to a course.
Attributes:
Name Type Descriptionverb
dict
See UnregisteredVerb.
object
dict
See CourseActivity.
context
dict
See LMSRegistrationContext.
Source code inralph/models/xapi/lms/statements.py
class LMSUnregisteredCourse(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `unregistered to a course` statement.\n\n Example: John is unregistered to a course.\n\n Attributes:\n verb (dict): See UnregisteredVerb.\n object (dict): See CourseActivity.\n context (dict): See LMSRegistrationContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://id.tincanapi.com/verb/unregistered\",\n object__definition__type=\"http://adlnet.gov/expapi/activities/course\",\n )\n\n verb: UnregisteredVerb = UnregisteredVerb()\n object: CourseActivity\n context: LMSRegistrationContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSUploadedAudio","title":" LMSUploadedAudio (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS uploaded an audio
statement.
Example: John uploaded an audio.
Attributes:
Name Type Descriptionverb
dict
See UploadedVerb.
object
dict
See AudioActivity.
context
dict
see LMSCommonContext.
Source code inralph/models/xapi/lms/statements.py
class LMSUploadedAudio(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `uploaded an audio` statement.\n\n Example: John uploaded an audio.\n\n Attributes:\n verb (dict): See UploadedVerb.\n object (dict): See AudioActivity.\n context (dict): see LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/audio/activity-type/audio\",\n verb__id=\"https://w3id.org/xapi/netc/verbs/uploaded\",\n )\n\n object: AudioActivity\n verb: UploadedVerb = UploadedVerb()\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSUploadedDocument","title":" LMSUploadedDocument (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS uploaded a document
statement.
Example: John uploaded a document.
Attributes:
Name Type Descriptionverb
dict
See UploadedVerb.
object
dict
See DocumentActivity.
context
dict
see LMSCommonContext.
Source code inralph/models/xapi/lms/statements.py
class LMSUploadedDocument(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `uploaded a document` statement.\n\n Example: John uploaded a document.\n\n Attributes:\n verb (dict): See UploadedVerb.\n object (dict): See DocumentActivity.\n context (dict): see LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://id.tincanapi.com/activitytype/document\",\n verb__id=\"https://w3id.org/xapi/netc/verbs/uploaded\",\n )\n\n object: DocumentActivity\n verb: UploadedVerb = UploadedVerb()\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSUploadedFile","title":" LMSUploadedFile (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS uploaded a file
statement.
Example: John has uploaded a file such as a pdf, doc, txt, ppt, xls, csv, etc\u2026
Attributes:
Name Type Descriptionverb
dict
See UploadedVerb.
object
dict
See LMSFileObject.
Source code inralph/models/xapi/lms/statements.py
class LMSUploadedFile(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `uploaded a file` statement.\n\n Example: John has uploaded a file such as a pdf, doc, txt, ppt, xls, csv, etc...\n\n Attributes:\n verb (dict): See UploadedVerb.\n object (dict): See LMSFileObject.\n context (dict) See LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/netc/verbs/uploaded\",\n object__definition__type=\"http://activitystrea.ms/file\",\n )\n\n verb: UploadedVerb = UploadedVerb()\n object: LMSFileObject\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSUploadedVideo","title":" LMSUploadedVideo (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS uploaded a video
statement.
Example: John uploaded a video.
Attributes:
Name Type Descriptionverb
dict
See UploadedVerb.
object
dict
See VideoActivity.
context
dict
see LMSCommonContext.
Source code inralph/models/xapi/lms/statements.py
class LMSUploadedVideo(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `uploaded a video` statement.\n\n Example: John uploaded a video.\n\n Attributes:\n verb (dict): See UploadedVerb.\n object (dict): See VideoActivity.\n context (dict): see LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/netc/verbs/uploaded\",\n )\n\n object: VideoActivity\n verb: UploadedVerb = UploadedVerb()\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.navigation","title":"navigation
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.navigation.statements","title":"statements
","text":"Navigation xAPI event definitions.
"},{"location":"models/xapi/#ralph.models.xapi.navigation.statements.PageTerminated","title":" PageTerminated (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for page terminated statement.
Example: John terminated the https://www.fun-mooc.fr/ page.
Attributes:
Name Type Descriptionobject
dict
See PageActivity.
verb
dict
See TerminatedVerb.
Source code inralph/models/xapi/navigation/statements.py
class PageTerminated(BaseXapiStatement):\n \"\"\"Pydantic model for page terminated statement.\n\n Example: John terminated the https://www.fun-mooc.fr/ page.\n\n Attributes:\n object (dict): See PageActivity.\n verb (dict): See TerminatedVerb.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://activitystrea.ms/schema/1.0/page\",\n verb__id=\"http://adlnet.gov/expapi/verbs/terminated\",\n )\n\n object: PageActivity\n verb: TerminatedVerb = TerminatedVerb()\n
"},{"location":"models/xapi/#ralph.models.xapi.navigation.statements.PageViewed","title":" PageViewed (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for page viewed statement.
Example: John viewed the https://www.fun-mooc.fr/ page.
Attributes:
Name Type Descriptionobject
dict
See PageActivity.
verb
dict
See ViewedVerb.
Source code inralph/models/xapi/navigation/statements.py
class PageViewed(BaseXapiStatement):\n \"\"\"Pydantic model for page viewed statement.\n\n Example: John viewed the https://www.fun-mooc.fr/ page.\n\n Attributes:\n object (dict): See PageActivity.\n verb (dict): See ViewedVerb.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://activitystrea.ms/schema/1.0/page\",\n verb__id=\"http://id.tincanapi.com/verb/viewed\",\n )\n\n object: PageActivity\n verb: ViewedVerb = ViewedVerb()\n
"},{"location":"models/xapi/#ralph.models.xapi.video","title":"video
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.video.contexts","title":"contexts
","text":"Video xAPI events context fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.BaseVideoContext","title":" BaseVideoContext (BaseXapiContext)
pydantic-model
","text":"Pydantic model for video core context
property.
Attributes:
Name Type DescriptioncontextActivities
dict
see VideoContextContextActivities.
Source code inralph/models/xapi/video/contexts.py
class BaseVideoContext(BaseXapiContext):\n \"\"\"Pydantic model for video core `context` property.\n\n Attributes:\n contextActivities (dict): see VideoContextContextActivities.\n \"\"\"\n\n contextActivities: VideoContextContextActivities\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoBrowsingContextExtensions","title":" VideoBrowsingContextExtensions (VideoContextExtensions)
pydantic-model
","text":"Pydantic model for video browsing context
.extensions
property.
Such field is used in paused
, completed
and terminated
events.
Attributes:
Name Type DescriptioncompletionThreshold
float
Consists of the percentage of media that should be consumed to trigger a completion.
length
float
Consists of the length of the video.
Source code inralph/models/xapi/video/contexts.py
class VideoBrowsingContextExtensions(VideoContextExtensions):\n \"\"\"Pydantic model for video browsing `context`.`extensions` property.\n\n Such field is used in `paused`, `completed` and `terminated` events.\n\n Attributes:\n completionThreshold (float): Consists of the percentage of media that should\n be consumed to trigger a completion.\n length (float): Consists of the length of the video.\n \"\"\"\n\n length: NonNegativeFloat = Field(alias=CONTEXT_EXTENSION_LENGTH)\n completionThreshold: Optional[float] = Field(\n alias=CONTEXT_EXTENSION_COMPLETION_THRESHOLD\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoCompletedContext","title":" VideoCompletedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video completed context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoBrowsingContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoCompletedContext(BaseVideoContext):\n \"\"\"Pydantic model for video completed `context` property.\n\n Attributes:\n extensions (dict): See VideoBrowsingContextExtensions.\n \"\"\"\n\n extensions: VideoBrowsingContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoContextContextActivities","title":" VideoContextContextActivities (BaseXapiContextContextActivities)
pydantic-model
","text":"Pydantic model for video context
.contextActivities
property.
Attributes:
Name Type Descriptioncategory
dict or list
see VideoProfileActivity.
Source code inralph/models/xapi/video/contexts.py
class VideoContextContextActivities(BaseXapiContextContextActivities):\n \"\"\"Pydantic model for video `context`.`contextActivities` property.\n\n Attributes:\n category (dict or list): see VideoProfileActivity.\n \"\"\"\n\n category: Union[\n VideoProfileActivity, List[Union[VideoProfileActivity, BaseXapiActivity]]\n ]\n\n @validator(\"category\")\n @classmethod\n def check_presence_of_profile_activity_category(\n cls,\n value: Union[\n VideoProfileActivity, List[Union[VideoProfileActivity, BaseXapiActivity]]\n ],\n ):\n \"\"\"Check that the category list contains a `VideoProfileActivity`.\"\"\"\n if isinstance(value, VideoProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, VideoProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `VideoProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoContextContextActivities.check_presence_of_profile_activity_category","title":"check_presence_of_profile_activity_category(value)
classmethod
","text":"Check that the category list contains a VideoProfileActivity
.
ralph/models/xapi/video/contexts.py
@validator(\"category\")\n@classmethod\ndef check_presence_of_profile_activity_category(\n cls,\n value: Union[\n VideoProfileActivity, List[Union[VideoProfileActivity, BaseXapiActivity]]\n ],\n):\n \"\"\"Check that the category list contains a `VideoProfileActivity`.\"\"\"\n if isinstance(value, VideoProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, VideoProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `VideoProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoContextExtensions","title":" VideoContextExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for video core context extensions
property.
Attributes:
Name Type Descriptionsession
uuid
Consists of the ID of the active session.
Source code inralph/models/xapi/video/contexts.py
class VideoContextExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for video core context `extensions` property.\n\n Attributes:\n session (uuid): Consists of the ID of the active session.\n \"\"\"\n\n session_id: Optional[UUID] = Field(alias=CONTEXT_EXTENSION_SESSION_ID)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoEnableClosedCaptioningContext","title":" VideoEnableClosedCaptioningContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video enable closed captioning context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoEnableClosedCaptioningContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoEnableClosedCaptioningContext(BaseVideoContext):\n \"\"\"Pydantic model for video enable closed captioning `context` property.\n\n Attributes:\n extensions (dict): See VideoEnableClosedCaptioningContextExtensions.\n \"\"\"\n\n extensions: VideoEnableClosedCaptioningContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoEnableClosedCaptioningContextExtensions","title":" VideoEnableClosedCaptioningContextExtensions (VideoContextExtensions)
pydantic-model
","text":"Represents the context.extensions field for video interacted
xAPI statement.
Attributes:
Name Type DescriptionccSubtitleLanguage
str
Consists of the language of subtitle or closed captioning.
Source code inralph/models/xapi/video/contexts.py
class VideoEnableClosedCaptioningContextExtensions(VideoContextExtensions):\n \"\"\"Represents the context.extensions field for video `interacted` xAPI statement.\n\n Attributes:\n ccSubtitleLanguage (str): Consists of the language of subtitle or closed\n captioning.\n \"\"\"\n\n ccSubtitleLanguage: str = Field(alias=CONTEXT_EXTENSION_CC_SUBTITLE_LANG)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoInitializedContext","title":" VideoInitializedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video initialized context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoInitializedContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoInitializedContext(BaseVideoContext):\n \"\"\"Pydantic model for video initialized `context` property.\n\n Attributes:\n extensions (dict): See VideoInitializedContextExtensions.\n \"\"\"\n\n extensions: VideoInitializedContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoInitializedContextExtensions","title":" VideoInitializedContextExtensions (VideoContextExtensions)
pydantic-model
","text":"Pydantic model for video initialized context
extensions
property.
Attributes:
Name Type Descriptionlength
float
Consists of the length of the video.
ccSubtitleEnabled
bool
Indicates whether subtitle or closed captioning is enabled.
ccSubtitleLanguage
str
Consists of the language of subtitle or closed captioning.
fullScreen
bool
Indicates whether the video is played in full screen mode.
screenSize
str
Consists of the device playback screen size or the maximum available screen size for Video playback.
videoPlaybackSize
str
Consists of the size in Width x Height of the video as viewed by the user.
speed
str
Consists of the play back speed.
userAgent
str
Consists of the User Agent string of the browser, if the video is launched in browser.
volume
int
Consists of the volume of the video.
completionThreshold
float
Consists of the percentage of media that should be consumed to trigger a completion.
Source code inralph/models/xapi/video/contexts.py
class VideoInitializedContextExtensions(VideoContextExtensions):\n \"\"\"Pydantic model for video initialized `context` `extensions` property.\n\n Attributes:\n length (float): Consists of the length of the video.\n ccSubtitleEnabled (bool): Indicates whether subtitle or closed captioning is\n enabled.\n ccSubtitleLanguage (str): Consists of the language of subtitle or closed\n captioning.\n fullScreen (bool): Indicates whether the video is played in full screen mode.\n screenSize (str): Consists of the device playback screen size or the maximum\n available screen size for Video playback.\n videoPlaybackSize (str): Consists of the size in Width x Height of the video as\n viewed by the user.\n speed (str): Consists of the play back speed.\n userAgent (str): Consists of the User Agent string of the browser,\n if the video is launched in browser.\n volume (int): Consists of the volume of the video.\n completionThreshold (float): Consists of the percentage of media that should be\n consumed to trigger a completion.\n \"\"\"\n\n length: NonNegativeFloat = Field(alias=CONTEXT_EXTENSION_LENGTH)\n ccSubtitleEnabled: Optional[bool] = Field(alias=CONTEXT_EXTENSION_CC_ENABLED)\n ccSubtitleLang: Optional[str] = Field(alias=CONTEXT_EXTENSION_CC_SUBTITLE_LANG)\n fullScreen: Optional[bool] = Field(alias=CONTEXT_EXTENSION_FULL_SCREEN)\n screenSize: Optional[str] = Field(alias=CONTEXT_EXTENSION_SCREEN_SIZE)\n videoPlaybackSize: Optional[str] = Field(\n alias=CONTEXT_EXTENSION_VIDEO_PLAYBACK_SIZE\n )\n speed: Optional[str] = Field(alias=CONTEXT_EXTENSION_SPEED)\n userAgent: Optional[str] = Field(alias=CONTEXT_EXTENSION_USER_AGENT)\n volume: Optional[int] = Field(alias=CONTEXT_EXTENSION_VOLUME)\n completionThreshold: Optional[float] = Field(\n alias=CONTEXT_EXTENSION_COMPLETION_THRESHOLD\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoPausedContext","title":" VideoPausedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video paused context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoBrowsingContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoPausedContext(BaseVideoContext):\n \"\"\"Pydantic model for video paused `context` property.\n\n Attributes:\n extensions (dict): See VideoBrowsingContextExtensions.\n \"\"\"\n\n extensions: VideoBrowsingContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoPlayedContext","title":" VideoPlayedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video played context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoPlayedContext(BaseVideoContext):\n \"\"\"Pydantic model for video played `context` property.\n\n Attributes:\n extensions (dict): See VideoContextExtensions.\n \"\"\"\n\n extensions: Optional[VideoContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoProfileActivity","title":" VideoProfileActivity (ProfileActivity)
pydantic-model
","text":"Pydantic model for video profile Activity
type.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/video
.
ralph/models/xapi/video/contexts.py
class VideoProfileActivity(ProfileActivity):\n \"\"\"Pydantic model for video profile `Activity` type.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/video`.\n \"\"\"\n\n id: Literal[\"https://w3id.org/xapi/video\"] = \"https://w3id.org/xapi/video\"\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoScreenChangeInteractionContext","title":" VideoScreenChangeInteractionContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video screen change interaction context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoScreenChangeInteractionContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoScreenChangeInteractionContext(BaseVideoContext):\n \"\"\"Pydantic model for video screen change interaction `context` property.\n\n Attributes:\n extensions (dict): See VideoScreenChangeInteractionContextExtensions.\n \"\"\"\n\n extensions: VideoScreenChangeInteractionContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoScreenChangeInteractionContextExtensions","title":" VideoScreenChangeInteractionContextExtensions (VideoContextExtensions)
pydantic-model
","text":"Pydantic model for video screen change interaction context
.extensions
property.
Attributes:
Name Type DescriptionfullScreen
bool
Indicates whether the video is played in full screen mode.
screenSize
str
Expresses the total available screen size for Video playback.
videoPlaybackSize
str
Consists of the size in Width x Height of the video as viewed by the user.
Source code inralph/models/xapi/video/contexts.py
class VideoScreenChangeInteractionContextExtensions(VideoContextExtensions):\n # noqa: D205, D415\n \"\"\"Pydantic model for video screen change interaction `context`.`extensions`\n property.\n\n Attributes:\n fullScreen (bool): Indicates whether the video is played in full screen mode.\n screenSize (str): Expresses the total available screen size for Video playback.\n videoPlaybackSize (str): Consists of the size in Width x Height of the video as\n viewed by the user.\n \"\"\"\n\n fullScreen: bool = Field(alias=CONTEXT_EXTENSION_FULL_SCREEN)\n screenSize: str = Field(alias=CONTEXT_EXTENSION_SCREEN_SIZE)\n videoPlaybackSize: str = Field(alias=CONTEXT_EXTENSION_VIDEO_PLAYBACK_SIZE)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoSeekedContext","title":" VideoSeekedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video seeked context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoSeekedContext(BaseVideoContext):\n \"\"\"Pydantic model for video seeked `context` property.\n\n Attributes:\n extensions (dict): See VideoContextExtensions.\n \"\"\"\n\n extensions: Optional[VideoContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoTerminatedContext","title":" VideoTerminatedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video terminated context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoBrowsingContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoTerminatedContext(BaseVideoContext):\n \"\"\"Pydantic model for video terminated `context` property.\n\n Attributes:\n extensions (dict): See VideoBrowsingContextExtensions.\n \"\"\"\n\n extensions: VideoBrowsingContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoVolumeChangeInteractionContext","title":" VideoVolumeChangeInteractionContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video volume change interaction context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoVolumeChangeInteractionContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoVolumeChangeInteractionContext(BaseVideoContext):\n \"\"\"Pydantic model for video volume change interaction `context` property.\n\n Attributes:\n extensions (dict): See VideoVolumeChangeInteractionContextExtensions.\n \"\"\"\n\n extensions: VideoVolumeChangeInteractionContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoVolumeChangeInteractionContextExtensions","title":" VideoVolumeChangeInteractionContextExtensions (VideoContextExtensions)
pydantic-model
","text":"Pydantic model for video volume change interaction context
.extensions
property.
Attributes:
Name Type Descriptionvolume
int
Consists of the volume of the video.
Source code inralph/models/xapi/video/contexts.py
class VideoVolumeChangeInteractionContextExtensions(VideoContextExtensions):\n # noqa: D205, D415\n \"\"\"Pydantic model for video volume change interaction `context`.`extensions`\n property.\n\n Attributes:\n volume (int): Consists of the volume of the video.\n \"\"\"\n\n volume: int = Field(alias=CONTEXT_EXTENSION_VOLUME)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results","title":"results
","text":"Video xAPI events result fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoCompletedResult","title":" VideoCompletedResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video completed result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoCompletedResultExtensions.
completion
bool
Consists of the value True
.
duration
str
Consists of the total time spent consuming the video under current registration.
Source code inralph/models/xapi/video/results.py
class VideoCompletedResult(BaseXapiResult):\n \"\"\"Pydantic model for video completed `result` property.\n\n Attributes:\n extensions (dict): See VideoCompletedResultExtensions.\n completion (bool): Consists of the value `True`.\n duration (str): Consists of the total time spent consuming the video under\n current registration.\n \"\"\"\n\n extensions: VideoCompletedResultExtensions\n completion: Optional[Literal[True]]\n duration: Optional[timedelta]\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoCompletedResultExtensions","title":" VideoCompletedResultExtensions (VideoResultExtensions)
pydantic-model
","text":"Pydantic model for video completed result
.extensions
property.
Attributes:
Name Type Descriptionprogress
float
Consists of the percentage of media consumed by the actor.
Source code inralph/models/xapi/video/results.py
class VideoCompletedResultExtensions(VideoResultExtensions):\n \"\"\"Pydantic model for video completed `result`.`extensions` property.\n\n Attributes:\n progress (float): Consists of the percentage of media consumed by the actor.\n \"\"\"\n\n progress: NonNegativeFloat = Field(alias=RESULT_EXTENSION_PROGRESS)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoEnableClosedCaptioningResult","title":" VideoEnableClosedCaptioningResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video enable closed captioning result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoEnableClosedCaptioningResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoEnableClosedCaptioningResult(BaseXapiResult):\n \"\"\"Pydantic model for video enable closed captioning `result` property.\n\n Attributes:\n extensions (dict): See VideoEnableClosedCaptioningResultExtensions.\n \"\"\"\n\n extensions: VideoEnableClosedCaptioningResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoEnableClosedCaptioningResultExtensions","title":" VideoEnableClosedCaptioningResultExtensions (VideoResultExtensions)
pydantic-model
","text":"Pydantic model for video enable closed captioning result
.extensions
property.
Attributes:
Name Type DescriptionccEnabled
bool
Indicates whether subtitles are enabled.
Source code inralph/models/xapi/video/results.py
class VideoEnableClosedCaptioningResultExtensions(VideoResultExtensions):\n \"\"\"Pydantic model for video enable closed captioning `result`.`extensions` property.\n\n Attributes:\n ccEnabled (bool): Indicates whether subtitles are enabled.\n \"\"\"\n\n ccEnabled: bool = Field(alias=CONTEXT_EXTENSION_CC_ENABLED)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoPausedResult","title":" VideoPausedResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video paused result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoPausedResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoPausedResult(BaseXapiResult):\n \"\"\"Pydantic model for video paused `result` property.\n\n Attributes:\n extensions (dict): See VideoPausedResultExtensions.\n \"\"\"\n\n extensions: VideoPausedResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoPausedResultExtensions","title":" VideoPausedResultExtensions (VideoResultExtensions)
pydantic-model
","text":"Pydantic model for video paused result
.extensions
property.
Attributes:
Name Type Descriptionprogress
float
Consists of the ratio of media consumed by the actor.
Source code inralph/models/xapi/video/results.py
class VideoPausedResultExtensions(VideoResultExtensions):\n \"\"\"Pydantic model for video paused `result`.`extensions` property.\n\n Attributes:\n progress (float): Consists of the ratio of media consumed by the actor.\n \"\"\"\n\n progress: Optional[NonNegativeFloat] = Field(alias=RESULT_EXTENSION_PROGRESS)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoPlayedResult","title":" VideoPlayedResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video played result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoPlayedResult(BaseXapiResult):\n \"\"\"Pydantic model for video played `result` property.\n\n Attributes:\n extensions (dict): See VideoResultExtensions.\n \"\"\"\n\n extensions: VideoResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoResultExtensions","title":" VideoResultExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for video result
.extensions
property.
Attributes:
Name Type DescriptionplayedSegments
str
Consists of parts of the video the actor watched during current registration in chronological order (for example, \u201c0[.]5[,]12[.]22[,]15[.]55[,]55[.]99.33[,]99.33\u201d).
time
float
Consists of the video time code when the event was emitted.
Source code inralph/models/xapi/video/results.py
class VideoResultExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for video `result`.`extensions` property.\n\n Attributes:\n playedSegments (str): Consists of parts of the video the actor watched during\n current registration in chronological order (for example,\n \"0[.]5[,]12[.]22[,]15[.]55[,]55[.]99.33[,]99.33\").\n time (float): Consists of the video time code when the event was emitted.\n \"\"\"\n\n time: NonNegativeFloat = Field(alias=RESULT_EXTENSION_TIME)\n playedSegments: Optional[str] = Field(alias=CONTEXT_EXTENSION_PLAYED_SEGMENTS)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoScreenChangeInteractionResult","title":" VideoScreenChangeInteractionResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video screen change interaction result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoScreenChangeInteractionResult(BaseXapiResult):\n \"\"\"Pydantic model for video screen change interaction `result` property.\n\n Attributes:\n extensions (dict): See VideoResultExtensions.\n \"\"\"\n\n extensions: VideoResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoSeekedResult","title":" VideoSeekedResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video seeked result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoSeekedResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoSeekedResult(BaseXapiResult):\n \"\"\"Pydantic model for video seeked `result` property.\n\n Attributes:\n extensions (dict): See VideoSeekedResultExtensions.\n \"\"\"\n\n extensions: VideoSeekedResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoSeekedResultExtensions","title":" VideoSeekedResultExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for video seeked result
.extensions
property.
Attributes:
Name Type DescriptiontimeFrom
float
Consists of the point in time the actor changed from in a media object during a seek operation.
timeTo
float
Consists of the point in time the actor changed to in a media object during a seek operation.
Source code inralph/models/xapi/video/results.py
class VideoSeekedResultExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for video seeked `result`.`extensions` property.\n\n Attributes:\n timeFrom (float): Consists of the point in time the actor changed from in a\n media object during a seek operation.\n timeTo (float): Consists of the point in time the actor changed to in a media\n object during a seek operation.\n \"\"\"\n\n timeFrom: NonNegativeFloat = Field(alias=RESULT_EXTENSION_TIME_FROM)\n timeTo: NonNegativeFloat = Field(alias=RESULT_EXTENSION_TIME_TO)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoTerminatedResult","title":" VideoTerminatedResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video terminated result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoTerminatedResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoTerminatedResult(BaseXapiResult):\n \"\"\"Pydantic model for video terminated `result` property.\n\n Attributes:\n extensions (dict): See VideoTerminatedResultExtensions.\n \"\"\"\n\n extensions: VideoTerminatedResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoTerminatedResultExtensions","title":" VideoTerminatedResultExtensions (VideoResultExtensions)
pydantic-model
","text":"Pydantic model for video terminated result
.extensions
property.
Attributes:
Name Type Descriptionprogress
float
Consists of the percentage of media consumed by the actor.
Source code inralph/models/xapi/video/results.py
class VideoTerminatedResultExtensions(VideoResultExtensions):\n \"\"\"Pydantic model for video terminated `result`.`extensions` property.\n\n Attributes:\n progress (float): Consists of the percentage of media consumed by the actor.\n \"\"\"\n\n progress: NonNegativeFloat = Field(alias=RESULT_EXTENSION_PROGRESS)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoVolumeChangeInteractionResult","title":" VideoVolumeChangeInteractionResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video volume change interaction result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoVolumeChangeInteractionResult(BaseXapiResult):\n \"\"\"Pydantic model for video volume change interaction `result` property.\n\n Attributes:\n extensions (dict): See VideoResultExtensions.\n \"\"\"\n\n extensions: VideoResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements","title":"statements
","text":"Video xAPI event definitions.
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.BaseVideoStatement","title":" BaseVideoStatement (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for video core statements.
Attributes:
Name Type Descriptionobject
dict
See VideoActivity.
Source code inralph/models/xapi/video/statements.py
class BaseVideoStatement(BaseXapiStatement):\n \"\"\"Pydantic model for video core statements.\n\n Attributes:\n object (dict): See VideoActivity.\n \"\"\"\n\n object: VideoActivity\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoCompleted","title":" VideoCompleted (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video completed statement.
Example: John completed a video by watching major parts of the video at least once.
Attributes:
Name Type Descriptionverb
dict
See CompletedVerb.
result
dict
See VideoCompletedResult.
context
dict
See VideoCompletedContext.
Source code inralph/models/xapi/video/statements.py
class VideoCompleted(BaseVideoStatement):\n \"\"\"Pydantic model for video completed statement.\n\n Example: John completed a video by watching major parts of the video at least once.\n\n Attributes:\n verb (dict): See CompletedVerb.\n result (dict): See VideoCompletedResult.\n context (dict): See VideoCompletedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/completed\",\n )\n\n verb: CompletedVerb = CompletedVerb()\n result: VideoCompletedResult\n context: VideoCompletedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoEnableClosedCaptioning","title":" VideoEnableClosedCaptioning (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video enable closed captioning statement.
Example: John interacted with the player to enable closed captioning.
Attributes:
Name Type Descriptionverb
dict
See InteractedVerb.
result
dict
See VideoEnableClosedCaptioningResult.
context
dict
See VideoEnableClosedCaptioningContext.
Source code inralph/models/xapi/video/statements.py
class VideoEnableClosedCaptioning(BaseVideoStatement):\n \"\"\"Pydantic model for video enable closed captioning statement.\n\n Example: John interacted with the player to enable closed captioning.\n\n Attributes:\n verb (dict): See InteractedVerb.\n result (dict): See VideoEnableClosedCaptioningResult.\n context (dict): See VideoEnableClosedCaptioningContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/interacted\",\n )\n\n verb: InteractedVerb = InteractedVerb()\n result: VideoEnableClosedCaptioningResult\n context: VideoEnableClosedCaptioningContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoInitialized","title":" VideoInitialized (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video initialized statement.
Example: A video has been fully initialized.
Attributes:
Name Type Descriptionverb
dict
See InitializedVerb.
context
dict
See VideoInitializedContext.
Source code inralph/models/xapi/video/statements.py
class VideoInitialized(BaseVideoStatement):\n \"\"\"Pydantic model for video initialized statement.\n\n Example: A video has been fully initialized.\n\n Attributes:\n verb (dict): See InitializedVerb.\n context (dict): See VideoInitializedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/initialized\",\n )\n\n verb: InitializedVerb = InitializedVerb()\n context: VideoInitializedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoPaused","title":" VideoPaused (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video paused statement.
Example: John paused the video or clicked the pause button.
Attributes:
Name Type Descriptionverb
dict
See PausedVerb.
result
dict
See VideoPausedResult.
context
dict
See VideoPausedContext.
Source code inralph/models/xapi/video/statements.py
class VideoPaused(BaseVideoStatement):\n \"\"\"Pydantic model for video paused statement.\n\n Example: John paused the video or clicked the pause button.\n\n Attributes:\n verb (dict): See PausedVerb.\n result (dict): See VideoPausedResult.\n context (dict): See VideoPausedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/paused\",\n )\n\n verb: PausedVerb = PausedVerb()\n result: VideoPausedResult\n context: VideoPausedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoPlayed","title":" VideoPlayed (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video played statement.
Example: John played the video or clicked the play button.
Attributes:
Name Type Descriptionverb
dict
See PlayedVerb.
result
dict
See VideoPlayedResult.
context
dict
See VideoPlayedContext.
Source code inralph/models/xapi/video/statements.py
class VideoPlayed(BaseVideoStatement):\n \"\"\"Pydantic model for video played statement.\n\n Example: John played the video or clicked the play button.\n\n Attributes:\n verb (dict): See PlayedVerb.\n result (dict): See VideoPlayedResult.\n context (dict): See VideoPlayedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/played\",\n )\n\n verb: PlayedVerb = PlayedVerb()\n result: VideoPlayedResult\n context: VideoPlayedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoScreenChangeInteraction","title":" VideoScreenChangeInteraction (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video screen change interaction statement.
Example: John interacted with the player to activate or deactivate full screen.
Attributes:
Name Type Descriptionverb
dict
See InteractedVerb.
result
dict
See VideoScreenChangeInteractionResult.
context
dict
See VideoScreenChangeInteractionContext.
Source code inralph/models/xapi/video/statements.py
class VideoScreenChangeInteraction(BaseVideoStatement):\n \"\"\"Pydantic model for video screen change interaction statement.\n\n Example: John interacted with the player to activate or deactivate full screen.\n\n Attributes:\n verb (dict): See InteractedVerb.\n result (dict): See VideoScreenChangeInteractionResult.\n context (dict): See VideoScreenChangeInteractionContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/interacted\",\n )\n\n verb: InteractedVerb = InteractedVerb()\n result: VideoScreenChangeInteractionResult\n context: VideoScreenChangeInteractionContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoSeeked","title":" VideoSeeked (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video seeked statement.
!!! example \u201cJohn moved the progress bar forward or backward to a specific time in the\u201d video.
Attributes:
Name Type Descriptionverb
dict
See SeekedVerb.
result
dict
See VideoSeekedResult.
context
dict
See VideoSeekedContext.
Source code inralph/models/xapi/video/statements.py
class VideoSeeked(BaseVideoStatement):\n \"\"\"Pydantic model for video seeked statement.\n\n Example: John moved the progress bar forward or backward to a specific time in the\n video.\n\n Attributes:\n verb (dict): See SeekedVerb.\n result (dict): See VideoSeekedResult.\n context (dict): See VideoSeekedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/seeked\",\n )\n\n verb: SeekedVerb = SeekedVerb()\n result: VideoSeekedResult\n context: VideoSeekedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoTerminated","title":" VideoTerminated (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video terminated statement.
Example: John ended a video (quit the player).
Attributes:
Name Type Descriptionverb
dict
See TerminatedVerb.
result
dict
See VideoTerminatedResult.
context
dict
See VideoTerminatedContext.
Source code inralph/models/xapi/video/statements.py
class VideoTerminated(BaseVideoStatement):\n \"\"\"Pydantic model for video terminated statement.\n\n Example: John ended a video (quit the player).\n\n Attributes:\n verb (dict): See TerminatedVerb.\n result (dict): See VideoTerminatedResult.\n context (dict): See VideoTerminatedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/terminated\",\n )\n\n verb: TerminatedVerb = TerminatedVerb()\n result: VideoTerminatedResult\n context: VideoTerminatedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoVolumeChangeInteraction","title":" VideoVolumeChangeInteraction (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video volume change interaction statement.
Example: John interacted with the player to change the volume.
Attributes : verb (dict): See InteractedVerb. result (dict): See VideoVolumeChangeInteractionResult. context (dict): See VideoVolumeChangeInteractionContext.
Source code inralph/models/xapi/video/statements.py
class VideoVolumeChangeInteraction(BaseVideoStatement):\n \"\"\"Pydantic model for video volume change interaction statement.\n\n Example: John interacted with the player to change the volume.\n\n Attributes :\n verb (dict): See InteractedVerb.\n result (dict): See VideoVolumeChangeInteractionResult.\n context (dict): See VideoVolumeChangeInteractionContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/interacted\",\n )\n\n verb: InteractedVerb = InteractedVerb()\n result: VideoVolumeChangeInteractionResult\n context: VideoVolumeChangeInteractionContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom","title":"virtual_classroom
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts","title":"contexts
","text":"Virtual classroom xAPI events context fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomAnsweredPollContext","title":" VirtualClassroomAnsweredPollContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom answered poll context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomContextExtensions.
contextActivities
dict
see VirtualClassroomAnsweredPollContextActivities.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomAnsweredPollContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom answered poll `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomContextExtensions.\n contextActivities (dict): see VirtualClassroomAnsweredPollContextActivities.\n \"\"\"\n\n extensions: VirtualClassroomContextExtensions\n contextActivities: VirtualClassroomAnsweredPollContextActivities\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomAnsweredPollContextActivities","title":" VirtualClassroomAnsweredPollContextActivities (VirtualClassroomContextContextActivities)
pydantic-model
","text":"Pydantic model for virtual classroom answered poll context
.contextActivities
property.
Attributes:
Name Type Descriptionparent
list
see VirtualClassroomActivity.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomAnsweredPollContextActivities(\n VirtualClassroomContextContextActivities\n):\n # noqa: D205, D415\n \"\"\"Pydantic model for virtual classroom answered poll `context`.`contextActivities`\n property.\n\n Attributes:\n parent (list): see VirtualClassroomActivity.\n \"\"\"\n\n parent: Union[VirtualClassroomActivity, List[VirtualClassroomActivity]]\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomContext","title":" VirtualClassroomContext (BaseXapiContext)
pydantic-model
","text":"Pydantic model for virtual classroom base context
property.
Attributes:
Name Type Descriptionregistration
uuid
the registration that the Statement is associated with.
extensions
dict
see VirtualClassroomContextExtensions.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomContext(BaseXapiContext):\n \"\"\"Pydantic model for virtual classroom base `context` property.\n\n Attributes:\n registration (uuid): the registration that the Statement is associated with.\n extensions (dict): see VirtualClassroomContextExtensions.\n \"\"\"\n\n contextActivities: VirtualClassroomContextContextActivities\n registration: UUID\n extensions: VirtualClassroomContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomContextContextActivities","title":" VirtualClassroomContextContextActivities (BaseXapiContextContextActivities)
pydantic-model
","text":"Pydantic model for virtual classroom context
.contextActivities
property.
Attributes:
Name Type Descriptioncategory
dict or list
see VirtualClassroomProfileActivity.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomContextContextActivities(BaseXapiContextContextActivities):\n \"\"\"Pydantic model for virtual classroom `context`.`contextActivities` property.\n\n Attributes:\n category (dict or list): see VirtualClassroomProfileActivity.\n \"\"\"\n\n category: Union[\n VirtualClassroomProfileActivity,\n List[Union[VirtualClassroomProfileActivity, BaseXapiActivity]],\n ]\n\n @validator(\"category\")\n @classmethod\n def check_presence_of_profile_activity_category(\n cls,\n value: Union[\n VirtualClassroomProfileActivity,\n List[Union[VirtualClassroomProfileActivity, BaseXapiActivity]],\n ],\n ):\n \"\"\"Check that the category list contains a `VirtualClassroomProfileActivity`.\"\"\"\n if isinstance(value, VirtualClassroomProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, VirtualClassroomProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `VirtualClassroomProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomContextContextActivities.check_presence_of_profile_activity_category","title":"check_presence_of_profile_activity_category(value)
classmethod
","text":"Check that the category list contains a VirtualClassroomProfileActivity
.
ralph/models/xapi/virtual_classroom/contexts.py
@validator(\"category\")\n@classmethod\ndef check_presence_of_profile_activity_category(\n cls,\n value: Union[\n VirtualClassroomProfileActivity,\n List[Union[VirtualClassroomProfileActivity, BaseXapiActivity]],\n ],\n):\n \"\"\"Check that the category list contains a `VirtualClassroomProfileActivity`.\"\"\"\n if isinstance(value, VirtualClassroomProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, VirtualClassroomProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `VirtualClassroomProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomContextExtensions","title":" VirtualClassroomContextExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for virtual classroom base context
.extensions
property.
Attributes:
Name Type Descriptionsession_id
str
Consists of the ID of the active session.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomContextExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for virtual classroom base `context`.`extensions` property.\n\n Attributes:\n session_id (str): Consists of the ID of the active session.\n \"\"\"\n\n session_id: str = Field(alias=CONTEXT_EXTENSION_SESSION_ID, default=\"\")\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomInitializedContext","title":" VirtualClassroomInitializedContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom initialized context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomInitializedContextExtensions.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomInitializedContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom initialized `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomInitializedContextExtensions.\n \"\"\"\n\n extensions: VirtualClassroomInitializedContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomInitializedContextExtensions","title":" VirtualClassroomInitializedContextExtensions (VirtualClassroomContextExtensions)
pydantic-model
","text":"Pydantic model for virtual classroom initialized context
.extensions
property.
Attributes:
Name Type Descriptionplanned_duration
datetime
Consists of the estimated duration of the scheduled virtual classroom.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomInitializedContextExtensions(VirtualClassroomContextExtensions):\n \"\"\"Pydantic model for virtual classroom initialized `context`.`extensions` property.\n\n Attributes:\n planned_duration (datetime): Consists of the estimated duration of the scheduled\n virtual classroom.\n \"\"\"\n\n planned_duration: Optional[datetime] = Field(\n alias=CONTEXT_EXTENSION_PLANNED_DURATION\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomJoinedContext","title":" VirtualClassroomJoinedContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom joined context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomJoinedContextExtensions.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomJoinedContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom joined `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomJoinedContextExtensions.\n \"\"\"\n\n extensions: VirtualClassroomJoinedContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomJoinedContextExtensions","title":" VirtualClassroomJoinedContextExtensions (VirtualClassroomContextExtensions)
pydantic-model
","text":"Pydantic model for virtual classroom initialized context
.extensions
property.
Attributes:
Name Type Descriptionplanned_duration
datetime
Consists of the estimated duration of the scheduled virtual classroom.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomJoinedContextExtensions(VirtualClassroomContextExtensions):\n \"\"\"Pydantic model for virtual classroom initialized `context`.`extensions` property.\n\n Attributes:\n planned_duration (datetime): Consists of the estimated duration of the scheduled\n virtual classroom.\n \"\"\"\n\n planned_duration: Optional[datetime] = Field(\n alias=CONTEXT_EXTENSION_PLANNED_DURATION\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomPostedPublicMessageContext","title":" VirtualClassroomPostedPublicMessageContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom posted public message context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomContextExtensions.
contextActivities
list
see VirtualClassroomPostedPublicMessageContextActivities.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomPostedPublicMessageContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom posted public message `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomContextExtensions.\n contextActivities (list): see\n VirtualClassroomPostedPublicMessageContextActivities.\n \"\"\"\n\n extensions: VirtualClassroomContextExtensions\n contextActivities: VirtualClassroomPostedPublicMessageContextActivities\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomPostedPublicMessageContextActivities","title":" VirtualClassroomPostedPublicMessageContextActivities (VirtualClassroomContextContextActivities)
pydantic-model
","text":"Pydantic model for virtual classroom posted public message context
.contextActivities
property.
Attributes:
Name Type Descriptionparent
list
see VirtualClassroomActivity.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomPostedPublicMessageContextActivities(\n VirtualClassroomContextContextActivities\n):\n # noqa: D205, D415\n \"\"\"Pydantic model for virtual classroom posted public message\n `context`.`contextActivities` property.\n\n Attributes:\n parent (list): see VirtualClassroomActivity.\n \"\"\"\n\n parent: Union[VirtualClassroomActivity, List[VirtualClassroomActivity]]\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomProfileActivity","title":" VirtualClassroomProfileActivity (ProfileActivity)
pydantic-model
","text":"Pydantic model for virtual classroom profile Activity
type.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom
.
ralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomProfileActivity(ProfileActivity):\n \"\"\"Pydantic model for virtual classroom profile `Activity` type.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/virtual-classroom`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom\"\n ] = \"https://w3id.org/xapi/virtual-classroom\"\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomStartedPollContext","title":" VirtualClassroomStartedPollContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom started poll context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomContextExtensions.
contextActivities
dict
see VirtualClassroomStartedPollContextActivities.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomStartedPollContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom started poll `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomContextExtensions.\n contextActivities (dict): see\n VirtualClassroomStartedPollContextActivities.\n \"\"\"\n\n extensions: VirtualClassroomContextExtensions\n contextActivities: VirtualClassroomStartedPollContextActivities\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomStartedPollContextActivities","title":" VirtualClassroomStartedPollContextActivities (VirtualClassroomContextContextActivities)
pydantic-model
","text":"Pydantic model for virtual classroom started poll context
.contextActivities
property.
Attributes:
Name Type Descriptionparent
list
see VirtualClassroomActivity.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomStartedPollContextActivities(\n VirtualClassroomContextContextActivities\n):\n # noqa: D205, D415\n \"\"\"Pydantic model for virtual classroom started poll `context`.`contextActivities`\n property.\n\n Attributes:\n parent (list): see VirtualClassroomActivity.\n \"\"\"\n\n parent: Union[VirtualClassroomActivity, List[VirtualClassroomActivity]]\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomTerminatedContext","title":" VirtualClassroomTerminatedContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom terminated context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomInitializedContextExtensions.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomTerminatedContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom terminated `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomInitializedContextExtensions.\n \"\"\"\n\n extensions: VirtualClassroomTerminatedContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomTerminatedContextExtensions","title":" VirtualClassroomTerminatedContextExtensions (VirtualClassroomContextExtensions)
pydantic-model
","text":"Pydantic model for virtual classroom terminated context
.extensions
property.
Attributes:
Name Type Descriptionplanned_duration
datetime
Consists of the estimated duration of the scheduled virtual classroom.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomTerminatedContextExtensions(VirtualClassroomContextExtensions):\n \"\"\"Pydantic model for virtual classroom terminated `context`.`extensions` property.\n\n Attributes:\n planned_duration (datetime): Consists of the estimated duration of the scheduled\n virtual classroom.\n \"\"\"\n\n planned_duration: Optional[datetime] = Field(\n alias=CONTEXT_EXTENSION_PLANNED_DURATION\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.results","title":"results
","text":"Virtual classroom xAPI events result fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.results.VirtualClassroomAnsweredPollResult","title":" VirtualClassroomAnsweredPollResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for virtual classroom answered poll result
property.
Attributes:
Name Type Descriptionresponse
str
Consists of the response for the given Activity.
Source code inralph/models/xapi/virtual_classroom/results.py
class VirtualClassroomAnsweredPollResult(BaseXapiResult):\n \"\"\"Pydantic model for virtual classroom answered poll `result` property.\n\n Attributes:\n response (str): Consists of the response for the given Activity.\n \"\"\"\n\n response: StrictStr # = StrictStr()\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements","title":"statements
","text":"Virtual classroom xAPI event definitions.
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.BaseVirtualClassroomStatement","title":" BaseVirtualClassroomStatement (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for Virtual Classroom core statements.
Attributes:
Name Type Descriptiontimestamp
datetime
Consists of the timestamp of when the event occurred.
Source code inralph/models/xapi/virtual_classroom/statements.py
class BaseVirtualClassroomStatement(BaseXapiStatement):\n \"\"\"Pydantic model for Virtual Classroom core statements.\n\n Attributes:\n timestamp (datetime): Consists of the timestamp of when the event occurred.\n \"\"\"\n\n timestamp: datetime\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomAnsweredPoll","title":" VirtualClassroomAnsweredPoll (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom answered poll statement.
Example: John answered to a poll question.
Attributes:
Name Type Descriptionverb
dict
See AskedVerb.
object
dict
See CMIInteractionActivity.
context
dict
See VirtualClassroomAnsweredPollContext.
result
dict
See AnsweredPollResult.
result
dict
See AnsweredPollResult.
timestamp
datetime
Consists of the timestamp of when the event occurred.
result
dict
See AnsweredPollResult.
timestamp
datetime
Consists of the timestamp of when the event occurred.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomAnsweredPoll(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom answered poll statement.\n\n Example: John answered to a poll question.\n\n Attributes:\n verb (dict): See AskedVerb.\n object (dict): See CMIInteractionActivity.\n context (dict): See VirtualClassroomAnsweredPollContext.\n result (dict): See AnsweredPollResult.\n result (dict): See AnsweredPollResult.\n timestamp (datetime): Consists of the timestamp of when the event occurred.\n result (dict): See AnsweredPollResult.\n timestamp (datetime): Consists of the timestamp of when the event occurred.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/answered\",\n object__definition__type=(\n \"http://adlnet.gov/expapi/activities/cmi.interaction\"\n ),\n )\n\n verb: AnsweredVerb = AnsweredVerb()\n object: CMIInteractionActivity\n context: VirtualClassroomAnsweredPollContext\n result: VirtualClassroomAnsweredPollResult\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomInitialized","title":" VirtualClassroomInitialized (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom initialized statement.
Example: John has entered the virtual classroom as the first user.
Attributes:
Name Type Descriptionverb
dict
See InitializedVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomInitializedContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomInitialized(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom initialized statement.\n\n Example: John has entered the virtual classroom as the first user.\n\n Attributes:\n verb (dict): See InitializedVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomInitializedContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/initialized\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: InitializedVerb = InitializedVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomInitializedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomJoined","title":" VirtualClassroomJoined (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom joined statement.
Example: Jane has entered the virtual classroom.
Attributes:
Name Type Descriptionverb
dict
See JoinVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomJoinedContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomJoined(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom joined statement.\n\n Example: Jane has entered the virtual classroom.\n\n Attributes:\n verb (dict): See JoinVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomJoinedContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://activitystrea.ms/join\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: JoinVerb = JoinVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomJoinedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomLeft","title":" VirtualClassroomLeft (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom joined statement.
Example: Jane has left the virtual classroom.
Attributes:
Name Type Descriptionverb
dict
See LeaveVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomLeft(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom joined statement.\n\n Example: Jane has left the virtual classroom.\n\n Attributes:\n verb (dict): See LeaveVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://activitystrea.ms/leave\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: LeaveVerb = LeaveVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomLoweredHand","title":" VirtualClassroomLoweredHand (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom lowered hand statement.
Example: Jane has lowered the hand.
Attributes:
Name Type Descriptionverb
dict
See LoweredHandVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomLoweredHandContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomLoweredHand(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom lowered hand statement.\n\n Example: Jane has lowered the hand.\n\n Attributes:\n verb (dict): See LoweredHandVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomLoweredHandContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/lowered-hand\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: LoweredHandVerb = LoweredHandVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomMuted","title":" VirtualClassroomMuted (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom muted statement.
Example: Jane has muted herself or has been muted.
Attributes:
Name Type Descriptionverb
dict
See MutedVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomMutedContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomMuted(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom muted statement.\n\n Example: Jane has muted herself or has been muted.\n\n Attributes:\n verb (dict): See MutedVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomMutedContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/muted\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: MutedVerb = MutedVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomPostedPublicMessage","title":" VirtualClassroomPostedPublicMessage (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom posted public message statement.
Example: John sent a message in the public chat.
Attributes:
Name Type Descriptionverb
dict
See PostedVerb.
object
dict
See MessageActivity.
context
dict
See VirtualClassroomPostedPublicMessageContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomPostedPublicMessage(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom posted public message statement.\n\n Example: John sent a message in the public chat.\n\n Attributes:\n verb (dict): See PostedVerb.\n object (dict): See MessageActivity.\n context (dict): See VirtualClassroomPostedPublicMessageContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/acrossx/verbs/posted\",\n object__definition__type=\"https://w3id.org/xapi/acrossx/activities/message\",\n )\n\n verb: PostedVerb = PostedVerb()\n object: MessageActivity\n context: VirtualClassroomPostedPublicMessageContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomRaisedHand","title":" VirtualClassroomRaisedHand (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom raised hand statement.
Example: Jane has raised the hand.
Attributes:
Name Type Descriptionverb
dict
See RaisedHandVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomRaisedHandContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomRaisedHand(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom raised hand statement.\n\n Example: Jane has raised the hand.\n\n Attributes:\n verb (dict): See RaisedHandVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomRaisedHandContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/raised-hand\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: RaisedHandVerb = RaisedHandVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomSharedScreen","title":" VirtualClassroomSharedScreen (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom shared screen statement.
Example: Jane has shared her screen.
Attributes:
Name Type Descriptionverb
dict
See SharedScreenVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomSharedScreenContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomSharedScreen(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom shared screen statement.\n\n Example: Jane has shared her screen.\n\n Attributes:\n verb (dict): See SharedScreenVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomSharedScreenContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/shared-screen\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: SharedScreenVerb = SharedScreenVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomStartedCamera","title":" VirtualClassroomStartedCamera (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom started camera statement.
Example: Jane has started her camera.
Attributes:
Name Type Descriptionverb
dict
See StartedCameraVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomStartedCamera(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom started camera statement.\n\n Example: Jane has started her camera.\n\n Attributes:\n verb (dict): See StartedCameraVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/started-camera\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: StartedCameraVerb = StartedCameraVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomStartedPoll","title":" VirtualClassroomStartedPoll (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom started poll statement.
Example: A poll has been started in the virtual classroom in order to collect participants opinions about a given question.
Attributes:
Name Type Descriptionverb
dict
See AskedVerb.
object
dict
See CMIInteractionActivity.
context
dict
See VirtualClassroomLoweredHandContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomStartedPoll(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom started poll statement.\n\n Example: A poll has been started in the virtual classroom in order\n to collect participants opinions about a given question.\n\n Attributes:\n verb (dict): See AskedVerb.\n object (dict): See CMIInteractionActivity.\n context (dict): See VirtualClassroomLoweredHandContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/asked\",\n object__definition__type=(\n \"http://adlnet.gov/expapi/activities/cmi.interaction\"\n ),\n )\n\n verb: AskedVerb = AskedVerb()\n object: CMIInteractionActivity\n context: VirtualClassroomStartedPollContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomStoppedCamera","title":" VirtualClassroomStoppedCamera (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom stopped camera statement.
Example: Jane has stopped her camera.
Attributes:
Name Type Descriptionverb
dict
See StoppedCameraVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomStoppedCameraContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomStoppedCamera(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom stopped camera statement.\n\n Example: Jane has stopped her camera.\n\n Attributes:\n verb (dict): See StoppedCameraVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomStoppedCameraContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/stopped-camera\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: StoppedCameraVerb = StoppedCameraVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomTerminated","title":" VirtualClassroomTerminated (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom terminated statement.
Example: Jane has terminated the virtual classroom.
Attributes:
Name Type Descriptionverb
dict
See TerminatedVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomTerminatedContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomTerminated(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom terminated statement.\n\n Example: Jane has terminated the virtual classroom.\n\n Attributes:\n verb (dict): See TerminatedVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomTerminatedContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/terminated\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: TerminatedVerb = TerminatedVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomTerminatedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomUnmuted","title":" VirtualClassroomUnmuted (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom unmuted statement.
Example: Jane has unmuted herself or has been unmuted.
Attributes:
Name Type Descriptionverb
dict
See UnmutedVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomUnmuted(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom unmuted statement.\n\n Example: Jane has unmuted herself or has been unmuted.\n\n Attributes:\n verb (dict): See UnmutedVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/unmuted\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: UnmutedVerb = UnmutedVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomUnsharedScreen","title":" VirtualClassroomUnsharedScreen (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom unshared screen statement.
Example: Jane has unshared her screen or her screen has been unshared by the moderator.
Attributes:
Name Type Descriptionverb
dict
See UnsharedScreenVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomUnsharedScreenContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomUnsharedScreen(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom unshared screen statement.\n\n Example: Jane has unshared her screen or her screen has been unshared by the\n moderator.\n\n Attributes:\n verb (dict): See UnsharedScreenVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomUnsharedScreenContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/unshared-screen\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: UnsharedScreenVerb = UnsharedScreenVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":"Ralph is a toolbox for your learning analytics, it can be used as a:
As a library or a CLI, you will be able to read and write from/to the following backends:
* read-only backend
The LRS server currently supports the following backends to store learning traces in xAPI format:
At first, Ralph has been designed as a CLI to batch process your logs using base commands and UNIX standard streams (stdin
, stdout
) to connect them in a pipeline. A base example pipeline may be:
$ ralph read --backend swift my_archive.gzip | \\\n gunzip | \\\n ralph write --backend es\n
In this small pipeline, we stream my_archive.gzip
content from a Swift container to the standard output (using the read
command), uncompress the content (using the gunzip
command), and bulk insert logs in an ElasticSearch index (using the write
command).
As UNIX is beautiful, Ralph offers many powerful possibilities by combining its commands with other standard commands or command line tools.
"},{"location":"#quick_start_guide","title":"Quick start guide","text":"Ralph is distributed as a python package and a Docker image.
If you choose to install ralph
in your native environment (without using Docker), please make sure that Python 3.11 is installed (and your default python distribution).
Ralph package can be installed from PyPI using the pip
tool:
# Create a new virtualenv (optional)\n$ python3.11 -m venv venv\n$ source venv/bin/activate\n\n# Install the full package (in a virtualenv)\n(venv) $ pip install \\\n ralph-malph[backend-es,backend-ldp,backend-lrs,backend-mongo,backend-swift,backend-ws,cli,lrs]\n\n# Install only the core package with the Elasticsearch backend and the LRS (in\n# a virtualenv)\n(venv) $ pip install ralph-malph[backend-es,lrs]\n\n# Test the ralph command (it should be in your PATH)\n(venv) $ ralph --help\n
If you only need to integrate ralph
models in your project, you don\u2019t need to install the backends
, cli
or lrs
extra dependencies, the core package is what you need:
# Install the core library (in a virtualenv)\n(venv) $ pip install ralph-malph\n
Alternatively, Docker users can pull the latest ralph
image and start playing with it:
# Pull latest docker image and get usage\n$ docker run --rm -i fundocker/ralph:latest ralph --help\n\n# Pro tip: define an alias to ease your life\n$ alias ralph=\"docker run --rm -i fundocker/ralph:latest ralph\"\n
Now that ralph
can be run from your system, we invite you to explore available commands.
This project is intended to be community-driven, so please, do not hesitate to get in touch if you have any questions related to our implementation or design decisions.
We try to raise our code quality standards and expect contributors to follow the recommendations from our handbook.
"},{"location":"#license","title":"License","text":"This work is released under the MIT License (see LICENSE).
"},{"location":"CHANGELOG/","title":"Changelog","text":"All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
"},{"location":"CHANGELOG/#unreleased","title":"Unreleased","text":""},{"location":"CHANGELOG/#added","title":"Added","text":"EdX
to xAPI
converters for enrollment eventsdatabase
and storage
backends under the unified data
backend interface [BC]query_statements
and query_statements_by_ids
backends methods under the unified lrs
backend interface [BC]ralph
APIGET /statements
now has \u201cmine\u201d option which matches statements that have an authority field matching that of the userpush
to write
and fetch
to read
[BC]fastapi
to 0.104.0
more-itertools
to 10.1.0
sentry_sdk
to 1.32.0
uvicorn
to 0.23.2
context.contextActivities.category
field is now mandatory in the video and virtual classroom profiles. [BC]LRSHTTP
methods must not be used in asyncio
events loop (BC)max_statements
option to AsyncLRSHTTP
id
, timestamp
, stored
and authority
statementId
and voidedStatementId
to snake_case, with camelCase alias, in LRSStatementsQuery
RALPH_LRS_RESTRICT_BY_AUTHORITY
option making ?mine=True
implicitschool
, course
, module
context extensions in Edx to xAPI base convertername
field in VideoActivity
xAPI model mistakenly used in video
profilefastapi
to 0.100.0
sentry_sdk
to 1.28.1
uvicorn
to 0.23.0
activity
parameter in GET /statements
clickhouse
backendGeneral improvement for the Helm Chart:
downloaded
verb)async_lrs
backendlrs
backendfastapi
to 0.97.0
sentry_sdk
to 1.25.1
client_options
to a dedicated pydantic modelhttpx
to 0.24.1
/statements
GET query agent
filteringcachetools
to 5.3.1
verb
.display
field no longer mandatory in xAPI models and for convertersentry_sdk
to 1.22.2
uvicorn
to 0.22.0
/statements
GET
method returns a code 400 with certain parameters as per the xAPI specificationmore
IRL building in LRS /statements
GET requestshttpx
to 0.24.0
fastapi
to 0.95.1
sentry_sdk
to 1.19.1
uvicorn
to 0.21.1
sentry_sdk
to 1.16.0
fastapi
to 0.92.0
sentry_sdk
to 1.15.0
extensions
fields3.7
+auth
subcommand to generate required credentials file for the LRS--version
optionfastapi
to 0.89.1
httpx
to 0.23.3
sentry_sdk
to 1.14.0
uvicorn
to 0.20.0
ca_certs
path for the ES backend client option (LRS)https://handbook.openfun.fr
fastapi
to 0.87.0
post
endpoint for statements implementing the LRS specget
method (used in the fetch
command)python-dotenv
dependencyhost
and port
options for the runserver
cli commandstatus
checkinghealth
LRS routerpython-legacy
handler for mkdocstrings
packageclick
to 8.1.3
elasticsearch
to 8.3.3
fastapi
to 0.79.1
ovh
to 1.0.0
pydantic
to 1.9.2
pymongo
to 4.2.0
python-keystoneclient
to 5.0.0
python-swiftclient
to 4.0.1
requests
to 2.28.1
sentry_sdk
to 1.9.5
uvicorn
to 0.18.2
websockets
to 10.3
pyyaml
dependency (BC)ws
websocket stream backend (compatible with the fetch
command)jq
, curl
and wget
in the fundocker/ralph
Docker imagerunserver
command with basic auth and a Whoami
routeget
endpoint for statements implementing the LRS specuvicorn
to 0.17.4
elasticsearch
to 7.17.0
sentry_sdk
to 1.5.5
fastapi
to 0.73.0
pyparsing
to 3.0.7
pydantic
to 1.9.0
python-keystoneclient
to 4.4.0
python-swiftclient
to 3.13.0
pyyaml
to 6.0
requests
to 2.27.1
websockets
to 10.1
elasticsearch
to 7.13.3
interacted
pydantic modelsterminated
pydantic modelscompleted
pydantic modelsseeked
pydantic modelsinitialized
pydantic modelspaused
pydantic modelsconvert
command to transform edX events to xAPI formatviewed
andpage_close
eventsplayed
pydantic modelsviewed
and page terminated
pydantic modelsvalidate
command to lint edX events using pydantic models--es-op-type
optionelasticsearch
to 7.13.2
python-swiftclient
to 3.12.0
click
to 8.0.1
click-option-group
to 0.5.3
pydantic
to 1.8.2
sentry_sdk
to 1.1.0
version
immutable field in DC selectorpandas
is no longer requiredpush
command --ignore-errors
option to ignore ES bulk import errorspyyaml
to 5.4.1
pandas
to 1.2.1
click_log
is no longer required as we are able to configure loggingMIT License
Copyright (c) 2020-present France Universit\u00e9 Num\u00e9rique
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"},{"location":"api/","title":"API Server","text":"Ralph comes with an API server that aims to implement the Learning Record Store (LRS) specification (still a work in progress).
"},{"location":"api/#getting_started","title":"Getting started","text":"The API server supports the following authentication methods:
The default method for securing Ralph API server is with HTTP basic authentication.
The API server can be started up with the following command:
$ ralph runserver --backend es\n
The --backend
(or -b
) option specifies which database backend to use for LRS data storage and retrieval. See Ralph\u2019s backends documentation for more details.
However, before you can start your API server and make requests against it, you need to set up your credentials.
"},{"location":"api/#creating_a_credentials_file","title":"Creating a credentials file","text":"The credentials file is expected to be a valid JSON file. Its location is specified by the RALPH_AUTH_FILE
configuration value. By default, ralph
will look for the auth.json
file in the application directory (see click documentation for details).
The expected format is a list of entries (JSON objects) each containing the username, the user\u2019s bcrypt
hashed+salted password, scopes they can access, and an agent
object used to represent the user in the LRS. The agent
is constrained by LRS specifications, and must use one of four valid Inverse Functional Identifiers.
[\n {\n \"username\": \"john.doe@example.com\",\n \"hash\": \"$2b$12$yBXrzIuRIk6yaft5KUgVFOIPv0PskCCh9PXmF2t7pno.qUZ5LK0D2\",\n \"scopes\": [\"example_scope\"],\n \"agent\": {\n \"mbox\": \"mailto:john.doe@example.com\"\n }\n },\n {\n \"username\": \"simon.says@example.com\",\n \"hash\": \"$2b$12$yBXrzIuRIk6yaft5KUgVFOIPv0PskCCh9PXmF2t7pno.qUZ5LK0D2\",\n \"scopes\": [\"second_scope\", \"third_scope\"],\n \"agent\": {\n \"account\": {\n \"name\": \"simonsAccountName\",\n \"homePage\": \"http://www.exampleHomePage.com\"\n }\n }\n }\n]\n
To create a new user credentials, Ralph\u2019s CLI provides a dedicated command:
$ ralph auth \\\n --username janedoe \\\n --password supersecret \\\n --scope janedoe_scope \\\n --agent-ifi-mbox mailto:janedoe@example.com \\\n # or --agent-ifi-mbox-sha1sum ebd31e95054c018b10727ccffd2ef2ec3a016ee9 \\\n # or --agent-ifi-openid \"http://jane.openid.example.org/\" \\\n # or --agent-ifi-account exampleAccountname http://www.exampleHomePage.com \\\n -w\n
This command updates your credentials file with the new janedoe
user.
Note that running this command requires that you installed Ralph with the CLI optional dependencies, e.g. pip install ralph-malph[cli]
(which we highly recommend).
The first request that can be answered by the ralph API server is a whoami
request, which checks if the user is authenticated and returns their username and permission scopes.
Use curl to get http://localhost:8100/whoami
:
$ curl http://localhost:8100/whoami\n< HTTP/1.1 401 Unauthorized\n< {\"error\":\"Not authenticated\"}\n
Send your username and password to the API server through HTTP Basic Auth:
$ curl --user john.doe@example.com:PASSWORD http://localhost:8100/whoami\n< HTTP/1.1 200 OK\n< {\"scopes\":[\"example_scope\"], \"agent\": {\"mbox\": \"mailto:john.doe@example.com\"}}\n
"},{"location":"api/#openid_connect_authentication","title":"OpenID Connect authentication","text":"Ralph LRS API server supports OpenID Connect (OIDC) on top of OAuth 2.0 for authentication and authorization.
To enable OIDC auth, you should set the RALPH_RUNSERVER_AUTH_BACKEND
environment variable as follows:
RALPH_RUNSERVER_AUTH_BACKEND=oidc\n
and you should define the RALPH_RUNSERVER_AUTH_OIDC_ISSUER_URI
environment variable with your identity provider\u2019s Issuer Identifier URI as follows: RALPH_RUNSERVER_AUTH_OIDC_ISSUER_URI=http://{provider_host}:{provider_port}/auth/realms/{realm_name}\n
This address must be accessible to the LRS on startup as it will perform OIDC Discovery to retrieve public keys and other information about the OIDC environment.
It is also strongly recommended that you set the optional RALPH_RUNSERVER_AUTH_OIDC_AUDIENCE
environment variable to the origin address of the LRS itself (ex. \u201chttp://localhost:8100\u201d) to enable verification that a given token was issued specifically for the LRS.
OIDC support is currently developed and tested against Keycloak but may work with other identity providers that implement the specification.
The Learning analytics playground repository contains a Docker Compose file and configuration for a demo instance of Keycloak with a ralph
client.
The first request that can be answered by the ralph API server is a whoami
request, which checks if the user is authenticated and returns their username and permission scopes.
Use curl to get http://localhost:8100/whoami
:
$ curl http://localhost:8100/whoami\n< HTTP/1.1 401 Unauthorized\n< {\"detail\":\"Could not validate credentials\"}\n
With the Keycloak instance running, use curl to get access token from Keycloak: curl --request POST 'http://localhost:8080/auth/realms/fun-mooc/protocol/openid-connect/token' \\\n--header 'Content-Type: application/x-www-form-urlencoded' \\\n--data-urlencode 'client_id=ralph' \\\n--data-urlencode 'client_secret=super-secret' \\\n--data-urlencode 'username=ralph_admin' \\\n--data-urlencode 'password=funfunfun' \\\n--data-urlencode 'grant_type=password'\n
which outputs (tokens truncated for example purpose):
{ \n \"access_token\":\"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSTWlLM\",\n \"expires_in\":300,\n \"refresh_expires_in\":1800,\n \"refresh_token\":\"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4MDc5NjExM\",\n \"token_type\":\"Bearer\",\n \"not-before-policy\":0,\n \"session_state\":\"22a36735-e35f-496b-a243-152d32ebff45\",\n \"scope\":\"profile email\"\n}\n
Send the access token to the API server as a Bearer header:
$ curl http://localhost:8100/whoami --header \"Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSTWlLM\"\n< HTTP/1.1 200 OK\n< {\"username\":\"ralph_admin\",\"scopes\":[\"all\"]}\n
"},{"location":"api/#security","title":"Security","text":"By default, all authenticated users have full read and write access to the server. You may use the options below to restrict behavior.
"},{"location":"api/#filtering_results_by_authority_multitenancy","title":"Filtering results by authority (multitenancy)","text":"In Ralph, all incoming statements are assigned an authority
(or ownership) derived from the user that makes the call. You may restrict read access to users \u201cown\u201d statements (thus enabling multitenancy) by setting the following environment variable:
RALPH_LRS_RESTRICT_BY_AUTHORITY = True # Default: False\n
WARNING: Two accounts with different credentials may share the same authority
meaning they can access the same statements. It is the administrators responsability to ensure that authority
is properly assigned.
NB: If not using \u201cscopes\u201d, or for users with limited \u201cscopes\u201d, using this option will make the use of option ?mine=True
implicit when fetching statement.
(Work In Progress)
"},{"location":"api/#forwarding_statements","title":"Forwarding statements","text":"Ralph\u2019s API server can be configured to forward xAPI statements it receives to other LRSes.
To configure statement forwarding, you need to create a .env
file in the current directory and define the RALPH_XAPI_FORWARDINGS
variable or define the RALPH_XAPI_FORWARDINGS
environment variable.
The value of the RALPH_XAPI_FORWARDINGS
variable should be a JSON encoded list of dictionaries where each dictionary defines a forwarding configuration and consists of the following key/value pairs:
is_active
boolean
Specifies whether or not this forwarding configuration should take effect. url
URL
Specifies the endpoint URL where forwarded statements should be send. basic_username
string
Specifies the basic auth username. basic_password
string
Specifies the basic auth password. max_retries
number
Specifies the number of times a failed forwarding request should be retried. timeout
number
Specifies the duration in seconds of network inactivity leading to a timeout. Note that for a forwarding configuration to be valid it is required that all key/value pairs are defined.
Example of a valid forwarding configuration:
RALPH_XAPI_FORWARDINGS='\n[\n {\n \"is_active\": true,\n \"url\": \"http://lrs1.example.com/xAPI/statements/\",\n \"basic_username\": \"admin1@example.com\",\n \"basic_password\": \"PASSWORD1\",\n \"max_retries\": 1,\n \"timeout\": 5\n },\n {\n \"is_active\": true,\n \"url\": \"http://lrs2.example.com/xAPI/statements/\",\n \"basic_username\": \"admin2@example.com\",\n \"basic_password\": \"PASSWORD2\",\n \"max_retries\": 5,\n \"timeout\": 0.2\n }\n]\n'\n
"},{"location":"api/#sentry_configuration","title":"Sentry configuration","text":"Ralph provides Sentry integration to monitor its LRS server and its CLI. To activate Sentry integration, one should define the following environment variables:
RALPH_SENTRY_DSN={PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}{PATH}/{PROJECT_ID}\nRALPH_EXECUTION_ENVIRONMENT=development\n
The Sentry DSN (Data Source Name) can be found in your project settings from Sentry application. The execution environment should reflect the environment Ralph has been deployed in (e.g. production
).
You may also want to monitor the performance of Ralph by configuring the CLI and LRS traces sample rates:
RALPH_SENTRY_CLI_TRACES_SAMPLE_RATE=0.1\nRALPH_SENTRY_LRS_TRACES_SAMPLE_RATE=0.3\n
Note that a sampling rate of 1.0
means 100% of transactions are sent to sentry and 0.1
only 10%.
If you want to lower noisy transactions (e.g. in a Kubernetes cluster), you can disable health checks related ones:
RALPH_SENTRY_IGNORE_HEALTH_CHECKS=True\n
"},{"location":"api/#additional_configuration","title":"Additional configuration","text":""},{"location":"api/#http_basic_auth_caching","title":"HTTP Basic auth caching","text":"HTTP basic auth implementation uses the secure and standard bcrypt algorithm to hash/salt passwords before storing them. This implementation comes with a performance cost. To speed up requests, credentials are stored in an LRU cache with a Time To Live. To configure this cache, you can define the following environment variables: - the maximum number of entries in the cache. Select a value greater than the maximum number of individual user credentials, for better performance. Defaults to 100.
RALPH_AUTH_CACHE_MAX_SIZE=100\n
- the Time To Live of the cache entries in seconds. Defaults to 3600s. RALPH_AUTH_CACHE_TTL=3600\n
"},{"location":"backends/","title":"Backends","text":"Ralph supports various storage and database backends that can be accessed to read from or write learning events to. Implemented backends are listed below along with their configuration parameters. If your favourite backend is missing to the list, feel free to submit your implementation or get in touch!
"},{"location":"backends/#key_concepts","title":"Key concepts","text":"We distinguish storage from database backends as the semantic and concepts are quite different in terms of code, but those two types of backends can be considered as \u201cbackends\u201d from a Ralph user perspective as the CLI can use both in most of its commands.
Each backend has its own parameters that are required to use it. Those parameters can be set as command line options or environment variables; the later is the recommended solution for sensible data such as service credentials. If we consider the os_username
(OpenStack user name) parameter of the OpenStack Swift backend, it can be set as a command line option using swift
as the option prefix (and replacing underscores in its name by dashes):
$ ralph list --backend swift --swift-os-username johndoe # [...] more options\n
Alternatively, this parameter can be set as an environment variable (in upper case, prefixed by the program name, e.g. RALPH_
):
$ export RALPH_BACKENDS__STORAGE__SWIFT__OS_USERNAME=\"johndoe\"\n$ ralph list --backend swift # [...] more options\n
The general patterns for backend parameters are:
--{{ backend_name }}-{{ parameter | underscore_to_dash }}
for command options, and,RALPH_BACKENDS__{{ backend_type | uppercase }}__{{ backend_name | uppercase }}__{{ parameter | uppercase }}
for environment variables, where the backend_type
is one of DATABASE
, STORAGE
and STREAM
.LDP is a nice service built by OVH on top of Graylog to follow, analyse and store your logs. Learning events (aka tracking logs) can be stored in GELF format using this backend.
For now the LDP backend is read-only as we consider that it is mostly used to collect primary logs and not as a Ralph target. Feel free to get in touch to prove us wrong, or better: submit your proposal for the write
method implementation.
To access OVH\u2019s LDP API, you need to register Ralph as an authorized application and generate an application key, an application secret and a consumer key.
While filling the registration form available at: eu.api.ovh.com/createToken/, be sure to give an appropriate validity time span to your token and allow only GET requests on the /dbaas/logs/*
path.
endpoint
: the API endpoint (e.g. ovh-eu
)application_key
: use generated application keyapplication_secret
: use generated application secretconsumer_key
: use generated consumer keyThe following parameters are required to fetch archives from an LDP account stream:
service_name
: the LDP account name (e.g. ldp-xx-xxxxx
)stream_id
: the identifier of the stream you are querying (e.g. a UUID hex representation: 77ec6e4a-ac15-4bcf-8043-7429bf275e49
)For more information about OVH\u2019s API client parameters, please refer to the project\u2019s documentation: github.com/ovh/python-ovh.
"},{"location":"backends/#openstack_swift","title":"OpenStack Swift","text":"Swift is the OpenStack object storage service. This storage backend is fully supported (read and write operations) to stream and store log archives.
"},{"location":"backends/#backend_parameters_1","title":"Backend parameters","text":"Primarily required parameters correspond to a standard authentication using OpenStack Keystone service:
os_identity_api_version
: keystone API version you will authenticate to (defaults to 3
)os_auth_url
: the authentication URL (defaults to OVH\u2019s Swift https://auth.cloud.ovh.net/
)os_project_domain_name
: the project domain name (defaults to Default
)os_user_domain_name
: the user domain name (defaults to Default
)os_username
: the name of your openstack swift useros_password
: the password of your openstack swift userSecondary parameters are required to work with the target container:
os_storage_url
: the URL of the target containeros_region_name
: the region where your container isos_tenant_name
: the name of the tenant of your containeros_tenant_id
: the identifier of the tenant of your containerS3 is the Amazon Simple Storage Service. This storage backend is fully supported (read and write operations) to stream and store log archives.
"},{"location":"backends/#backend_parameters_2","title":"Backend parameters","text":"Primarily required parameters correspond to a standard authentication with AWS CLI:
access_key_id
: the access key for your AWS accountsecret_access_key
: the secret key for your AWS accountsession_token
: the session key for your AWS account (only needed when you are using temporary credentials).Secondary parameters are required to work with the target bucket:
default_region
: the region where your bucket isbucket_name
: the name of your S3 bucketendpoint_url
: the endpoint of your S3 serverThe file system backend is a dummy template that can be used to develop your own backend. It\u2019s a \u201cdummy\u201d backend as it\u2019s not required in a UNIX Shell context, the ls
and cat
commands used along with UNIX streams will do a better job.
The only required parameter is the path
we want to list or stream content from.
The webSocket backend is read-only and can be used to get real-time events.
If you use OVH\u2019s Logs Data Platform (LDP), you can retrieve a WebSocket URI to test your data stream by following instructions from the official documentation.
"},{"location":"backends/#backend_parameters_4","title":"Backend parameters","text":"ws_uri
: the WebSocket uri (e.g. wss://example.com/websocket
)Elasticsearch backend is mostly used for indexation purpose (as a datalake) but it can also be used to fetch indexed data from it.
"},{"location":"backends/#backend_parameters_5","title":"Backend parameters","text":"Elasticsearch backend parameters required to connect to a cluster are:
hosts
: a list of cluster hosts to connect to (e.g. [\"http://elasticsearch-node:9200\"]
)index
: the elasticsearch index where to get/put documentsclient_options
: a comma separated key=value list of Elasticsearch client optionsThe Elasticsearch client options supported in Ralph are: - ca_certs
: the path to the CA certificate file. - verify_certs
: enable or disable the certificate verification. Note that it should be enabled in production. Default to True
MongoDB backend is mostly used for indexation purpose (as a datalake) but it can also be used to fetch collections of documents from it.
"},{"location":"backends/#backend_parameters_6","title":"Backend parameters","text":"MongoDB backend parameters required to connect to a cluster are:
connection_uri
: the connection URI to connect to (e.g. [\"mongodb://mongo:27017/\"]
)database
: the database to connect tocollection
: the collection to get/put objects toclient_options
: a comma separated key=value list of MongoDB client optionsThe MongoDB client options supported in Ralph are: - document_class
: default class to use for documents returned from queries - tz_aware
: if True, datetime instances returned as values in a document will be timezone aware (otherwise they will be naive)
The ClickHouse backend can be used as a data lake and to fetch collections of documents from it.
"},{"location":"backends/#backend_parameters_7","title":"Backend parameters","text":"ClickHouse parameters required to connect are:
host
: the connection hostname to connect to (e.g. \"clickhouse.yourhost.com\"
)port
: the port to the ClickHouse HTTPS interface (e.g. 8123
)database
: the name of the database to connect toevent_table_name
: the name of the table to write statements toclient_options
: a comma separated key=value list of ClickHouse client optionsSecondary parameters are needed if not using the default ClickHouse user:
username
: the username to connect aspassword
: the password for the given ClickHouse usernameBy default, the following client options are set, if you override the default client options you must also set these:
\"date_time_input_format\": \"best_effort\"
allows RFC date parsing\"allow_experimental_object_type\": 1
allows the JSON data type we use to store statementsThe ClickHouse client options supported in Ralph can be found in these locations: - Python driver specific - General ClickHouse client settings
"},{"location":"backends/#http_backends","title":"HTTP backends","text":""},{"location":"backends/#lrs_and_asynchronous_lrs","title":"LRS and Asynchronous LRS","text":"The LRS backend is used to store and retrieve xAPI statements from various systems mostly used in e-learning infrastructures.
"},{"location":"backends/#backend_parameters_8","title":"Backend parameters","text":"LRS parameters required to connect are:
url
: the URL to connect to the server (e.g. [http://ralph:secret@lrs:8100
])username
: the username to connect aspassword
: the password for the given LRS usernameOptional parameters can be configured if necessary:
headers
: a comma-separated key=value list of LRS server headersThe cli is a stream-based tool to play with your logs.
It offers functionalities to: - Validate or convert learning data in different standards - Read and write learning data to various databases or servers - Manage an instance of a Ralph LRS server
Usage:
ralph [OPTIONS] COMMAND [ARGS]...\n
Options:
-v, --verbosity LVL Either CRITICAL, ERROR, WARNING, INFO (default) or\n DEBUG\n --version Show the version and exit.\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-auth","title":"ralph auth","text":"Generate credentials for LRS HTTP basic authentication.
Usage:
ralph auth [OPTIONS]\n
Options:
-u, --username TEXT The user for which we generate credentials.\n [required]\n -p, --password TEXT The password to encrypt for this user. Will\n be prompted if missing. [required]\n -s, --scope TEXT The user scope(s). This option can be\n provided multiple times. [required]\n -M, --agent-ifi-mbox TEXT The mbox Inverse Functional Identifier of\n the associated agent.\n -S, --agent-ifi-mbox-sha1sum TEXT\n The mbox-sha1sum Inverse Functional\n Identifier of the associated agent.\n -O, --agent-ifi-openid TEXT The openid Inverse Functional Identifier of\n the associated agent.\n -A, --agent-ifi-account TEXT...\n Input \"{name} {homePage}\". The account\n Inverse Functional Identifier of the\n associated agent.\n -N, --agent-name TEXT The name of the associated agent.\n -w, --write-to-disk Write new credentials to the LRS\n authentication file.\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-convert","title":"ralph convert","text":"Convert input events to a given format.
Usage:
ralph convert [OPTIONS]\n
Options:
From edX to xAPI converter options: \n -u, --uuid-namespace TEXT The UUID namespace to use for the `ID` field\n generation\n -p, --platform-url TEXT The `actor.account.homePage` to use in the\n xAPI statements [required]\n -f, --from [edx] Input events format to convert [required]\n -t, --to [xapi] Output events format [required]\n -I, --ignore-errors Continue writing regardless of raised errors\n -F, --fail-on-unknown Stop converting at first unknown event\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-extract","title":"ralph extract","text":"Extract input events from a container format using a dedicated parser.
Usage:
ralph extract [OPTIONS]\n
Options:
-p, --parser [gelf|es] Container format parser used to extract events\n [required]\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-list","title":"ralph list","text":"List available documents from a configured data backend.
Usage:
ralph list [OPTIONS]\n
Options:
-b, --backend [async_es|async_mongo|clickhouse|es|fs|ldp|mongo|s3|swift]\n Backend [required]\n async_es backend: \n --async-es-allow-yellow-status / --no-async-es-allow-yellow-status\n --async-es-client-options KEY=VALUE,KEY=VALUE\n --async-es-default-chunk-size INTEGER\n --async-es-default-index TEXT\n --async-es-hosts VALUE1,VALUE2,VALUE3\n --async-es-locale-encoding TEXT\n --async-es-point-in-time-keep-alive TEXT\n --async-es-refresh-after-write TEXT\n async_mongo backend: \n --async-mongo-client-options KEY=VALUE,KEY=VALUE\n --async-mongo-connection-uri TEXT\n --async-mongo-default-chunk-size INTEGER\n --async-mongo-default-collection TEXT\n --async-mongo-default-database TEXT\n --async-mongo-locale-encoding TEXT\n clickhouse backend: \n --clickhouse-client-options KEY=VALUE,KEY=VALUE\n --clickhouse-database TEXT\n --clickhouse-default-chunk-size INTEGER\n --clickhouse-event-table-name TEXT\n --clickhouse-host TEXT\n --clickhouse-locale-encoding TEXT\n --clickhouse-password TEXT\n --clickhouse-port INTEGER\n --clickhouse-username TEXT\n es backend: \n --es-allow-yellow-status / --no-es-allow-yellow-status\n --es-client-options KEY=VALUE,KEY=VALUE\n --es-default-chunk-size INTEGER\n --es-default-index TEXT\n --es-hosts VALUE1,VALUE2,VALUE3\n --es-locale-encoding TEXT\n --es-point-in-time-keep-alive TEXT\n --es-refresh-after-write TEXT\n fs backend: \n --fs-default-chunk-size INTEGER\n --fs-default-directory-path PATH\n --fs-default-query-string TEXT\n --fs-locale-encoding TEXT\n ldp backend: \n --ldp-application-key TEXT\n --ldp-application-secret TEXT\n --ldp-consumer-key TEXT\n --ldp-default-stream-id TEXT\n --ldp-endpoint TEXT\n --ldp-request-timeout TEXT\n --ldp-service-name TEXT\n mongo backend: \n --mongo-client-options KEY=VALUE,KEY=VALUE\n --mongo-connection-uri TEXT\n --mongo-default-chunk-size INTEGER\n --mongo-default-collection TEXT\n --mongo-default-database TEXT\n --mongo-locale-encoding TEXT\n s3 backend: \n --s3-access-key-id TEXT\n --s3-default-bucket-name TEXT\n --s3-default-chunk-size INTEGER\n --s3-default-region TEXT\n --s3-endpoint-url TEXT\n --s3-locale-encoding TEXT\n --s3-secret-access-key TEXT\n --s3-session-token TEXT\n swift backend: \n --swift-auth-url TEXT\n --swift-default-container TEXT\n --swift-identity-api-version TEXT\n --swift-locale-encoding TEXT\n --swift-object-storage-url TEXT\n --swift-password TEXT\n --swift-project-domain-name TEXT\n --swift-region-name TEXT\n --swift-tenant-id TEXT\n --swift-tenant-name TEXT\n --swift-username TEXT\n --swift-user-domain-name TEXT\n -t, --target TEXT Container to list events from\n -n, --new / -a, --all List not fetched (or all) documents\n -D, --details / -I, --ids Get documents detailed output (JSON)\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-read","title":"ralph read","text":"Read an archive or records from a configured backend.
Usage:
ralph read [OPTIONS] [ARCHIVE]\n
Options:
-b, --backend [async_es|async_mongo|clickhouse|es|fs|ldp|lrs|mongo|s3|swift|ws]\n Backend [required]\n async_es backend: \n --async-es-allow-yellow-status / --no-async-es-allow-yellow-status\n --async-es-client-options KEY=VALUE,KEY=VALUE\n --async-es-default-chunk-size INTEGER\n --async-es-default-index TEXT\n --async-es-hosts VALUE1,VALUE2,VALUE3\n --async-es-locale-encoding TEXT\n --async-es-point-in-time-keep-alive TEXT\n --async-es-refresh-after-write TEXT\n async_mongo backend: \n --async-mongo-client-options KEY=VALUE,KEY=VALUE\n --async-mongo-connection-uri TEXT\n --async-mongo-default-chunk-size INTEGER\n --async-mongo-default-collection TEXT\n --async-mongo-default-database TEXT\n --async-mongo-locale-encoding TEXT\n clickhouse backend: \n --clickhouse-client-options KEY=VALUE,KEY=VALUE\n --clickhouse-database TEXT\n --clickhouse-default-chunk-size INTEGER\n --clickhouse-event-table-name TEXT\n --clickhouse-host TEXT\n --clickhouse-locale-encoding TEXT\n --clickhouse-password TEXT\n --clickhouse-port INTEGER\n --clickhouse-username TEXT\n es backend: \n --es-allow-yellow-status / --no-es-allow-yellow-status\n --es-client-options KEY=VALUE,KEY=VALUE\n --es-default-chunk-size INTEGER\n --es-default-index TEXT\n --es-hosts VALUE1,VALUE2,VALUE3\n --es-locale-encoding TEXT\n --es-point-in-time-keep-alive TEXT\n --es-refresh-after-write TEXT\n fs backend: \n --fs-default-chunk-size INTEGER\n --fs-default-directory-path PATH\n --fs-default-query-string TEXT\n --fs-locale-encoding TEXT\n ldp backend: \n --ldp-application-key TEXT\n --ldp-application-secret TEXT\n --ldp-consumer-key TEXT\n --ldp-default-stream-id TEXT\n --ldp-endpoint TEXT\n --ldp-request-timeout TEXT\n --ldp-service-name TEXT\n lrs backend: \n --lrs-base-url TEXT\n --lrs-headers KEY=VALUE,KEY=VALUE\n --lrs-password TEXT\n --lrs-statements-endpoint TEXT\n --lrs-status-endpoint TEXT\n --lrs-username TEXT\n mongo backend: \n --mongo-client-options KEY=VALUE,KEY=VALUE\n --mongo-connection-uri TEXT\n --mongo-default-chunk-size INTEGER\n --mongo-default-collection TEXT\n --mongo-default-database TEXT\n --mongo-locale-encoding TEXT\n s3 backend: \n --s3-access-key-id TEXT\n --s3-default-bucket-name TEXT\n --s3-default-chunk-size INTEGER\n --s3-default-region TEXT\n --s3-endpoint-url TEXT\n --s3-locale-encoding TEXT\n --s3-secret-access-key TEXT\n --s3-session-token TEXT\n swift backend: \n --swift-auth-url TEXT\n --swift-default-container TEXT\n --swift-identity-api-version TEXT\n --swift-locale-encoding TEXT\n --swift-object-storage-url TEXT\n --swift-password TEXT\n --swift-project-domain-name TEXT\n --swift-region-name TEXT\n --swift-tenant-id TEXT\n --swift-tenant-name TEXT\n --swift-username TEXT\n --swift-user-domain-name TEXT\n ws backend: \n --ws-uri TEXT\n -c, --chunk-size INTEGER Get events by chunks of size #\n -t, --target TEXT Endpoint from which to read events (e.g.\n `/statements`)\n -q, --query '{\"KEY\": \"VALUE\", \"KEY\": \"VALUE\"}'\n Query object as a JSON string (database and\n HTTP backends ONLY)\n -i, --ignore_errors BOOLEAN Ignore errors during the encoding operation.\n [default: False]\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-runserver","title":"ralph runserver","text":"Run the API server for the development environment.
Starts uvicorn programmatically for convenience and documentation.
Usage:
ralph runserver [OPTIONS]\n
Options:
-b, --backend [async_es|async_mongo|clickhouse|es|fs|mongo]\n Backend [required]\n async_es backend: \n --async-es-allow-yellow-status / --no-async-es-allow-yellow-status\n --async-es-client-options KEY=VALUE,KEY=VALUE\n --async-es-default-chunk-size INTEGER\n --async-es-default-index TEXT\n --async-es-hosts VALUE1,VALUE2,VALUE3\n --async-es-locale-encoding TEXT\n --async-es-point-in-time-keep-alive TEXT\n --async-es-refresh-after-write TEXT\n async_mongo backend: \n --async-mongo-client-options KEY=VALUE,KEY=VALUE\n --async-mongo-connection-uri TEXT\n --async-mongo-default-chunk-size INTEGER\n --async-mongo-default-collection TEXT\n --async-mongo-default-database TEXT\n --async-mongo-locale-encoding TEXT\n clickhouse backend: \n --clickhouse-client-options KEY=VALUE,KEY=VALUE\n --clickhouse-database TEXT\n --clickhouse-default-chunk-size INTEGER\n --clickhouse-event-table-name TEXT\n --clickhouse-host TEXT\n --clickhouse-ids-chunk-size INTEGER\n --clickhouse-locale-encoding TEXT\n --clickhouse-password TEXT\n --clickhouse-port INTEGER\n --clickhouse-username TEXT\n es backend: \n --es-allow-yellow-status / --no-es-allow-yellow-status\n --es-client-options KEY=VALUE,KEY=VALUE\n --es-default-chunk-size INTEGER\n --es-default-index TEXT\n --es-hosts VALUE1,VALUE2,VALUE3\n --es-locale-encoding TEXT\n --es-point-in-time-keep-alive TEXT\n --es-refresh-after-write TEXT\n fs backend: \n --fs-default-chunk-size INTEGER\n --fs-default-directory-path PATH\n --fs-default-lrs-file TEXT\n --fs-default-query-string TEXT\n --fs-locale-encoding TEXT\n mongo backend: \n --mongo-client-options KEY=VALUE,KEY=VALUE\n --mongo-connection-uri TEXT\n --mongo-default-chunk-size INTEGER\n --mongo-default-collection TEXT\n --mongo-default-database TEXT\n --mongo-locale-encoding TEXT\n -h, --host TEXT LRS server host name\n -p, --port INTEGER LRS server port\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-validate","title":"ralph validate","text":"Validate input events of given format.
Usage:
ralph validate [OPTIONS]\n
Options:
-f, --format [edx|xapi] Input events format to validate [required]\n -I, --ignore-errors Continue validating regardless of raised errors\n -F, --fail-on-unknown Stop validating at first unknown event\n --help Show this message and exit.\n
"},{"location":"commands/#ralph-write","title":"ralph write","text":"Write an archive to a configured backend.
Usage:
ralph write [OPTIONS]\n
Options:
-b, --backend [async_es|async_mongo|clickhouse|es|fs|ldp|lrs|mongo|s3|swift]\n Backend [required]\n async_es backend: \n --async-es-allow-yellow-status / --no-async-es-allow-yellow-status\n --async-es-client-options KEY=VALUE,KEY=VALUE\n --async-es-default-chunk-size INTEGER\n --async-es-default-index TEXT\n --async-es-hosts VALUE1,VALUE2,VALUE3\n --async-es-locale-encoding TEXT\n --async-es-point-in-time-keep-alive TEXT\n --async-es-refresh-after-write TEXT\n async_mongo backend: \n --async-mongo-client-options KEY=VALUE,KEY=VALUE\n --async-mongo-connection-uri TEXT\n --async-mongo-default-chunk-size INTEGER\n --async-mongo-default-collection TEXT\n --async-mongo-default-database TEXT\n --async-mongo-locale-encoding TEXT\n clickhouse backend: \n --clickhouse-client-options KEY=VALUE,KEY=VALUE\n --clickhouse-database TEXT\n --clickhouse-default-chunk-size INTEGER\n --clickhouse-event-table-name TEXT\n --clickhouse-host TEXT\n --clickhouse-locale-encoding TEXT\n --clickhouse-password TEXT\n --clickhouse-port INTEGER\n --clickhouse-username TEXT\n es backend: \n --es-allow-yellow-status / --no-es-allow-yellow-status\n --es-client-options KEY=VALUE,KEY=VALUE\n --es-default-chunk-size INTEGER\n --es-default-index TEXT\n --es-hosts VALUE1,VALUE2,VALUE3\n --es-locale-encoding TEXT\n --es-point-in-time-keep-alive TEXT\n --es-refresh-after-write TEXT\n fs backend: \n --fs-default-chunk-size INTEGER\n --fs-default-directory-path PATH\n --fs-default-query-string TEXT\n --fs-locale-encoding TEXT\n ldp backend: \n --ldp-application-key TEXT\n --ldp-application-secret TEXT\n --ldp-consumer-key TEXT\n --ldp-default-stream-id TEXT\n --ldp-endpoint TEXT\n --ldp-request-timeout TEXT\n --ldp-service-name TEXT\n lrs backend: \n --lrs-base-url TEXT\n --lrs-headers KEY=VALUE,KEY=VALUE\n --lrs-password TEXT\n --lrs-statements-endpoint TEXT\n --lrs-status-endpoint TEXT\n --lrs-username TEXT\n mongo backend: \n --mongo-client-options KEY=VALUE,KEY=VALUE\n --mongo-connection-uri TEXT\n --mongo-default-chunk-size INTEGER\n --mongo-default-collection TEXT\n --mongo-default-database TEXT\n --mongo-locale-encoding TEXT\n s3 backend: \n --s3-access-key-id TEXT\n --s3-default-bucket-name TEXT\n --s3-default-chunk-size INTEGER\n --s3-default-region TEXT\n --s3-endpoint-url TEXT\n --s3-locale-encoding TEXT\n --s3-secret-access-key TEXT\n --s3-session-token TEXT\n swift backend: \n --swift-auth-url TEXT\n --swift-default-container TEXT\n --swift-identity-api-version TEXT\n --swift-locale-encoding TEXT\n --swift-object-storage-url TEXT\n --swift-password TEXT\n --swift-project-domain-name TEXT\n --swift-region-name TEXT\n --swift-tenant-id TEXT\n --swift-tenant-name TEXT\n --swift-username TEXT\n --swift-user-domain-name TEXT\n -c, --chunk-size INTEGER Get events by chunks of size #\n -f, --force Overwrite existing archives or records\n -I, --ignore-errors Continue writing regardless of raised errors\n -s, --simultaneous With HTTP backend, POST all chunks\n simultaneously (instead of sequentially)\n -m, --max-num-simultaneous INTEGER\n The maximum number of chunks to send at\n once, when using `--simultaneous`. Use `-1`\n to not set a limit.\n -t, --target TEXT The target container to write into\n --help Show this message and exit.\n
"},{"location":"contribute/","title":"Contribute","text":""},{"location":"contribute/#ralphs_core","title":"Ralph\u2019s core","text":"To start playing with ralph
, you should build it using the bootstrap
Make target:
$ make bootstrap\n
Once the project has been bootstrapped, you may want to edit generated .env
file to set up available backends parameters that will be injected in the running container as environment variables to configure Ralph (see backends documentation):
# Elasticsearch backend\nRALPH_ES_HOSTS=http://elasticsearch:9200\nRALPH_ES_INDEX=statements\nRALPH_ES_TEST_HOSTS=http://elasticsearch:9200\nRALPH_ES_TEST_INDEX=test-index\n\n# [...]\n
Note that lines starting with a #
are considered as commented and thus will have no effect while running Ralph.
Now you can start playing the CLI:
$ bin/ralph --help\n
To lint your code, either use the lint
meta target or one of the linting tools we use:
# Run all linters\n$ make lint\n\n# Run pylint\n$ make lint-pylint\n\n# List available linters\n$ make help | grep lint-\n
To run tests on your code, either use the test
Make target or the bin/pytest
script to pass specific arguments to the test runner:
# Run all tests\n$ make test\n\n# Run pytest with options\n$ bin/pytest -x -k mixins\n\n# Run pytest with options and more debugging logs\n$ bin/pytest -x -vvv -s --log-level=DEBUG -k mixins\n
"},{"location":"contribute/#working_with_local_backends","title":"Working with local backends","text":"Not all backends are accessible in a local environment development; for now only elasticsearch
and swift
services are accessible as docker containers (see docker-compose.yml
services).
To configure those backends, we provide default parameters in the .env.dist
template, you can copy/paste them in your .env
file (and uncomment them so that they are properly injected in running containers).
In order to run the Elasticsearch backend locally on GNU/Linux operating systems, ensure that your virtual memory limits are not too low and increase them (temporally) if needed by typing this command from your terminal (as root
or using sudo
):
sysctl -w vm.max_map_count=262144
Reference: https://www.elastic.co/guide/en/elasticsearch/reference/master/vm-max-map-count.html
Once configured, start available backends using:
$ make run-[BACKEND]\n
Substitute [BACKEND]
by the backend name, e.g. es
for Elasticsearch or swift
for OpenStack Swift:
# Start Elasticsearch local backend\n$ make run-es\n# Start Swift local backend\n$ make run-swift\n# Start all local backends\n$ make run-all\n
Now that you have started at least the elasticsearch
and swift
backends, it\u2019s time to play with them:
# Store a JSON file in the Swift backend\n$ echo '{\"id\": 1, \"foo\": \"bar\"}' | \\\n ./bin/ralph write -b swift -f foo.json\n\n# Check that we have created a new JSON file in the Swift backend\n$ bin/ralph list -b swift\nfoo.json\n\n# Read the content of the JSON file and index it in Elasticsearch\n$ bin/ralph read -b swift foo.json | \\\n bin/ralph write -b es\n\n# Check that we have properly indexed the JSON file in Elasticsearch\n$ bin/ralph read -b es\n{\"id\": 1, \"foo\": \"bar\"}\n
"},{"location":"contribute/#ralphs_tray","title":"Ralph\u2019s tray","text":"Ralph is distributed along with its tray (a deployable package for Kubernetes clusters using Arnold). If you intend to work on this tray, please refer to Arnold\u2019s documentation first.
Dependencies:
v.1.23.5
): This CLI is used to communicate with the running Kubernetes instance you will use.v.5.0.0
): This tool is used to set up and run a lightweight Kubernetes cluster, in order to have a local environment (it is required to complete quickstart instructions below to avoid depending on an existing Kubernetes cluster).k3d
cluster","text":"To create (or run) a local kubernetes cluster, we use k3d
. The cluster\u2019s bootstrapping should be run via:
$ make k3d-cluster\n
Running a k3d-cluster locally supposes that the 80 and 443 ports of your machine are available, so that the ingresses created for your project responds properly. If one or both ports are already used by another service running on your machine, the make k3d-cluster
command may fail.
You can check that your cluster is running using the k3d cluster
command:
$ k3d cluster list\nNAME SERVERS AGENTS LOADBALANCER\nralph 1/1 0/0 true\n
As you can see, we are running a single node cluster called ralph
.
Once your Kubernetes cluster is running, you need to create a standard Arnold project describing applications and environments you need to deploy:
$ make arnold-bootstrap\n
Once bootstrapped, Arnold should have created a group_vars
directory containing the following files:
$ tree group_vars\ngroup_vars\n\u251c\u2500\u2500 common\n\u2514\u2500\u2500 customer\n \u2514\u2500\u2500 ralph\n \u251c\u2500\u2500 development\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 main.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 secrets\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 databases.vault.yml\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 elasticsearch.vault.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 ralph.vault.yml\n \u2514\u2500\u2500 main.yml\n\n5 directories, 5 files\n
To create the LRS credentials file, you need to provide a list of accounts allowed to request the LRS in Ralph\u2019s vault:
# Setup your kubernetes environment\n$ source .k3d-cluster.env.sh\n\n# Decrypt the vault\n$ bin/arnold -d -c ralph -e development -- vault -a ralph decrypt\n
Edit the vault file to add a new account for the foo
user with the bar
password and a relevant scope:
# group_vars/customer/ralph/development/secrets/ralph.vault.yml\n#\n# [...]\n#\n# LRS\nLRS_AUTH:\n - username: \"foo\"\n hash: \"$2b$12$lCggI749U6TrzK7Qyr7xGe1KVSAXdPjtkMew.BD6lzIk//T5YSb72\"\n scopes:\n - \"foo_scope\"\n
The password hash has been generated using bcrypt
as explained in the API user guide.
And finally (re-)encrypt Ralph\u2019s vault:
# Encrypt the vault\n$ bin/arnold -d -c ralph -e development -- vault -a ralph encrypt\n
You are now ready to create the related Kubernetes Secret while initializing Arnold project in the next step.
"},{"location":"contribute/#prepare_working_namespace","title":"Prepare working namespace","text":"You are now ready to create required Kubernetes objects to start working on Ralph\u2019s deployment:
$ make arnold-init\n
At this point an Elasticsearch cluster should be running on your Kubernetes cluster:
$ kubectl -n development-ralph get -l app=elasticsearch pod\nNAME READY STATUS RESTARTS AGE\nelasticsearch-node-0 1/1 Running 0 69s\nelasticsearch-node-1 1/1 Running 0 69s\nelasticsearch-node-2 1/1 Running 0 69s\nes-index-template-j-221010-09h25m24s-nx5qz 0/1 Completed 0 49s\n
We are now ready to deploy Ralph to Kubernetes!
"},{"location":"contribute/#deploy_code_repeat","title":"Deploy, code, repeat","text":"To test your local docker image, you need to build it and publish it to the local kubernetes cluster docker registry using the k3d-push
Makefile rule:
$ make k3d-push\n
Note that each time you modify Ralph\u2019s application or its Docker image, you will need to make this update.
Now that your Docker image is published, it\u2019s time to deploy it!
$ make arnold-deploy\n
To test this deployment, let\u2019s try to make an authenticated request to the LRS:
$ curl -sLk \\\n --user foo:bar \\\n \"https://$(\\\n kubectl -n development-ralph \\\n get \\\n ingress/ralph-app-current \\\n -o jsonpath='{.spec.rules[0].host}')/whoami\"\n
And why not send test statements from Potsie\u2019s repository:
$ curl -sL \\\n https://github.com/openfun/potsie/raw/main/fixtures/elasticsearch/lrs.json.gz | \\\n gunzip | \\\n head -n 100 | \\\n jq -s . | \\\n sed \"s/@timestamp/timestamp/g\" | \\\n curl -sLk \\\n --user foo:bar \\\n -X POST \\\n -H \"Content-Type: application/json\" \\\n \"https://$(\\\n kubectl -n development-ralph \\\n get \\\n ingress/ralph-app-current \\\n -o jsonpath='{.spec.rules[0].host}')/xAPI/statements/\" \\\n -d @-\n
This example command requires jq
to serialize the request payload (xAPI statements). When dealing with JSON data, we strongly recommend installing it to manipulate them from the command line.
If you want to run the bin/arnold
script to run specific Arnold commands, you must ensure that your environment is properly set and that Arnold runs in development mode (i.e. using the -d
flag):
$ source .k3d-cluster.env.sh\n$ bin/arnold -d -c ralph -e development -- vault -a ralph view\n
"},{"location":"contribute/#stop_k3d_cluster","title":"Stop k3d
cluster","text":"When finished to work on the Tray, you can stop the k3d
cluster using the k3d-stop
helper:
$ make k3d-stop\n
"},{"location":"models/","title":"Rationale","text":"Ralph can be considered versatile since at some point it is log-content-agnostic: most commands will work as expected without transforming logged events content or format.
But on the other side, Ralph is a tool dedicated to learning events processing so we\u2019ve implemented key features related to learning events validation and conversion. For now, we mostly focus on two learning events standards: Open edX and xAPI.
Data validation and serialisation/de-serialisation are achieved using pydantics models that are documented in the following subsections:
edX pydantic models.
"},{"location":"models/edx/#ralph.models.edx.base","title":"base
","text":"Base event model definitions.
"},{"location":"models/edx/#ralph.models.edx.base.AbstractBaseEventField","title":" AbstractBaseEventField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for core event
fields.
The base model does not have any attributes as event field does not have common sub-fields.
Source code inralph/models/edx/base.py
class AbstractBaseEventField(BaseModelWithConfig):\n \"\"\"Pydantic model for core `event` fields.\n\n The base model does not have any attributes as event field does not have common\n sub-fields.\n \"\"\"\n
"},{"location":"models/edx/#ralph.models.edx.base.BaseContextField","title":" BaseContextField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for core context
field.
Attributes:
Name Type Descriptioncourse_user_tags
Dict of str
Content from user_api_usercoursetag
table. Retrieved with: dict( UserCourseTag.objects.filter( user=request.user.pk, course_id=course_key ).values_list('key', 'value') )
Note: Is only present when a course page is requested. Is an empty dictionary when the user is not logged in or not found in the user_api_usercoursetag
table.
user_id
int or str or None
Consists of the ID of the authenticated user. Retrieved with: request.user.pk
querying the auth_user
table. Note: Is an integer when the user is found in the auth_user
table. Is an empty string when an exception is raised while retrieving the ID. Is None
when the user is not logged in.
org_id
str
Consists of the organization name that lists the course. Retrieved with: course_id.org
where course_id
is an opaque_keys.edx.locator.CourseLocator
which is created using the URL of the requested page. Note: Is an empty string when the requested page is not a course page.
course_id
str
Consists of the unique identifier for the visited course page. Retrieved with: course_id.to_deprecated_string()
where course_id
is an opaque_keys.edx.locator.CourseLocator
which is created using the URL of the requested page. Note: Is an empty string when the requested page is not a course page.
path
Path
Consist of the relative URL (without the hostname) of the requested page. Retrieved with: request.META['PATH_INFO']
ralph/models/edx/base.py
class BaseContextField(BaseModelWithConfig):\n \"\"\"Pydantic model for core `context` field.\n\n Attributes:\n course_user_tags (Dict of str): Content from `user_api_usercoursetag` table.\n Retrieved with:\n `dict(\n UserCourseTag.objects.filter(\n user=request.user.pk, course_id=course_key\n ).values_list('key', 'value')\n )`\n Note:\n Is only present when a course page is requested.\n Is an empty dictionary when the user is not logged in or not found in\n the `user_api_usercoursetag` table.\n user_id (int or str or None): Consists of the ID of the authenticated user.\n Retrieved with:\n `request.user.pk` querying the `auth_user` table.\n Note:\n Is an integer when the user is found in the `auth_user` table.\n Is an empty string when an exception is raised while retrieving the ID.\n Is `None` when the user is not logged in.\n org_id (str): Consists of the organization name that lists the course.\n Retrieved with:\n `course_id.org` where `course_id` is an\n `opaque_keys.edx.locator.CourseLocator` which is created using the URL\n of the requested page.\n Note:\n Is an empty string when the requested page is not a course page.\n course_id (str): Consists of the unique identifier for the visited course page.\n Retrieved with:\n `course_id.to_deprecated_string()` where `course_id` is an\n `opaque_keys.edx.locator.CourseLocator` which is created using the URL\n of the requested page.\n Note:\n Is an empty string when the requested page is not a course page.\n path (Path): Consist of the relative URL (without the hostname) of the\n requested page.\n Retrieved with:\n `request.META['PATH_INFO']`\n \"\"\"\n\n course_id: constr(regex=r\"^$|^course-v1:.+\\+.+\\+.+$\") # noqa:F722\n course_user_tags: Optional[Dict[str, str]]\n module: Optional[ContextModuleField]\n org_id: str\n path: Path\n user_id: Union[int, Literal[\"\"], None]\n
"},{"location":"models/edx/#ralph.models.edx.base.BaseEdxModel","title":" BaseEdxModel (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for core statement.
WARNING: it does not define the event
, event_type
and event_source
fields.
Attributes:
Name Type Descriptionusername
str
Consists of the unique username identifying the logged-in user. Retrieved with: request.user.username
querying the auth_user
table. Note: Is an empty string when the user is not logged in. If an exception is raised when retrieving the username from the table then the value is anonymous
. Usernames are made of 2-30 ASCII letters / numbers / underscores (_) / hyphens (-)
ip
IPv4Address or str
Consists of the public IPv4 address of the user. Retrieved with: get_ip(request)
cf. https://github.com/un33k/django-ipware/tree/1.1.0 Note: Can be an empty string if the IP address is not found.
agent
str
Consists of the User-Agent
HTTP request header. Retrieved with: request.META[HTTP_USER_AGENT]
Note: Can be an empty string if the header is not present in the request. Contains information about: Browser name and version Operating system name and version Default language
host
str
Consists of the hostname of the server. Retrieved with: request.META[SERVER_NAME]
referer
Path
Consists of the Referer
HTTP request header. Retrieved with: request.META[HTTP_REFERER]
Note: Can be an empty string if the header is not present in the request. Contains the referring URL (previous URL visited by the user).
accept_language
str
Consists of the Accept-Language
HTTP request header. Retrieved with: request.META[HTTP_ACCEPT_LANGUAGE]
Note: Can be an empty string if the header is not present in the request. Contains the default language settings of the user.
context
BaseContextField
see BaseContextField.
time
datetime
Consists of the UTC time in ISO format at which the event was emitted. Retrieved with: datetime.datetime.utcnow()
page
None
Consists of the value None
Note: In JSON the value is null
instead of None
.
ralph/models/edx/base.py
class BaseEdxModel(BaseModelWithConfig):\n \"\"\"Pydantic model for core statement.\n\n WARNING: it does not define the `event`, `event_type` and `event_source` fields.\n\n Attributes:\n username (str): Consists of the unique username identifying the logged-in user.\n Retrieved with:\n `request.user.username` querying the `auth_user` table.\n Note:\n Is an empty string when the user is not logged in.\n If an exception is raised when retrieving the username from the table\n then the value is `anonymous`.\n Usernames are made of 2-30 ASCII letters / numbers / underscores (_) /\n hyphens (-)\n ip (IPv4Address or str): Consists of the public IPv4 address of the user.\n Retrieved with:\n `get_ip(request)` cf. https://github.com/un33k/django-ipware/tree/1.1.0\n Note:\n Can be an empty string if the IP address is not found.\n agent (str): Consists of the `User-Agent` HTTP request header.\n Retrieved with:\n `request.META[HTTP_USER_AGENT]`\n Note:\n Can be an empty string if the header is not present in the request.\n Contains information about:\n Browser name and version\n Operating system name and version\n Default language\n host (str): Consists of the hostname of the server.\n Retrieved with:\n `request.META[SERVER_NAME]`\n referer (Path): Consists of the `Referer` HTTP request header.\n Retrieved with:\n `request.META[HTTP_REFERER]`\n Note:\n Can be an empty string if the header is not present in the request.\n Contains the referring URL (previous URL visited by the user).\n accept_language (str): Consists of the `Accept-Language` HTTP request header.\n Retrieved with:\n `request.META[HTTP_ACCEPT_LANGUAGE]`\n Note:\n Can be an empty string if the header is not present in the request.\n Contains the default language settings of the user.\n context (BaseContextField): see BaseContextField.\n time (datetime): Consists of the UTC time in ISO format at which the event was\n emitted.\n Retrieved with:\n `datetime.datetime.utcnow()`\n page (None): Consists of the value `None`\n Note:\n In JSON the value is `null` instead of `None`.\n \"\"\"\n\n username: Union[constr(min_length=2, max_length=30), Literal[\"\"]]\n ip: Union[IPv4Address, Literal[\"\"]]\n agent: str\n host: str\n referer: Union[AnyHttpUrl, Literal[\"\"]]\n accept_language: str\n context: BaseContextField\n time: datetime\n page: None\n
"},{"location":"models/edx/#ralph.models.edx.base.BaseModelWithConfig","title":" BaseModelWithConfig (BaseModel)
pydantic-model
","text":"Pydantic model for base configuration shared among all models.
Source code inralph/models/edx/base.py
class BaseModelWithConfig(BaseModel):\n \"\"\"Pydantic model for base configuration shared among all models.\"\"\"\n\n class Config: # pylint: disable=missing-class-docstring # noqa: D106\n extra = \"forbid\"\n
"},{"location":"models/edx/#ralph.models.edx.base.ContextModuleField","title":" ContextModuleField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for context
.module
field.
Attributes:
Name Type Descriptionusage_key
str
Consists of a block ID of the current component.
display_name
str
Consists of a short description or title of the component.
Source code inralph/models/edx/base.py
class ContextModuleField(BaseModelWithConfig):\n \"\"\"Pydantic model for `context`.`module` field.\n\n Attributes:\n usage_key (str): Consists of a block ID of the current component.\n display_name (str): Consists of a short description or title of the component.\n \"\"\"\n\n usage_key: constr(regex=r\"^block-v1:.+\\+.+\\+.+type@.+@[a-f0-9]{32}$\") # noqa:F722\n display_name: str\n original_usage_key: Optional[\n constr(\n regex=r\"^block-v1:.+\\+.+\\+.+type@problem\\+block@[a-f0-9]{32}$\" # noqa:F722\n )\n ]\n original_usage_version: Optional[str]\n
"},{"location":"models/edx/#ralph.models.edx.browser","title":"browser
","text":"Browser event model definitions.
"},{"location":"models/edx/#ralph.models.edx.browser.BaseBrowserModel","title":" BaseBrowserModel (BaseEdxModel)
pydantic-model
","text":"Pydantic model for core browser statements.
This type of event is triggered on (XHR) POST/GET requests to the /event
URL.
Attributes:
Name Type Descriptionevent_source
str
Consists of the value browser
.
page
AnyUrl
Consists of the URL (with hostname) of the visited page. Retrieved with: window.location.href
from the JavaScript front-end.
session
str
Consists of the md5 encrypted Django session key or an empty string.
Source code inralph/models/edx/browser.py
class BaseBrowserModel(BaseEdxModel):\n \"\"\"Pydantic model for core browser statements.\n\n This type of event is triggered on (XHR) POST/GET requests to the `/event` URL.\n\n Attributes:\n event_source (str): Consists of the value `browser`.\n page (AnyUrl): Consists of the URL (with hostname) of the visited page.\n Retrieved with:\n `window.location.href` from the JavaScript front-end.\n session (str): Consists of the md5 encrypted Django session key or an empty\n string.\n \"\"\"\n\n event_source: Literal[\"browser\"]\n page: AnyUrl\n session: Union[constr(regex=r\"^[a-f0-9]{32}$\"), Literal[\"\"]] # noqa: F722\n
"},{"location":"models/edx/#ralph.models.edx.converters","title":"converters
special
","text":""},{"location":"models/edx/#ralph.models.edx.converters.xapi","title":"xapi
special
","text":"edX to xAPI conversion sets.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.base","title":"base
","text":"Base xAPI Converter.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.base.BaseXapiConverter","title":" BaseXapiConverter (BaseConversionSet)
","text":"Base xAPI Converter.
WARNING: The converter may not include the following edX fields: - context.org_id: When org_id
is an empty string. - context.course_id: When course_id
is an empty string.
WARNING: The converter should not include the following edX fields as they may contain sensitive data: username
, referer
, event
, event_source
, ip
, agent
, accept_language:
, context.course_user_tags
.
ralph/models/edx/converters/xapi/base.py
class BaseXapiConverter(BaseConversionSet):\n \"\"\"Base xAPI Converter.\n\n WARNING: The converter may not include the following edX fields:\n - context.org_id: When `org_id` is an empty string.\n - context.course_id: When `course_id` is an empty string.\n\n WARNING: The converter should not include the following edX fields as they may\n contain sensitive data: `username`, `referer`, `event`, `event_source`, `ip`,\n `agent`, `accept_language:`, `context.course_user_tags`.\n \"\"\"\n\n def __init__(self, uuid_namespace: str, platform_url: str):\n \"\"\"Initialize BaseXapiConverter.\"\"\"\n self.platform_url = platform_url\n try:\n self.uuid_namespace = UUID(uuid_namespace)\n except (TypeError, ValueError, AttributeError) as err:\n raise ConfigurationException(\"Invalid UUID namespace\") from err\n super().__init__()\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n return {\n ConversionItem(\n \"id\",\n None,\n lambda event_str: str(uuid5(self.uuid_namespace, event_str)),\n True,\n ),\n ConversionItem(\n \"actor__account__homePage\", transformers=lambda _: self.platform_url\n ),\n ConversionItem(\n \"actor__account__name\",\n \"context__user_id\",\n lambda user_id: str(user_id) if user_id else \"anonymous\",\n ),\n ConversionItem(\"timestamp\", \"time\"),\n }\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.base.BaseXapiConverter.__init__","title":"__init__(self, uuid_namespace, platform_url)
special
","text":"Initialize BaseXapiConverter.
Source code inralph/models/edx/converters/xapi/base.py
def __init__(self, uuid_namespace: str, platform_url: str):\n \"\"\"Initialize BaseXapiConverter.\"\"\"\n self.platform_url = platform_url\n try:\n self.uuid_namespace = UUID(uuid_namespace)\n except (TypeError, ValueError, AttributeError) as err:\n raise ConfigurationException(\"Invalid UUID namespace\") from err\n super().__init__()\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment","title":"enrollment
","text":"Enrollment event xAPI Converter.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentActivatedToLMSRegisteredCourse","title":" EdxCourseEnrollmentActivatedToLMSRegisteredCourse (LMSBaseXapiConverter)
","text":"Convert a common edX edx.course.enrollment.activated
event to xAPI.
ralph/models/edx/converters/xapi/enrollment.py
class EdxCourseEnrollmentActivatedToLMSRegisteredCourse(LMSBaseXapiConverter):\n \"\"\"Convert a common edX `edx.course.enrollment.activated` event to xAPI.\"\"\"\n\n __src__ = EdxCourseEnrollmentActivated\n __dest__ = LMSRegisteredCourse\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentActivatedToLMSRegisteredCourse.__dest__","title":" __dest__ (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS registered to a course
statement.
Example: John is registered to a course.
Attributes:
Name Type Descriptionverb
dict
See RegisteredVerb.
object
dict
See CourseActivity.
context
dict
See LMSRegistrationContext.
Source code inralph/models/edx/converters/xapi/enrollment.py
class LMSRegisteredCourse(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `registered to a course` statement.\n\n Example: John is registered to a course.\n\n Attributes:\n verb (dict): See RegisteredVerb.\n object (dict): See CourseActivity.\n context (dict): See LMSRegistrationContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/registered\",\n object__definition__type=\"http://adlnet.gov/expapi/activities/course\",\n )\n\n verb: RegisteredVerb = RegisteredVerb()\n object: CourseActivity\n context: LMSRegistrationContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentActivatedToLMSRegisteredCourse.__src__","title":" __src__ (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.activated
statement.
The server emits this statement when a student enrolls in a course.
Attributes:
Name Type Descriptionevent
EnrollmentEventField
See EnrollmentEventField.
event_type
str
Consists of the value edx.course.enrollment.activated
.
name
str
Consists of the value edx.course.enrollment.activated
.
ralph/models/edx/converters/xapi/enrollment.py
class EdxCourseEnrollmentActivated(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.activated` statement.\n\n The server emits this statement when a student enrolls in a course.\n\n Attributes:\n event (EnrollmentEventField): See EnrollmentEventField.\n event_type (str): Consists of the value `edx.course.enrollment.activated`.\n name (str): Consists of the value `edx.course.enrollment.activated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.activated\"\n )\n\n event: Union[\n Json[EnrollmentEventField], # pylint: disable=unsubscriptable-object\n EnrollmentEventField,\n ]\n event_type: Literal[\"edx.course.enrollment.activated\"]\n name: Literal[\"edx.course.enrollment.activated\"]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentDeactivatedToLMSUnregisteredCourse","title":" EdxCourseEnrollmentDeactivatedToLMSUnregisteredCourse (LMSBaseXapiConverter)
","text":"Convert a common edX edx.course.enrollment.deactivated
event to xAPI.
ralph/models/edx/converters/xapi/enrollment.py
class EdxCourseEnrollmentDeactivatedToLMSUnregisteredCourse(LMSBaseXapiConverter):\n \"\"\"Convert a common edX `edx.course.enrollment.deactivated` event to xAPI.\"\"\"\n\n __src__ = EdxCourseEnrollmentDeactivated\n __dest__ = LMSUnregisteredCourse\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentDeactivatedToLMSUnregisteredCourse.__dest__","title":" __dest__ (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS unregistered to a course
statement.
Example: John is unregistered to a course.
Attributes:
Name Type Descriptionverb
dict
See UnregisteredVerb.
object
dict
See CourseActivity.
context
dict
See LMSRegistrationContext.
Source code inralph/models/edx/converters/xapi/enrollment.py
class LMSUnregisteredCourse(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `unregistered to a course` statement.\n\n Example: John is unregistered to a course.\n\n Attributes:\n verb (dict): See UnregisteredVerb.\n object (dict): See CourseActivity.\n context (dict): See LMSRegistrationContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://id.tincanapi.com/verb/unregistered\",\n object__definition__type=\"http://adlnet.gov/expapi/activities/course\",\n )\n\n verb: UnregisteredVerb = UnregisteredVerb()\n object: CourseActivity\n context: LMSRegistrationContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.EdxCourseEnrollmentDeactivatedToLMSUnregisteredCourse.__src__","title":" __src__ (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.deactivated
statement.
The server emits this statement when a student unenrolls from a course.
Attributes:
Name Type Descriptionevent
EnrollmentEventField
See EnrollmentEventField.
event_type
str
Consists of the value edx.course.enrollment.deactivated
.
name
str
Consists of the value edx.course.enrollment.deactivated
.
ralph/models/edx/converters/xapi/enrollment.py
class EdxCourseEnrollmentDeactivated(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.deactivated` statement.\n\n The server emits this statement when a student unenrolls from a course.\n\n Attributes:\n event (EnrollmentEventField): See EnrollmentEventField.\n event_type (str): Consists of the value `edx.course.enrollment.deactivated`.\n name (str): Consists of the value `edx.course.enrollment.deactivated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.deactivated\"\n )\n\n event: Union[\n Json[EnrollmentEventField], # pylint: disable=unsubscriptable-object\n EnrollmentEventField,\n ]\n event_type: Literal[\"edx.course.enrollment.deactivated\"]\n name: Literal[\"edx.course.enrollment.deactivated\"]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.enrollment.LMSBaseXapiConverter","title":" LMSBaseXapiConverter (BaseXapiConverter)
","text":"Base LMS xAPI Converter.
Source code inralph/models/edx/converters/xapi/enrollment.py
class LMSBaseXapiConverter(BaseXapiConverter):\n \"\"\"Base LMS xAPI Converter.\"\"\"\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"object__id\",\n \"event__course_id\",\n lambda course_id: f\"{self.platform_url}/courses/{course_id}/info\",\n ),\n ConversionItem(\n \"context__contextActivities__category\",\n None,\n lambda _: [{\"id\": \"https://w3id.org/xapi/lms\"}],\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.navigational","title":"navigational
","text":"Navigational event xAPI Converter.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.navigational.UIPageCloseToPageTerminated","title":" UIPageCloseToPageTerminated (BaseXapiConverter)
","text":"Convert a common edX page_close
event to xAPI.
Example Statement: John terminated https://www.fun-mooc.fr/ page.
WARNING: The converter does not use the self.platform_url
in the object__id
because the platform_url
is present in the edX\u2019s event page
field.
ralph/models/edx/converters/xapi/navigational.py
class UIPageCloseToPageTerminated(BaseXapiConverter):\n \"\"\"Convert a common edX `page_close` event to xAPI.\n\n Example Statement: John terminated https://www.fun-mooc.fr/ page.\n\n WARNING: The converter does not use the `self.platform_url` in the `object__id`\n because the `platform_url` is present in the edX's event `page` field.\n \"\"\"\n\n __src__ = UIPageClose\n __dest__ = PageTerminated\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union({ConversionItem(\"object__id\", \"page\")})\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.navigational.UIPageCloseToPageTerminated.__dest__","title":" __dest__ (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for page terminated statement.
Example: John terminated the https://www.fun-mooc.fr/ page.
Attributes:
Name Type Descriptionobject
dict
See PageActivity.
verb
dict
See TerminatedVerb.
Source code inralph/models/edx/converters/xapi/navigational.py
class PageTerminated(BaseXapiStatement):\n \"\"\"Pydantic model for page terminated statement.\n\n Example: John terminated the https://www.fun-mooc.fr/ page.\n\n Attributes:\n object (dict): See PageActivity.\n verb (dict): See TerminatedVerb.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://activitystrea.ms/schema/1.0/page\",\n verb__id=\"http://adlnet.gov/expapi/verbs/terminated\",\n )\n\n object: PageActivity\n verb: TerminatedVerb = TerminatedVerb()\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.navigational.UIPageCloseToPageTerminated.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for page_close
statement.
The browser emits this statement when the user navigates to the next page or closes the browser window (when the JavaScript window.onunload
event is called).
Attributes:
Name Type Descriptionevent
str
Consists of the string value {}
.
event_type
str
Consists of the value page_close
.
name
str
Consists of the value page_close
.
ralph/models/edx/converters/xapi/navigational.py
class UIPageClose(BaseBrowserModel):\n \"\"\"Pydantic model for `page_close` statement.\n\n The browser emits this statement when the user navigates to the next page\n or closes the browser window (when the JavaScript `window.onunload` event\n is called).\n\n Attributes:\n event (str): Consists of the string value `{}`.\n event_type (str): Consists of the value `page_close`.\n name (str): Consists of the value `page_close`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"page_close\")\n\n # pylint: disable=unsubscriptable-object\n event: Literal[\"{}\"]\n event_type: Literal[\"page_close\"]\n name: Literal[\"page_close\"]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.server","title":"server
","text":"Server event xAPI Converter.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.server.ServerEventToPageViewed","title":" ServerEventToPageViewed (BaseXapiConverter)
","text":"Convert a common edX server event to xAPI.
Example Statement: John viewed https://www.fun-mooc.fr/ page.
Source code inralph/models/edx/converters/xapi/server.py
class ServerEventToPageViewed(BaseXapiConverter):\n \"\"\"Convert a common edX server event to xAPI.\n\n Example Statement: John viewed https://www.fun-mooc.fr/ page.\n \"\"\"\n\n __src__ = Server\n __dest__ = PageViewed\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"object__id\",\n \"event_type\",\n lambda event_type: self.platform_url + event_type,\n ),\n }\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.server.ServerEventToPageViewed.__dest__","title":" __dest__ (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for page viewed statement.
Example: John viewed the https://www.fun-mooc.fr/ page.
Attributes:
Name Type Descriptionobject
dict
See PageActivity.
verb
dict
See ViewedVerb.
Source code inralph/models/edx/converters/xapi/server.py
class PageViewed(BaseXapiStatement):\n \"\"\"Pydantic model for page viewed statement.\n\n Example: John viewed the https://www.fun-mooc.fr/ page.\n\n Attributes:\n object (dict): See PageActivity.\n verb (dict): See ViewedVerb.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://activitystrea.ms/schema/1.0/page\",\n verb__id=\"http://id.tincanapi.com/verb/viewed\",\n )\n\n object: PageActivity\n verb: ViewedVerb = ViewedVerb()\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.server.ServerEventToPageViewed.__src__","title":" __src__ (BaseServerModel)
pydantic-model
","text":"Pydantic model for common server statement.
This type of event is triggered from the django middleware on each request excluding: /event
, login
, heartbeat
, /segmentio/event
and /performance
.
Attributes:
Name Type Descriptionevent_type
str
Consist of the relative URL (without the hostname) of the requested page. Retrieved with: request.META['PATH_INFO']
event
str
Consist of a JSON string holding the content of the GET or POST request. Retrieved with: json.dumps( { 'GET': dict(request.GET), 'POST': dict(request.POST) } )[:512]
Note: Values for [\u2018password\u2019, \u2018newpassword\u2019, \u2018new_password\u2019, \u2018oldpassword\u2019, \u2018old_password\u2019, \u2018new_password1\u2019, \u2018new_password2\u2019] are replaced by ********
. The JSON string is truncated at 512 characters resulting in invalid JSON.
ralph/models/edx/converters/xapi/server.py
class Server(BaseServerModel):\n \"\"\"Pydantic model for common server statement.\n\n This type of event is triggered from the django middleware on each request\n excluding: `/event`, `login`, `heartbeat`, `/segmentio/event` and `/performance`.\n\n Attributes:\n event_type (str): Consist of the relative URL (without the hostname) of the\n requested page.\n Retrieved with:\n `request.META['PATH_INFO']`\n event (str): Consist of a JSON string holding the content of the GET or POST\n request.\n Retrieved with:\n ```json.dumps(\n {\n 'GET': dict(request.GET),\n 'POST': dict(request.POST)\n }\n )[:512]```\n Note:\n Values for ['password', 'newpassword', 'new_password', 'oldpassword',\n 'old_password', 'new_password1', 'new_password2'] are replaced by\n `********`.\n The JSON string is truncated at 512 characters resulting in invalid\n JSON.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=LazyModelField(\"context__path\")\n )\n\n # pylint: disable=unsubscriptable-object\n event_type: Path\n event: Union[Json[ServerEventField], ServerEventField]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video","title":"video
","text":"Video event xAPI Converter.
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UILoadVideoToVideoInitialized","title":" UILoadVideoToVideoInitialized (VideoBaseXapiConverter)
","text":"Convert a common edX load_video
event to xAPI.
ralph/models/edx/converters/xapi/video.py
class UILoadVideoToVideoInitialized(VideoBaseXapiConverter):\n \"\"\"Convert a common edX `load_video` event to xAPI.\"\"\"\n\n __src__ = UILoadVideo\n __dest__ = VideoInitialized\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_LENGTH,\n None,\n # Set the video length to null by default.\n # This information is mandatory in the xAPI template\n # and does not exist in the edX `load_video` event model.\n lambda _: 0.0,\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_USER_AGENT, \"agent\"\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UILoadVideoToVideoInitialized.__dest__","title":" __dest__ (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video initialized statement.
Example: A video has been fully initialized.
Attributes:
Name Type Descriptionverb
dict
See InitializedVerb.
context
dict
See VideoInitializedContext.
Source code inralph/models/edx/converters/xapi/video.py
class VideoInitialized(BaseVideoStatement):\n \"\"\"Pydantic model for video initialized statement.\n\n Example: A video has been fully initialized.\n\n Attributes:\n verb (dict): See InitializedVerb.\n context (dict): See VideoInitializedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/initialized\",\n )\n\n verb: InitializedVerb = InitializedVerb()\n context: VideoInitializedContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UILoadVideoToVideoInitialized.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for load_video
statement.
The browser emits this statement when the video is fully rendered and ready to play.
Attributes:
Name Type Descriptionevent
VideoBaseEventField
See VideoBaseEventField.
event_type
str
Consists of the value load_video
.
name
str
Consists either of the value load_video
or edx.video.loaded
.
ralph/models/edx/converters/xapi/video.py
class UILoadVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `load_video` statement.\n\n The browser emits this statement when the video is fully rendered and ready to\n play.\n\n Attributes:\n event (VideoBaseEventField): See VideoBaseEventField.\n event_type (str): Consists of the value `load_video`.\n name (str): Consists either of the value `load_video` or `edx.video.loaded`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"load_video\")\n\n event: Union[\n Json[VideoBaseEventField], # pylint: disable=unsubscriptable-object\n VideoBaseEventField,\n ]\n event_type: Literal[\"load_video\"]\n name: Literal[\"load_video\", \"edx.video.loaded\"]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPauseVideoToVideoPaused","title":" UIPauseVideoToVideoPaused (VideoBaseXapiConverter)
","text":"Convert a common edX pause_video
event to xAPI.
ralph/models/edx/converters/xapi/video.py
class UIPauseVideoToVideoPaused(VideoBaseXapiConverter):\n \"\"\"Convert a common edX `pause_video` event to xAPI.\"\"\"\n\n __src__ = UIPauseVideo\n __dest__ = VideoPaused\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_TIME,\n \"event__currentTime\",\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_LENGTH,\n None,\n # Set the video length to null by default.\n # This information is mandatory in the xAPI template\n # and does not exist in the edX `pause_video` event model.\n lambda _: 0.0,\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPauseVideoToVideoPaused.__dest__","title":" __dest__ (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video paused statement.
Example: John paused the video or clicked the pause button.
Attributes:
Name Type Descriptionverb
dict
See PausedVerb.
result
dict
See VideoPausedResult.
context
dict
See VideoPausedContext.
Source code inralph/models/edx/converters/xapi/video.py
class VideoPaused(BaseVideoStatement):\n \"\"\"Pydantic model for video paused statement.\n\n Example: John paused the video or clicked the pause button.\n\n Attributes:\n verb (dict): See PausedVerb.\n result (dict): See VideoPausedResult.\n context (dict): See VideoPausedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/paused\",\n )\n\n verb: PausedVerb = PausedVerb()\n result: VideoPausedResult\n context: VideoPausedContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPauseVideoToVideoPaused.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for pause_video
statement.
The browser emits this statement when a user selects the video player\u2019s pause control.
Attributes:
Name Type Descriptionevent
PauseVideoEventField
See PauseVideoEventField.
event_type
str
Consists of the value pause_video
.
name
str
Consists either of the value pause_video
or edx.video.paused
.
ralph/models/edx/converters/xapi/video.py
class UIPauseVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `pause_video` statement.\n\n The browser emits this statement when a user selects the video player's pause\n control.\n\n Attributes:\n event (PauseVideoEventField): See PauseVideoEventField.\n event_type (str): Consists of the value `pause_video`.\n name (str): Consists either of the value `pause_video` or `edx.video.paused`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"pause_video\")\n\n event: Union[\n Json[PauseVideoEventField], # pylint: disable=unsubscriptable-object\n PauseVideoEventField,\n ]\n event_type: Literal[\"pause_video\"]\n name: Optional[Literal[\"pause_video\", \"edx.video.paused\"]]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPlayVideoToVideoPlayed","title":" UIPlayVideoToVideoPlayed (VideoBaseXapiConverter)
","text":"Convert a common edX play_video
event to xAPI.
ralph/models/edx/converters/xapi/video.py
class UIPlayVideoToVideoPlayed(VideoBaseXapiConverter):\n \"\"\"Convert a common edX `play_video` event to xAPI.\"\"\"\n\n __src__ = UIPlayVideo\n __dest__ = VideoPlayed\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_TIME,\n \"event__currentTime\",\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPlayVideoToVideoPlayed.__dest__","title":" __dest__ (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video played statement.
Example: John played the video or clicked the play button.
Attributes:
Name Type Descriptionverb
dict
See PlayedVerb.
result
dict
See VideoPlayedResult.
context
dict
See VideoPlayedContext.
Source code inralph/models/edx/converters/xapi/video.py
class VideoPlayed(BaseVideoStatement):\n \"\"\"Pydantic model for video played statement.\n\n Example: John played the video or clicked the play button.\n\n Attributes:\n verb (dict): See PlayedVerb.\n result (dict): See VideoPlayedResult.\n context (dict): See VideoPlayedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/played\",\n )\n\n verb: PlayedVerb = PlayedVerb()\n result: VideoPlayedResult\n context: VideoPlayedContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIPlayVideoToVideoPlayed.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for play_video
statement.
The browser emits this statement when a user selects the video player\u2019s play control.
Attributes:
Name Type Descriptionevent
PlayVideoEventField
See PlayVideoEventField.
event_type
str
Consists of the value play_video
.
name
str
Consists either of the value play_video
or edx.video.played
.
ralph/models/edx/converters/xapi/video.py
class UIPlayVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `play_video` statement.\n\n The browser emits this statement when a user selects the video player's play\n control.\n\n Attributes:\n event (PlayVideoEventField): See PlayVideoEventField.\n event_type (str): Consists of the value `play_video`.\n name (str): Consists either of the value `play_video` or `edx.video.played`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"play_video\")\n\n event: Union[\n Json[PlayVideoEventField], # pylint: disable=unsubscriptable-object\n PlayVideoEventField,\n ]\n event_type: Literal[\"play_video\"]\n name: Optional[Literal[\"play_video\", \"edx.video.played\"]]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UISeekVideoToVideoSeeked","title":" UISeekVideoToVideoSeeked (VideoBaseXapiConverter)
","text":"Convert a common edX seek_video
event to xAPI.
ralph/models/edx/converters/xapi/video.py
class UISeekVideoToVideoSeeked(VideoBaseXapiConverter):\n \"\"\"Convert a common edX `seek_video` event to xAPI.\"\"\"\n\n __src__ = UISeekVideo\n __dest__ = VideoSeeked\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_TIME_FROM,\n \"event__old_time\",\n ),\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_TIME_TO,\n \"event__new_time\",\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UISeekVideoToVideoSeeked.__dest__","title":" __dest__ (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video seeked statement.
!!! example \u201cJohn moved the progress bar forward or backward to a specific time in the\u201d video.
Attributes:
Name Type Descriptionverb
dict
See SeekedVerb.
result
dict
See VideoSeekedResult.
context
dict
See VideoSeekedContext.
Source code inralph/models/edx/converters/xapi/video.py
class VideoSeeked(BaseVideoStatement):\n \"\"\"Pydantic model for video seeked statement.\n\n Example: John moved the progress bar forward or backward to a specific time in the\n video.\n\n Attributes:\n verb (dict): See SeekedVerb.\n result (dict): See VideoSeekedResult.\n context (dict): See VideoSeekedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/seeked\",\n )\n\n verb: SeekedVerb = SeekedVerb()\n result: VideoSeekedResult\n context: VideoSeekedContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UISeekVideoToVideoSeeked.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for seek_video
statement.
The browser emits this statement when a user selects a user interface control to go to a different point in the video file.
Attributes:
Name Type Descriptionevent
SeekVideoEventField
See SeekVideoEventField.
event_type
str
Consists of the value seek_video
.
name
str
Consists either of the value seek_video
or edx.video.position.changed
.
ralph/models/edx/converters/xapi/video.py
class UISeekVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `seek_video` statement.\n\n The browser emits this statement when a user selects a user interface control to go\n to a different point in the video file.\n\n Attributes:\n event (SeekVideoEventField): See SeekVideoEventField.\n event_type (str): Consists of the value `seek_video`.\n name (str): Consists either of the value `seek_video` or\n `edx.video.position.changed`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"seek_video\")\n\n event: Union[\n Json[SeekVideoEventField], # pylint: disable=unsubscriptable-object\n SeekVideoEventField,\n ]\n event_type: Literal[\"seek_video\"]\n name: Optional[Literal[\"seek_video\", \"edx.video.position.changed\"]]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIStopVideoToVideoTerminated","title":" UIStopVideoToVideoTerminated (VideoBaseXapiConverter)
","text":"Convert a common edX stop_video
event to xAPI.
ralph/models/edx/converters/xapi/video.py
class UIStopVideoToVideoTerminated(VideoBaseXapiConverter):\n \"\"\"Convert a common edX `stop_video` event to xAPI.\"\"\"\n\n __src__ = UIStopVideo\n __dest__ = VideoTerminated\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_TIME,\n \"event__currentTime\",\n ),\n ConversionItem(\n \"result__extensions__\" + RESULT_EXTENSION_PROGRESS,\n None,\n # Set the video progress to null by default.\n # This information is mandatory in the xAPI template\n # and does not exist in the edX `stop_video` event model.\n lambda _: 0.0,\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_LENGTH,\n None,\n # Set the video length to null by default.\n # This information is mandatory in the xAPI template\n # and does not exist in the edX `stop_video` event model.\n lambda _: 0.0,\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIStopVideoToVideoTerminated.__dest__","title":" __dest__ (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video terminated statement.
Example: John ended a video (quit the player).
Attributes:
Name Type Descriptionverb
dict
See TerminatedVerb.
result
dict
See VideoTerminatedResult.
context
dict
See VideoTerminatedContext.
Source code inralph/models/edx/converters/xapi/video.py
class VideoTerminated(BaseVideoStatement):\n \"\"\"Pydantic model for video terminated statement.\n\n Example: John ended a video (quit the player).\n\n Attributes:\n verb (dict): See TerminatedVerb.\n result (dict): See VideoTerminatedResult.\n context (dict): See VideoTerminatedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/terminated\",\n )\n\n verb: TerminatedVerb = TerminatedVerb()\n result: VideoTerminatedResult\n context: VideoTerminatedContext\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.UIStopVideoToVideoTerminated.__src__","title":" __src__ (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for stop_video
statement.
The browser emits this statement when the video player reaches the end of the video file and play automatically stops.
Attributes:
Name Type Descriptionevent
StopVideoEventField
See StopVideoEventField.
event_type
str
Consists of the value stop_video
.
name
str
Consists either of the value stop_video
or edx.video.stopped
.
ralph/models/edx/converters/xapi/video.py
class UIStopVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `stop_video` statement.\n\n The browser emits this statement when the video player reaches the end of the video\n file and play automatically stops.\n\n Attributes:\n event (StopVideoEventField): See StopVideoEventField.\n event_type (str): Consists of the value `stop_video`.\n name (str): Consists either of the value `stop_video` or `edx.video.stopped`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"stop_video\")\n\n event: Union[\n Json[StopVideoEventField], # pylint: disable=unsubscriptable-object\n StopVideoEventField,\n ]\n event_type: Literal[\"stop_video\"]\n name: Optional[Literal[\"stop_video\", \"edx.video.stopped\"]]\n
"},{"location":"models/edx/#ralph.models.edx.converters.xapi.video.VideoBaseXapiConverter","title":" VideoBaseXapiConverter (BaseXapiConverter)
","text":"Base Video xAPI Converter.
Source code inralph/models/edx/converters/xapi/video.py
class VideoBaseXapiConverter(BaseXapiConverter):\n \"\"\"Base Video xAPI Converter.\"\"\"\n\n def _get_conversion_items(self):\n \"\"\"Return a set of ConversionItems used for conversion.\"\"\"\n conversion_items = super()._get_conversion_items()\n return conversion_items.union(\n {\n ConversionItem(\n \"object__definition__name\",\n \"event__id\",\n lambda id: {LANG_EN_US_DISPLAY: id},\n ),\n ConversionItem(\n \"object__id\",\n None,\n lambda event: self.platform_url\n + \"/xblock/block-v1:\"\n + event[\"context\"][\"course_id\"]\n + \"-course-v1:+type@video+block@\"\n + event[\"event\"][\"id\"],\n ),\n ConversionItem(\n \"context__contextActivities__category\",\n None,\n lambda _: [{\"id\": \"https://w3id.org/xapi/video\"}],\n ),\n ConversionItem(\n \"context__extensions__\" + CONTEXT_EXTENSION_SESSION_ID,\n \"session\",\n ),\n },\n )\n
"},{"location":"models/edx/#ralph.models.edx.enrollment","title":"enrollment
special
","text":""},{"location":"models/edx/#ralph.models.edx.enrollment.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.enrollment.fields.contexts","title":"contexts
","text":"Enrollment event models context fields definitions.
"},{"location":"models/edx/#ralph.models.edx.enrollment.fields.contexts.EdxCourseEnrollmentUpgradeClickedContextField","title":" EdxCourseEnrollmentUpgradeClickedContextField (BaseContextField)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.upgrade_clicked
.context
field.
In addition to the common context member fields, this statement also comprises the mode
context member field.
Attributes:
Name Type Descriptionmode
str
Consists of either the audit
or honor
value. It identifies the enrollment mode when the user clicked Challenge Yourself.
ralph/models/edx/enrollment/fields/contexts.py
class EdxCourseEnrollmentUpgradeClickedContextField(BaseContextField):\n \"\"\"Pydantic model for `edx.course.enrollment.upgrade_clicked`.`context` field.\n\n In addition to the common context member fields, this statement also comprises the\n `mode` context member field.\n\n Attributes:\n mode (str): Consists of either the `audit` or `honor` value. It identifies the\n enrollment mode when the user clicked <kbd>Challenge Yourself</kbd>.\n \"\"\"\n\n mode: Union[Literal[\"audit\"], Literal[\"honor\"]]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.fields.contexts.EdxCourseEnrollmentUpgradeSucceededContextField","title":" EdxCourseEnrollmentUpgradeSucceededContextField (BaseContextField)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.upgrade.succeeded
.context
field.
In addition to the common context member fields, this statement also comprises the mode
context member field.
Attributes:
Name Type Descriptionmode
str
Consists of the verified
value.
ralph/models/edx/enrollment/fields/contexts.py
class EdxCourseEnrollmentUpgradeSucceededContextField(BaseContextField):\n \"\"\"Pydantic model for `edx.course.enrollment.upgrade.succeeded`.`context` field.\n\n In addition to the common context member fields, this statement also comprises the\n `mode` context member field.\n\n Attributes:\n mode (str): Consists of the `verified` value.\n \"\"\"\n\n mode: Literal[\"verified\"]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.fields.events","title":"events
","text":"Enrollment models event field definition.
"},{"location":"models/edx/#ralph.models.edx.enrollment.fields.events.EnrollmentEventField","title":" EnrollmentEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for enrollment event
field.
Note: Only server enrollment statements require an event
field.
Attributes:
Name Type Descriptioncourse_id
str
Consists in the course in which the student was enrolled or unenrolled.
mode
str
Takes either audit
, honor
, professional
or verified
value. It identifies the student\u2019s enrollment mode.
user_id
int
Identifies the student who was enrolled or unenrolled.
Source code inralph/models/edx/enrollment/fields/events.py
class EnrollmentEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for enrollment `event` field.\n\n Note: Only server enrollment statements require an `event` field.\n\n Attributes:\n course_id (str): Consists in the course in which the student was enrolled or\n unenrolled.\n mode (str): Takes either `audit`, `honor`, `professional` or `verified` value.\n It identifies the student\u2019s enrollment mode.\n user_id (int): Identifies the student who was enrolled or unenrolled.\n \"\"\"\n\n course_id: str\n mode: Union[\n Literal[\"audit\"], Literal[\"honor\"], Literal[\"professional\"], Literal[\"verified\"]\n ]\n user_id: Union[int, Literal[\"\"], None]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements","title":"statements
","text":"Enrollment event model definitions.
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements.EdxCourseEnrollmentActivated","title":" EdxCourseEnrollmentActivated (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.activated
statement.
The server emits this statement when a student enrolls in a course.
Attributes:
Name Type Descriptionevent
EnrollmentEventField
See EnrollmentEventField.
event_type
str
Consists of the value edx.course.enrollment.activated
.
name
str
Consists of the value edx.course.enrollment.activated
.
ralph/models/edx/enrollment/statements.py
class EdxCourseEnrollmentActivated(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.activated` statement.\n\n The server emits this statement when a student enrolls in a course.\n\n Attributes:\n event (EnrollmentEventField): See EnrollmentEventField.\n event_type (str): Consists of the value `edx.course.enrollment.activated`.\n name (str): Consists of the value `edx.course.enrollment.activated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.activated\"\n )\n\n event: Union[\n Json[EnrollmentEventField], # pylint: disable=unsubscriptable-object\n EnrollmentEventField,\n ]\n event_type: Literal[\"edx.course.enrollment.activated\"]\n name: Literal[\"edx.course.enrollment.activated\"]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements.EdxCourseEnrollmentDeactivated","title":" EdxCourseEnrollmentDeactivated (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.deactivated
statement.
The server emits this statement when a student unenrolls from a course.
Attributes:
Name Type Descriptionevent
EnrollmentEventField
See EnrollmentEventField.
event_type
str
Consists of the value edx.course.enrollment.deactivated
.
name
str
Consists of the value edx.course.enrollment.deactivated
.
ralph/models/edx/enrollment/statements.py
class EdxCourseEnrollmentDeactivated(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.deactivated` statement.\n\n The server emits this statement when a student unenrolls from a course.\n\n Attributes:\n event (EnrollmentEventField): See EnrollmentEventField.\n event_type (str): Consists of the value `edx.course.enrollment.deactivated`.\n name (str): Consists of the value `edx.course.enrollment.deactivated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.deactivated\"\n )\n\n event: Union[\n Json[EnrollmentEventField], # pylint: disable=unsubscriptable-object\n EnrollmentEventField,\n ]\n event_type: Literal[\"edx.course.enrollment.deactivated\"]\n name: Literal[\"edx.course.enrollment.deactivated\"]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements.EdxCourseEnrollmentModeChanged","title":" EdxCourseEnrollmentModeChanged (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.mode_changed
statement.
The server emits this statement when the process of changing a student\u2019s student_courseenrollment.mode to a different mode is complete.
Attributes:
Name Type Descriptionevent
EnrollmentEventField
See EnrollmentEventField.
event_type
str
Consists of the value edx.course.enrollment.mode_changed
.
name
str
Consists of the value edx.course.enrollment.mode_changed
.
ralph/models/edx/enrollment/statements.py
class EdxCourseEnrollmentModeChanged(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.mode_changed` statement.\n\n The server emits this statement when the process of changing a student\u2019s\n student_courseenrollment.mode to a different mode is complete.\n\n Attributes:\n event (EnrollmentEventField): See EnrollmentEventField.\n event_type (str): Consists of the value `edx.course.enrollment.mode_changed`.\n name (str): Consists of the value `edx.course.enrollment.mode_changed`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.mode_changed\"\n )\n\n event: Union[\n Json[EnrollmentEventField], # pylint: disable=unsubscriptable-object\n EnrollmentEventField,\n ]\n event_type: Literal[\"edx.course.enrollment.mode_changed\"]\n name: Literal[\"edx.course.enrollment.mode_changed\"]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements.EdxCourseEnrollmentUpgradeSucceeded","title":" EdxCourseEnrollmentUpgradeSucceeded (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.upgrade.succeeded
statement.
The server emits this statement when the process of upgrading a student\u2019s student_courseenrollment.mode from audit
or honor
to verified
is complete.
Attributes:
Name Type Descriptioncontext
EdxCourseEnrollmentUpgradeSucceededContextField
See EdxCourseEnrollmentUpgradeSucceededContextField.
event_type
str
Consists of the value edx.course.enrollment.upgrade.succeeded
.
name
str
Consists of the value edx.course.enrollment.upgrade.succeeded
.
ralph/models/edx/enrollment/statements.py
class EdxCourseEnrollmentUpgradeSucceeded(BaseServerModel):\n \"\"\"Pydantic model for `edx.course.enrollment.upgrade.succeeded` statement.\n\n The server emits this statement when the process of upgrading a student\u2019s\n student_courseenrollment.mode from `audit` or `honor` to `verified` is complete.\n\n Attributes:\n context (EdxCourseEnrollmentUpgradeSucceededContextField):\n See EdxCourseEnrollmentUpgradeSucceededContextField.\n event_type (str): Consists of the value\n `edx.course.enrollment.upgrade.succeeded`.\n name (str): Consists of the value `edx.course.enrollment.upgrade.succeeded`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.course.enrollment.upgrade.succeeded\"\n )\n\n context: EdxCourseEnrollmentUpgradeSucceededContextField\n event_type: Literal[\"edx.course.enrollment.upgrade.succeeded\"]\n name: Literal[\"edx.course.enrollment.upgrade.succeeded\"]\n
"},{"location":"models/edx/#ralph.models.edx.enrollment.statements.UIEdxCourseEnrollmentUpgradeClicked","title":" UIEdxCourseEnrollmentUpgradeClicked (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for edx.course.enrollment.upgrade_clicked
statement.
The browser emits this statement when a student clicks ChallengeYourself option, and the process of upgrading the student_courseenrollment.mode for the student to verified
begins.
Attributes:
Name Type Descriptioncontext
EdxCourseEnrollmentUpgradeClickedContextField
See EdxCourseEnrollmentUpgradeClickedContextField.
event_type
str
Consists of the value edx.course.enrollment.upgrade_clicked
.
name
str
Consists of the value edx.course.enrollment.upgrade_clicked
.
ralph/models/edx/enrollment/statements.py
class UIEdxCourseEnrollmentUpgradeClicked(BaseBrowserModel):\n \"\"\"Pydantic model for `edx.course.enrollment.upgrade_clicked` statement.\n\n The browser emits this statement when a student clicks <kbd>ChallengeYourself</kbd>\n option, and the process of upgrading the student_courseenrollment.mode for the\n student to `verified` begins.\n\n Attributes:\n context (EdxCourseEnrollmentUpgradeClickedContextField):\n See EdxCourseEnrollmentUpgradeClickedContextField.\n event_type (str): Consists of the value `edx.course.enrollment.upgrade_clicked`.\n name (str): Consists of the value `edx.course.enrollment.upgrade_clicked`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"edx.course.enrollment.upgrade_clicked\"\n )\n\n context: EdxCourseEnrollmentUpgradeClickedContextField\n event_type: Literal[\"edx.course.enrollment.upgrade_clicked\"]\n name: Literal[\"edx.course.enrollment.upgrade_clicked\"]\n
"},{"location":"models/edx/#ralph.models.edx.navigational","title":"navigational
special
","text":""},{"location":"models/edx/#ralph.models.edx.navigational.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.navigational.fields.events","title":"events
","text":"Navigational event field definition.
"},{"location":"models/edx/#ralph.models.edx.navigational.fields.events.NavigationalEventField","title":" NavigationalEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for navigational event
field.
Note: All navigational statements are emitted from the browser.
Attributes:
Name Type Descriptionid
str
Consists of the edX ID of the sequence.
old
int
For seq_goto
, it consists of the index of the unit being jumped to. For seq_next
and seq_prev
, it consists of the index of the unit being navigated to.
new
int
For seq_goto
, it consists of the index of the unit being jumped from. For seq_next
and seq_prev
, it consists of the index of the unit being navigated away from.
ralph/models/edx/navigational/fields/events.py
class NavigationalEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for navigational `event` field.\n\n Note: All navigational statements are emitted from the browser.\n\n Attributes:\n id (str): Consists of the edX ID of the sequence.\n old (int): For `seq_goto`, it consists of the index of the unit being jumped to.\n For `seq_next` and `seq_prev`, it consists of the index of the unit being\n navigated to.\n new (int): For `seq_goto`, it consists of the index of the unit being jumped\n from. For `seq_next` and `seq_prev`, it consists of the index of the unit\n being navigated away from.\n \"\"\"\n\n id: constr(\n regex=(\n r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+type\" # noqa : F722\n r\"@sequential\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n )\n new: int\n old: int\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements","title":"statements
","text":"Navigational event model definitions.
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UIPageClose","title":" UIPageClose (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for page_close
statement.
The browser emits this statement when the user navigates to the next page or closes the browser window (when the JavaScript window.onunload
event is called).
Attributes:
Name Type Descriptionevent
str
Consists of the string value {}
.
event_type
str
Consists of the value page_close
.
name
str
Consists of the value page_close
.
ralph/models/edx/navigational/statements.py
class UIPageClose(BaseBrowserModel):\n \"\"\"Pydantic model for `page_close` statement.\n\n The browser emits this statement when the user navigates to the next page\n or closes the browser window (when the JavaScript `window.onunload` event\n is called).\n\n Attributes:\n event (str): Consists of the string value `{}`.\n event_type (str): Consists of the value `page_close`.\n name (str): Consists of the value `page_close`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"page_close\")\n\n # pylint: disable=unsubscriptable-object\n event: Literal[\"{}\"]\n event_type: Literal[\"page_close\"]\n name: Literal[\"page_close\"]\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UISeqGoto","title":" UISeqGoto (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for seq_goto
statement.
The browser emits this statement when a user jumps between units in a sequence.
Attributes:
Name Type Descriptionevent
obj
Consists of member fields that identify specifics triggered event.
event_type
str
Consists of the value seq_goto
.
name
str
Consists of the value seq_goto
.
ralph/models/edx/navigational/statements.py
class UISeqGoto(BaseBrowserModel):\n \"\"\"Pydantic model for `seq_goto` statement.\n\n The browser emits this statement when a user jumps between units in a sequence.\n\n Attributes:\n event (obj): Consists of member fields that identify specifics triggered event.\n event_type (str): Consists of the value `seq_goto`.\n name (str): Consists of the value `seq_goto`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"seq_goto\")\n\n # pylint: disable=unsubscriptable-object\n event: Union[Json[NavigationalEventField], NavigationalEventField]\n event_type: Literal[\"seq_goto\"]\n name: Literal[\"seq_goto\"]\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UISeqNext","title":" UISeqNext (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for seq_next
statement.
The browser emits this statement when a user navigates to the next unit in a sequence.
Attributes:
Name Type Descriptionevent
obj
Consists of member fields that identify specifics triggered event.
event_type
str
Consists of the value seq_next
.
name
str
Consists of the value seq_next
.
ralph/models/edx/navigational/statements.py
class UISeqNext(BaseBrowserModel):\n \"\"\"Pydantic model for `seq_next` statement.\n\n The browser emits this statement when a user navigates to the next unit in a\n sequence.\n\n Attributes:\n event (obj): Consists of member fields that identify specifics triggered event.\n event_type (str): Consists of the value `seq_next`.\n name (str): Consists of the value `seq_next`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"seq_next\")\n\n # pylint: disable=unsubscriptable-object\n event: Union[Json[NavigationalEventField], NavigationalEventField]\n event_type: Literal[\"seq_next\"]\n name: Literal[\"seq_next\"]\n\n @validator(\"event\")\n @classmethod\n def validate_next_jump_event_field(cls, value):\n \"\"\"Check that event.new is equal to event.old + 1.\"\"\"\n if value.new != value.old + 1:\n raise ValueError(\"event.new - event.old should be equal to 1\")\n\n return value\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UISeqNext.validate_next_jump_event_field","title":"validate_next_jump_event_field(value)
classmethod
","text":"Check that event.new is equal to event.old + 1.
Source code inralph/models/edx/navigational/statements.py
@validator(\"event\")\n@classmethod\ndef validate_next_jump_event_field(cls, value):\n \"\"\"Check that event.new is equal to event.old + 1.\"\"\"\n if value.new != value.old + 1:\n raise ValueError(\"event.new - event.old should be equal to 1\")\n\n return value\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UISeqPrev","title":" UISeqPrev (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for seq_prev
statement.
The browser emits this statement when a user navigates to the previous unit in a sequence.
Attributes:
Name Type Descriptionevent
obj
Consists of member fields that identify specifics triggered event.
event_type
str
Consists of the value seq_prev
.
name
str
Consists of the value seq_prev
.
ralph/models/edx/navigational/statements.py
class UISeqPrev(BaseBrowserModel):\n \"\"\"Pydantic model for `seq_prev` statement.\n\n The browser emits this statement when a user navigates to the previous unit in a\n sequence.\n\n Attributes:\n event (obj): Consists of member fields that identify specifics triggered event.\n event_type (str): Consists of the value `seq_prev`.\n name (str): Consists of the value `seq_prev`.\n\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"seq_prev\")\n\n # pylint: disable=unsubscriptable-object\n event: Union[Json[NavigationalEventField], NavigationalEventField]\n event_type: Literal[\"seq_prev\"]\n name: Literal[\"seq_prev\"]\n\n @validator(\"event\")\n @classmethod\n def validate_prev_jump_event_field(cls, value):\n \"\"\"Check that event.new is equal to event.old - 1.\"\"\"\n if value.new != value.old - 1:\n raise ValueError(\"event.old - event.new should be equal to 1\")\n\n return value\n
"},{"location":"models/edx/#ralph.models.edx.navigational.statements.UISeqPrev.validate_prev_jump_event_field","title":"validate_prev_jump_event_field(value)
classmethod
","text":"Check that event.new is equal to event.old - 1.
Source code inralph/models/edx/navigational/statements.py
@validator(\"event\")\n@classmethod\ndef validate_prev_jump_event_field(cls, value):\n \"\"\"Check that event.new is equal to event.old - 1.\"\"\"\n if value.new != value.old - 1:\n raise ValueError(\"event.old - event.new should be equal to 1\")\n\n return value\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment","title":"open_response_assessment
special
","text":""},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events","title":"events
","text":"Open Response Assessment events model event fields definitions.
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAAssessEventField","title":" ORAAssessEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for assessment event
field.
This field is defined in: - openassessmentblock.peer_assess
- openassessmentblock.self_assess
- openassessmentblock.staff_assess
Attributes:
Name Type Descriptionfeedback
str
Consists of the learner\u2019s comments about the submitted response.
parts
list
see ORAAssessEventPartsField.
rubric
dict
see ORAPeerAssessEventRubricField.
scored_at
datetime
Consists of the timestamp for when the assessment was submitted.
scorer_id
str
Consists of the course-specific anonymized user ID of the learner who submitted the assessment.
score_type
str
Consists of either PE
value for a peer assessment, SE
for a self assessment or ST
for a staff assessment.
submission_uuid
str
Consists of the unique identifier for the submitted response.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAAssessEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for assessment `event` field.\n\n This field is defined in:\n - `openassessmentblock.peer_assess`\n - `openassessmentblock.self_assess`\n - `openassessmentblock.staff_assess`\n\n Attributes:\n feedback (str): Consists of the learner's comments about the submitted response.\n parts (list): see ORAAssessEventPartsField.\n rubric (dict): see ORAPeerAssessEventRubricField.\n scored_at (datetime): Consists of the timestamp for when the assessment was\n submitted.\n scorer_id (str): Consists of the course-specific anonymized user ID of the\n learner who submitted the assessment.\n score_type (str): Consists of either `PE` value for a peer assessment, `SE` for\n a self assessment or `ST` for a staff assessment.\n submission_uuid (str): Consists of the unique identifier for the submitted\n response.\n \"\"\"\n\n feedback: str\n parts: List[ORAAssessEventPartsField]\n rubric: ORAAssessEventRubricField\n scored_at: datetime\n scorer_id: constr(max_length=40)\n score_type: Literal[\"PE\", \"SE\", \"ST\"]\n submission_uuid: UUID\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAAssessEventPartsCriterionField","title":" ORAAssessEventPartsCriterionField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for assessment event
.parts
.criterion
field.
Attributes:
Name Type Descriptionname
str
Consists of the criterion name.
points_possible
int
Consists of the maximum number of points allocated to the criterion.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAAssessEventPartsCriterionField(BaseModelWithConfig):\n \"\"\"Pydantic model for assessment `event`.`parts`.`criterion` field.\n\n Attributes:\n name (str): Consists of the criterion name.\n points_possible (int): Consists of the maximum number of points\n allocated to the criterion.\n \"\"\"\n\n name: str\n points_possible: int\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAAssessEventPartsField","title":" ORAAssessEventPartsField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for assessment event
.parts
field.
Attributes:
Name Type Descriptionoption
str
Consists of the option that the learner selected for it.
criterion
dict
see ORAAssessEventPartsCriterionField.
feedback
str
Consists of feedback comments that the learner could have supplied.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAAssessEventPartsField(BaseModelWithConfig):\n \"\"\"Pydantic model for assessment `event`.`parts` field.\n\n Attributes:\n option (str): Consists of the option that the learner selected for it.\n criterion (dict): see ORAAssessEventPartsCriterionField.\n feedback (str): Consists of feedback comments that the learner could have\n supplied.\n \"\"\"\n\n option: str\n criterion: ORAAssessEventPartsCriterionField\n feedback: Optional[str]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAAssessEventRubricField","title":" ORAAssessEventRubricField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for assessment event
.rubric
field.
This field is defined in: - openassessmentblock.peer_assess
- openassessmentblock.self_assess
- openassessmentblock.staff_assess
Attributes:
Name Type Descriptioncontent_hash
ConstrainedStrValue
Consists of the identifier of the rubric that the learner used to assess the response.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAAssessEventRubricField(BaseModelWithConfig):\n \"\"\"Pydantic model for assessment `event`.`rubric` field.\n\n This field is defined in:\n - `openassessmentblock.peer_assess`\n - `openassessmentblock.self_assess`\n - `openassessmentblock.staff_assess`\n\n Attributes:\n content_hash: Consists of the identifier of the rubric that the learner used to\n assess the response.\n \"\"\"\n\n content_hash: constr(regex=r\"^[a-f0-9]{1,40}$\") # noqa: F722\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORACreateSubmissionEventAnswerField","title":" ORACreateSubmissionEventAnswerField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for openassessmentblock.create_submission
.event
.answer
field.
Attributes:
Name Type Descriptionparts
dict
Consists of a key-value dictionary with all answers text.
file_keys
list
Consists of a list of file identifiers if files are given for answer.
files_description
list
Consists of a list of file descriptions if files are given for answer.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORACreateSubmissionEventAnswerField(BaseModelWithConfig):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessmentblock.create_submission`.`event`.`answer`\n field.\n\n Attributes:\n parts (dict): Consists of a key-value dictionary with all answers text.\n file_keys (list): Consists of a list of file identifiers if files are given for\n answer.\n files_description (list): Consists of a list of file descriptions if files are\n given for answer.\n \"\"\"\n\n parts: List[Dict[Literal[\"text\"], str]]\n file_keys: Optional[List[str]]\n files_descriptions: Optional[List[str]]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORACreateSubmissionEventField","title":" ORACreateSubmissionEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.create_submission
.event
field.
Attributes:
Name Type Descriptionanswer
dict
see ORACreateSubmissionEventAnswerField.
attempt_number
int
Consists of the number of submission attempts. Currently, this value is set to 1.
created_at
datetime
Consists of the timestamp for when the learner submitted the response.
submitted_at
datetime
Consists of the timestamp for when the learner submitted the response. This value is the same as submitted_at
.
submission_uuid
str
Consists of the unique identifier of the response.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORACreateSubmissionEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `openassessmentblock.create_submission`.`event` field.\n\n Attributes:\n answer (dict): see ORACreateSubmissionEventAnswerField.\n attempt_number (int): Consists of the number of submission attempts. Currently,\n this value is set to 1.\n created_at (datetime): Consists of the timestamp for when the learner submitted\n the response.\n submitted_at (datetime): Consists of the timestamp for when the learner\n submitted the response. This value is the same as `submitted_at`.\n submission_uuid (str): Consists of the unique identifier of the response.\n \"\"\"\n\n answer: ORACreateSubmissionEventAnswerField\n attempt_number: int\n created_at: datetime\n submitted_at: datetime\n submission_uuid: UUID\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAGetPeerSubmissionEventField","title":" ORAGetPeerSubmissionEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.get_peer_submission
.event
field.
Attributes:
Name Type Descriptioncourse_id
str
Consists of the course identifier including the assessment.
item_id
str
Consists of the locator string that identifies the problem in the course.
requesting_student_id
str
Consists of the course-specific anonymized user ID of the learner who retrieved the response for peer assessment.
submission_returned_uuid
str
Consists of the unique identifier of the response that was retrieved for assessment. Set to None
if no assessment available.
ralph/models/edx/open_response_assessment/fields/events.py
class ORAGetPeerSubmissionEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `openassessmentblock.get_peer_submission`.`event` field.\n\n Attributes:\n course_id (str): Consists of the course identifier including the assessment.\n item_id (str): Consists of the locator string that identifies the problem in\n the course.\n requesting_student_id (str): Consists of the course-specific anonymized user ID\n of the learner who retrieved the response for peer assessment.\n submission_returned_uuid (str): Consists of the unique identifier of the\n response that was retrieved for assessment. Set to `None` if no assessment\n available.\n \"\"\"\n\n course_id: constr(max_length=255)\n item_id: constr(\n regex=(\n r\"^block-v1:.+\\+.+\\+.+type@openassessment\" # noqa : F722\n r\"+block@[a-f0-9]{32}$\" # noqa : F722\n )\n )\n requesting_student_id: str\n submission_returned_uuid: Union[str, None]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAGetSubmissionForStaffGradingEventField","title":" ORAGetSubmissionForStaffGradingEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.get_submission_for_staff_grading
. event
field.
Attributes:
Name Type Descriptionitem_id
str
Consists of the locator string that identifies the problem in the course.
submission_returned_uuid
str
Consists of the unique identifier of the response that was retrieved for assessment. Set to None
if no assessment available.
requesting_staff_id
str
Consists of the course-specific anonymized user ID of the course team member who is retrieved the response for grading.
type
str
Consists of the type of staff grading that is being performed. Currently, set to full-grade
.
ralph/models/edx/open_response_assessment/fields/events.py
class ORAGetSubmissionForStaffGradingEventField(AbstractBaseEventField):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessmentblock.get_submission_for_staff_grading`.\n `event` field.\n\n Attributes:\n item_id (str): Consists of the locator string that identifies the problem in\n the course.\n submission_returned_uuid (str): Consists of the unique identifier of the\n response that was retrieved for assessment. Set to `None` if no assessment\n available.\n requesting_staff_id (str): Consists of the course-specific anonymized user ID\n of the course team member who is retrieved the response for grading.\n type (str): Consists of the type of staff grading that is being performed.\n Currently, set to `full-grade`.\n \"\"\"\n\n item_id: constr(\n regex=(\n r\"^block-v1:.+\\+.+\\+.+type@openassessment\" # noqa : F722\n r\"+block@[a-f0-9]{32}$\" # noqa : F722\n )\n )\n submission_returned_uuid: Union[str, None]\n requesting_staff_id: str\n type: Literal[\"full-grade\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORASaveSubmissionEventField","title":" ORASaveSubmissionEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.save_submission
.event
field.
Attributes:
Name Type Descriptionsaved_response
str
Consists of a JSON string of the users saved responses. Note: Responses have a length limit of 100000 in the front-end but not in the back-end. Events are truncated at TRACK_MAX_EVENT
which is 50000 by default. Also, the eventtracking.backends.logger.LoggerBackend
silently drops events when they exceed TRACK_MAX_EVENT
.
ralph/models/edx/open_response_assessment/fields/events.py
class ORASaveSubmissionEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `openassessmentblock.save_submission`.`event` field.\n\n Attributes:\n saved_response (str): Consists of a JSON string of the users saved responses.\n Note:\n Responses have a length limit of 100000 in the front-end but not in the\n back-end. Events are truncated at `TRACK_MAX_EVENT` which is 50000 by\n default. Also, the `eventtracking.backends.logger.LoggerBackend`\n silently drops events when they exceed `TRACK_MAX_EVENT`.\n \"\"\"\n\n # pylint: disable=unsubscriptable-object\n saved_response: ORASaveSubmissionEventSavedResponseField\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORASaveSubmissionEventSavedResponseField","title":" ORASaveSubmissionEventSavedResponseField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for openassessmentblock.save_submission
.saved_response
field.
Attributes:
Name Type Descriptiontext
str
Consists of the response text.
file_upload_key
str
Consists of the AWS S3 key that identifies the location of the uploaded file on the Amazon S3 storage service. Only present when responses include an image, .pdf, or other file.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORASaveSubmissionEventSavedResponseField(BaseModelWithConfig):\n \"\"\"Pydantic model for `openassessmentblock.save_submission`.`saved_response` field.\n\n Attributes:\n text (str): Consists of the response text.\n file_upload_key (str): Consists of the AWS S3 key that identifies the location\n of the uploaded file on the Amazon S3 storage service. Only present when\n responses include an image, .pdf, or other file.\n \"\"\"\n\n text: str\n file_upload_key: Optional[str]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAStaffAssessEventField","title":" ORAStaffAssessEventField (ORAAssessEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.staff_assess
.event
field.
Attributes:
Name Type Descriptiontype
str
Consists of the type of staff grading that is being performed. Can be either equal to regrade
in the case of a grade override or full-grade
in the case of an included staff assessment step.
ralph/models/edx/open_response_assessment/fields/events.py
class ORAStaffAssessEventField(ORAAssessEventField):\n \"\"\"Pydantic model for `openassessmentblock.staff_assess`.`event` field.\n\n Attributes:\n type (str): Consists of the type of staff grading that is being performed. Can\n be either equal to `regrade` in the case of a grade override or\n `full-grade` in the case of an included staff assessment step.\n \"\"\"\n\n type: Literal[\"regrade\", \"full-grade\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAStudentTrainingAssessExampleEventField","title":" ORAStudentTrainingAssessExampleEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessment.student_training_assess_example
.event
field.
Attributes:
Name Type Descriptioncorrections
dict
Consists of a set of name/value pairs that identify criteria for which the learner selected a different option than the course team.
options_selected
dict
Consists of a set of name/value pairs that identify the option that the learner selected for each criterion in the rubric.
submission_uuid
str
Consists of the unique identifier of the response.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAStudentTrainingAssessExampleEventField(AbstractBaseEventField):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessment.student_training_assess_example`.`event`\n field.\n\n Attributes:\n corrections (dict): Consists of a set of name/value pairs that identify\n criteria for which the learner selected a different option than the course\n team.\n options_selected (dict): Consists of a set of name/value pairs that identify\n the option that the learner selected for each criterion in the rubric.\n submission_uuid (str): Consists of the unique identifier of the response.\n \"\"\"\n\n corrections: Dict[str, str]\n options_selected: Dict[str, str]\n submission_uuid: UUID\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORASubmitFeedbackOnAssessmentsEventField","title":" ORASubmitFeedbackOnAssessmentsEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for openassessmentblock.submit_feedback_on_assessments
. event
field.
Attributes:
Name Type Descriptionfeedback_text
str
Consists of the learner\u2019s comments about the assessment process.
options
list
Consists of the label of each checkbox option that the learner selected to evaluate the assessment process.
submission_uuid
str
Consists of the unique identifier for the feedback.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORASubmitFeedbackOnAssessmentsEventField(AbstractBaseEventField):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessmentblock.submit_feedback_on_assessments`.\n `event` field.\n\n Attributes:\n feedback_text (str): Consists of the learner's comments about the assessment\n process.\n options (list): Consists of the label of each checkbox option that the learner\n selected to evaluate the assessment process.\n submission_uuid (str): Consists of the unique identifier for the feedback.\n \"\"\"\n\n feedback_text: str\n options: List[str]\n submission_uuid: UUID\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.fields.events.ORAUploadFileEventField","title":" ORAUploadFileEventField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for openassessment.upload_file
.event
field.
Attributes:
Name Type DescriptionfileName
str
Consists of the name of the uploaded file.
fileSize
int
Consists of the bytes size of the uploaded file.
fileType
str
Consists of the MIME type of the uploaded file.
Source code inralph/models/edx/open_response_assessment/fields/events.py
class ORAUploadFileEventField(BaseModelWithConfig):\n \"\"\"Pydantic model for `openassessment.upload_file`.`event` field.\n\n Attributes:\n fileName (str): Consists of the name of the uploaded file.\n fileSize (int): Consists of the bytes size of the uploaded file.\n fileType (str): Consists of the MIME type of the uploaded file.\n \"\"\"\n\n fileName: constr(max_length=255)\n fileSize: int\n fileType: str\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements","title":"statements
","text":"Open Response Assessment events model definitions.
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORACreateSubmission","title":" ORACreateSubmission (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.create_submission
statement.
The server emits this statement when a learner submits a response, a peer assessment or a self assessment.
Attributes:
Name Type Descriptionevent
dict
See ORACreateSubmissionEventField.
event_type
str
Consists of the value openassessmentblock.create_submission
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORACreateSubmission(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.create_submission` statement.\n\n The server emits this statement when a learner submits a response, a peer\n assessment or a self assessment.\n\n Attributes:\n event (dict): See ORACreateSubmissionEventField.\n event_type (str): Consists of the value `openassessmentblock.create_submission`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.create_submission\"\n )\n\n event: ORACreateSubmissionEventField\n event_type: Literal[\"openassessmentblock.create_submission\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAGetPeerSubmission","title":" ORAGetPeerSubmission (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.get_peer_submission
statement.
The server emits this statement when a response is delivered to a learner for evaluation.
Attributes:
Name Type Descriptionevent
dict
See ORAGetPeerSubmissionEventField.
event_type
str
Consists of the value openassessmentblock.get_peer_submission
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORAGetPeerSubmission(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.get_peer_submission` statement.\n\n The server emits this statement when a response is delivered to a learner for\n evaluation.\n\n Attributes:\n event (dict): See ORAGetPeerSubmissionEventField.\n event_type (str): Consists of the value\n `openassessmentblock.get_peer_submission`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.get_peer_submission\"\n )\n\n event: ORAGetPeerSubmissionEventField\n event_type: Literal[\"openassessmentblock.get_peer_submission\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAGetSubmissionForStaffGrading","title":" ORAGetSubmissionForStaffGrading (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.get_submission_for_staff_grading
statement.
The server emits this statement when a course team member retrieves a learner\u2019s response for grading.
Attributes:
Name Type Descriptionevent
dict
See ORAGetSubmissionForStaffGradingEventField.
event_type
str
Consists of the value openassessmentblock.get_submission_for_staff_grading
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORAGetSubmissionForStaffGrading(BaseServerModel):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessmentblock.get_submission_for_staff_grading`\n statement.\n\n The server emits this statement when a course team member retrieves a learner's\n response for grading.\n\n Attributes:\n event (dict): See ORAGetSubmissionForStaffGradingEventField.\n event_type (str): Consists of the value\n `openassessmentblock.get_submission_for_staff_grading`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\",\n event_type=\"openassessmentblock.get_submission_for_staff_grading\",\n )\n\n event: ORAGetSubmissionForStaffGradingEventField\n event_type: Literal[\"openassessmentblock.get_submission_for_staff_grading\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAPeerAssess","title":" ORAPeerAssess (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.peer_assess
statement.
The server emits this statement when a learner submits an assessment of a peer\u2019s response.
Attributes:
Name Type Descriptionevent
dict
See ORAAssessEventField.
event_type
str
Consists of the value openassessmentblock.peer_assess
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORAPeerAssess(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.peer_assess` statement.\n\n The server emits this statement when a learner submits an assessment of a\n peer's response.\n\n Attributes:\n event (dict): See ORAAssessEventField.\n event_type (str): Consists of the value `openassessmentblock.peer_assess`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.peer_assess\"\n )\n\n event: ORAAssessEventField\n event_type: Literal[\"openassessmentblock.peer_assess\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORASaveSubmission","title":" ORASaveSubmission (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.save_submission
statement.
The server emits this statement when the user clicks on the Save your progress button to save the current state of the response to an open assessment question.
Attributes:
Name Type Descriptionevent
str
See ORASaveSubmissionEventField.
event_type
str
Consists of the value openassessmentblock.save_submission
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORASaveSubmission(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.save_submission` statement.\n\n The server emits this statement when the user clicks on the\n <kbd>Save your progress</kbd> button to save the current state of the\n response to an open assessment question.\n\n Attributes:\n event (str): See ORASaveSubmissionEventField.\n event_type (str): Consists of the value `openassessmentblock.save_submission`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.save_submission\"\n )\n\n event: ORASaveSubmissionEventField\n event_type: Literal[\"openassessmentblock.save_submission\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORASelfAssess","title":" ORASelfAssess (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.self_assess
statement.
The server emits this statement when a learner submits a self-assessment.
Attributes:
Name Type Descriptionevent
dict
See ORAAssessEventField.
event_type
str
Consists of the value openassessmentblock.self_assess
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORASelfAssess(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.self_assess` statement.\n\n The server emits this statement when a learner submits a self-assessment.\n\n Attributes:\n event (dict): See ORAAssessEventField.\n event_type (str): Consists of the value `openassessmentblock.self_assess`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.self_assess\"\n )\n\n event: ORAAssessEventField\n event_type: Literal[\"openassessmentblock.self_assess\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAStaffAssess","title":" ORAStaffAssess (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.staff_assess
statement.
The server emits this statement when a course team member submits an assessment of a learner\u2019s response.
Attributes:
Name Type Descriptionevent
dict
See ORAStaffAssessEventField.
event_type
str
Consists of the value openassessmentblock.staff_assess
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORAStaffAssess(BaseServerModel):\n \"\"\"Pydantic model for `openassessmentblock.staff_assess` statement.\n\n The server emits this statement when a course team member submits an assessment\n of a learner's response.\n\n Attributes:\n event (dict): See ORAStaffAssessEventField.\n event_type (str): Consists of the value `openassessmentblock.staff_assess`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"openassessmentblock.staff_assess\"\n )\n\n event: ORAStaffAssessEventField\n event_type: Literal[\"openassessmentblock.staff_assess\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAStudentTrainingAssessExample","title":" ORAStudentTrainingAssessExample (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessment.student_training_assess_example
statement.
The server emits this event when a learner submits an assessment for an example response within a training step.
Attributes:
Name Type Descriptionevent
dict
See ORAStudentTrainingAssessExampleEventField.
event_type
str
Consists of the value openassessment.student_training_assess_example
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORAStudentTrainingAssessExample(BaseServerModel):\n \"\"\"Pydantic model for `openassessment.student_training_assess_example` statement.\n\n The server emits this event when a learner submits an assessment for an example\n response within a training step.\n\n Attributes:\n event (dict): See ORAStudentTrainingAssessExampleEventField.\n event_type (str): Consists of the value\n `openassessment.student_training_assess_example`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\",\n event_type=\"openassessment.student_training_assess_example\",\n )\n\n event: ORAStudentTrainingAssessExampleEventField\n event_type: Literal[\"openassessment.student_training_assess_example\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORASubmitFeedbackOnAssessments","title":" ORASubmitFeedbackOnAssessments (BaseServerModel)
pydantic-model
","text":"Pydantic model for openassessmentblock.submit_feedback_on_assessments
statement.
The server emits this statement when a learner submits a suggestion, opinion or other feedback about the assessment process.
Attributes:
Name Type Descriptionevent
dict
See ORASubmitFeedbackOnAssessmentsEventField.
event_type
str
Consists of the value openassessmentblock.submit_feedback_on_assessments
.
page
str
Consists of the value x_module
.
ralph/models/edx/open_response_assessment/statements.py
class ORASubmitFeedbackOnAssessments(BaseServerModel):\n # noqa: D205, D415\n \"\"\"Pydantic model for `openassessmentblock.submit_feedback_on_assessments`\n statement.\n\n The server emits this statement when a learner submits a suggestion, opinion or\n other feedback about the assessment process.\n\n Attributes:\n event (dict): See ORASubmitFeedbackOnAssessmentsEventField.\n event_type (str): Consists of the value\n `openassessmentblock.submit_feedback_on_assessments`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\",\n event_type=\"openassessmentblock.submit_feedback_on_assessments\",\n )\n\n event: ORASubmitFeedbackOnAssessmentsEventField\n event_type: Literal[\"openassessmentblock.submit_feedback_on_assessments\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.open_response_assessment.statements.ORAUploadFile","title":" ORAUploadFile (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for openassessment.upload_file
statement.
The browser emits this statement when a learner successfully uploads an image, .pdf, or other file as part of a response.
Attributes:
Name Type Descriptionevent
dict
See ORAUploadFileEventField.
event_type
str
Consists of the value openassessment.upload_file
.
name
str
Consists of the value openassessment.upload_file
.
ralph/models/edx/open_response_assessment/statements.py
class ORAUploadFile(BaseBrowserModel):\n \"\"\"Pydantic model for `openassessment.upload_file` statement.\n\n The browser emits this statement when a learner successfully uploads an image,\n .pdf, or other file as part of a response.\n\n Attributes:\n event (dict): See ORAUploadFileEventField.\n event_type (str): Consists of the value `openassessment.upload_file`.\n name (str): Consists of the value `openassessment.upload_file`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"openassessment.upload_file\"\n )\n\n # pylint: disable=unsubscriptable-object\n event: Union[Json[ORAUploadFileEventField], ORAUploadFileEventField]\n event_type: Literal[\"openassessment.upload_file\"]\n name: Literal[\"openassessment.upload_file\"]\n
"},{"location":"models/edx/#ralph.models.edx.peer_instruction","title":"peer_instruction
special
","text":""},{"location":"models/edx/#ralph.models.edx.peer_instruction.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.peer_instruction.fields.events","title":"events
","text":"Peer instruction event field definition.
"},{"location":"models/edx/#ralph.models.edx.peer_instruction.fields.events.PeerInstructionEventField","title":" PeerInstructionEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for peer instruction event
field.
Attributes:
Name Type Descriptionanswer
int
Consists of the index assigned to the answer choice selected by the learner.
rationale
str
Consists of the text entered by the learner to explain why they selected that answer choice.
truncated
bool
True
only if the rationale was longer than 12,500 characters, which is the maximum included in the event.
ralph/models/edx/peer_instruction/fields/events.py
class PeerInstructionEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for peer instruction `event` field.\n\n Attributes:\n answer (int): Consists of the index assigned to the answer choice selected by\n the learner.\n rationale (str): Consists of the text entered by the learner to explain why\n they selected that answer choice.\n truncated (bool): `True` only if the rationale was longer than 12,500\n characters, which is the maximum included in the event.\n \"\"\"\n\n answer: int\n rationale: constr(max_length=12500)\n truncated: bool\n
"},{"location":"models/edx/#ralph.models.edx.peer_instruction.statements","title":"statements
","text":"Peer instruction events model definitions.
"},{"location":"models/edx/#ralph.models.edx.peer_instruction.statements.PeerInstructionAccessed","title":" PeerInstructionAccessed (BaseServerModel)
pydantic-model
","text":"Pydantic model for ubc.peer_instruction.accessed
statement.
The server emits this event when a peer instruction question and its set of answer choices is shown to a learner.
Attributes:
Name Type Descriptionevent_type
str
Consists of the value ubc.peer_instruction.accessed
.
name
str
Consists of the value ubc.peer_instruction.accessed
.
ralph/models/edx/peer_instruction/statements.py
class PeerInstructionAccessed(BaseServerModel):\n \"\"\"Pydantic model for `ubc.peer_instruction.accessed` statement.\n\n The server emits this event when a peer instruction question and its set of answer\n choices is shown to a learner.\n\n Attributes:\n event_type (str): Consists of the value `ubc.peer_instruction.accessed`.\n name (str): Consists of the value `ubc.peer_instruction.accessed`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"ubc.peer_instruction.accessed\"\n )\n\n event_type: Literal[\"ubc.peer_instruction.accessed\"]\n name: Literal[\"ubc.peer_instruction.accessed\"]\n
"},{"location":"models/edx/#ralph.models.edx.peer_instruction.statements.PeerInstructionOriginalSubmitted","title":" PeerInstructionOriginalSubmitted (BaseServerModel)
pydantic-model
","text":"Pydantic model for ubc.peer_instruction.original_submitted
statement.
The server emits this event when learners submit their initial responses. These events record the answer choice the learner selected and the explanation given for why that selection was made.
Attributes:
Name Type Descriptionevent
int
See PeerInstructionEventField.
event_type
str
Consists of the value ubc.peer_instruction.original_submitted
.
name
str
Consists of the value ubc.peer_instruction.original_submitted
.
ralph/models/edx/peer_instruction/statements.py
class PeerInstructionOriginalSubmitted(BaseServerModel):\n \"\"\"Pydantic model for `ubc.peer_instruction.original_submitted` statement.\n\n The server emits this event when learners submit their initial responses. These\n events record the answer choice the learner selected and the explanation given\n for why that selection was made.\n\n Attributes:\n event (int): See PeerInstructionEventField.\n event_type (str): Consists of the value\n `ubc.peer_instruction.original_submitted`.\n name (str): Consists of the value `ubc.peer_instruction.original_submitted`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"ubc.peer_instruction.original_submitted\"\n )\n\n event: Union[\n Json[PeerInstructionEventField], # pylint: disable=unsubscriptable-object\n PeerInstructionEventField,\n ]\n event_type: Literal[\"ubc.peer_instruction.original_submitted\"]\n name: Literal[\"ubc.peer_instruction.original_submitted\"]\n
"},{"location":"models/edx/#ralph.models.edx.peer_instruction.statements.PeerInstructionRevisedSubmitted","title":" PeerInstructionRevisedSubmitted (BaseServerModel)
pydantic-model
","text":"Pydantic model for ubc.peer_instruction.revised_submitted
statement.
The server emits this event when learners submit their revised responses. These events record the answer choice selected by the learner and the explanation for why that selection was made.
Attributes:
Name Type Descriptionevent
int
See PeerInstructionEventField.
event_type
str
Consists of the value ubc.peer_instruction.revised_submitted
.
name
str
Consists of the value ubc.peer_instruction.revised_submitted
.
ralph/models/edx/peer_instruction/statements.py
class PeerInstructionRevisedSubmitted(BaseServerModel):\n \"\"\"Pydantic model for `ubc.peer_instruction.revised_submitted` statement.\n\n The server emits this event when learners submit their revised responses. These\n events record the answer choice selected by the learner and the explanation for\n why that selection was made.\n\n Attributes:\n event (int): See PeerInstructionEventField.\n event_type (str): Consists of the value\n `ubc.peer_instruction.revised_submitted`.\n name (str): Consists of the value `ubc.peer_instruction.revised_submitted`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"ubc.peer_instruction.revised_submitted\"\n )\n\n event: Union[\n Json[PeerInstructionEventField], # pylint: disable=unsubscriptable-object\n PeerInstructionEventField,\n ]\n event_type: Literal[\"ubc.peer_instruction.revised_submitted\"]\n name: Literal[\"ubc.peer_instruction.revised_submitted\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction","title":"problem_interaction
special
","text":""},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events","title":"events
","text":"Problem interaction events model event fields definitions.
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.CorrectMap","title":" CorrectMap (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for problem interaction event
.correct_map
field.
Attributes:
Name Type Descriptionanswervariable
str
Consists of the variable chosen in answer in the case of optionresponse provided with variables.
correctness
str
Consists either of the correct
or incorrect
value.
hint
str
Consists of optional hint.
hint_mode
str
Consists either of the value on_request
or always
value.
msg
str
Consists of extra message response.
npoints
int
Consists of awarded points.
queuestate
json
see QueueStateField.
Source code inralph/models/edx/problem_interaction/fields/events.py
class CorrectMap(BaseModelWithConfig):\n \"\"\"Pydantic model for problem interaction `event`.`correct_map` field.\n\n Attributes:\n answervariable (str): Consists of the variable chosen in answer in the case of\n optionresponse provided with variables.\n correctness (str): Consists either of the `correct` or `incorrect` value.\n hint (str): Consists of optional hint.\n hint_mode (str): Consists either of the value `on_request` or `always` value.\n msg (str): Consists of extra message response.\n npoints (int): Consists of awarded points.\n queuestate (json): see QueueStateField.\n \"\"\"\n\n answervariable: Union[Literal[None], None, str]\n correctness: Union[Literal[\"correct\"], Literal[\"incorrect\"]]\n hint: Optional[str]\n hintmode: Optional[Union[Literal[\"on_request\"], Literal[\"always\"]]]\n msg: str\n npoints: Optional[int]\n queuestate: Optional[QueueState]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.EdxProblemHintDemandhintDisplayedEventField","title":" EdxProblemHintDemandhintDisplayedEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for edx.problem.hint.demandhint_displayed
.event
field.
Attributes:
Name Type Descriptionhint_index
int
Consists of the identifier for the hint that was displayed to the user.
hint_len
int
Consists of the total number of hints defined for this problem.
hint_text
str
Consists of the text of the hint that was displayed to the user.
module_id
str
Consists of the identifier for the problem component for which the user requested the hint.
Source code inralph/models/edx/problem_interaction/fields/events.py
class EdxProblemHintDemandhintDisplayedEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `edx.problem.hint.demandhint_displayed`.`event` field.\n\n Attributes:\n hint_index (int): Consists of the identifier for the hint that was displayed to\n the user.\n hint_len (int): Consists of the total number of hints defined for this problem.\n hint_text (str): Consists of the text of the hint that was displayed to the\n user.\n module_id (str): Consists of the identifier for the problem component for which\n the user requested the hint.\n \"\"\"\n\n hint_index: int\n hint_len: int\n hint_text: str\n module_id: str\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.EdxProblemHintFeedbackDisplayedEventField","title":" EdxProblemHintFeedbackDisplayedEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for edx.problem.hint.feedback_displayed
.event
field.
Attributes:
Name Type Descriptionchoice_all
list
Lists all the answer choices for problems with multiple possible answers defined.
correctness
bool
True
if the student_answer
value is correct, else False
.
hint_label
str
Consists of the feedback message given for the answer correctness.
hints
list
Consists of a text member field with the given feedback string.
module_id
str
Consists of the identifier for the problem component for which the user received the feedback.
problem_part_id
str
Consists of the specific problem for which the user received feedback.
question_type
str
Consists of the XML tag that identifies the problem type.
student_answer
list
Consists of the answer value(s) selected or supplied by the user.
trigger_type
str
Identifies the type of feedback obtained by the student_answer
response. Consists either of single
or compound
value.
ralph/models/edx/problem_interaction/fields/events.py
class EdxProblemHintFeedbackDisplayedEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `edx.problem.hint.feedback_displayed`.`event` field.\n\n Attributes:\n choice_all (list): Lists all the answer choices for problems with multiple\n possible answers defined.\n correctness (bool): `True` if the `student_answer` value is correct, else\n `False`.\n hint_label (str): Consists of the feedback message given for the answer\n correctness.\n hints (list): Consists of a text member field with the given feedback string.\n module_id (str): Consists of the identifier for the problem component for which\n the user received the feedback.\n problem_part_id (str): Consists of the specific problem for which the user\n received feedback.\n question_type (str): Consists of the XML tag that identifies the problem type.\n student_answer (list): Consists of the answer value(s) selected or supplied by\n the user.\n trigger_type (str): Identifies the type of feedback obtained by the\n `student_answer` response. Consists either of `single` or `compound` value.\n \"\"\"\n\n choice_all: Optional[List[str]]\n correctness: bool\n hint_label: str\n hints: List[dict]\n module_id: str\n problem_part_id: str\n question_type: Union[\n Literal[\"stringresponse\"],\n Literal[\"choiceresponse\"],\n Literal[\"multiplechoiceresponse\"],\n Literal[\"numericalresponse\"],\n Literal[\"optionresponse\"],\n ]\n student_answer: List[str]\n trigger_type: Union[Literal[\"single\"], Literal[\"compound\"]]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ProblemCheckEventField","title":" ProblemCheckEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_check
.event
field.
Attributes:
Name Type Descriptionanswers
dict
Consists of a dictionary of problem ID and the corresponding internal answer identifier for each problem.
attempts
int
Consists of the number of times the user attempted to answer the problem.
correct_map
dict
Consists of the evaluation data for each answer.
grade
int
Consists of the current grade value.
max_grade
int
Consists of the maximum possible grade value.
problem_id
str
Consists of the ID of the problem that was checked.
state
json
Consists of the current problem state.
submission
dict
Consists of a dictionary of data about the given answer.
success
str
Consists of either the correct
or incorrect
value.
ralph/models/edx/problem_interaction/fields/events.py
class ProblemCheckEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_check`.`event` field.\n\n Attributes:\n answers (dict): Consists of a dictionary of problem ID and the corresponding\n internal answer identifier for each problem.\n attempts (int): Consists of the number of times the user attempted to answer\n the problem.\n correct_map (dict): Consists of the evaluation data for each answer.\n grade (int): Consists of the current grade value.\n max_grade (int): Consists of the maximum possible grade value.\n problem_id (str): Consists of the ID of the problem that was checked.\n state (json): Consists of the current problem state.\n submission (dict): Consists of a dictionary of data about the given answer.\n success (str): Consists of either the `correct` or `incorrect` value.\n \"\"\"\n\n answers: Dict[\n constr(regex=r\"^[a-f0-9]{32}_[0-9]_[0-9]$\"), # noqa : F722\n Union[List[str], str],\n ]\n attempts: int\n correct_map: Dict[\n constr(regex=r\"^[a-f0-9]{32}_[0-9]_[0-9]$\"), # noqa : F722\n CorrectMap,\n ]\n grade: int\n max_grade: int\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n submission: Dict[\n constr(regex=r\"^[a-f0-9]{32}_[0-9]_[0-9]$\"), # noqa : F722\n SubmissionAnswerField,\n ]\n success: Union[Literal[\"correct\"], Literal[\"incorrect\"]]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ProblemCheckFailEventField","title":" ProblemCheckFailEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_check_fail
.event
field.
Attributes:
Name Type Descriptionanswers
dict
Consists of a dictionary of problem ID and the internal answer identifier for each problem.
failure
str
Consists either of the closed
or unreset
value.
problem_id
str
Consists of the ID of the problem that was checked.
state
dict
Consists of the current problem state.
Source code inralph/models/edx/problem_interaction/fields/events.py
class ProblemCheckFailEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_check_fail`.`event` field.\n\n Attributes:\n answers (dict): Consists of a dictionary of problem ID and the internal answer\n identifier for each problem.\n failure (str): Consists either of the `closed` or `unreset` value.\n problem_id (str): Consists of the ID of the problem that was checked.\n state (dict): Consists of the current problem state.\n \"\"\"\n\n answers: Dict[\n constr(regex=r\"^[a-f0-9]{32}_[0-9]_[0-9]$\"), # noqa : F722\n Union[List[str], str],\n ]\n failure: Union[Literal[\"closed\"], Literal[\"unreset\"]]\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ProblemRescoreEventField","title":" ProblemRescoreEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_rescore
.event
field.
Attributes:
Name Type Descriptionattempts
int
Consists of the number of attempts of rescoring.
correct_map
json
see CorrectMapSubFields.
new_score
int
Consists of the new score obtained after rescoring.
new_total
int
Consists of the new total summed after rescoring.
orig_score
int
Consists of the original scored before rescoring.
problem_id
str
Consists of the ID of the problem being rescored.
state
json
see StateField.
success
str
Consists either of the correct
or incorrect
value.
ralph/models/edx/problem_interaction/fields/events.py
class ProblemRescoreEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_rescore`.`event` field.\n\n Attributes:\n attempts (int): Consists of the number of attempts of rescoring.\n correct_map (json): see CorrectMapSubFields.\n new_score (int): Consists of the new score obtained after rescoring.\n new_total (int): Consists of the new total summed after rescoring.\n orig_score (int): Consists of the original scored before rescoring.\n problem_id (str): Consists of the ID of the problem being rescored.\n state (json): see StateField.\n success (str): Consists either of the `correct` or `incorrect` value.\n \"\"\"\n\n attempts: int\n correct_map: CorrectMap\n new_score: int\n new_total: int\n orig_score: int\n orig_total: int\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n success: Union[Literal[\"correct\"], Literal[\"incorrect\"]]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ProblemRescoreFailEventField","title":" ProblemRescoreFailEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_rescore_fail
.event
field.
Attributes:
Name Type Descriptionfailure
str
Consists either of the closed
or unreset
value.
problem_id
str
Consists of the ID of the problem being checked.
state
json
see StateField.
Source code inralph/models/edx/problem_interaction/fields/events.py
class ProblemRescoreFailEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_rescore_fail`.`event` field.\n\n Attributes:\n failure (str): Consists either of the `closed` or `unreset` value.\n problem_id (str): Consists of the ID of the problem being checked.\n state (json): see StateField.\n \"\"\"\n\n failure: Union[Literal[\"closed\"], Literal[\"unreset\"]]\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.QueueState","title":" QueueState (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for problem interaction event
.correct_map
.queuestate
field.
Attributes:
Name Type Descriptionkey
str
Consists of a secret string.
time
str
Consists of a string dump of a DateTime object in the format \u2018%Y%m%d%H%M%S\u2019.
Source code inralph/models/edx/problem_interaction/fields/events.py
class QueueState(BaseModelWithConfig):\n \"\"\"Pydantic model for problem interaction `event`.`correct_map`.`queuestate` field.\n\n Attributes:\n key (str): Consists of a secret string.\n time (str): Consists of a string dump of a DateTime object in the format\n '%Y%m%d%H%M%S'.\n \"\"\"\n\n key: str\n time: datetime\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ResetProblemEventField","title":" ResetProblemEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for reset_problem
.event
field.
Attributes:
Name Type Descriptionnew_state
json
see StateField.
old_state
json
see StateField.
problem_id
str
Consists of the ID of the problem being reset.
Source code inralph/models/edx/problem_interaction/fields/events.py
class ResetProblemEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `reset_problem`.`event` field.\n\n Attributes:\n new_state (json): see StateField.\n old_state (json): see StateField.\n problem_id (str): Consists of the ID of the problem being reset.\n \"\"\"\n\n new_state: State\n old_state: State\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ResetProblemFailEventField","title":" ResetProblemFailEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for reset_problem_fail
.event
field.
Attributes:
Name Type Descriptionfailure
str
Consists either of closed
or not_done
value.
old_state
json
see StateField.
problem_id
str
Consists of the ID of the problem being reset.
Source code inralph/models/edx/problem_interaction/fields/events.py
class ResetProblemFailEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `reset_problem_fail`.`event` field.\n\n Attributes:\n failure (str): Consists either of `closed` or `not_done` value.\n old_state (json): see StateField.\n problem_id (str): Consists of the ID of the problem being reset.\n \"\"\"\n\n failure: Union[Literal[\"closed\"], Literal[\"not_done\"]]\n old_state: State\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.SaveProblemFailEventField","title":" SaveProblemFailEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for save_problem_fail
.event
field.
Attributes:
Name Type Descriptionanswers
dict
Consists of a dict of the answer string or a list or a dict of the answer strings if multiple choices are allowed.
failure
str
Consists either of closed
or done
value.
problem_id
str
Consists of the ID of the problem being saved.
state
json
see StateField.
Source code inralph/models/edx/problem_interaction/fields/events.py
class SaveProblemFailEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `save_problem_fail`.`event` field.\n\n Attributes:\n answers (dict): Consists of a dict of the answer string or a list or a dict of\n the answer strings if multiple choices are allowed.\n failure (str): Consists either of `closed` or `done` value.\n problem_id (str): Consists of the ID of the problem being saved.\n state (json): see StateField.\n \"\"\"\n\n answers: Dict[str, Union[int, str, list, dict]]\n failure: Union[Literal[\"closed\"], Literal[\"done\"]]\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.SaveProblemSuccessEventField","title":" SaveProblemSuccessEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for save_problem_success
.event
field.
Attributes:
Name Type Descriptionanswers
dict
Consists of a dict of the answer string or a list or a dict of the answer strings if multiple choices are allowed.
problem_id
str
Consists of the ID of the problem being saved.
state
json
see StateField.
Source code inralph/models/edx/problem_interaction/fields/events.py
class SaveProblemSuccessEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `save_problem_success`.`event` field.\n\n Attributes:\n answers (dict): Consists of a dict of the answer string or a list or a dict of\n the answer strings if multiple choices are allowed.\n problem_id (str): Consists of the ID of the problem being saved.\n state (json): see StateField.\n \"\"\"\n\n answers: Dict[str, Union[int, str, list, dict]]\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n state: State\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.ShowAnswerEventField","title":" ShowAnswerEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for show_answer
.event
field.
Attributes:
Name Type Descriptionproblem_id
str
Consists of the ID of the problem being shown.
Source code inralph/models/edx/problem_interaction/fields/events.py
class ShowAnswerEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `show_answer`.`event` field.\n\n Attributes:\n problem_id (str): Consists of the ID of the problem being shown.\n \"\"\"\n\n problem_id: constr(\n regex=r\"^block-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+\" # noqa : F722\n r\"type@problem\\+block@[a-f0-9]{32}$\" # noqa : F722\n )\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.State","title":" State (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for problem interaction event
.state
field.
Attributes:
Name Type Descriptioncorrect_map
dict
see CorrectMapSubFields.
done
bool
True
if the problem is answered, else False
.
input_state
dict
Consists of the state field given before answering.
seed
int
Consists of the seed element for the current state.
student_answers
dict
Consists of the answer(s) given by the user.
Source code inralph/models/edx/problem_interaction/fields/events.py
class State(BaseModelWithConfig):\n \"\"\"Pydantic model for problem interaction `event`.`state` field.\n\n Attributes:\n correct_map (dict): see CorrectMapSubFields.\n done (bool): `True` if the problem is answered, else `False`.\n input_state (dict): Consists of the state field given before answering.\n seed (int): Consists of the seed element for the current state.\n student_answers (dict): Consists of the answer(s) given by the user.\n \"\"\"\n\n correct_map: Dict[\n constr(regex=r\"^[a-f0-9]{32}_[0-9]_[0-9]$\"), # noqa : F722\n CorrectMap,\n ]\n done: Optional[bool]\n input_state: dict\n seed: int\n student_answers: dict\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.SubmissionAnswerField","title":" SubmissionAnswerField (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for problem_check
.event
.submission
field.
Attributes:
Name Type Descriptionanswer
str, list
Consists of the answer string or a list of the answer strings if multiple choices are allowed.
correct
bool
True
if the answer
value is correct, else False
.
input_type
str
Consists of the type of value that the student supplies for the response_type
.
question
str
Consists of the question text.
response_type
str
Consists of the type of problem.
variant
str
Consists of the unique ID of the variant that was presented to this user.
Source code inralph/models/edx/problem_interaction/fields/events.py
class SubmissionAnswerField(BaseModelWithConfig):\n \"\"\"Pydantic model for `problem_check`.`event`.`submission` field.\n\n Attributes:\n answer (str, list): Consists of the answer string or a list of the answer\n strings if multiple choices are allowed.\n correct (bool): `True` if the `answer` value is correct, else `False`.\n input_type (str): Consists of the type of value that the student supplies for\n the `response_type`.\n question (str): Consists of the question text.\n response_type (str): Consists of the type of problem.\n variant (str): Consists of the unique ID of the variant that was presented to\n this user.\n \"\"\"\n\n answer: Union[str, List[str]]\n correct: bool\n input_type: str\n question: str\n response_type: str\n variant: str\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.UIProblemResetEventField","title":" UIProblemResetEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_reset
.event
field.
Attributes:
Name Type Descriptionanswers
str, list
Consists of the answer string or a list of the answer strings if multiple choices are allowed.
Source code inralph/models/edx/problem_interaction/fields/events.py
class UIProblemResetEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_reset`.`event` field.\n\n Attributes:\n answers (str, list): Consists of the answer string or a list of the answer\n strings if multiple choices are allowed.\n \"\"\"\n\n answers: Union[str, List[str]]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.fields.events.UIProblemShowEventField","title":" UIProblemShowEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for problem_show
.event
field.
Attributes:
Name Type Descriptionproblem
str
Consists of the optional name value that the course creators supply or the system-generated hash code for the problem being shown.
Source code inralph/models/edx/problem_interaction/fields/events.py
class UIProblemShowEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `problem_show`.`event` field.\n\n Attributes:\n problem (str): Consists of the optional name value that the course creators\n supply or the system-generated hash code for the problem being shown.\n \"\"\"\n\n problem: str\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements","title":"statements
","text":"Problem interaction events model definitions.
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.EdxProblemHintDemandhintDisplayed","title":" EdxProblemHintDemandhintDisplayed (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.problem.hint.demandhint_displayed
statement.
The server emits this statement when a user requests a hint for a problem.
Attributes:
Name Type Descriptionevent
dict
See EdxProblemHintDemandhintDisplayedEventField.
event_type
str
Consists of the value edx.problem.hint.demandhint_displayed
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class EdxProblemHintDemandhintDisplayed(BaseServerModel):\n \"\"\"Pydantic model for `edx.problem.hint.demandhint_displayed` statement.\n\n The server emits this statement when a user requests a hint for a problem.\n\n Attributes:\n event (dict): See EdxProblemHintDemandhintDisplayedEventField.\n event_type (str): Consists of the value `edx.problem.hint.demandhint_displayed`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.problem.hint.demandhint_displayed\"\n )\n\n event: EdxProblemHintDemandhintDisplayedEventField\n event_type: Literal[\"edx.problem.hint.demandhint_displayed\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.EdxProblemHintFeedbackDisplayed","title":" EdxProblemHintFeedbackDisplayed (BaseServerModel)
pydantic-model
","text":"Pydantic model for edx.problem.hint.feedback_displayed
statement.
The server emits this event when a user receives a hint after answering a problem.
Attributes:
Name Type Descriptionevent
dict
See EdxProblemHintFeedbackDisplayedEventField.
event_type
str
Consists of the value edx.problem.hint.feedback_displayed
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class EdxProblemHintFeedbackDisplayed(BaseServerModel):\n \"\"\"Pydantic model for `edx.problem.hint.feedback_displayed` statement.\n\n The server emits this event when a user receives a hint after answering a problem.\n\n Attributes:\n event (dict): See EdxProblemHintFeedbackDisplayedEventField.\n event_type (str): Consists of the value `edx.problem.hint.feedback_displayed`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=\"edx.problem.hint.feedback_displayed\"\n )\n\n event: EdxProblemHintFeedbackDisplayedEventField\n event_type: Literal[\"edx.problem.hint.feedback_displayed\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ProblemCheck","title":" ProblemCheck (BaseServerModel)
pydantic-model
","text":"Pydantic model for problem_check
statement.
The server emits this event when a user checks a problem.
Attributes:
Name Type Descriptionevent
dict
See ProblemCheckEventField.
event_type
str
Consists of the value problem_check
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ProblemCheck(BaseServerModel):\n \"\"\"Pydantic model for `problem_check` statement.\n\n The server emits this event when a user checks a problem.\n\n Attributes:\n event (dict): See ProblemCheckEventField.\n event_type (str): Consists of the value `problem_check`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"problem_check\")\n\n event: ProblemCheckEventField\n event_type: Literal[\"problem_check\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ProblemCheckFail","title":" ProblemCheckFail (BaseServerModel)
pydantic-model
","text":"Pydantic model for problem_check_fail
statement.
The server emits this event when a user checks a problem and a failure prevents the problem from being checked successfully.
Attributes:
Name Type Descriptionevent
dict
See ProblemCheckFailEventField.
event_type
str
Consists of the value problem_check_fail
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ProblemCheckFail(BaseServerModel):\n \"\"\"Pydantic model for `problem_check_fail` statement.\n\n The server emits this event when a user checks a problem and a failure prevents the\n problem from being checked successfully.\n\n Attributes:\n event (dict): See ProblemCheckFailEventField.\n event_type (str): Consists of the value `problem_check_fail`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"problem_check_fail\")\n\n event: ProblemCheckFailEventField\n event_type: Literal[\"problem_check_fail\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ProblemRescore","title":" ProblemRescore (BaseServerModel)
pydantic-model
","text":"Pydantic model for problem_rescore
statement.
The server emits this statement when a problem is successfully rescored.
Attributes:
Name Type Descriptionevent
dict
See ProblemRescoreEventField.
event_type
str
Consists of the value problem_rescore
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ProblemRescore(BaseServerModel):\n \"\"\"Pydantic model for `problem_rescore` statement.\n\n The server emits this statement when a problem is successfully rescored.\n\n Attributes:\n event (dict): See ProblemRescoreEventField.\n event_type (str): Consists of the value `problem_rescore`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"problem_rescore\")\n\n event: ProblemRescoreEventField\n event_type: Literal[\"problem_rescore\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ProblemRescoreFail","title":" ProblemRescoreFail (BaseServerModel)
pydantic-model
","text":"Pydantic model for problem_rescore_fail
statement.
The server emits this statement when a problem cannot be successfully rescored.
Attributes:
Name Type Descriptionevent
dict
See ProblemRescoreFailEventField.
event_type
str
Consists of the value problem_rescore_fail
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ProblemRescoreFail(BaseServerModel):\n \"\"\"Pydantic model for `problem_rescore_fail` statement.\n\n The server emits this statement when a problem cannot be successfully rescored.\n\n Attributes:\n event (dict): See ProblemRescoreFailEventField.\n event_type (str): Consists of the value `problem_rescore_fail`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"problem_rescore_fail\")\n\n event: ProblemRescoreFailEventField\n event_type: Literal[\"problem_rescore_fail\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ResetProblem","title":" ResetProblem (BaseServerModel)
pydantic-model
","text":"Pydantic model for reset_problem
statement.
The server emits this statement when a problem has been reset successfully.
Attributes:
Name Type Descriptionevent
dict
See ResetProblemEventField.
event_type
str
Consists of the value reset_problem
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ResetProblem(BaseServerModel):\n \"\"\"Pydantic model for `reset_problem` statement.\n\n The server emits this statement when a problem has been reset successfully.\n\n Attributes:\n event (dict): See ResetProblemEventField.\n event_type (str): Consists of the value `reset_problem`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"reset_problem\")\n\n event: ResetProblemEventField\n event_type: Literal[\"reset_problem\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ResetProblemFail","title":" ResetProblemFail (BaseServerModel)
pydantic-model
","text":"Pydantic model for reset_problem_fail
statement.
The server emits this statement when a problem cannot be reset successfully.
Attributes:
Name Type Descriptionevent
dict
See ResetProblemFailEventField.
event_type
str
Consists of the value reset_problem_fail
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ResetProblemFail(BaseServerModel):\n \"\"\"Pydantic model for `reset_problem_fail` statement.\n\n The server emits this statement when a problem cannot be reset successfully.\n\n Attributes:\n event (dict): See ResetProblemFailEventField.\n event_type (str): Consists of the value `reset_problem_fail`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"reset_problem_fail\")\n\n event: ResetProblemFailEventField\n event_type: Literal[\"reset_problem_fail\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.SaveProblemFail","title":" SaveProblemFail (BaseServerModel)
pydantic-model
","text":"Pydantic model for save_problem_fail
statement.
The server emits this statement when a problem cannot be saved successfully.
Attributes:
Name Type Descriptionevent
dict
See SaveProblemFailEventField.
event_type
str
Consists of the value save_problem_fail
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class SaveProblemFail(BaseServerModel):\n \"\"\"Pydantic model for `save_problem_fail` statement.\n\n The server emits this statement when a problem cannot be saved successfully.\n\n Attributes:\n event (dict): See SaveProblemFailEventField.\n event_type (str): Consists of the value `save_problem_fail`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"save_problem_fail\")\n\n event: SaveProblemFailEventField\n event_type: Literal[\"save_problem_fail\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.SaveProblemSuccess","title":" SaveProblemSuccess (BaseServerModel)
pydantic-model
","text":"Pydantic model for save_problem_success
statement.
The server emits this statement when a problem is saved successfully.
Attributes:
Name Type Descriptionevent
dict
See SaveProblemSuccessEventField.
event_type
str
Consists of the value save_problem_success
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class SaveProblemSuccess(BaseServerModel):\n \"\"\"Pydantic model for `save_problem_success` statement.\n\n The server emits this statement when a problem is saved successfully.\n\n Attributes:\n event (dict): See SaveProblemSuccessEventField.\n event_type (str): Consists of the value `save_problem_success`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"save_problem_success\")\n\n event: SaveProblemSuccessEventField\n event_type: Literal[\"save_problem_success\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.ShowAnswer","title":" ShowAnswer (BaseServerModel)
pydantic-model
","text":"Pydantic model for showanswer
statement.
The server emits this statement when the answer to a problem is shown.
Attributes:
Name Type Descriptionevent
dict
See ShowAnswerEventField.
event_type
str
Consists of the value showanswer
.
page
str
Consists of the value x_module
.
ralph/models/edx/problem_interaction/statements.py
class ShowAnswer(BaseServerModel):\n \"\"\"Pydantic model for `showanswer` statement.\n\n The server emits this statement when the answer to a problem is shown.\n\n Attributes:\n event (dict): See ShowAnswerEventField.\n event_type (str): Consists of the value `showanswer`.\n page (str): Consists of the value `x_module`.\n \"\"\"\n\n __selector__ = selector(event_source=\"server\", event_type=\"showanswer\")\n\n event: ShowAnswerEventField\n event_type: Literal[\"showanswer\"]\n page: Literal[\"x_module\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.UIProblemCheck","title":" UIProblemCheck (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for problem_check
statement.
The browser emits this event when a user checks a problem.
Attributes:
Name Type Descriptionevent
str
Consists of values of problem being checked, styled as GET
parameters.
event_type
str
Consists of the value problem_check
.
name
str
Consists of the value problem_check
.
ralph/models/edx/problem_interaction/statements.py
class UIProblemCheck(BaseBrowserModel):\n \"\"\"Pydantic model for `problem_check` statement.\n\n The browser emits this event when a user checks a problem.\n\n Attributes:\n event (str): Consists of values of problem being checked, styled as `GET`\n parameters.\n event_type (str): Consists of the value `problem_check`.\n name (str): Consists of the value `problem_check`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"problem_check\")\n\n event: str\n event_type: Literal[\"problem_check\"]\n name: Literal[\"problem_check\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.UIProblemGraded","title":" UIProblemGraded (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for problem_graded
statement.
The server emits this statement each time a user clicks Check for a problem and it is graded successfully.
Attributes:
Name Type Descriptionevent
list
See ProblemGradedEventField.
event_type
str
Consists of the value problem_graded
.
name
str
Consists of the value problem_graded
.
ralph/models/edx/problem_interaction/statements.py
class UIProblemGraded(BaseBrowserModel):\n \"\"\"Pydantic model for `problem_graded` statement.\n\n The server emits this statement each time a user clicks <kbd>Check</kbd> for a\n problem and it is graded successfully.\n\n Attributes:\n event (list): See ProblemGradedEventField.\n event_type (str): Consists of the value `problem_graded`.\n name (str): Consists of the value `problem_graded`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"problem_graded\")\n\n event: List[Union[str, Literal[None], None]]\n event_type: Literal[\"problem_graded\"]\n name: Literal[\"problem_graded\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.UIProblemReset","title":" UIProblemReset (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for problem_reset
statement.
The browser emits problem_reset events when a user clicks Reset to reset the problem answer.
Attributes:
Name Type Descriptionevent
json
See ProblemResetEventField.
event_type
str
Consists of the value problem_reset
.
name
str
Consists of the value problem_reset
.
ralph/models/edx/problem_interaction/statements.py
class UIProblemReset(BaseBrowserModel):\n \"\"\"Pydantic model for `problem_reset` statement.\n\n The browser emits problem_reset events when a user clicks <kbd>Reset</kbd> to reset\n the problem answer.\n\n Attributes:\n event (json): See ProblemResetEventField.\n event_type (str): Consists of the value `problem_reset`.\n name (str): Consists of the value `problem_reset`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"problem_reset\")\n\n event: Union[\n str,\n Json[UIProblemResetEventField], # pylint: disable=unsubscriptable-object\n UIProblemResetEventField,\n ]\n event_type: Literal[\"problem_reset\"]\n name: Literal[\"problem_reset\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.UIProblemSave","title":" UIProblemSave (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for problem_save
statement.
The browser emits this statement when a user saves a problem.
Attributes:
Name Type Descriptionevent
str
Consists of all the answers saved for the problem.
event_type
str
Consists of the value problem_save
.
name
str
Consists of the value problem_save
.
ralph/models/edx/problem_interaction/statements.py
class UIProblemSave(BaseBrowserModel):\n \"\"\"Pydantic model for `problem_save` statement.\n\n The browser emits this statement when a user saves a problem.\n\n Attributes:\n event (str): Consists of all the answers saved for the problem.\n event_type (str): Consists of the value `problem_save`.\n name (str): Consists of the value `problem_save`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"problem_save\")\n\n event: str\n event_type: Literal[\"problem_save\"]\n name: Literal[\"problem_save\"]\n
"},{"location":"models/edx/#ralph.models.edx.problem_interaction.statements.UIProblemShow","title":" UIProblemShow (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for problem_show
statement.
The browser emits this statement when the answer clicks Show Answer to show the problem answer.
Attributes:
Name Type Descriptionevent
json
See ProblemShowEventField.
event_type
str
Consists of the value problem_save
.
name
str
Consists of the value problem_save
.
ralph/models/edx/problem_interaction/statements.py
class UIProblemShow(BaseBrowserModel):\n \"\"\"Pydantic model for `problem_show` statement.\n\n The browser emits this statement when the answer clicks <kbd>Show Answer</kbd> to\n show the problem answer.\n\n Attributes:\n event (json): See ProblemShowEventField.\n event_type (str): Consists of the value `problem_save`.\n name (str): Consists of the value `problem_save`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"problem_show\")\n\n event: Union[\n Json[UIProblemShowEventField], # pylint: disable=unsubscriptable-object\n UIProblemShowEventField,\n ]\n event_type: Literal[\"problem_show\"]\n name: Literal[\"problem_show\"]\n
"},{"location":"models/edx/#ralph.models.edx.server","title":"server
","text":"Server event model definitions.
"},{"location":"models/edx/#ralph.models.edx.server.BaseServerModel","title":" BaseServerModel (BaseEdxModel)
pydantic-model
","text":"Pydantic model for core server statement.
Source code inralph/models/edx/server.py
class BaseServerModel(BaseEdxModel):\n \"\"\"Pydantic model for core server statement.\"\"\"\n\n event_source: Literal[\"server\"]\n
"},{"location":"models/edx/#ralph.models.edx.server.Server","title":" Server (BaseServerModel)
pydantic-model
","text":"Pydantic model for common server statement.
This type of event is triggered from the django middleware on each request excluding: /event
, login
, heartbeat
, /segmentio/event
and /performance
.
Attributes:
Name Type Descriptionevent_type
str
Consist of the relative URL (without the hostname) of the requested page. Retrieved with: request.META['PATH_INFO']
event
str
Consist of a JSON string holding the content of the GET or POST request. Retrieved with: json.dumps( { 'GET': dict(request.GET), 'POST': dict(request.POST) } )[:512]
Note: Values for [\u2018password\u2019, \u2018newpassword\u2019, \u2018new_password\u2019, \u2018oldpassword\u2019, \u2018old_password\u2019, \u2018new_password1\u2019, \u2018new_password2\u2019] are replaced by ********
. The JSON string is truncated at 512 characters resulting in invalid JSON.
ralph/models/edx/server.py
class Server(BaseServerModel):\n \"\"\"Pydantic model for common server statement.\n\n This type of event is triggered from the django middleware on each request\n excluding: `/event`, `login`, `heartbeat`, `/segmentio/event` and `/performance`.\n\n Attributes:\n event_type (str): Consist of the relative URL (without the hostname) of the\n requested page.\n Retrieved with:\n `request.META['PATH_INFO']`\n event (str): Consist of a JSON string holding the content of the GET or POST\n request.\n Retrieved with:\n ```json.dumps(\n {\n 'GET': dict(request.GET),\n 'POST': dict(request.POST)\n }\n )[:512]```\n Note:\n Values for ['password', 'newpassword', 'new_password', 'oldpassword',\n 'old_password', 'new_password1', 'new_password2'] are replaced by\n `********`.\n The JSON string is truncated at 512 characters resulting in invalid\n JSON.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"server\", event_type=LazyModelField(\"context__path\")\n )\n\n # pylint: disable=unsubscriptable-object\n event_type: Path\n event: Union[Json[ServerEventField], ServerEventField]\n
"},{"location":"models/edx/#ralph.models.edx.server.ServerEventField","title":" ServerEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for common server event
field.
ralph/models/edx/server.py
class ServerEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for common server `event` field.\"\"\"\n\n GET: dict\n POST: dict\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction","title":"textbook_interaction
special
","text":""},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events","title":"events
","text":"Textbook interaction event fields definitions.
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.BookEventField","title":" BookEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for book
.event
field.
Attributes:
Name Type Descriptionchapter
str
Consists of the name of the PDF file.
name
str
Consists of textbook.pdf.page.loaded
if type is set to gotopage
, textbook.pdf.page.navigatednext
if type is set to prevpage
, textbook.pdf.page.navigatednext
if type is set to nextpage
.
new
int
Consists of the destination page number.
old
int
Consists of the original page number. It applies to gotopage
event types only.
type
str
Consists of gotopage
value when a page loads after the student manually enters its number, prevpage
value when the next page button is clicked or nextpage
value when the previous page button is clicked.
ralph/models/edx/textbook_interaction/fields/events.py
class BookEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `book`.`event` field.\n\n Attributes:\n chapter (str): Consists of the name of the PDF file.\n name (str): Consists of `textbook.pdf.page.loaded` if type is set to\n `gotopage`,\n `textbook.pdf.page.navigatednext` if type is set to `prevpage`,\n `textbook.pdf.page.navigatednext` if type is set to `nextpage`.\n new (int): Consists of the destination page number.\n old (int): Consists of the original page number. It applies to `gotopage` event\n types only.\n type (str): Consists of `gotopage` value when a page loads after the student\n manually enters its number, `prevpage` value when the next page button is\n clicked or `nextpage` value when the previous page button is clicked.\n \"\"\"\n\n chapter: constr(\n regex=(\n r\"^\\/asset-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+type@asset\\+block.+$\" # noqa\n )\n )\n name: Union[\n Literal[\"textbook.pdf.page.loaded\"], Literal[\"textbook.pdf.page.navigatednext\"]\n ]\n new: int\n old: Optional[int]\n type: Union[Literal[\"gotopage\"], Literal[\"prevpage\"], Literal[\"nextpage\"]] = Field(\n alias=\"type\"\n )\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookInteractionBaseEventField","title":" TextbookInteractionBaseEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for textbook interaction core event
field.
Attributes:
Name Type Descriptionchapter
str
Consists of the name of the PDF file. It begins with the block_id
value and ends with the .pdf
extension.
page
int
The number of the page that is open when the event is emitted.
Source code inralph/models/edx/textbook_interaction/fields/events.py
class TextbookInteractionBaseEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for textbook interaction core `event` field.\n\n Attributes:\n chapter (str): Consists of the name of the PDF file.\n It begins with the `block_id` value and ends with the `.pdf` extension.\n page (int): The number of the page that is open when the event is emitted.\n \"\"\"\n\n page: int\n chapter: constr(\n regex=(\n r\"^\\/asset-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+type@asset\\+block.+$\" # noqa\n )\n )\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfChapterNavigatedEventField","title":" TextbookPdfChapterNavigatedEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.chapter.navigated
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.chapter.navigated
.
chapter
str
Consists of the name of the PDF file. It begins with the block_id
value and ends with the .pdf
extension.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfChapterNavigatedEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.chapter.navigated`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.chapter.navigated`.\n chapter (str): Consists of the name of the PDF file.\n It begins with the `block_id` value and ends with the `.pdf` extension.\n \"\"\"\n\n name: Literal[\"textbook.pdf.chapter.navigated\"]\n chapter: constr(\n regex=(\n r\"^\\/asset-v1:[^\\/+]+(\\/|\\+)[^\\/+]+(\\/|\\+)[^\\/?]+type@asset\\+block.+$\" # noqa\n )\n )\n chapter_title: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfDisplayScaledEventField","title":" TextbookPdfDisplayScaledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.display.scaled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.display.scaled
.
amount
str
Consists of a floating point number string value.
Source code inralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfDisplayScaledEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.display.scaled`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.display.scaled`.\n amount (str): Consists of a floating point number string value.\n \"\"\"\n\n name: Literal[\"textbook.pdf.display.scaled\"]\n amount: float\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfOutlineToggledEventField","title":" TextbookPdfOutlineToggledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.outline.toggled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.outline.toggled
.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfOutlineToggledEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.outline.toggled`.`event` field.\n\n Attribute:\n name (str): Consists of the value `textbook.pdf.outline.toggled`.\n \"\"\"\n\n name: Literal[\"textbook.pdf.outline.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfPageNavigatedEventField","title":" TextbookPdfPageNavigatedEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.page.navigated
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.page.navigated
.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfPageNavigatedEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.page.navigated`.`event` field.\n\n Attribute:\n name (str): Consists of the value `textbook.pdf.page.navigated`.\n \"\"\"\n\n name: Literal[\"textbook.pdf.page.navigated\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfPageScrolledEventField","title":" TextbookPdfPageScrolledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.page.scrolled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.page.scrolled
.
direction
str
Consists either of the up
or down
value.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfPageScrolledEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.page.scrolled`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.page.scrolled`.\n direction (str): Consists either of the `up` or `down` value.\n \"\"\"\n\n name: Literal[\"textbook.pdf.page.scrolled\"]\n direction: Union[Literal[\"up\"], Literal[\"down\"]]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfSearchCaseSensitivityToggledEventField","title":" TextbookPdfSearchCaseSensitivityToggledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.searchcasesensitivity.toggled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.searchcasesensitivity.toggled
.
caseSensitive
bool
Consists either of the true
value if the case sensitive option is selected or false
if this option is not selected.
highlightAll
bool
Consists either of the true
value if the option to highlight all matches is selected or false
if this option is not selected.
query
str
Consists of the value in the search field.
status
str
Consists either of the value not found
for a search string that is unsuccessful or blank for successful search strings.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfSearchCaseSensitivityToggledEventField(\n TextbookInteractionBaseEventField\n):\n \"\"\"Pydantic model for `textbook.pdf.searchcasesensitivity.toggled`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.searchcasesensitivity.toggled`.\n caseSensitive (bool): Consists either of the `true` value if the case sensitive\n option is selected or `false` if this option is not selected.\n highlightAll (bool): Consists either of the `true` value if the option to\n highlight all matches is selected or `false` if this option is not selected.\n query (str): Consists of the value in the search field.\n status (str): Consists either of the value `not found` for a search string that\n is unsuccessful or blank for successful search strings.\n \"\"\"\n\n name: Literal[\"textbook.pdf.searchcasesensitivity.toggled\"]\n caseSensitive: bool\n highlightAll: bool\n query: str\n status: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfSearchExecutedEventField","title":" TextbookPdfSearchExecutedEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.executed
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.search.executed
.
caseSensitive
bool
Consists either of the true
value if the case-sensitive option is selected or false
if this option is not selected.
highlightAll
bool
Consists either of the true
value if the option to highlight all matches is selected or false
if this option is not selected.
query
str
Consists of the value in the search field.
status
str
Consists either of the value not found
for a search string that is unsuccessful or blank for successful search strings.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfSearchExecutedEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.search.executed`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.search.executed`.\n caseSensitive (bool): Consists either of the `true` value if the case-sensitive\n option is selected or `false` if this option is not selected.\n highlightAll (bool): Consists either of the `true` value if the option to\n highlight all matches is selected or `false` if this option is not selected.\n query (str): Consists of the value in the search field.\n status (str): Consists either of the value `not found` for a search string that\n is unsuccessful or blank for successful search strings.\n \"\"\"\n\n name: Literal[\"textbook.pdf.search.executed\"]\n caseSensitive: bool\n highlightAll: bool\n query: str\n status: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfSearchHighlightToggledEventField","title":" TextbookPdfSearchHighlightToggledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.highlight.toggled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.search.highlight.toggled
.
caseSensitive
bool
Consists either of the true
value if the case sensitive option is selected or false
if this option is not selected.
highlightAll
bool
Consists either of the true
value if the option to highlight all matches is selected or false
if this option is not selected.
query
str
Consists of the value in the search field.
status
str
Consists either of the value not found
for a search string that is unsuccessful or blank for successful search strings.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfSearchHighlightToggledEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.search.highlight.toggled`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.search.highlight.toggled`.\n caseSensitive (bool): Consists either of the `true` value if the case sensitive\n option is selected or `false` if this option is not selected.\n highlightAll (bool): Consists either of the `true` value if the option to\n highlight all matches is selected or `false` if this option is not selected.\n query (str): Consists of the value in the search field.\n status (str): Consists either of the value `not found` for a search string that\n is unsuccessful or blank for successful search strings.\n \"\"\"\n\n name: Literal[\"textbook.pdf.search.highlight.toggled\"]\n caseSensitive: bool\n highlightAll: bool\n query: str\n status: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfSearchNavigatedNextEventField","title":" TextbookPdfSearchNavigatedNextEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.navigatednext
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.search.navigatednext
.
caseSensitive
bool
Consists either of the true
value if the case-sensitive option is selected or false
if this option is not selected.
findPrevious(bool)
Consists either of the \u2018true\u2019 value if the user clicks the Find Previous icon or \u2018false\u2019 if the user clicks the Find Next icon.
highlightAll
bool
Consists either of the true
value if the option to highlight all matches is selected or false
if this option is not selected.
query
str
Consists of the value in the search field.
status
str
Consists either of the value not found
for a search string that is unsuccessful or blank for successful search strings.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfSearchNavigatedNextEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.search.navigatednext`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.search.navigatednext`.\n caseSensitive (bool): Consists either of the `true` value if the case-sensitive\n option is selected or `false` if this option is not selected.\n findPrevious(bool): Consists either of the \u2018true\u2019 value if the user clicks the\n Find Previous icon or \u2018false\u2019 if the user clicks the <kbd>Find Next</kbd>\n icon.\n highlightAll (bool): Consists either of the `true` value if the option to\n highlight all matches is selected or `false` if this option is not selected.\n query (str): Consists of the value in the search field.\n status (str): Consists either of the value `not found` for a search string that\n is unsuccessful or blank for successful search strings.\n \"\"\"\n\n name: Literal[\"textbook.pdf.search.navigatednext\"]\n caseSensitive: bool\n findPrevious: bool\n highlightAll: bool\n query: str\n status: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfThumbnailNavigatedEventField","title":" TextbookPdfThumbnailNavigatedEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.thumbnail.navigated
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.thumbnail.navigated
.
thumbnail_title
str
Consists of the name of the thumbnail.
Source code inralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfThumbnailNavigatedEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.thumbnail.navigated`.`event` field.\n\n Attribute:\n name (str): Consists of the value `textbook.pdf.thumbnail.navigated`.\n thumbnail_title (str): Consists of the name of the thumbnail.\n \"\"\"\n\n name: Literal[\"textbook.pdf.thumbnail.navigated\"]\n thumbnail_title: str\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfThumbnailsToggledEventField","title":" TextbookPdfThumbnailsToggledEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.thumbnails.toggled
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.thumbnails.toggled
.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfThumbnailsToggledEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.thumbnails.toggled`.`event` field.\n\n Attribute:\n name (str): Consists of the value `textbook.pdf.thumbnails.toggled`.\n \"\"\"\n\n name: Literal[\"textbook.pdf.thumbnails.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfZoomButtonsChangedEventField","title":" TextbookPdfZoomButtonsChangedEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.zoom.buttons.changed
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.zoom.buttons.changed
.
direction
str
Consists of either the in
or out
value.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfZoomButtonsChangedEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.zoom.buttons.changed`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.zoom.buttons.changed`.\n direction (str): Consists of either the `in` or `out` value.\n \"\"\"\n\n name: Literal[\"textbook.pdf.zoom.buttons.changed\"]\n direction: Union[Literal[\"in\"], Literal[\"out\"]]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.fields.events.TextbookPdfZoomMenuChangedEventField","title":" TextbookPdfZoomMenuChangedEventField (TextbookInteractionBaseEventField)
pydantic-model
","text":"Pydantic model for textbook.pdf.zoom.menu.changed
.event
field.
Attributes:
Name Type Descriptionname
str
Consists of the value textbook.pdf.zoom.menu.changed
.
amount
str
Consists either of the 0.5
, 0.75
, 1
, 1.25
, 1.5
, 2
, 3
, 4
, auto
, custom
, page-actual
, page-fit
, page-width
value.
ralph/models/edx/textbook_interaction/fields/events.py
class TextbookPdfZoomMenuChangedEventField(TextbookInteractionBaseEventField):\n \"\"\"Pydantic model for `textbook.pdf.zoom.menu.changed`.`event` field.\n\n Attributes:\n name (str): Consists of the value `textbook.pdf.zoom.menu.changed`.\n amount (str): Consists either of the `0.5`, `0.75`, `1`, `1.25`, `1.5`, `2`,\n `3`, `4`, `auto`, `custom`, `page-actual`, `page-fit`, `page-width` value.\n \"\"\"\n\n name: Literal[\"textbook.pdf.zoom.menu.changed\"]\n amount: Union[\n Literal[\"0.5\"],\n Literal[\"0.75\"],\n Literal[\"1\"],\n Literal[\"1.25\"],\n Literal[\"1.5\"],\n Literal[\"2\"],\n Literal[\"3\"],\n Literal[\"4\"],\n Literal[\"auto\"],\n Literal[\"custom\"],\n Literal[\"page-actual\"],\n Literal[\"page-fit\"],\n Literal[\"page-width\"],\n ]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements","title":"statements
","text":"Textbook interaction event model definitions.
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UIBook","title":" UIBook (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for book
statement.
The browser emits this statement when a user navigates within the PDF Viewer or the PNG Viewer.
Attributes:
Name Type Descriptionevent
BookEventField
See BookEventField.
event_type
str
Consists of the value book
.
name
str
Consists of the value book
.
ralph/models/edx/textbook_interaction/statements.py
class UIBook(BaseBrowserModel):\n \"\"\"Pydantic model for `book` statement.\n\n The browser emits this statement when a user navigates within the PDF Viewer or the\n PNG Viewer.\n\n Attributes:\n event (BookEventField): See BookEventField.\n event_type (str): Consists of the value `book`.\n name (str): Consists of the value `book`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"book\")\n\n event: Union[\n Json[BookEventField], BookEventField # pylint: disable=unsubscriptable-object\n ]\n event_type: Literal[\"book\"]\n name: Literal[\"book\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfChapterNavigated","title":" UITextbookPdfChapterNavigated (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.chapter.navigated
statement.
The browser emits this statement when a user clicks on a link in the outline to navigate to a chapter.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfChapterNavigatedEventField.
event_type
str
Consists of the value textbook.pdf.chapter.navigated
.
name
str
Consists of the value textbook.pdf.chapter.navigated
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfChapterNavigated(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.chapter.navigated` statement.\n\n The browser emits this statement when a user clicks on a link in the outline to\n navigate to a chapter.\n\n Attributes:\n event (json): See TextbookPdfChapterNavigatedEventField.\n event_type (str): Consists of the value `textbook.pdf.chapter.navigated`.\n name (str): Consists of the value `textbook.pdf.chapter.navigated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.chapter.navigated\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfChapterNavigatedEventField\n ],\n TextbookPdfChapterNavigatedEventField,\n ]\n event_type: Literal[\"textbook.pdf.chapter.navigated\"]\n name: Literal[\"textbook.pdf.chapter.navigated\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfDisplayScaled","title":" UITextbookPdfDisplayScaled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.display.scaled
statement.
The browser emits this statement when the display magnification changes or the first page is shown.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfDisplayScaledEventField.
event_type
str
Consists of the value textbook.pdf.display.scaled
.
name
str
Consists of the value textbook.pdf.display.scaled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfDisplayScaled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.display.scaled` statement.\n\n The browser emits this statement when the display magnification changes or the\n first page is shown.\n\n Attributes:\n event (json): See TextbookPdfDisplayScaledEventField.\n event_type (str): Consists of the value `textbook.pdf.display.scaled`.\n name (str): Consists of the value `textbook.pdf.display.scaled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.display.scaled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfDisplayScaledEventField\n ],\n TextbookPdfDisplayScaledEventField,\n ]\n event_type: Literal[\"textbook.pdf.display.scaled\"]\n name: Literal[\"textbook.pdf.display.scaled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfOutlineToggled","title":" UITextbookPdfOutlineToggled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.outline.toggled
statement.
The browser emits this statement when a user clicks the outline icon to show or hide a list of the book\u2019s chapters.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfOutlineToggledEventField.
event_type
str
Consists of the value textbook.pdf.outline.toggled
.
name
str
Consists of the value textbook.pdf.outline.toggled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfOutlineToggled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.outline.toggled` statement.\n\n The browser emits this statement when a user clicks the outline icon to show or\n hide a list of the book\u2019s chapters.\n\n Attributes:\n event (json): See TextbookPdfOutlineToggledEventField.\n event_type (str): Consists of the value `textbook.pdf.outline.toggled`.\n name (str): Consists of the value `textbook.pdf.outline.toggled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.outline.toggled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfOutlineToggledEventField\n ],\n TextbookPdfOutlineToggledEventField,\n ]\n event_type: Literal[\"textbook.pdf.outline.toggled\"]\n name: Literal[\"textbook.pdf.outline.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfPageNavigated","title":" UITextbookPdfPageNavigated (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.page.navigated
statement.
The browser emits this statement when a user manually enters a page number.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfPageNavigatedEventField.
event_type
str
Consists of the value textbook.pdf.page.navigated
.
name
str
Consists of the value textbook.pdf.page.navigated
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfPageNavigated(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.page.navigated` statement.\n\n The browser emits this statement when a user manually enters a page number.\n\n Attributes:\n event (json): See TextbookPdfPageNavigatedEventField.\n event_type (str): Consists of the value `textbook.pdf.page.navigated`.\n name (str): Consists of the value `textbook.pdf.page.navigated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.page.navigated\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfPageNavigatedEventField\n ],\n TextbookPdfPageNavigatedEventField,\n ]\n event_type: Literal[\"textbook.pdf.page.navigated\"]\n name: Literal[\"textbook.pdf.page.navigated\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfPageScrolled","title":" UITextbookPdfPageScrolled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.page.scrolled
statement.
The browser emits this statement when the user scrolls to the next or previous page and the transition takes less than 50 milliseconds.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfPageScrolledEventField.
event_type
str
Consists of the value textbook.pdf.page.scrolled
.
name
str
Consists of the value textbook.pdf.page.scrolled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfPageScrolled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.page.scrolled` statement.\n\n The browser emits this statement when the user scrolls to the next or previous page\n and the transition takes less than 50 milliseconds.\n\n Attributes:\n event (json): See TextbookPdfPageScrolledEventField.\n event_type (str): Consists of the value `textbook.pdf.page.scrolled`.\n name (str): Consists of the value `textbook.pdf.page.scrolled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.page.scrolled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfPageScrolledEventField\n ],\n TextbookPdfPageScrolledEventField,\n ]\n event_type: Literal[\"textbook.pdf.page.scrolled\"]\n name: Literal[\"textbook.pdf.page.scrolled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfSearchCaseSensitivityToggled","title":" UITextbookPdfSearchCaseSensitivityToggled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.searchcasesensitivity.toggled
statement.
The browser emits this statement when a user selects or clears the Match Case option.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfSearchCaseSensitivityToggledEventField.
event_type
str
Consists of the value textbook.pdf.searchcasesensitivity.toggled
.
name
str
Consists of the value textbook.pdf.searchcasesensitivity.toggled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfSearchCaseSensitivityToggled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.searchcasesensitivity.toggled` statement.\n\n The browser emits this statement when a user selects or clears the\n <kbd>Match Case</kbd> option.\n\n Attributes:\n event (json): See TextbookPdfSearchCaseSensitivityToggledEventField.\n event_type (str): Consists of the value\n `textbook.pdf.searchcasesensitivity.toggled`.\n name (str): Consists of the value `textbook.pdf.searchcasesensitivity.toggled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.searchcasesensitivity.toggled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfSearchCaseSensitivityToggledEventField\n ],\n TextbookPdfSearchCaseSensitivityToggledEventField,\n ]\n event_type: Literal[\"textbook.pdf.searchcasesensitivity.toggled\"]\n name: Literal[\"textbook.pdf.searchcasesensitivity.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfSearchExecuted","title":" UITextbookPdfSearchExecuted (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.executed
statement.
The browser emits this statement when a user searches for a text value in the file.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfSearchExecutedEventField.
event_type
str
Consists of the value textbook.pdf.search.executed
.
name
str
Consists of the value textbook.pdf.search.executed
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfSearchExecuted(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.search.executed` statement.\n\n The browser emits this statement when a user searches for a text value in the file.\n\n Attributes:\n event (json): See TextbookPdfSearchExecutedEventField.\n event_type (str): Consists of the value `textbook.pdf.search.executed`.\n name (str): Consists of the value `textbook.pdf.search.executed`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.search.executed\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfSearchExecutedEventField\n ],\n TextbookPdfSearchExecutedEventField,\n ]\n event_type: Literal[\"textbook.pdf.search.executed\"]\n name: Literal[\"textbook.pdf.search.executed\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfSearchHighlightToggled","title":" UITextbookPdfSearchHighlightToggled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.highlight.toggled
statement.
The browser emits this statement when a user selects or clears the Highlight All option.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfSearchHighlightToggledEventField.
event_type
str
Consists of the value textbook.pdf.search.highlight.toggled
.
name
str
Consists of the value textbook.pdf.search.highlight.toggled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfSearchHighlightToggled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.search.highlight.toggled` statement.\n\n The browser emits this statement when a user selects or clears the\n <kbd>Highlight All</kbd> option.\n\n Attributes:\n event (json): See TextbookPdfSearchHighlightToggledEventField.\n event_type (str): Consists of the value `textbook.pdf.search.highlight.toggled`.\n name (str): Consists of the value `textbook.pdf.search.highlight.toggled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.search.highlight.toggled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfSearchHighlightToggledEventField\n ],\n TextbookPdfSearchHighlightToggledEventField,\n ]\n event_type: Literal[\"textbook.pdf.search.highlight.toggled\"]\n name: Literal[\"textbook.pdf.search.highlight.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfSearchNavigatedNext","title":" UITextbookPdfSearchNavigatedNext (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.search.navigatednext
statement.
The browser emits this statement when a user clicks on the Find Next or Find Previous icons for an entered search string.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfSearchNavigatedNextEventField.
event_type
str
Consists of the value textbook.pdf.search.navigatednext
.
name
str
Consists of the value textbook.pdf.search.navigatednext
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfSearchNavigatedNext(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.search.navigatednext` statement.\n\n The browser emits this statement when a user clicks on the <kbd>Find Next</kbd> or\n <kbd>Find Previous</kbd> icons for an entered search string.\n\n Attributes:\n event (json): See TextbookPdfSearchNavigatedNextEventField.\n event_type (str): Consists of the value `textbook.pdf.search.navigatednext`.\n name (str): Consists of the value `textbook.pdf.search.navigatednext`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.search.navigatednext\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfSearchNavigatedNextEventField\n ],\n TextbookPdfSearchNavigatedNextEventField,\n ]\n event_type: Literal[\"textbook.pdf.search.navigatednext\"]\n name: Literal[\"textbook.pdf.search.navigatednext\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfThumbnailNavigated","title":" UITextbookPdfThumbnailNavigated (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.thumbnail.navigated
statement.
The browser emits this statement when a user clicks on a thumbnail image to navigate to a page.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfThumbnailNavigatedEventField.
event_type
str
Consists of the value textbook.pdf.thumbnail.navigated
.
name
str
Consists of the value textbook.pdf.thumbnail.navigated
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfThumbnailNavigated(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.thumbnail.navigated` statement.\n\n The browser emits this statement when a user clicks on a thumbnail image to\n navigate to a page.\n\n Attributes:\n event (json): See TextbookPdfThumbnailNavigatedEventField.\n event_type (str): Consists of the value `textbook.pdf.thumbnail.navigated`.\n name (str): Consists of the value `textbook.pdf.thumbnail.navigated`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.thumbnail.navigated\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfThumbnailNavigatedEventField\n ],\n TextbookPdfThumbnailNavigatedEventField,\n ]\n event_type: Literal[\"textbook.pdf.thumbnail.navigated\"]\n name: Literal[\"textbook.pdf.thumbnail.navigated\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfThumbnailsToggled","title":" UITextbookPdfThumbnailsToggled (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.thumbnails.toggled
statement.
The browser emits this statement when a user clicks on the icon to show or hide page thumbnails.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfThumbnailsToggledEventField.
event_type
str
Consists of the value textbook.pdf.thumbnails.toggled
.
name
str
Consists of the value textbook.pdf.thumbnails.toggled
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfThumbnailsToggled(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.thumbnails.toggled` statement.\n\n The browser emits this statement when a user clicks on the icon to show or hide\n page thumbnails.\n\n Attributes:\n event (json): See TextbookPdfThumbnailsToggledEventField.\n event_type (str): Consists of the value `textbook.pdf.thumbnails.toggled`.\n name (str): Consists of the value `textbook.pdf.thumbnails.toggled`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.thumbnails.toggled\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfThumbnailsToggledEventField\n ],\n TextbookPdfThumbnailsToggledEventField,\n ]\n event_type: Literal[\"textbook.pdf.thumbnails.toggled\"]\n name: Literal[\"textbook.pdf.thumbnails.toggled\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfZoomButtonsChanged","title":" UITextbookPdfZoomButtonsChanged (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.zoom.buttons.changed
statement.
The browser emits this statement when a user clicks either the Zoom In or Zoom Out icon.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfZoomButtonsChangedEventField.
event_type
str
Consists of the value textbook.pdf.zoom.buttons.changed
.
name
str
Consists of the value textbook.pdf.zoom.buttons.changed
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfZoomButtonsChanged(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.zoom.buttons.changed` statement.\n\n The browser emits this statement when a user clicks either the <kbd>Zoom In</kbd>\n or <kbd>Zoom Out</kbd> icon.\n\n Attributes:\n event (json): See TextbookPdfZoomButtonsChangedEventField.\n event_type (str): Consists of the value `textbook.pdf.zoom.buttons.changed`.\n name (str): Consists of the value `textbook.pdf.zoom.buttons.changed`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.zoom.buttons.changed\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfZoomButtonsChangedEventField\n ],\n TextbookPdfZoomButtonsChangedEventField,\n ]\n event_type: Literal[\"textbook.pdf.zoom.buttons.changed\"]\n name: Literal[\"textbook.pdf.zoom.buttons.changed\"]\n
"},{"location":"models/edx/#ralph.models.edx.textbook_interaction.statements.UITextbookPdfZoomMenuChanged","title":" UITextbookPdfZoomMenuChanged (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for textbook.pdf.zoom.menu.changed
statement.
The browser emits this statement when a user selects a magnification setting.
Attributes:
Name Type Descriptionevent
json
See TextbookPdfZoomMenuChangedEventField.
event_type
str
Consists of the value textbook.pdf.zoom.menu.changed
.
name
str
Consists of the value textbook.pdf.zoom.menu.changed
.
ralph/models/edx/textbook_interaction/statements.py
class UITextbookPdfZoomMenuChanged(BaseBrowserModel):\n \"\"\"Pydantic model for `textbook.pdf.zoom.menu.changed` statement.\n\n The browser emits this statement when a user selects a magnification setting.\n\n Attributes:\n event (json): See TextbookPdfZoomMenuChangedEventField.\n event_type (str): Consists of the value `textbook.pdf.zoom.menu.changed`.\n name (str): Consists of the value `textbook.pdf.zoom.menu.changed`.\n \"\"\"\n\n __selector__ = selector(\n event_source=\"browser\", event_type=\"textbook.pdf.zoom.menu.changed\"\n )\n\n event: Union[\n Json[ # pylint: disable=unsubscriptable-object\n TextbookPdfZoomMenuChangedEventField\n ],\n TextbookPdfZoomMenuChangedEventField,\n ]\n event_type: Literal[\"textbook.pdf.zoom.menu.changed\"]\n name: Literal[\"textbook.pdf.zoom.menu.changed\"]\n
"},{"location":"models/edx/#ralph.models.edx.video","title":"video
special
","text":""},{"location":"models/edx/#ralph.models.edx.video.fields","title":"fields
special
","text":""},{"location":"models/edx/#ralph.models.edx.video.fields.events","title":"events
","text":"Video event fields definitions.
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.PauseVideoEventField","title":" PauseVideoEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for pause_video
.event
.
Attributes:
Name Type DescriptioncurrentTime
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class PauseVideoEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `pause_video`.`event`.\n\n Attributes:\n currentTime (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n currentTime: float\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.PlayVideoEventField","title":" PlayVideoEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for play_video
.event
field.
Attributes:
Name Type DescriptioncurrentTime
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class PlayVideoEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `play_video`.`event` field.\n\n Attributes:\n currentTime (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n currentTime: float\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.SeekVideoEventField","title":" SeekVideoEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for seek_video
.event
field.
Attributes:
Name Type Descriptionnew_time
float
Consists of the point in time the actor changed to in a media object during a seek operation.
old_time
float
Consists of the point in time the actor changed from in a media object during a seek operation.
type
str
Consists of the navigational method used to change position within the video, either onCaptionSeek
or onSlideSeek
value.
ralph/models/edx/video/fields/events.py
class SeekVideoEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `seek_video`.`event` field.\n\n Attributes:\n new_time (float): Consists of the point in time the actor changed to in a media\n object during a seek operation.\n old_time (float): Consists of the point in time the actor changed from in a\n media object during a seek operation.\n type (str): Consists of the navigational method used to change position\n within the video, either `onCaptionSeek` or `onSlideSeek` value.\n \"\"\"\n\n new_time: float\n old_time: float\n type: str\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.SpeedChangeVideoEventField","title":" SpeedChangeVideoEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for speed_change_video
.event
field.
Attributes:
Name Type DescriptioncurrentTime
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class SpeedChangeVideoEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `speed_change_video`.`event` field.\n\n Attributes:\n currentTime (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n currentTime: float\n new_speed: Literal[\"0.75\", \"1.0\", \"1.25\", \"1.50\", \"2.0\"]\n old_speed: Literal[\"0.75\", \"1.0\", \"1.25\", \"1.50\", \"2.0\"]\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.StopVideoEventField","title":" StopVideoEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for stop_video
.event
field.
Attributes:
Name Type DescriptioncurrentTime
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class StopVideoEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `stop_video`.`event` field.\n\n Attributes:\n currentTime (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n currentTime: float\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.VideoBaseEventField","title":" VideoBaseEventField (AbstractBaseEventField)
pydantic-model
","text":"Pydantic model for video core event
field.
Attributes:
Name Type Descriptioncode
str
Consists of the html5
value for browser-played videos.
id
str
Consists of the additional videos name if given by the course creators, or the system-generated hash code otherwise.
Source code inralph/models/edx/video/fields/events.py
class VideoBaseEventField(AbstractBaseEventField):\n \"\"\"Pydantic model for video core `event` field.\n\n Attributes:\n code (str): Consists of the `html5` value for browser-played\n videos.\n id (str): Consists of the additional videos name if given by the\n course creators, or the system-generated hash code otherwise.\n \"\"\"\n\n class Config: # pylint: disable=missing-class-docstring # noqa: D106\n extra = \"allow\"\n\n code: str\n id: str\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.VideoHideTranscriptEventField","title":" VideoHideTranscriptEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for hide_transcript
.event
field.
Attributes:
Name Type Descriptioncurrent_time
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class VideoHideTranscriptEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `hide_transcript`.`event` field.\n\n Attributes:\n current_time (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n current_time: float\n
"},{"location":"models/edx/#ralph.models.edx.video.fields.events.VideoShowTranscriptEventField","title":" VideoShowTranscriptEventField (VideoBaseEventField)
pydantic-model
","text":"Pydantic model for show_transcript
.event
field.
Attributes:
Name Type Descriptioncurrent_time
float
Consists of the time in the video at which the statement was emitted.
Source code inralph/models/edx/video/fields/events.py
class VideoShowTranscriptEventField(VideoBaseEventField):\n \"\"\"Pydantic model for `show_transcript`.`event` field.\n\n Attributes:\n current_time (float): Consists of the time in the video at which\n the statement was emitted.\n \"\"\"\n\n current_time: float\n
"},{"location":"models/edx/#ralph.models.edx.video.statements","title":"statements
","text":"Video event model definitions.
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIHideTranscript","title":" UIHideTranscript (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for hide_transcript
statement.
The browser emits this statement when a user selects CC to suppress display of the video transcript.
Attributes:
Name Type Descriptionevent
VideoTranscriptEventField
See VideoTranscriptEventField.
event_type
str
Consists of the value hide_transcript
.
name
str
Consists either of the value hide_transcript
or edx.video.transcript.hidden
.
ralph/models/edx/video/statements.py
class UIHideTranscript(BaseBrowserModel):\n \"\"\"Pydantic model for `hide_transcript` statement.\n\n The browser emits this statement when a user selects <kbd>CC</kbd> to suppress\n display of the video transcript.\n\n Attributes:\n event (VideoTranscriptEventField): See VideoTranscriptEventField.\n event_type (str): Consists of the value `hide_transcript`.\n name (str): Consists either of the value `hide_transcript` or\n `edx.video.transcript.hidden`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"hide_transcript\")\n\n event: Union[\n Json[VideoHideTranscriptEventField], # pylint: disable=unsubscriptable-object\n VideoHideTranscriptEventField,\n ]\n event_type: Literal[\"hide_transcript\"]\n name: Literal[\"hide_transcript\", \"edx.video.transcript.hidden\"]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UILoadVideo","title":" UILoadVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for load_video
statement.
The browser emits this statement when the video is fully rendered and ready to play.
Attributes:
Name Type Descriptionevent
VideoBaseEventField
See VideoBaseEventField.
event_type
str
Consists of the value load_video
.
name
str
Consists either of the value load_video
or edx.video.loaded
.
ralph/models/edx/video/statements.py
class UILoadVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `load_video` statement.\n\n The browser emits this statement when the video is fully rendered and ready to\n play.\n\n Attributes:\n event (VideoBaseEventField): See VideoBaseEventField.\n event_type (str): Consists of the value `load_video`.\n name (str): Consists either of the value `load_video` or `edx.video.loaded`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"load_video\")\n\n event: Union[\n Json[VideoBaseEventField], # pylint: disable=unsubscriptable-object\n VideoBaseEventField,\n ]\n event_type: Literal[\"load_video\"]\n name: Literal[\"load_video\", \"edx.video.loaded\"]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIPauseVideo","title":" UIPauseVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for pause_video
statement.
The browser emits this statement when a user selects the video player\u2019s pause control.
Attributes:
Name Type Descriptionevent
PauseVideoEventField
See PauseVideoEventField.
event_type
str
Consists of the value pause_video
.
name
str
Consists either of the value pause_video
or edx.video.paused
.
ralph/models/edx/video/statements.py
class UIPauseVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `pause_video` statement.\n\n The browser emits this statement when a user selects the video player's pause\n control.\n\n Attributes:\n event (PauseVideoEventField): See PauseVideoEventField.\n event_type (str): Consists of the value `pause_video`.\n name (str): Consists either of the value `pause_video` or `edx.video.paused`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"pause_video\")\n\n event: Union[\n Json[PauseVideoEventField], # pylint: disable=unsubscriptable-object\n PauseVideoEventField,\n ]\n event_type: Literal[\"pause_video\"]\n name: Optional[Literal[\"pause_video\", \"edx.video.paused\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIPlayVideo","title":" UIPlayVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for play_video
statement.
The browser emits this statement when a user selects the video player\u2019s play control.
Attributes:
Name Type Descriptionevent
PlayVideoEventField
See PlayVideoEventField.
event_type
str
Consists of the value play_video
.
name
str
Consists either of the value play_video
or edx.video.played
.
ralph/models/edx/video/statements.py
class UIPlayVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `play_video` statement.\n\n The browser emits this statement when a user selects the video player's play\n control.\n\n Attributes:\n event (PlayVideoEventField): See PlayVideoEventField.\n event_type (str): Consists of the value `play_video`.\n name (str): Consists either of the value `play_video` or `edx.video.played`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"play_video\")\n\n event: Union[\n Json[PlayVideoEventField], # pylint: disable=unsubscriptable-object\n PlayVideoEventField,\n ]\n event_type: Literal[\"play_video\"]\n name: Optional[Literal[\"play_video\", \"edx.video.played\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UISeekVideo","title":" UISeekVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for seek_video
statement.
The browser emits this statement when a user selects a user interface control to go to a different point in the video file.
Attributes:
Name Type Descriptionevent
SeekVideoEventField
See SeekVideoEventField.
event_type
str
Consists of the value seek_video
.
name
str
Consists either of the value seek_video
or edx.video.position.changed
.
ralph/models/edx/video/statements.py
class UISeekVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `seek_video` statement.\n\n The browser emits this statement when a user selects a user interface control to go\n to a different point in the video file.\n\n Attributes:\n event (SeekVideoEventField): See SeekVideoEventField.\n event_type (str): Consists of the value `seek_video`.\n name (str): Consists either of the value `seek_video` or\n `edx.video.position.changed`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"seek_video\")\n\n event: Union[\n Json[SeekVideoEventField], # pylint: disable=unsubscriptable-object\n SeekVideoEventField,\n ]\n event_type: Literal[\"seek_video\"]\n name: Optional[Literal[\"seek_video\", \"edx.video.position.changed\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIShowTranscript","title":" UIShowTranscript (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for show_transcript
statement.
The browser emits this statement when a user selects CC to display the video transcript.
Attributes:
Name Type Descriptionevent
VideoTranscriptEventField
See VideoTranscriptEventField.
event_type
str
Consists of the value show_transcript
.
name
str
Consists either of the value show_transcript
or edx.video.transcript.shown
.
ralph/models/edx/video/statements.py
class UIShowTranscript(BaseBrowserModel):\n \"\"\"Pydantic model for `show_transcript` statement.\n\n The browser emits this statement when a user selects <kbd>CC</kbd> to display the\n video transcript.\n\n Attributes:\n event (VideoTranscriptEventField): See VideoTranscriptEventField.\n event_type (str): Consists of the value `show_transcript`.\n name (str): Consists either of the value `show_transcript` or\n `edx.video.transcript.shown`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"show_transcript\")\n\n event: Union[\n Json[VideoShowTranscriptEventField], # pylint: disable=unsubscriptable-object\n VideoShowTranscriptEventField,\n ]\n event_type: Literal[\"show_transcript\"]\n name: Literal[\"show_transcript\", \"edx.video.transcript.shown\"]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UISpeedChangeVideo","title":" UISpeedChangeVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for speed_change_video
statement.
The browser emits this statement when a user selects a different playing speed for the video.
Attributes:
Name Type Descriptionevent
SpeedChangeVideoEventField
See SpeedChangeVideoEventField.
event_type
str
Consists of the value speed_change_video
.
ralph/models/edx/video/statements.py
class UISpeedChangeVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `speed_change_video` statement.\n\n The browser emits this statement when a user selects a different playing speed for\n the video.\n\n Attributes:\n event (SpeedChangeVideoEventField): See SpeedChangeVideoEventField.\n event_type (str): Consists of the value `speed_change_video`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"speed_change_video\")\n\n event: Union[\n Json[SpeedChangeVideoEventField], # pylint: disable=unsubscriptable-object\n SpeedChangeVideoEventField,\n ]\n event_type: Literal[\"speed_change_video\"]\n name: Optional[Literal[\"speed_change_video\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIStopVideo","title":" UIStopVideo (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for stop_video
statement.
The browser emits this statement when the video player reaches the end of the video file and play automatically stops.
Attributes:
Name Type Descriptionevent
StopVideoEventField
See StopVideoEventField.
event_type
str
Consists of the value stop_video
.
name
str
Consists either of the value stop_video
or edx.video.stopped
.
ralph/models/edx/video/statements.py
class UIStopVideo(BaseBrowserModel):\n \"\"\"Pydantic model for `stop_video` statement.\n\n The browser emits this statement when the video player reaches the end of the video\n file and play automatically stops.\n\n Attributes:\n event (StopVideoEventField): See StopVideoEventField.\n event_type (str): Consists of the value `stop_video`.\n name (str): Consists either of the value `stop_video` or `edx.video.stopped`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"stop_video\")\n\n event: Union[\n Json[StopVideoEventField], # pylint: disable=unsubscriptable-object\n StopVideoEventField,\n ]\n event_type: Literal[\"stop_video\"]\n name: Optional[Literal[\"stop_video\", \"edx.video.stopped\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIVideoHideCCMenu","title":" UIVideoHideCCMenu (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for video_hide_cc_menu
statement.
The browser emits this statement when a user selects a language from the CC menu for a video that has transcripts in multiple languages
Attributes:
Name Type Descriptionevent
VideoBaseEventField
See VideoBaseEventField.
event_type
str
Consists of the value video_hide_cc_menu
.
ralph/models/edx/video/statements.py
class UIVideoHideCCMenu(BaseBrowserModel):\n \"\"\"Pydantic model for `video_hide_cc_menu` statement.\n\n The browser emits this statement when a user selects a language from the CC menu\n for a video that has transcripts in multiple languages\n\n Attributes:\n event (VideoBaseEventField): See VideoBaseEventField.\n event_type (str): Consists of the value `video_hide_cc_menu`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"video_hide_cc_menu\")\n\n event: Union[\n Json[VideoBaseEventField], # pylint: disable=unsubscriptable-object\n VideoBaseEventField,\n ]\n event_type: Literal[\"video_hide_cc_menu\"]\n name: Optional[Literal[\"video_hide_cc_menu\"]]\n
"},{"location":"models/edx/#ralph.models.edx.video.statements.UIVideoShowCCMenu","title":" UIVideoShowCCMenu (BaseBrowserModel)
pydantic-model
","text":"Pydantic model for video_show_cc_menu
statement.
The browser emits this statement when a user selects CC for a video that has transcripts in multiple languages.
Note: This statement is emitted in addition to the show_transcript event.
Attributes:
Name Type Descriptionevent
VideoBaseEventField
See VideoBaseEventField.
event_type
str
Consists of the value video_show_cc_menu
.
ralph/models/edx/video/statements.py
class UIVideoShowCCMenu(BaseBrowserModel):\n \"\"\"Pydantic model for `video_show_cc_menu` statement.\n\n The browser emits this statement when a user selects CC for a video that has\n transcripts in multiple languages.\n\n Note: This statement is emitted in addition to the show_transcript event.\n\n Attributes:\n event (VideoBaseEventField): See VideoBaseEventField.\n event_type (str): Consists of the value `video_show_cc_menu`.\n \"\"\"\n\n __selector__ = selector(event_source=\"browser\", event_type=\"video_show_cc_menu\")\n\n event: Union[\n Json[VideoBaseEventField], # pylint: disable=unsubscriptable-object\n VideoBaseEventField,\n ]\n event_type: Literal[\"video_show_cc_menu\"]\n name: Optional[Literal[\"video_show_cc_menu\"]]\n
"},{"location":"models/xapi/","title":"xAPI events","text":"xAPI pydantic models.
"},{"location":"models/xapi/#ralph.models.xapi.base","title":"base
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.base.agents","title":"agents
","text":"Base xAPI Agent
definitions.
BaseXapiAgentAccount (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for Agent
type account
property.
Attributes:
Name Type DescriptionhomePage
IRI
Consists of the home page of the account\u2019s service provider.
name
str
Consists of the unique id or name of the Actor\u2019s account.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentAccount(BaseModelWithConfig):\n \"\"\"Pydantic model for `Agent` type `account` property.\n\n Attributes:\n homePage (IRI): Consists of the home page of the account's service provider.\n name (str): Consists of the unique id or name of the Actor's account.\n \"\"\"\n\n homePage: IRI\n name: StrictStr\n
"},{"location":"models/xapi/#ralph.models.xapi.base.agents.BaseXapiAgentCommonProperties","title":" BaseXapiAgentCommonProperties (BaseModelWithConfig, ABC)
pydantic-model
","text":"Pydantic model for core Agent
type property.
It defines who performed the action.
Attributes:
Name Type DescriptionobjectType
str
Consists of the value Agent
.
name
str
Consists of the full name of the Agent.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentCommonProperties(BaseModelWithConfig, ABC):\n \"\"\"Pydantic model for core `Agent` type property.\n\n It defines who performed the action.\n\n Attributes:\n objectType (str): Consists of the value `Agent`.\n name (str): Consists of the full name of the Agent.\n \"\"\"\n\n objectType: Optional[Literal[\"Agent\"]]\n name: Optional[StrictStr]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.agents.BaseXapiAgentWithAccount","title":" BaseXapiAgentWithAccount (BaseXapiAgentCommonProperties, BaseXapiAccountIFI)
pydantic-model
","text":"Pydantic model for Agent
type property.
It is defined for agent type with an account IFI.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentWithAccount(BaseXapiAgentCommonProperties, BaseXapiAccountIFI):\n \"\"\"Pydantic model for `Agent` type property.\n\n It is defined for agent type with an account IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.agents.BaseXapiAgentWithMbox","title":" BaseXapiAgentWithMbox (BaseXapiAgentCommonProperties, BaseXapiMboxIFI)
pydantic-model
","text":"Pydantic model for Agent
type property.
It is defined for agent type with a mailto IFI.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentWithMbox(BaseXapiAgentCommonProperties, BaseXapiMboxIFI):\n \"\"\"Pydantic model for `Agent` type property.\n\n It is defined for agent type with a mailto IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.agents.BaseXapiAgentWithMboxSha1Sum","title":" BaseXapiAgentWithMboxSha1Sum (BaseXapiAgentCommonProperties, BaseXapiMboxSha1SumIFI)
pydantic-model
","text":"Pydantic model for Agent
type property.
It is defined for agent type with a hash IFI.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentWithMboxSha1Sum(\n BaseXapiAgentCommonProperties, BaseXapiMboxSha1SumIFI\n):\n \"\"\"Pydantic model for `Agent` type property.\n\n It is defined for agent type with a hash IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.agents.BaseXapiAgentWithOpenId","title":" BaseXapiAgentWithOpenId (BaseXapiAgentCommonProperties, BaseXapiOpenIdIFI)
pydantic-model
","text":"Pydantic model for Agent
type property.
It is defined for agent type with an openID IFI.
Source code inralph/models/xapi/base/agents.py
class BaseXapiAgentWithOpenId(BaseXapiAgentCommonProperties, BaseXapiOpenIdIFI):\n \"\"\"Pydantic model for `Agent` type property.\n\n It is defined for agent type with an openID IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.attachments","title":"attachments
","text":"Base xAPI Attachments
definitions.
BaseXapiAttachment (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for attachment
property.
Attributes:
Name Type DescriptionusageType
IRI
Identifies the usage of this Attachment.
display
LanguageMap
Consists of the Attachment\u2019s title.
description
LanguageMap
Consists of the Attachment\u2019s description.
contentType
str
Consists of the Attachment\u2019s content type.
length
int
Consists of the length of the Attachment\u2019s data in octets.
sha2
str
Consists of the SHA-2 hash of the Attachment data.
fileUrl
URL
Consists of the URL from which the Attachment can be retrieved.
Source code inralph/models/xapi/base/attachments.py
class BaseXapiAttachment(BaseModelWithConfig):\n \"\"\"Pydantic model for `attachment` property.\n\n Attributes:\n usageType (IRI): Identifies the usage of this Attachment.\n display (LanguageMap): Consists of the Attachment's title.\n description (LanguageMap): Consists of the Attachment's description.\n contentType (str): Consists of the Attachment's content type.\n length (int): Consists of the length of the Attachment's data in octets.\n sha2 (str): Consists of the SHA-2 hash of the Attachment data.\n fileUrl (URL): Consists of the URL from which the Attachment can be retrieved.\n \"\"\"\n\n usageType: IRI\n display: LanguageMap\n description: Optional[LanguageMap]\n contentType: str\n length: int\n sha2: str\n fileUrl: Optional[AnyUrl]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.common","title":"common
","text":"Common for xAPI base definitions.
"},{"location":"models/xapi/#ralph.models.xapi.base.common.IRI","title":" IRI (str)
","text":"Pydantic custom data type validating RFC 3987 IRIs.
Source code inralph/models/xapi/base/common.py
class IRI(str):\n \"\"\"Pydantic custom data type validating RFC 3987 IRIs.\"\"\"\n\n @classmethod\n def __get_validators__(cls): # noqa: D105\n def validate(iri: str):\n \"\"\"Check whether the provided IRI is a valid RFC 3987 IRI.\"\"\"\n parse(iri, rule=\"IRI\")\n return cls(iri)\n\n yield validate\n
"},{"location":"models/xapi/#ralph.models.xapi.base.common.LanguageTag","title":" LanguageTag (str)
","text":"Pydantic custom data type validating RFC 5646 Language tags.
Source code inralph/models/xapi/base/common.py
class LanguageTag(str):\n \"\"\"Pydantic custom data type validating RFC 5646 Language tags.\"\"\"\n\n @classmethod\n def __get_validators__(cls): # noqa: D105\n def validate(tag: str):\n \"\"\"Check whether the provided tag is a valid RFC 5646 Language tag.\"\"\"\n if not tag_is_valid(tag):\n raise TypeError(\"Invalid RFC 5646 Language tag\")\n return cls(tag)\n\n yield validate\n
"},{"location":"models/xapi/#ralph.models.xapi.base.common.MailtoEmail","title":" MailtoEmail (str)
","text":"Pydantic custom data type validating mailto:email
format.
ralph/models/xapi/base/common.py
class MailtoEmail(str):\n \"\"\"Pydantic custom data type validating `mailto:email` format.\"\"\"\n\n @classmethod\n def __get_validators__(cls): # noqa: D105\n def validate(mailto: str):\n \"\"\"Check whether the provided value follows the `mailto:email` format.\"\"\"\n if not mailto.startswith(\"mailto:\"):\n raise TypeError(\"Invalid `mailto:email` value\")\n valid = validate_email(mailto[7:])\n return cls(f\"mailto:{valid[1]}\")\n\n yield validate\n
"},{"location":"models/xapi/#ralph.models.xapi.base.contexts","title":"contexts
","text":"Base xAPI Context
definitions.
BaseXapiContext (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for context
property.
Attributes:
Name Type Descriptionregistration
UUID
The registration that the Statement is associated with.
instructor
dict
The instructor that the Statement relates to.
team
dict
The team that this Statement relates to.
contextActivities
dict
See BaseXapiContextContextActivities.
revision
str
The revision of the activity associated with this Statement.
platform
str
The platform where the learning activity took place.
language
dict
The language in which the experience occurred.
statement
dict
Another Statement giving context for this Statement.
extensions
dict
Consists of a dictionary of other properties as needed.
Source code inralph/models/xapi/base/contexts.py
class BaseXapiContext(BaseModelWithConfig):\n \"\"\"Pydantic model for `context` property.\n\n Attributes:\n registration (UUID): The registration that the Statement is associated with.\n instructor (dict): The instructor that the Statement relates to.\n team (dict): The team that this Statement relates to.\n contextActivities (dict): See BaseXapiContextContextActivities.\n revision (str): The revision of the activity associated with this Statement.\n platform (str): The platform where the learning activity took place.\n language (dict): The language in which the experience occurred.\n statement (dict): Another Statement giving context for this Statement.\n extensions (dict): Consists of a dictionary of other properties as needed.\n \"\"\"\n\n registration: Optional[UUID]\n instructor: Optional[BaseXapiAgent]\n team: Optional[BaseXapiGroup]\n contextActivities: Optional[BaseXapiContextContextActivities]\n revision: Optional[StrictStr]\n platform: Optional[StrictStr]\n language: Optional[LanguageTag]\n statement: Optional[BaseXapiStatementRef]\n extensions: Optional[Dict[IRI, Union[str, int, bool, list, dict, None]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.contexts.BaseXapiContextContextActivities","title":" BaseXapiContextContextActivities (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for context contextActivities
property.
Attributes:
Name Type Descriptionparent
dict or list
An Activity with a direct relation to the statement\u2019s Activity.
grouping
dict or list
An Activity with an indirect relation to the statement\u2019s Activity.
category
dict or list
An Activity used to categorize the Statement.
other
dict or list
A contextActivity that doesn\u2019t fit one of the other properties.
Source code inralph/models/xapi/base/contexts.py
class BaseXapiContextContextActivities(BaseModelWithConfig):\n \"\"\"Pydantic model for context `contextActivities` property.\n\n Attributes:\n parent (dict or list): An Activity with a direct relation to the statement's\n Activity.\n grouping (dict or list): An Activity with an indirect relation to the\n statement's Activity.\n category (dict or list): An Activity used to categorize the Statement.\n other (dict or list): A contextActivity that doesn't fit one of the other\n properties.\n \"\"\"\n\n parent: Optional[Union[BaseXapiActivity, List[BaseXapiActivity]]]\n grouping: Optional[Union[BaseXapiActivity, List[BaseXapiActivity]]]\n category: Optional[Union[BaseXapiActivity, List[BaseXapiActivity]]]\n other: Optional[Union[BaseXapiActivity, List[BaseXapiActivity]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups","title":"groups
","text":"Base xAPI Group
definitions.
BaseXapiAnonymousGroup (BaseXapiGroupCommonProperties)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for Anonymous Group type.
Attributes:
Name Type Descriptionmember
list
Consist of a list of the members of this Group.
Source code inralph/models/xapi/base/groups.py
class BaseXapiAnonymousGroup(BaseXapiGroupCommonProperties):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for Anonymous Group type.\n\n Attributes:\n member (list): Consist of a list of the members of this Group.\n \"\"\"\n\n member: List[BaseXapiAgent]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiGroupCommonProperties","title":" BaseXapiGroupCommonProperties (BaseModelWithConfig, ABC)
pydantic-model
","text":"Pydantic model for core Group
type property.
It is defined for the Group which performed the action.
Attributes:
Name Type DescriptionobjectType
str
Consists of the value Group
.
name
str
Consists of the full name of the Group.
Source code inralph/models/xapi/base/groups.py
class BaseXapiGroupCommonProperties(BaseModelWithConfig, ABC):\n \"\"\"Pydantic model for core `Group` type property.\n\n It is defined for the Group which performed the action.\n\n Attributes:\n objectType (str): Consists of the value `Group`.\n name (str): Consists of the full name of the Group.\n \"\"\"\n\n objectType: Literal[\"Group\"]\n name: Optional[StrictStr]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiIdentifiedGroup","title":" BaseXapiIdentifiedGroup (BaseXapiGroupCommonProperties)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for Identified Group type.
Attributes:
Name Type Descriptionmember
list
Consist of a list of the members of this Group.
Source code inralph/models/xapi/base/groups.py
class BaseXapiIdentifiedGroup(BaseXapiGroupCommonProperties):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for Identified Group type.\n\n Attributes:\n member (list): Consist of a list of the members of this Group.\n \"\"\"\n\n member: Optional[List[BaseXapiAgent]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiIdentifiedGroupWithAccount","title":" BaseXapiIdentifiedGroupWithAccount (BaseXapiIdentifiedGroup, BaseXapiAccountIFI)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for group type with an account IFI.
Source code inralph/models/xapi/base/groups.py
class BaseXapiIdentifiedGroupWithAccount(BaseXapiIdentifiedGroup, BaseXapiAccountIFI):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for group type with an account IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiIdentifiedGroupWithMbox","title":" BaseXapiIdentifiedGroupWithMbox (BaseXapiIdentifiedGroup, BaseXapiMboxIFI)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for group type with a mailto IFI.
Source code inralph/models/xapi/base/groups.py
class BaseXapiIdentifiedGroupWithMbox(BaseXapiIdentifiedGroup, BaseXapiMboxIFI):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for group type with a mailto IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiIdentifiedGroupWithMboxSha1Sum","title":" BaseXapiIdentifiedGroupWithMboxSha1Sum (BaseXapiIdentifiedGroup, BaseXapiMboxSha1SumIFI)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for group type with a hash IFI.
Source code inralph/models/xapi/base/groups.py
class BaseXapiIdentifiedGroupWithMboxSha1Sum(\n BaseXapiIdentifiedGroup, BaseXapiMboxSha1SumIFI\n):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for group type with a hash IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.groups.BaseXapiIdentifiedGroupWithOpenId","title":" BaseXapiIdentifiedGroupWithOpenId (BaseXapiIdentifiedGroup, BaseXapiOpenIdIFI)
pydantic-model
","text":"Pydantic model for Group
type property.
It is defined for group type with an openID IFI.
Source code inralph/models/xapi/base/groups.py
class BaseXapiIdentifiedGroupWithOpenId(BaseXapiIdentifiedGroup, BaseXapiOpenIdIFI):\n \"\"\"Pydantic model for `Group` type property.\n\n It is defined for group type with an openID IFI.\n \"\"\"\n
"},{"location":"models/xapi/#ralph.models.xapi.base.ifi","title":"ifi
","text":"Base xAPI Inverse Functional Identifier
definitions.
BaseXapiAccount (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for IFI account
property.
Attributes:
Name Type DescriptionhomePage
IRI
Consists of the home page of the account\u2019s service provider.
name
str
Consists of the unique id or name of the Actor\u2019s account.
Source code inralph/models/xapi/base/ifi.py
class BaseXapiAccount(BaseModelWithConfig):\n \"\"\"Pydantic model for IFI `account` property.\n\n Attributes:\n homePage (IRI): Consists of the home page of the account's service provider.\n name (str): Consists of the unique id or name of the Actor's account.\n \"\"\"\n\n homePage: IRI\n name: StrictStr\n
"},{"location":"models/xapi/#ralph.models.xapi.base.ifi.BaseXapiAccountIFI","title":" BaseXapiAccountIFI (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for account Inverse Functional Identifier.
Attributes:
Name Type Descriptionaccount
dict
See BaseXapiAccount.
Source code inralph/models/xapi/base/ifi.py
class BaseXapiAccountIFI(BaseModelWithConfig):\n \"\"\"Pydantic model for account Inverse Functional Identifier.\n\n Attributes:\n account (dict): See BaseXapiAccount.\n \"\"\"\n\n account: BaseXapiAccount\n
"},{"location":"models/xapi/#ralph.models.xapi.base.ifi.BaseXapiMboxIFI","title":" BaseXapiMboxIFI (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for mailto Inverse Functional Identifier.
Attributes:
Name Type Descriptionmbox
MailtoEmail
Consists of the Agent\u2019s email address.
Source code inralph/models/xapi/base/ifi.py
class BaseXapiMboxIFI(BaseModelWithConfig):\n \"\"\"Pydantic model for mailto Inverse Functional Identifier.\n\n Attributes:\n mbox (MailtoEmail): Consists of the Agent's email address.\n \"\"\"\n\n mbox: MailtoEmail\n
"},{"location":"models/xapi/#ralph.models.xapi.base.ifi.BaseXapiMboxSha1SumIFI","title":" BaseXapiMboxSha1SumIFI (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for hash Inverse Functional Identifier.
Attributes:
Name Type Descriptionmbox_sha1sum
str
Consists of the SHA1 hash of the Agent\u2019s email address.
Source code inralph/models/xapi/base/ifi.py
class BaseXapiMboxSha1SumIFI(BaseModelWithConfig):\n \"\"\"Pydantic model for hash Inverse Functional Identifier.\n\n Attributes:\n mbox_sha1sum (str): Consists of the SHA1 hash of the Agent's email address.\n \"\"\"\n\n mbox_sha1sum: constr(regex=r\"^[0-9a-f]{40}$\") # noqa:F722\n
"},{"location":"models/xapi/#ralph.models.xapi.base.ifi.BaseXapiOpenIdIFI","title":" BaseXapiOpenIdIFI (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for OpenID Inverse Functional Identifier.
Attributes:
Name Type Descriptionopenid
URI
Consists of an openID that uniquely identifies the Agent.
Source code inralph/models/xapi/base/ifi.py
class BaseXapiOpenIdIFI(BaseModelWithConfig):\n \"\"\"Pydantic model for OpenID Inverse Functional Identifier.\n\n Attributes:\n openid (URI): Consists of an openID that uniquely identifies the Agent.\n \"\"\"\n\n openid: AnyUrl\n
"},{"location":"models/xapi/#ralph.models.xapi.base.objects","title":"objects
","text":"Base xAPI Object
definitions (2).
BaseXapiSubStatement (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for SubStatement
type property.
Attributes:
Name Type Descriptionactor
dict
See BaseXapiAgent and BaseXapiGroup.
verb
dict
See BaseXapiVerb.
object
dict
See BaseXapiUnnestedObject.
objectType
dict
Consists of the value SubStatement
.
ralph/models/xapi/base/objects.py
class BaseXapiSubStatement(BaseModelWithConfig):\n \"\"\"Pydantic model for `SubStatement` type property.\n\n Attributes:\n actor (dict): See BaseXapiAgent and BaseXapiGroup.\n verb (dict): See BaseXapiVerb.\n object (dict): See BaseXapiUnnestedObject.\n objectType (dict): Consists of the value `SubStatement`.\n \"\"\"\n\n actor: Union[BaseXapiAgent, BaseXapiGroup]\n verb: BaseXapiVerb\n object: BaseXapiUnnestedObject\n objectType: Literal[\"SubStatement\"]\n result: Optional[BaseXapiResult]\n context: Optional[BaseXapiContext]\n timestamp: Optional[datetime]\n attachments: Optional[List[BaseXapiAttachment]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.results","title":"results
","text":"Base xAPI Result
definitions.
BaseXapiResult (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for result
property.
Attributes:
Name Type Descriptionscore
dict
See BaseXapiResultScore.
success
bool
Indicates whether the attempt on the Activity was successful.
completion
bool
Indicates whether the Activity was completed.
response
str
Consists of the response for the given Activity.
duration
timedelta
Consists of the duration over which the Statement occurred.
extensions
dict
Consists of a dictionary of other properties as needed.
Source code inralph/models/xapi/base/results.py
class BaseXapiResult(BaseModelWithConfig):\n \"\"\"Pydantic model for `result` property.\n\n Attributes:\n score (dict): See BaseXapiResultScore.\n success (bool): Indicates whether the attempt on the Activity was successful.\n completion (bool): Indicates whether the Activity was completed.\n response (str): Consists of the response for the given Activity.\n duration (timedelta): Consists of the duration over which the Statement\n occurred.\n extensions (dict): Consists of a dictionary of other properties as needed.\n \"\"\"\n\n score: Optional[BaseXapiResultScore]\n success: Optional[StrictBool]\n completion: Optional[StrictBool]\n response: Optional[StrictStr]\n duration: Optional[timedelta]\n extensions: Optional[Dict[IRI, Union[str, int, bool, list, dict, None]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.results.BaseXapiResultScore","title":" BaseXapiResultScore (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for result score
property.
Attributes:
Name Type Descriptionscaled
int
Consists of the normalized score related to the experience.
raw
Decimal
Consists of the non-normalized score achieved by the Actor.
min
Decimal
Consists of the lowest possible score.
max
Decimal
Consists of the highest possible score.
Source code inralph/models/xapi/base/results.py
class BaseXapiResultScore(BaseModelWithConfig):\n \"\"\"Pydantic model for result `score` property.\n\n Attributes:\n scaled (int): Consists of the normalized score related to the experience.\n raw (Decimal): Consists of the non-normalized score achieved by the Actor.\n min (Decimal): Consists of the lowest possible score.\n max (Decimal): Consists of the highest possible score.\n \"\"\"\n\n scaled: Optional[conint(ge=-1, le=1)]\n raw: Optional[Decimal]\n min: Optional[Decimal]\n max: Optional[Decimal]\n\n @root_validator\n @classmethod\n def check_raw_min_max_relation(cls, values):\n \"\"\"Check the relationship `min < raw < max`.\"\"\"\n raw_value = values.get(\"raw\", None)\n min_value = values.get(\"min\", None)\n max_value = values.get(\"max\", None)\n\n if min_value:\n if max_value and min_value > max_value:\n raise ValueError(\"min cannot be greater than max\")\n if raw_value and min_value > raw_value:\n raise ValueError(\"min cannot be greater than raw\")\n if max_value:\n if raw_value and raw_value > max_value:\n raise ValueError(\"raw cannot be greater than max\")\n\n return values\n
"},{"location":"models/xapi/#ralph.models.xapi.base.results.BaseXapiResultScore.check_raw_min_max_relation","title":"check_raw_min_max_relation(values)
classmethod
","text":"Check the relationship min < raw < max
.
ralph/models/xapi/base/results.py
@root_validator\n@classmethod\ndef check_raw_min_max_relation(cls, values):\n \"\"\"Check the relationship `min < raw < max`.\"\"\"\n raw_value = values.get(\"raw\", None)\n min_value = values.get(\"min\", None)\n max_value = values.get(\"max\", None)\n\n if min_value:\n if max_value and min_value > max_value:\n raise ValueError(\"min cannot be greater than max\")\n if raw_value and min_value > raw_value:\n raise ValueError(\"min cannot be greater than raw\")\n if max_value:\n if raw_value and raw_value > max_value:\n raise ValueError(\"raw cannot be greater than max\")\n\n return values\n
"},{"location":"models/xapi/#ralph.models.xapi.base.statements","title":"statements
","text":"Base xAPI Statement
definitions.
BaseXapiStatement (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for base xAPI statements.
Attributes:
Name Type Descriptionid
UUID
Consists of a generated UUID string from the source event string.
actor
dict
Consists of a definition of who performed the action.
verb
dict
Consists of the action between an Actor and an Activity.
object
dict
Consists of a definition of the thing that was acted on.
result
dict
Consists of the outcome related to the Statement.
context
dict
Consists of contextual information for the Statement.
timestamp
datetime
Consists of the timestamp of when the event occurred.
stored
datetime
Consists of the timestamp of when the event was recorded.
authority
dict
Consists of the Actor asserting this Statement is true.
version
str
Consists of the associated xAPI version of the Statement.
attachments
list
Consists of a list of attachments.
Source code inralph/models/xapi/base/statements.py
class BaseXapiStatement(BaseModelWithConfig):\n \"\"\"Pydantic model for base xAPI statements.\n\n Attributes:\n id (UUID): Consists of a generated UUID string from the source event string.\n actor (dict): Consists of a definition of who performed the action.\n verb (dict): Consists of the action between an Actor and an Activity.\n object (dict): Consists of a definition of the thing that was acted on.\n result (dict): Consists of the outcome related to the Statement.\n context (dict): Consists of contextual information for the Statement.\n timestamp (datetime): Consists of the timestamp of when the event occurred.\n stored (datetime): Consists of the timestamp of when the event was recorded.\n authority (dict): Consists of the Actor asserting this Statement is true.\n version (str): Consists of the associated xAPI version of the Statement.\n attachments (list): Consists of a list of attachments.\n \"\"\"\n\n id: Optional[UUID]\n actor: Union[BaseXapiAgent, BaseXapiGroup]\n verb: BaseXapiVerb\n object: BaseXapiObject\n result: Optional[BaseXapiResult]\n context: Optional[BaseXapiContext]\n timestamp: Optional[datetime]\n stored: Optional[datetime]\n authority: Optional[Union[BaseXapiAgent, BaseXapiGroup]]\n version: constr(regex=r\"^1\\.0\\.[0-9]+$\") = \"1.0.0\" # noqa:F722\n attachments: Optional[List[BaseXapiAttachment]]\n\n @root_validator(pre=True)\n @classmethod\n def check_abscence_of_empty_and_invalid_values(cls, values):\n \"\"\"Check the model for empty and invalid values.\n\n Check that the `context` field contains `platform` and `revision` fields\n only if the `object.objectType` property is equal to `Activity`.\n \"\"\"\n for field, value in list(values.items()):\n if value in [None, \"\", {}]:\n raise ValueError(f\"{field}: invalid empty value\")\n if isinstance(value, dict) and field != \"extensions\":\n cls.check_abscence_of_empty_and_invalid_values(value)\n\n context = dict(values.get(\"context\", {}))\n if context:\n platform = context.get(\"platform\", {})\n revision = context.get(\"revision\", {})\n object_type = dict(values[\"object\"]).get(\"objectType\", \"Activity\")\n if (platform or revision) and object_type != \"Activity\":\n raise ValueError(\n \"revision and platform properties can only be used if the \"\n \"Statement's Object is an Activity\"\n )\n return values\n
"},{"location":"models/xapi/#ralph.models.xapi.base.statements.BaseXapiStatement.check_abscence_of_empty_and_invalid_values","title":"check_abscence_of_empty_and_invalid_values(values)
classmethod
","text":"Check the model for empty and invalid values.
Check that the context
field contains platform
and revision
fields only if the object.objectType
property is equal to Activity
.
ralph/models/xapi/base/statements.py
@root_validator(pre=True)\n@classmethod\ndef check_abscence_of_empty_and_invalid_values(cls, values):\n \"\"\"Check the model for empty and invalid values.\n\n Check that the `context` field contains `platform` and `revision` fields\n only if the `object.objectType` property is equal to `Activity`.\n \"\"\"\n for field, value in list(values.items()):\n if value in [None, \"\", {}]:\n raise ValueError(f\"{field}: invalid empty value\")\n if isinstance(value, dict) and field != \"extensions\":\n cls.check_abscence_of_empty_and_invalid_values(value)\n\n context = dict(values.get(\"context\", {}))\n if context:\n platform = context.get(\"platform\", {})\n revision = context.get(\"revision\", {})\n object_type = dict(values[\"object\"]).get(\"objectType\", \"Activity\")\n if (platform or revision) and object_type != \"Activity\":\n raise ValueError(\n \"revision and platform properties can only be used if the \"\n \"Statement's Object is an Activity\"\n )\n return values\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects","title":"unnested_objects
","text":"Base xAPI Object
definitions (1).
BaseXapiActivity (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for Activity
type property.
Attributes:
Name Type Descriptionid
IRI
Consists of an identifier for a single unique Activity.
objectType
str
Consists of the value Activity
.
definition
dict
See BaseXapiActivityDefinition and BaseXapiActivityInteractionDefinition.
Source code inralph/models/xapi/base/unnested_objects.py
class BaseXapiActivity(BaseModelWithConfig):\n \"\"\"Pydantic model for `Activity` type property.\n\n Attributes:\n id (IRI): Consists of an identifier for a single unique Activity.\n objectType (str): Consists of the value `Activity`.\n definition (dict): See BaseXapiActivityDefinition and\n BaseXapiActivityInteractionDefinition.\n \"\"\"\n\n id: IRI\n objectType: Optional[Literal[\"Activity\"]]\n definition: Optional[\n Union[\n BaseXapiActivityDefinition,\n BaseXapiActivityInteractionDefinition,\n ]\n ]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects.BaseXapiActivityDefinition","title":" BaseXapiActivityDefinition (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for Activity
type definition
property.
Attributes:
Name Type Descriptionname
LanguageMap
Consists of the human-readable/visual name of the Activity.
description
LanguageMap
Consists of a description of the Activity.
type
IRI
Consists of the type of the Activity.
moreInfo
URL
Consists of an URL to a document about the Activity.
extensions
dict
Consists of a dictionary of other properties as needed.
Source code inralph/models/xapi/base/unnested_objects.py
class BaseXapiActivityDefinition(BaseModelWithConfig):\n \"\"\"Pydantic model for `Activity` type `definition` property.\n\n Attributes:\n name (LanguageMap): Consists of the human-readable/visual name of the Activity.\n description (LanguageMap): Consists of a description of the Activity.\n type (IRI): Consists of the type of the Activity.\n moreInfo (URL): Consists of an URL to a document about the Activity.\n extensions (dict): Consists of a dictionary of other properties as needed.\n \"\"\"\n\n name: Optional[LanguageMap]\n description: Optional[LanguageMap]\n type: Optional[IRI]\n moreInfo: Optional[AnyUrl]\n extensions: Optional[Dict[IRI, Union[str, int, bool, list, dict, None]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects.BaseXapiActivityInteractionDefinition","title":" BaseXapiActivityInteractionDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for Activity
type definition
property.
It is defined for field with interaction properties.
Attributes:
Name Type DescriptioninteractionType
str
Consists of the type of the interaction.
correctResponsesPattern
list
Consists of a pattern for the correct response.
choices
list
Consists of a list of selectable choices.
scale
list
Consists of a list of the options on the likert
scale.
source
list
Consists of a list of sources to be matched.
target
list
Consists of a list of targets to be matched.
steps
list
Consists of a list of the elements making up the interaction.
Source code inralph/models/xapi/base/unnested_objects.py
class BaseXapiActivityInteractionDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for `Activity` type `definition` property.\n\n It is defined for field with interaction properties.\n\n Attributes:\n interactionType (str): Consists of the type of the interaction.\n correctResponsesPattern (list): Consists of a pattern for the correct response.\n choices (list): Consists of a list of selectable choices.\n scale (list): Consists of a list of the options on the `likert` scale.\n source (list): Consists of a list of sources to be matched.\n target (list): Consists of a list of targets to be matched.\n steps (list): Consists of a list of the elements making up the interaction.\n \"\"\"\n\n interactionType: Literal[\n \"true-false\",\n \"choice\",\n \"fill-in\",\n \"long-fill-in\",\n \"matching\",\n \"performance\",\n \"sequencing\",\n \"likert\",\n \"numeric\",\n \"other\",\n ]\n correctResponsesPattern: Optional[List[StrictStr]]\n choices: Optional[List[BaseXapiInteractionComponent]]\n scale: Optional[List[BaseXapiInteractionComponent]]\n source: Optional[List[BaseXapiInteractionComponent]]\n target: Optional[List[BaseXapiInteractionComponent]]\n steps: Optional[List[BaseXapiInteractionComponent]]\n\n @validator(\"choices\", \"scale\", \"source\", \"target\", \"steps\")\n @classmethod\n def check_unique_ids(cls, value):\n \"\"\"Check the uniqueness of interaction components IDs.\"\"\"\n if len(value) != len({x.id for x in value}):\n raise ValueError(\"Duplicate InteractionComponents are not valid\")\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects.BaseXapiActivityInteractionDefinition.check_unique_ids","title":"check_unique_ids(value)
classmethod
","text":"Check the uniqueness of interaction components IDs.
Source code inralph/models/xapi/base/unnested_objects.py
@validator(\"choices\", \"scale\", \"source\", \"target\", \"steps\")\n@classmethod\ndef check_unique_ids(cls, value):\n \"\"\"Check the uniqueness of interaction components IDs.\"\"\"\n if len(value) != len({x.id for x in value}):\n raise ValueError(\"Duplicate InteractionComponents are not valid\")\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects.BaseXapiInteractionComponent","title":" BaseXapiInteractionComponent (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for an interaction component.
Attributes:
Name Type Descriptionid
str
Consists of an identifier of the interaction component.
description
LanguageMap
Consists of the description of the interaction.
Source code inralph/models/xapi/base/unnested_objects.py
class BaseXapiInteractionComponent(BaseModelWithConfig):\n \"\"\"Pydantic model for an interaction component.\n\n Attributes:\n id (str): Consists of an identifier of the interaction component.\n description (LanguageMap): Consists of the description of the interaction.\n \"\"\"\n\n id: constr(regex=r\"^[^\\s]+$\") # noqa:F722\n description: Optional[LanguageMap]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.unnested_objects.BaseXapiStatementRef","title":" BaseXapiStatementRef (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for StatementRef
type property.
Attributes:
Name Type DescriptionobjectType
str
Consists of the value StatementRef
.
id
UUID
Consists of the UUID of the referenced statement.
Source code inralph/models/xapi/base/unnested_objects.py
class BaseXapiStatementRef(BaseModelWithConfig):\n \"\"\"Pydantic model for `StatementRef` type property.\n\n Attributes:\n objectType (str): Consists of the value `StatementRef`.\n id (UUID): Consists of the UUID of the referenced statement.\n \"\"\"\n\n id: UUID\n objectType: Literal[\"StatementRef\"]\n
"},{"location":"models/xapi/#ralph.models.xapi.base.verbs","title":"verbs
","text":"Base xAPI Verb
definitions.
BaseXapiVerb (BaseModelWithConfig)
pydantic-model
","text":"Pydantic model for verb
property.
Attributes:
Name Type Descriptionid
IRI
Consists of an identifier for the verb.
display
LanguageMap
Consists of a human-readable representation of the verb.
Source code inralph/models/xapi/base/verbs.py
class BaseXapiVerb(BaseModelWithConfig):\n \"\"\"Pydantic model for `verb` property.\n\n Attributes:\n id (IRI): Consists of an identifier for the verb.\n display (LanguageMap): Consists of a human-readable representation of the verb.\n \"\"\"\n\n id: IRI\n display: Optional[LanguageMap]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts","title":"concepts
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types","title":"activity_types
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.acrossx_profile","title":"acrossx_profile
","text":"AcrossX Profile
activity types definitions.
MessageActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for message Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see MessageActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/acrossx_profile.py
class MessageActivity(BaseXapiActivity):\n \"\"\"Pydantic model for message `Activity` type.\n\n Attributes:\n definition (dict): see MessageActivityDefinition.\n \"\"\"\n\n definition: MessageActivityDefinition = MessageActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.acrossx_profile.MessageActivityDefinition","title":" MessageActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for message Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value https://w3id.org/xapi/acrossx/activities/message
.
ralph/models/xapi/concepts/activity_types/acrossx_profile.py
class MessageActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for message `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `https://w3id.org/xapi/acrossx/activities/message`.\n \"\"\"\n\n type: Literal[\n \"https://w3id.org/xapi/acrossx/activities/message\"\n ] = \"https://w3id.org/xapi/acrossx/activities/message\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.acrossx_profile.WebpageActivity","title":" WebpageActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for webpage Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see WebpageActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/acrossx_profile.py
class WebpageActivity(BaseXapiActivity):\n \"\"\"Pydantic model for webpage `Activity` type.\n\n Attributes:\n definition (dict): see WebpageActivityDefinition.\n \"\"\"\n\n definition: WebpageActivityDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.acrossx_profile.WebpageActivityDefinition","title":" WebpageActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for webpage Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value https://w3id.org/xapi/acrossx/activities/webpage
.
ralph/models/xapi/concepts/activity_types/acrossx_profile.py
class WebpageActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for webpage `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `https://w3id.org/xapi/acrossx/activities/webpage`.\n \"\"\"\n\n type: Literal[\"https://w3id.org/xapi/acrossx/activities/webpage\"]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.activity_streams_vocabulary","title":"activity_streams_vocabulary
","text":"Activity streams vocabulary
activity types definitions.
FileActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for file Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
See FileActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/activity_streams_vocabulary.py
class FileActivity(BaseXapiActivity):\n \"\"\"Pydantic model for file `Activity` type.\n\n Attributes:\n definition (dict): See FileActivityDefinition.\n \"\"\"\n\n definition: FileActivityDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.activity_streams_vocabulary.FileActivityDefinition","title":" FileActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for file Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://activitystrea.ms/file
.
ralph/models/xapi/concepts/activity_types/activity_streams_vocabulary.py
class FileActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for file `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value `http://activitystrea.ms/file`.\n \"\"\"\n\n type: Literal[\"http://activitystrea.ms/file\"]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.activity_streams_vocabulary.PageActivity","title":" PageActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for page Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
See PageActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/activity_streams_vocabulary.py
class PageActivity(BaseXapiActivity):\n \"\"\"Pydantic model for page `Activity` type.\n\n Attributes:\n definition (dict): See PageActivityDefinition.\n \"\"\"\n\n definition: PageActivityDefinition = PageActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.activity_streams_vocabulary.PageActivityDefinition","title":" PageActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for page Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://activitystrea.ms/schema/1.0/page
.
ralph/models/xapi/concepts/activity_types/activity_streams_vocabulary.py
class PageActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for page `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value `http://activitystrea.ms/schema/1.0/page`.\n \"\"\"\n\n type: Literal[\n \"http://activitystrea.ms/schema/1.0/page\"\n ] = \"http://activitystrea.ms/schema/1.0/page\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.audio","title":"audio
","text":"Audio
activity types definitions.
AudioActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for audio Activity
type.
Attributes:
Name Type Descriptionname
dict
Consists of the dictionary {\"en-US\": <name of the audio>}
.
definition
dict
See audioActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/audio.py
class AudioActivity(BaseXapiActivity):\n \"\"\"Pydantic model for audio `Activity` type.\n\n Attributes:\n name (dict): Consists of the dictionary `{\"en-US\": <name of the audio>}`.\n definition (dict): See audioActivityDefinition.\n \"\"\"\n\n definition: AudioActivityDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.audio.AudioActivityDefinition","title":" AudioActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for audio Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value https://w3id.org/xapi/audio/activity-type/audio
.
ralph/models/xapi/concepts/activity_types/audio.py
class AudioActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for audio `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `https://w3id.org/xapi/audio/activity-type/audio`.\n \"\"\"\n\n type: Literal[\"https://w3id.org/xapi/audio/activity-type/audio\"]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile","title":"scorm_profile
","text":"Scorm Profile
activity types definitions.
CMIInteractionActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for CMI Interaction Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see CMIInteractionActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/scorm_profile.py
class CMIInteractionActivity(BaseXapiActivity):\n \"\"\"Pydantic model for CMI Interaction `Activity` type.\n\n Attributes:\n definition (dict): see CMIInteractionActivityDefinition.\n \"\"\"\n\n definition: CMIInteractionActivityDefinition = CMIInteractionActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.CMIInteractionActivityDefinition","title":" CMIInteractionActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for CMI Interaction Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://adlnet.gov/expapi/activities/cmi.interaction
.
ralph/models/xapi/concepts/activity_types/scorm_profile.py
class CMIInteractionActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for CMI Interaction `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `http://adlnet.gov/expapi/activities/cmi.interaction`.\n \"\"\"\n\n type: Literal[\n \"http://adlnet.gov/expapi/activities/cmi.interaction\"\n ] = \"http://adlnet.gov/expapi/activities/cmi.interaction\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.CourseActivity","title":" CourseActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for course Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see CourseActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/scorm_profile.py
class CourseActivity(BaseXapiActivity):\n \"\"\"Pydantic model for course `Activity` type.\n\n Attributes:\n definition (dict): see CourseActivityDefinition.\n \"\"\"\n\n definition: CourseActivityDefinition = CourseActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.CourseActivityDefinition","title":" CourseActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for course Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://adlnet.gov/expapi/activities/course
.
ralph/models/xapi/concepts/activity_types/scorm_profile.py
class CourseActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for course `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `http://adlnet.gov/expapi/activities/course`.\n \"\"\"\n\n type: Literal[\n \"http://adlnet.gov/expapi/activities/course\"\n ] = \"http://adlnet.gov/expapi/activities/course\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.ModuleActivity","title":" ModuleActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for module Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see ModuleActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/scorm_profile.py
class ModuleActivity(BaseXapiActivity):\n \"\"\"Pydantic model for module `Activity` type.\n\n Attributes:\n definition (dict): see ModuleActivityDefinition.\n \"\"\"\n\n definition: ModuleActivityDefinition = ModuleActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.ModuleActivityDefinition","title":" ModuleActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for module Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://adlnet.gov/expapi/activities/module
.
ralph/models/xapi/concepts/activity_types/scorm_profile.py
class ModuleActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for module `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `http://adlnet.gov/expapi/activities/module`.\n \"\"\"\n\n type: Literal[\n \"http://adlnet.gov/expapi/activities/module\"\n ] = \"http://adlnet.gov/expapi/activities/module\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.ProfileActivity","title":" ProfileActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for profile Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see ProfileActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/scorm_profile.py
class ProfileActivity(BaseXapiActivity):\n \"\"\"Pydantic model for profile `Activity` type.\n\n Attributes:\n definition (dict): see ProfileActivityDefinition.\n \"\"\"\n\n definition: ProfileActivityDefinition = ProfileActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.scorm_profile.ProfileActivityDefinition","title":" ProfileActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for profile Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://adlnet.gov/expapi/activities/profile
.
ralph/models/xapi/concepts/activity_types/scorm_profile.py
class ProfileActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for profile `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `http://adlnet.gov/expapi/activities/profile`.\n \"\"\"\n\n type: Literal[\n \"http://adlnet.gov/expapi/activities/profile\"\n ] = \"http://adlnet.gov/expapi/activities/profile\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.tincan_vocabulary","title":"tincan_vocabulary
","text":"Scorm Profile
activity types definitions.
DocumentActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for document Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
see DocumentActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/tincan_vocabulary.py
class DocumentActivity(BaseXapiActivity):\n \"\"\"Pydantic model for document `Activity` type.\n\n Attributes:\n definition (dict): see DocumentActivityDefinition.\n \"\"\"\n\n definition: DocumentActivityDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.tincan_vocabulary.DocumentActivityDefinition","title":" DocumentActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for document Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value http://id.tincanapi.com/activitytype/document
.
ralph/models/xapi/concepts/activity_types/tincan_vocabulary.py
class DocumentActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for document `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `http://id.tincanapi.com/activitytype/document`.\n \"\"\"\n\n type: Literal[\"http://id.tincanapi.com/activitytype/document\"]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.video","title":"video
","text":"Video
activity types definitions.
VideoActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for video Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
See VideoActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/video.py
class VideoActivity(BaseXapiActivity):\n \"\"\"Pydantic model for video `Activity` type.\n\n Attributes:\n definition (dict): See VideoActivityDefinition.\n \"\"\"\n\n definition: VideoActivityDefinition = VideoActivityDefinition()\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.video.VideoActivityDefinition","title":" VideoActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for video Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value https://w3id.org/xapi/video/activity-type/video
.
ralph/models/xapi/concepts/activity_types/video.py
class VideoActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for video `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `https://w3id.org/xapi/video/activity-type/video`.\n \"\"\"\n\n type: Literal[\n \"https://w3id.org/xapi/video/activity-type/video\"\n ] = \"https://w3id.org/xapi/video/activity-type/video\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.virtual_classroom","title":"virtual_classroom
","text":"Virtual classroom
activity types definitions.
VirtualClassroomActivity (BaseXapiActivity)
pydantic-model
","text":"Pydantic model for virtual classroom Activity
type.
Attributes:
Name Type Descriptiondefinition
dict
See VirtualClassroomActivityDefinition.
Source code inralph/models/xapi/concepts/activity_types/virtual_classroom.py
class VirtualClassroomActivity(BaseXapiActivity):\n \"\"\"Pydantic model for virtual classroom `Activity` type.\n\n Attributes:\n definition (dict): See VirtualClassroomActivityDefinition.\n \"\"\"\n\n definition: VirtualClassroomActivityDefinition = (\n VirtualClassroomActivityDefinition()\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.activity_types.virtual_classroom.VirtualClassroomActivityDefinition","title":" VirtualClassroomActivityDefinition (BaseXapiActivityDefinition)
pydantic-model
","text":"Pydantic model for virtual classroom Activity
type definition
property.
Attributes:
Name Type Descriptiontype
str
Consists of the value https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom
.
ralph/models/xapi/concepts/activity_types/virtual_classroom.py
class VirtualClassroomActivityDefinition(BaseXapiActivityDefinition):\n \"\"\"Pydantic model for virtual classroom `Activity` type `definition` property.\n\n Attributes:\n type (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom`.\n \"\"\"\n\n type: Literal[\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ] = \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.constants","title":"constants
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.concepts.constants.acrossx_profile","title":"acrossx_profile
","text":"Constants for AcrossX Profile
xAPI profile.
cmi5_profile
","text":"Constants for cmi5 Profile
xAPI profile.
lms
","text":"Constants for LMS
xAPI profile.
scorm_profile
","text":"Constants for Scorm Profile
xAPI profile.
tincan_vocabulary
","text":"Constants for TinCan Vocabulary
xAPI profile.
video
","text":"Constants for Video
xAPI profile.
verbs
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.acrossx_profile","title":"acrossx_profile
","text":"AcrossX Profile
verbs definitions.
PostedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for posted verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/acrossx/verbs/posted
.
display
dict
Consists of the dictionary {\"en-US\": \"posted\"}
.
ralph/models/xapi/concepts/verbs/acrossx_profile.py
class PostedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for posted `verb`.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/acrossx/verbs/posted`.\n display (dict): Consists of the dictionary `{\"en-US\": \"posted\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/acrossx/verbs/posted\"\n ] = \"https://w3id.org/xapi/acrossx/verbs/posted\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"posted\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.activity_streams_vocabulary","title":"activity_streams_vocabulary
","text":"Activity streams vocabulary
verbs definitions.
JoinVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for join verb.
Attributes:
Name Type Descriptionid
str
Consists of the value http://activitystrea.ms/join
.
display
dict
Consists of the dictionary {\"en-US\": \"joined\"}
.
ralph/models/xapi/concepts/verbs/activity_streams_vocabulary.py
class JoinVerb(BaseXapiVerb):\n \"\"\"Pydantic model for join verb.\n\n Attributes:\n id (str): Consists of the value `http://activitystrea.ms/join`.\n display (dict): Consists of the dictionary `{\"en-US\": \"joined\"}`.\n \"\"\"\n\n id: Literal[\"http://activitystrea.ms/join\"] = \"http://activitystrea.ms/join\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"joined\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.activity_streams_vocabulary.LeaveVerb","title":" LeaveVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for leave verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://activitystrea.ms/leave
.
display
dict
Consists of the dictionary {\"en-US\": \"left\"}
.
ralph/models/xapi/concepts/verbs/activity_streams_vocabulary.py
class LeaveVerb(BaseXapiVerb):\n \"\"\"Pydantic model for leave `verb`.\n\n Attributes:\n id (str): Consists of the value `http://activitystrea.ms/leave`.\n display (dict): Consists of the dictionary `{\"en-US\": \"left\"}`.\n \"\"\"\n\n id: Literal[\"http://activitystrea.ms/leave\"] = \"http://activitystrea.ms/leave\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"left\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.adl_vocabulary","title":"adl_vocabulary
","text":"ADL Vocabulary
verbs definitions.
AnsweredVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for answered verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/answered
.
display
dict
Consists of the dictionary {\"en-US\": \"answered\"}
.
ralph/models/xapi/concepts/verbs/adl_vocabulary.py
class AnsweredVerb(BaseXapiVerb):\n \"\"\"Pydantic model for answered `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/answered`.\n display (dict): Consists of the dictionary `{\"en-US\": \"answered\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/answered\"\n ] = \"http://adlnet.gov/expapi/verbs/answered\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"answered\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.adl_vocabulary.AskedVerb","title":" AskedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for asked verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/asked
.
display
dict
Consists of the dictionary {\"en-US\": \"asked\"}
.
ralph/models/xapi/concepts/verbs/adl_vocabulary.py
class AskedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for asked `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/asked`.\n display (dict): Consists of the dictionary `{\"en-US\": \"asked\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/asked\"\n ] = \"http://adlnet.gov/expapi/verbs/asked\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"asked\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.adl_vocabulary.RegisteredVerb","title":" RegisteredVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for registered verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/registered
.
display
dict
Consists of the dictionary {\"en-US\": \"registered\"}
.
ralph/models/xapi/concepts/verbs/adl_vocabulary.py
class RegisteredVerb(BaseXapiVerb):\n \"\"\"Pydantic model for registered `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/registered`.\n display (dict): Consists of the dictionary `{\"en-US\": \"registered\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/registered\"\n ] = \"http://adlnet.gov/expapi/verbs/registered\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"registered\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.navy_common_reference_profile","title":"navy_common_reference_profile
","text":"Navy Common Reference Profile
verbs definitions.
AccessedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for accessed verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/netc/verbs/accessed
.
display
dict
Consists of the dictionary {\"en-US\": \"accessed\"}
.
ralph/models/xapi/concepts/verbs/navy_common_reference_profile.py
class AccessedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for accessed `verb`.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/netc/verbs/accessed`.\n display (dict): Consists of the dictionary `{\"en-US\": \"accessed\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/netc/verbs/accessed\"\n ] = \"https://w3id.org/xapi/netc/verbs/accessed\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"accessed\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.navy_common_reference_profile.UploadedVerb","title":" UploadedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for uploaded verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/netc/verbs/uploaded
.
display
dict
Consists of the dictionary {\"en-US\": \"uploaded\"}
.
ralph/models/xapi/concepts/verbs/navy_common_reference_profile.py
class UploadedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for uploaded `verb`.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/netc/verbs/uploaded`.\n display (dict): Consists of the dictionary `{\"en-US\": \"uploaded\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/netc/verbs/uploaded\"\n ] = \"https://w3id.org/xapi/netc/verbs/uploaded\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"uploaded\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.scorm_profile","title":"scorm_profile
","text":"Scorm Profile
verbs definitions.
CompletedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for completed verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/completed
.
display
dict
Consists of the dictionary {\"en-US\": \"completed\"}
.
ralph/models/xapi/concepts/verbs/scorm_profile.py
class CompletedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for completed `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/completed`.\n display (dict): Consists of the dictionary `{\"en-US\": \"completed\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/completed\"\n ] = \"http://adlnet.gov/expapi/verbs/completed\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"completed\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.scorm_profile.InitializedVerb","title":" InitializedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for initialized verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/initialized
.
display
Dict
Consists of the dictionary {\"en-US\": \"initialized\"}
.
ralph/models/xapi/concepts/verbs/scorm_profile.py
class InitializedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for initialized `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/initialized`.\n display (Dict): Consists of the dictionary `{\"en-US\": \"initialized\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/initialized\"\n ] = \"http://adlnet.gov/expapi/verbs/initialized\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"initialized\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.scorm_profile.InteractedVerb","title":" InteractedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for interacted verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/interacted
.
display
dict
Consists of the dictionary {\"en-US\": \"interacted\"}
.
ralph/models/xapi/concepts/verbs/scorm_profile.py
class InteractedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for interacted `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/interacted`.\n display (dict): Consists of the dictionary `{\"en-US\": \"interacted\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/interacted\"\n ] = \"http://adlnet.gov/expapi/verbs/interacted\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"interacted\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.scorm_profile.TerminatedVerb","title":" TerminatedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for terminated verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://adlnet.gov/expapi/verbs/terminated
.
display
dict
Consists of the dictionary {\"en-US\": \"terminated\"}
.
ralph/models/xapi/concepts/verbs/scorm_profile.py
class TerminatedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for terminated `verb`.\n\n Attributes:\n id (str): Consists of the value `http://adlnet.gov/expapi/verbs/terminated`.\n display (dict): Consists of the dictionary `{\"en-US\": \"terminated\"}`.\n \"\"\"\n\n id: Literal[\n \"http://adlnet.gov/expapi/verbs/terminated\"\n ] = \"http://adlnet.gov/expapi/verbs/terminated\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"terminated\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.tincan_vocabulary","title":"tincan_vocabulary
","text":"TinCan Vocabulary
verbs definitions.
DownloadedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for downloaded verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://id.tincanapi.com/verb/downloaded
.
display
dict
Consists of the dictionary {\"en-US\": \"downloaded\"}
.
ralph/models/xapi/concepts/verbs/tincan_vocabulary.py
class DownloadedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for downloaded `verb`.\n\n Attributes:\n id (str): Consists of the value `http://id.tincanapi.com/verb/downloaded`.\n display (dict): Consists of the dictionary `{\"en-US\": \"downloaded\"}`.\n \"\"\"\n\n id: Literal[\n \"http://id.tincanapi.com/verb/downloaded\"\n ] = \"http://id.tincanapi.com/verb/downloaded\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"downloaded\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.tincan_vocabulary.UnregisteredVerb","title":" UnregisteredVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for unregistered verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://id.tincanapi.com/verb/unregistered
.
display
dict
Consists of the dictionary {\"en-US\": \"unregistered\"}
.
ralph/models/xapi/concepts/verbs/tincan_vocabulary.py
class UnregisteredVerb(BaseXapiVerb):\n \"\"\"Pydantic model for unregistered `verb`.\n\n Attributes:\n id (str): Consists of the value `http://id.tincanapi.com/verb/unregistered`.\n display (dict): Consists of the dictionary `{\"en-US\": \"unregistered\"}`.\n \"\"\"\n\n id: Literal[\n \"http://id.tincanapi.com/verb/unregistered\"\n ] = \"http://id.tincanapi.com/verb/unregistered\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"unregistered\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.tincan_vocabulary.ViewedVerb","title":" ViewedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for viewed verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value http://id.tincanapi.com/verb/viewed
.
display
dict
Consists of the dictionary {\"en-US\": \"viewed\"}
.
ralph/models/xapi/concepts/verbs/tincan_vocabulary.py
class ViewedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for viewed `verb`.\n\n Attributes:\n id (str): Consists of the value `http://id.tincanapi.com/verb/viewed`.\n display (dict): Consists of the dictionary `{\"en-US\": \"viewed\"}`.\n \"\"\"\n\n id: Literal[\n \"http://id.tincanapi.com/verb/viewed\"\n ] = \"http://id.tincanapi.com/verb/viewed\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"viewed\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.video","title":"video
","text":"Video
verbs definitions.
PausedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for paused verb
field.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/video/verbs/paused
.
display
dict
Consists of the dictionary {\"en-US\": \"paused\"}
.
ralph/models/xapi/concepts/verbs/video.py
class PausedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for paused `verb` field.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/video/verbs/paused`.\n display (dict): Consists of the dictionary `{\"en-US\": \"paused\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/video/verbs/paused\"\n ] = \"https://w3id.org/xapi/video/verbs/paused\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"paused\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.video.PlayedVerb","title":" PlayedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for played verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/video/verbs/played
.
display
dict
Consists of the dictionary {\"en-US\": \"played\"}
.
ralph/models/xapi/concepts/verbs/video.py
class PlayedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for played `verb`.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/video/verbs/played`.\n display (dict): Consists of the dictionary `{\"en-US\": \"played\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/video/verbs/played\"\n ] = \"https://w3id.org/xapi/video/verbs/played\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"played\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.video.SeekedVerb","title":" SeekedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for seeked verb
field.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/video/verbs/seeked
.
display
dict
Consists of the dictionary {\"en-US\": \"seeked\"}
.
ralph/models/xapi/concepts/verbs/video.py
class SeekedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for seeked `verb` field.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/video/verbs/seeked`.\n display (dict): Consists of the dictionary `{\"en-US\": \"seeked\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/video/verbs/seeked\"\n ] = \"https://w3id.org/xapi/video/verbs/seeked\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"seeked\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom","title":"virtual_classroom
","text":"Virtual classroom
verbs definitions.
LoweredHandVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for lowered hand verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/lowered-hand
.
display
dict
Consists of the dictionary {\"en-US\": \"lowered hand\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class LoweredHandVerb(BaseXapiVerb):\n \"\"\"Pydantic model for lowered hand `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/lowered-hand`.\n display (dict): Consists of the dictionary `{\"en-US\": \"lowered hand\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/lowered-hand\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/lowered-hand\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"lowered hand\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.MutedVerb","title":" MutedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for muted verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/muted
.
display
dict
Consists of the dictionary {\"en-US\": \"muted\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class MutedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for muted `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/muted`.\n display (dict): Consists of the dictionary `{\"en-US\": \"muted\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/muted\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/muted\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"muted\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.RaisedHandVerb","title":" RaisedHandVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for raised hand verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/raised-hand
.
display
dict
Consists of the dictionary {\"en-US\": \"raised hand\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class RaisedHandVerb(BaseXapiVerb):\n \"\"\"Pydantic model for raised hand `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/raised-hand`.\n display (dict): Consists of the dictionary `{\"en-US\": \"raised hand\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/raised-hand\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/raised-hand\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"raised hand\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.SharedScreenVerb","title":" SharedScreenVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for shared screen verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/shared-screen
.
display
dict
Consists of the dictionary {\"en-US\": \"shared screen\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class SharedScreenVerb(BaseXapiVerb):\n \"\"\"Pydantic model for shared screen `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/shared-screen`.\n display (dict): Consists of the dictionary `{\"en-US\": \"shared screen\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/shared-screen\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/shared-screen\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"shared screen\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.StartedCameraVerb","title":" StartedCameraVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for started camera verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/started-camera
.
display
dict
Consists of the dictionary {\"en-US\": \"started camera\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class StartedCameraVerb(BaseXapiVerb):\n \"\"\"Pydantic model for started camera `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/started-camera`.\n display (dict): Consists of the dictionary `{\"en-US\": \"started camera\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/started-camera\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/started-camera\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"started camera\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.StoppedCameraVerb","title":" StoppedCameraVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for stopped camera verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/stopped-camera
.
display
dict
Consists of the dictionary {\"en-US\": \"stopped camera\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class StoppedCameraVerb(BaseXapiVerb):\n \"\"\"Pydantic model for stopped camera `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/stopped-camera`.\n display (dict): Consists of the dictionary `{\"en-US\": \"stopped camera\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/stopped-camera\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/stopped-camera\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"stopped camera\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.UnmutedVerb","title":" UnmutedVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for unmuted verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/unmuted
.
display
dict
Consists of the dictionary {\"en-US\": \"unmuted\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class UnmutedVerb(BaseXapiVerb):\n \"\"\"Pydantic model for unmuted `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/unmuted`.\n display (dict): Consists of the dictionary `{\"en-US\": \"unmuted\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/unmuted\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/unmuted\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"unmuted\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.concepts.verbs.virtual_classroom.UnsharedScreenVerb","title":" UnsharedScreenVerb (BaseXapiVerb)
pydantic-model
","text":"Pydantic model for unshared screen verb
.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom/verbs/unshared-screen
.
display
dict
Consists of the dictionary {\"en-US\": \"unshared screen\"}
.
ralph/models/xapi/concepts/verbs/virtual_classroom.py
class UnsharedScreenVerb(BaseXapiVerb):\n \"\"\"Pydantic model for unshared screen `verb`.\n\n Attributes:\n id (str): Consists of the value\n `https://w3id.org/xapi/virtual-classroom/verbs/unshared-screen`.\n display (dict): Consists of the dictionary `{\"en-US\": \"unshared screen\"}`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom/verbs/unshared-screen\"\n ] = \"https://w3id.org/xapi/virtual-classroom/verbs/unshared-screen\"\n display: Optional[Dict[Literal[LANG_EN_US_DISPLAY], Literal[\"unshared screen\"]]]\n
"},{"location":"models/xapi/#ralph.models.xapi.config","title":"config
","text":"Base xAPI model configuration.
"},{"location":"models/xapi/#ralph.models.xapi.config.BaseExtensionModelWithConfig","title":" BaseExtensionModelWithConfig (BaseModel)
pydantic-model
","text":"Pydantic model for extension configuration shared among all models.
Source code inralph/models/xapi/config.py
class BaseExtensionModelWithConfig(BaseModel):\n \"\"\"Pydantic model for extension configuration shared among all models.\"\"\"\n\n class Config: # pylint: disable=missing-class-docstring # noqa: D106\n extra = Extra.allow\n min_anystr_length = 0\n
"},{"location":"models/xapi/#ralph.models.xapi.config.BaseModelWithConfig","title":" BaseModelWithConfig (BaseModel)
pydantic-model
","text":"Pydantic model for base configuration shared among all models.
Source code inralph/models/xapi/config.py
class BaseModelWithConfig(BaseModel):\n \"\"\"Pydantic model for base configuration shared among all models.\"\"\"\n\n class Config: # pylint: disable=missing-class-docstring # noqa: D106\n extra = Extra.forbid\n min_anystr_length = 1\n
"},{"location":"models/xapi/#ralph.models.xapi.constants","title":"constants
","text":"Constants for xAPI specifications.
"},{"location":"models/xapi/#ralph.models.xapi.lms","title":"lms
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.lms.contexts","title":"contexts
","text":"LMS xAPI events context fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSCommonContext","title":" LMSCommonContext (LMSContext)
pydantic-model
","text":"Pydantic model for LMS common context
property.
Attributes:
Name Type Descriptionextensions
dict
See LMSCommonContextExtensions.
Source code inralph/models/xapi/lms/contexts.py
class LMSCommonContext(LMSContext):\n \"\"\"Pydantic model for LMS common `context` property.\n\n Attributes:\n extensions (dict): See LMSCommonContextExtensions.\n \"\"\"\n\n extensions: Optional[LMSCommonContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSCommonContextExtensions","title":" LMSCommonContextExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for common LMS statements context
.extensions
property.
This model is used for downloaded a video
, downloaded a document
, downloaded an audio
, downloaded a file
, uploaded a video
, uploaded a document
and uploaded an audio
, uploaded a file
statement templates.
Attributes:
Name Type Descriptionsession_id
uuid
ID of the active session.
Source code inralph/models/xapi/lms/contexts.py
class LMSCommonContextExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for common LMS statements `context`.`extensions` property.\n\n This model is used for `downloaded a video`, `downloaded a document`,\n `downloaded an audio`, `downloaded a file`, `uploaded a video`,\n `uploaded a document` and `uploaded an audio`, `uploaded a file`\n statement templates.\n\n Attributes:\n session_id (uuid): ID of the active session.\n \"\"\"\n\n session_id: Optional[UUID] = Field(alias=CONTEXT_EXTENSION_SESSION_ID)\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSContext","title":" LMSContext (BaseXapiContext)
pydantic-model
","text":"Pydantic model for LMS base context
property.
Attributes:
Name Type DescriptioncontextActivities
dict
see LMSContextContextActivities.
Source code inralph/models/xapi/lms/contexts.py
class LMSContext(BaseXapiContext):\n \"\"\"Pydantic model for LMS base `context` property.\n\n Attributes:\n contextActivities (dict): see LMSContextContextActivities.\n \"\"\"\n\n contextActivities: LMSContextContextActivities\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSContextContextActivities","title":" LMSContextContextActivities (BaseXapiContextContextActivities)
pydantic-model
","text":"Pydantic model for LMS context
.contextActivities
property.
Attributes:
Name Type Descriptioncategory
dict or list
see LMSProfileActivity.
Source code inralph/models/xapi/lms/contexts.py
class LMSContextContextActivities(BaseXapiContextContextActivities):\n \"\"\"Pydantic model for LMS `context`.`contextActivities` property.\n\n Attributes:\n category (dict or list): see LMSProfileActivity.\n \"\"\"\n\n category: Union[\n LMSProfileActivity, List[Union[LMSProfileActivity, BaseXapiActivity]]\n ]\n\n @validator(\"category\")\n @classmethod\n def check_presence_of_profile_activity_category(\n cls,\n value: Union[\n LMSProfileActivity, List[Union[LMSProfileActivity, BaseXapiActivity]]\n ],\n ):\n \"\"\"Check that the category list contains a `LMSProfileActivity`.\"\"\"\n if isinstance(value, LMSProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, LMSProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `LMSProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSContextContextActivities.check_presence_of_profile_activity_category","title":"check_presence_of_profile_activity_category(value)
classmethod
","text":"Check that the category list contains a LMSProfileActivity
.
ralph/models/xapi/lms/contexts.py
@validator(\"category\")\n@classmethod\ndef check_presence_of_profile_activity_category(\n cls,\n value: Union[\n LMSProfileActivity, List[Union[LMSProfileActivity, BaseXapiActivity]]\n ],\n):\n \"\"\"Check that the category list contains a `LMSProfileActivity`.\"\"\"\n if isinstance(value, LMSProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, LMSProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `LMSProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSDownloadedAudioContext","title":" LMSDownloadedAudioContext (LMSContext)
pydantic-model
","text":"Pydantic model for LMS downloaded audio context
property.
Attributes:
Name Type Descriptionextensions
dict
See LMSDownloadedAudioContextExtensions.
Source code inralph/models/xapi/lms/contexts.py
class LMSDownloadedAudioContext(LMSContext):\n \"\"\"Pydantic model for LMS downloaded audio `context` property.\n\n Attributes:\n extensions (dict): See LMSDownloadedAudioContextExtensions.\n \"\"\"\n\n extensions: Optional[LMSDownloadedAudioContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSDownloadedAudioContextExtensions","title":" LMSDownloadedAudioContextExtensions (LMSCommonContextExtensions)
pydantic-model
","text":"Pydantic model for LMS downloaded audio context
.extensions
property.
Attributes:
Name Type Descriptionlength
float
Length of the audio.
Source code inralph/models/xapi/lms/contexts.py
class LMSDownloadedAudioContextExtensions(LMSCommonContextExtensions):\n \"\"\"Pydantic model for LMS downloaded audio `context`.`extensions` property.\n\n Attributes:\n length (float): Length of the audio.\n \"\"\"\n\n length: Optional[NonNegativeFloat] = Field(alias=CONTEXT_EXTENSION_LENGTH)\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSDownloadedVideoContext","title":" LMSDownloadedVideoContext (LMSContext)
pydantic-model
","text":"Pydantic model for LMS downloaded video context
property.
Attributes:
Name Type Descriptionextensions
dict
See LMSDownloadedVideoContextExtensions.
Source code inralph/models/xapi/lms/contexts.py
class LMSDownloadedVideoContext(LMSContext):\n \"\"\"Pydantic model for LMS downloaded video `context` property.\n\n Attributes:\n extensions (dict): See LMSDownloadedVideoContextExtensions.\n \"\"\"\n\n extensions: Optional[LMSDownloadedVideoContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSDownloadedVideoContextExtensions","title":" LMSDownloadedVideoContextExtensions (LMSCommonContextExtensions)
pydantic-model
","text":"Pydantic model for LMS downloaded video context
.extensions
property.
Attributes:
Name Type Descriptionlength
float
Length of the video.
quality
int
Video resolution or quality of the video.
Source code inralph/models/xapi/lms/contexts.py
class LMSDownloadedVideoContextExtensions(LMSCommonContextExtensions):\n \"\"\"Pydantic model for LMS downloaded video `context`.`extensions` property.\n\n Attributes:\n length (float): Length of the video.\n quality (int): Video resolution or quality of the video.\n \"\"\"\n\n length: Optional[condecimal(ge=0, decimal_places=3)] = Field(\n alias=CONTEXT_EXTENSION_LENGTH\n )\n quality: Optional[PositiveInt] = Field(alias=CONTEXT_EXTENSION_QUALITY)\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSProfileActivity","title":" LMSProfileActivity (ProfileActivity)
pydantic-model
","text":"Pydantic model for LMS profile
activity type.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/lms
.
ralph/models/xapi/lms/contexts.py
class LMSProfileActivity(ProfileActivity):\n \"\"\"Pydantic model for LMS `profile` activity type.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/lms`.\n \"\"\"\n\n id: Literal[\"https://w3id.org/xapi/lms\"] = \"https://w3id.org/xapi/lms\"\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSRegistrationContext","title":" LMSRegistrationContext (LMSContext)
pydantic-model
","text":"Pydantic model for LMS registration statements context
property.
This model is used for registered to a course
and unregistered to a course
statement templates.
Attributes:
Name Type Descriptionextensions
dict
see LMSRegistrationContextExtensions.
Source code inralph/models/xapi/lms/contexts.py
class LMSRegistrationContext(LMSContext):\n \"\"\"Pydantic model for LMS registration statements `context` property.\n\n This model is used for `registered to a course` and\n `unregistered to a course` statement templates.\n\n Attributes:\n extensions (dict): see LMSRegistrationContextExtensions.\n \"\"\"\n\n extensions: Optional[LMSRegistrationContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.contexts.LMSRegistrationContextExtensions","title":" LMSRegistrationContextExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for LMS registration context
.extensions
property.
Attributes:
Name Type Descriptionstarting_date
datetime
Starting date of the activity, formatted according to the normal format of ISO 8601.
ending_date
datetime
Ending date of the activity, formatted according to the normal format of ISO 8601.
role
str
Role of the actor. For example: admin
, manager
, teacher
, guest
, learner
or staff
.
ralph/models/xapi/lms/contexts.py
class LMSRegistrationContextExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for LMS registration `context`.`extensions` property.\n\n Attributes:\n starting_date (datetime): Starting date of the activity, formatted according to\n the normal format of ISO 8601.\n ending_date (datetime): Ending date of the activity, formatted according to the\n normal format of ISO 8601.\n role (str): Role of the actor. For example: `admin`, `manager`, `teacher`,\n `guest`, `learner` or `staff`.\n \"\"\"\n\n starting_date: Optional[datetime] = Field(alias=CONTEXT_EXTENSION_STARTING_DATE)\n ending_date: Optional[datetime] = Field(alias=CONTEXT_EXTENSION_ENDING_DATE)\n role: Optional[str] = Field(alias=CONTEXT_EXTENSION_ROLE)\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects","title":"objects
","text":"LMS xAPI events object fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSFileObject","title":" LMSFileObject (FileActivity)
pydantic-model
","text":"Pydantic model for LMS file object
property.
Attributes:
Name Type Descriptiondefinition
dict
see LMSFileObjectDefinition.
Source code inralph/models/xapi/lms/objects.py
class LMSFileObject(FileActivity):\n \"\"\"Pydantic model for LMS file `object` property.\n\n Attributes:\n definition (dict): see LMSFileObjectDefinition.\n \"\"\"\n\n definition: LMSFileObjectDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSFileObjectDefinition","title":" LMSFileObjectDefinition (FileActivityDefinition)
pydantic-model
","text":"Pydantic model for LMS file object
.definition
property.
Attributes:
Name Type Descriptionextensions
dict
see LMSFileObjectDefinitionExtensions.
Source code inralph/models/xapi/lms/objects.py
class LMSFileObjectDefinition(FileActivityDefinition):\n \"\"\"Pydantic model for LMS file `object`.`definition` property.\n\n Attributes:\n extensions (dict): see LMSFileObjectDefinitionExtensions.\n \"\"\"\n\n extensions: Optional[LMSFileObjectDefinitionExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSFileObjectDefinitionExtensions","title":" LMSFileObjectDefinitionExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for LMS file object
.definition
.extensions
property.
Attributes:
Name Type Descriptiontype
str
Characterisation of the MIME type of the file.
Source code inralph/models/xapi/lms/objects.py
class LMSFileObjectDefinitionExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for LMS file `object`.`definition`.`extensions` property.\n\n Attributes:\n type (str): Characterisation of the MIME type of the file.\n \"\"\"\n\n type: str = Field(alias=ACTIVITY_EXTENSIONS_TYPE)\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSPageObject","title":" LMSPageObject (WebpageActivity)
pydantic-model
","text":"Pydantic model for LMS page object
property.
Attributes:
Name Type Descriptiondefinition
dict
see LMSPageObjectDefinition.
Source code inralph/models/xapi/lms/objects.py
class LMSPageObject(WebpageActivity):\n \"\"\"Pydantic model for LMS page `object` property.\n\n Attributes:\n definition (dict): see LMSPageObjectDefinition.\n \"\"\"\n\n definition: LMSPageObjectDefinition\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSPageObjectDefinition","title":" LMSPageObjectDefinition (WebpageActivityDefinition)
pydantic-model
","text":"Pydantic model for LMS page object
.definition
property.
Attributes:
Name Type Descriptionextensions
dict
see LMSPageObjectDefinitionExtensions.
Source code inralph/models/xapi/lms/objects.py
class LMSPageObjectDefinition(WebpageActivityDefinition):\n \"\"\"Pydantic model for LMS page `object`.`definition` property.\n\n Attributes:\n extensions (dict): see LMSPageObjectDefinitionExtensions.\n \"\"\"\n\n extensions: Optional[LMSPageObjectDefinitionExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.objects.LMSPageObjectDefinitionExtensions","title":" LMSPageObjectDefinitionExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for LMS page object
.definition
.extensions
property.
Attributes:
Name Type Descriptiontype
str
Characterisation of the page. Can be either course
, course_list
, user_space
value.
ralph/models/xapi/lms/objects.py
class LMSPageObjectDefinitionExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for LMS page `object`.`definition`.`extensions` property.\n\n Attributes:\n type (str): Characterisation of the page. Can be either `course`,\n `course_list`, `user_space` value.\n \"\"\"\n\n type: Optional[Literal[\"course\", \"course_list\", \"user_space\"]] = Field(\n alias=ACTIVITY_EXTENSIONS_TYPE\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements","title":"statements
","text":"LMS xAPI event definitions.
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.BaseLMSStatement","title":" BaseLMSStatement (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for LMS core statements.
Attributes:
Name Type Descriptiontimestamp
datetime
Timestamp of when the event occurred.
Source code inralph/models/xapi/lms/statements.py
class BaseLMSStatement(BaseXapiStatement):\n \"\"\"Pydantic model for LMS core statements.\n\n Attributes:\n timestamp (datetime): Timestamp of when the event occurred.\n \"\"\"\n\n timestamp: datetime\n context: LMSContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSAccessedFile","title":" LMSAccessedFile (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS accessed a file
statement.
Example: John has accessed a file such as a pdf, doc, txt, ppt, xls, csv, etc\u2026
Attributes:
Name Type Descriptionverb
dict
See AccessedVerb.
object
dict
See LMSFileObject.
Source code inralph/models/xapi/lms/statements.py
class LMSAccessedFile(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `accessed a file` statement.\n\n Example: John has accessed a file such as a pdf, doc, txt, ppt, xls, csv, etc...\n\n Attributes:\n verb (dict): See AccessedVerb.\n object (dict): See LMSFileObject.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/netc/verbs/accessed\",\n object__definition__type=\"http://activitystrea.ms/file\",\n )\n\n verb: AccessedVerb = AccessedVerb()\n object: LMSFileObject\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSAccessedPage","title":" LMSAccessedPage (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS accessed a page
statement.
Example: John has accessed a page of an LMS or a website.
Attributes:
Name Type Descriptionverb
dict
See AccessedVerb.
object
dict
See LMSPageObject.
Source code inralph/models/xapi/lms/statements.py
class LMSAccessedPage(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `accessed a page` statement.\n\n Example: John has accessed a page of an LMS or a website.\n\n Attributes:\n verb (dict): See AccessedVerb.\n object (dict): See LMSPageObject.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/netc/verbs/accessed\",\n object__definition__type=\"https://w3id.org/xapi/acrossx/activities/webpage\",\n )\n\n verb: AccessedVerb = AccessedVerb()\n object: LMSPageObject\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSDownloadedAudio","title":" LMSDownloadedAudio (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS downloaded an audio
statement.
Example: John downloaded (rather than played) an audio.
Attributes:
Name Type Descriptionverb
dict
See DownloadedVerb.
object
dict
See AudioActivity.
context
dict
see LMSDownloadedAudioContext.
Source code inralph/models/xapi/lms/statements.py
class LMSDownloadedAudio(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `downloaded an audio` statement.\n\n Example: John downloaded (rather than played) an audio.\n\n Attributes:\n verb (dict): See DownloadedVerb.\n object (dict): See AudioActivity.\n context (dict): see LMSDownloadedAudioContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/audio/activity-type/audio\",\n verb__id=\"http://id.tincanapi.com/verb/downloaded\",\n )\n\n object: AudioActivity\n verb: DownloadedVerb = DownloadedVerb()\n context: LMSDownloadedAudioContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSDownloadedDocument","title":" LMSDownloadedDocument (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS downloaded a document
statement.
Example: John downloaded (rather than accessed or opened) a document.
Attributes:
Name Type Descriptionverb
dict
See DownloadedVerb.
object
dict
See DocumentActivity.
context
dict
see LMSCommonContext.
Source code inralph/models/xapi/lms/statements.py
class LMSDownloadedDocument(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `downloaded a document` statement.\n\n Example: John downloaded (rather than accessed or opened) a document.\n\n Attributes:\n verb (dict): See DownloadedVerb.\n object (dict): See DocumentActivity.\n context (dict): see LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://id.tincanapi.com/activitytype/document\",\n verb__id=\"http://id.tincanapi.com/verb/downloaded\",\n )\n\n object: DocumentActivity\n verb: DownloadedVerb = DownloadedVerb()\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSDownloadedFile","title":" LMSDownloadedFile (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS downloaded a file
statement.
Example: John has uploaded a file such as a pdf, doc, txt, ppt, xls, csv, etc\u2026
Attributes:
Name Type Descriptionverb
dict
See DownloadedVerb.
object
dict
See LMSFileObject.
context
dict
see LMSCommonContext.
Source code inralph/models/xapi/lms/statements.py
class LMSDownloadedFile(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `downloaded a file` statement.\n\n Example: John has uploaded a file such as a pdf, doc, txt, ppt, xls, csv, etc...\n\n Attributes:\n verb (dict): See DownloadedVerb.\n object (dict): See LMSFileObject.\n context (dict): see LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://id.tincanapi.com/verb/downloaded\",\n object__definition__type=\"http://activitystrea.ms/file\",\n )\n\n verb: DownloadedVerb = DownloadedVerb()\n object: LMSFileObject\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSDownloadedVideo","title":" LMSDownloadedVideo (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS downloaded a video
statement.
Example: John downloaded (rather than played) a video.
Attributes:
Name Type Descriptionverb
dict
See DownloadedVerb.
object
dict
See VideoActivity.
context
dict
See LMSDownloadedVideoContext.
Source code inralph/models/xapi/lms/statements.py
class LMSDownloadedVideo(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `downloaded a video` statement.\n\n Example: John downloaded (rather than played) a video.\n\n Attributes:\n verb (dict): See DownloadedVerb.\n object (dict): See VideoActivity.\n context (dict): See LMSDownloadedVideoContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://id.tincanapi.com/verb/downloaded\",\n )\n\n object: VideoActivity\n verb: DownloadedVerb = DownloadedVerb()\n context: LMSDownloadedVideoContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSRegisteredCourse","title":" LMSRegisteredCourse (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS registered to a course
statement.
Example: John is registered to a course.
Attributes:
Name Type Descriptionverb
dict
See RegisteredVerb.
object
dict
See CourseActivity.
context
dict
See LMSRegistrationContext.
Source code inralph/models/xapi/lms/statements.py
class LMSRegisteredCourse(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `registered to a course` statement.\n\n Example: John is registered to a course.\n\n Attributes:\n verb (dict): See RegisteredVerb.\n object (dict): See CourseActivity.\n context (dict): See LMSRegistrationContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/registered\",\n object__definition__type=\"http://adlnet.gov/expapi/activities/course\",\n )\n\n verb: RegisteredVerb = RegisteredVerb()\n object: CourseActivity\n context: LMSRegistrationContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSUnregisteredCourse","title":" LMSUnregisteredCourse (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS unregistered to a course
statement.
Example: John is unregistered to a course.
Attributes:
Name Type Descriptionverb
dict
See UnregisteredVerb.
object
dict
See CourseActivity.
context
dict
See LMSRegistrationContext.
Source code inralph/models/xapi/lms/statements.py
class LMSUnregisteredCourse(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `unregistered to a course` statement.\n\n Example: John is unregistered to a course.\n\n Attributes:\n verb (dict): See UnregisteredVerb.\n object (dict): See CourseActivity.\n context (dict): See LMSRegistrationContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://id.tincanapi.com/verb/unregistered\",\n object__definition__type=\"http://adlnet.gov/expapi/activities/course\",\n )\n\n verb: UnregisteredVerb = UnregisteredVerb()\n object: CourseActivity\n context: LMSRegistrationContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSUploadedAudio","title":" LMSUploadedAudio (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS uploaded an audio
statement.
Example: John uploaded an audio.
Attributes:
Name Type Descriptionverb
dict
See UploadedVerb.
object
dict
See AudioActivity.
context
dict
see LMSCommonContext.
Source code inralph/models/xapi/lms/statements.py
class LMSUploadedAudio(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `uploaded an audio` statement.\n\n Example: John uploaded an audio.\n\n Attributes:\n verb (dict): See UploadedVerb.\n object (dict): See AudioActivity.\n context (dict): see LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/audio/activity-type/audio\",\n verb__id=\"https://w3id.org/xapi/netc/verbs/uploaded\",\n )\n\n object: AudioActivity\n verb: UploadedVerb = UploadedVerb()\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSUploadedDocument","title":" LMSUploadedDocument (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS uploaded a document
statement.
Example: John uploaded a document.
Attributes:
Name Type Descriptionverb
dict
See UploadedVerb.
object
dict
See DocumentActivity.
context
dict
see LMSCommonContext.
Source code inralph/models/xapi/lms/statements.py
class LMSUploadedDocument(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `uploaded a document` statement.\n\n Example: John uploaded a document.\n\n Attributes:\n verb (dict): See UploadedVerb.\n object (dict): See DocumentActivity.\n context (dict): see LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://id.tincanapi.com/activitytype/document\",\n verb__id=\"https://w3id.org/xapi/netc/verbs/uploaded\",\n )\n\n object: DocumentActivity\n verb: UploadedVerb = UploadedVerb()\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSUploadedFile","title":" LMSUploadedFile (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS uploaded a file
statement.
Example: John has uploaded a file such as a pdf, doc, txt, ppt, xls, csv, etc\u2026
Attributes:
Name Type Descriptionverb
dict
See UploadedVerb.
object
dict
See LMSFileObject.
Source code inralph/models/xapi/lms/statements.py
class LMSUploadedFile(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `uploaded a file` statement.\n\n Example: John has uploaded a file such as a pdf, doc, txt, ppt, xls, csv, etc...\n\n Attributes:\n verb (dict): See UploadedVerb.\n object (dict): See LMSFileObject.\n context (dict) See LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/netc/verbs/uploaded\",\n object__definition__type=\"http://activitystrea.ms/file\",\n )\n\n verb: UploadedVerb = UploadedVerb()\n object: LMSFileObject\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.lms.statements.LMSUploadedVideo","title":" LMSUploadedVideo (BaseLMSStatement)
pydantic-model
","text":"Pydantic model for LMS uploaded a video
statement.
Example: John uploaded a video.
Attributes:
Name Type Descriptionverb
dict
See UploadedVerb.
object
dict
See VideoActivity.
context
dict
see LMSCommonContext.
Source code inralph/models/xapi/lms/statements.py
class LMSUploadedVideo(BaseLMSStatement):\n \"\"\"Pydantic model for LMS `uploaded a video` statement.\n\n Example: John uploaded a video.\n\n Attributes:\n verb (dict): See UploadedVerb.\n object (dict): See VideoActivity.\n context (dict): see LMSCommonContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/netc/verbs/uploaded\",\n )\n\n object: VideoActivity\n verb: UploadedVerb = UploadedVerb()\n context: LMSCommonContext\n
"},{"location":"models/xapi/#ralph.models.xapi.navigation","title":"navigation
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.navigation.statements","title":"statements
","text":"Navigation xAPI event definitions.
"},{"location":"models/xapi/#ralph.models.xapi.navigation.statements.PageTerminated","title":" PageTerminated (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for page terminated statement.
Example: John terminated the https://www.fun-mooc.fr/ page.
Attributes:
Name Type Descriptionobject
dict
See PageActivity.
verb
dict
See TerminatedVerb.
Source code inralph/models/xapi/navigation/statements.py
class PageTerminated(BaseXapiStatement):\n \"\"\"Pydantic model for page terminated statement.\n\n Example: John terminated the https://www.fun-mooc.fr/ page.\n\n Attributes:\n object (dict): See PageActivity.\n verb (dict): See TerminatedVerb.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://activitystrea.ms/schema/1.0/page\",\n verb__id=\"http://adlnet.gov/expapi/verbs/terminated\",\n )\n\n object: PageActivity\n verb: TerminatedVerb = TerminatedVerb()\n
"},{"location":"models/xapi/#ralph.models.xapi.navigation.statements.PageViewed","title":" PageViewed (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for page viewed statement.
Example: John viewed the https://www.fun-mooc.fr/ page.
Attributes:
Name Type Descriptionobject
dict
See PageActivity.
verb
dict
See ViewedVerb.
Source code inralph/models/xapi/navigation/statements.py
class PageViewed(BaseXapiStatement):\n \"\"\"Pydantic model for page viewed statement.\n\n Example: John viewed the https://www.fun-mooc.fr/ page.\n\n Attributes:\n object (dict): See PageActivity.\n verb (dict): See ViewedVerb.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"http://activitystrea.ms/schema/1.0/page\",\n verb__id=\"http://id.tincanapi.com/verb/viewed\",\n )\n\n object: PageActivity\n verb: ViewedVerb = ViewedVerb()\n
"},{"location":"models/xapi/#ralph.models.xapi.video","title":"video
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.video.contexts","title":"contexts
","text":"Video xAPI events context fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.BaseVideoContext","title":" BaseVideoContext (BaseXapiContext)
pydantic-model
","text":"Pydantic model for video core context
property.
Attributes:
Name Type DescriptioncontextActivities
dict
see VideoContextContextActivities.
Source code inralph/models/xapi/video/contexts.py
class BaseVideoContext(BaseXapiContext):\n \"\"\"Pydantic model for video core `context` property.\n\n Attributes:\n contextActivities (dict): see VideoContextContextActivities.\n \"\"\"\n\n contextActivities: VideoContextContextActivities\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoBrowsingContextExtensions","title":" VideoBrowsingContextExtensions (VideoContextExtensions)
pydantic-model
","text":"Pydantic model for video browsing context
.extensions
property.
Such field is used in paused
, completed
and terminated
events.
Attributes:
Name Type DescriptioncompletionThreshold
float
Consists of the percentage of media that should be consumed to trigger a completion.
length
float
Consists of the length of the video.
Source code inralph/models/xapi/video/contexts.py
class VideoBrowsingContextExtensions(VideoContextExtensions):\n \"\"\"Pydantic model for video browsing `context`.`extensions` property.\n\n Such field is used in `paused`, `completed` and `terminated` events.\n\n Attributes:\n completionThreshold (float): Consists of the percentage of media that should\n be consumed to trigger a completion.\n length (float): Consists of the length of the video.\n \"\"\"\n\n length: NonNegativeFloat = Field(alias=CONTEXT_EXTENSION_LENGTH)\n completionThreshold: Optional[float] = Field(\n alias=CONTEXT_EXTENSION_COMPLETION_THRESHOLD\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoCompletedContext","title":" VideoCompletedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video completed context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoBrowsingContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoCompletedContext(BaseVideoContext):\n \"\"\"Pydantic model for video completed `context` property.\n\n Attributes:\n extensions (dict): See VideoBrowsingContextExtensions.\n \"\"\"\n\n extensions: VideoBrowsingContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoContextContextActivities","title":" VideoContextContextActivities (BaseXapiContextContextActivities)
pydantic-model
","text":"Pydantic model for video context
.contextActivities
property.
Attributes:
Name Type Descriptioncategory
dict or list
see VideoProfileActivity.
Source code inralph/models/xapi/video/contexts.py
class VideoContextContextActivities(BaseXapiContextContextActivities):\n \"\"\"Pydantic model for video `context`.`contextActivities` property.\n\n Attributes:\n category (dict or list): see VideoProfileActivity.\n \"\"\"\n\n category: Union[\n VideoProfileActivity, List[Union[VideoProfileActivity, BaseXapiActivity]]\n ]\n\n @validator(\"category\")\n @classmethod\n def check_presence_of_profile_activity_category(\n cls,\n value: Union[\n VideoProfileActivity, List[Union[VideoProfileActivity, BaseXapiActivity]]\n ],\n ):\n \"\"\"Check that the category list contains a `VideoProfileActivity`.\"\"\"\n if isinstance(value, VideoProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, VideoProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `VideoProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoContextContextActivities.check_presence_of_profile_activity_category","title":"check_presence_of_profile_activity_category(value)
classmethod
","text":"Check that the category list contains a VideoProfileActivity
.
ralph/models/xapi/video/contexts.py
@validator(\"category\")\n@classmethod\ndef check_presence_of_profile_activity_category(\n cls,\n value: Union[\n VideoProfileActivity, List[Union[VideoProfileActivity, BaseXapiActivity]]\n ],\n):\n \"\"\"Check that the category list contains a `VideoProfileActivity`.\"\"\"\n if isinstance(value, VideoProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, VideoProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `VideoProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoContextExtensions","title":" VideoContextExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for video core context extensions
property.
Attributes:
Name Type Descriptionsession
uuid
Consists of the ID of the active session.
Source code inralph/models/xapi/video/contexts.py
class VideoContextExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for video core context `extensions` property.\n\n Attributes:\n session (uuid): Consists of the ID of the active session.\n \"\"\"\n\n session_id: Optional[UUID] = Field(alias=CONTEXT_EXTENSION_SESSION_ID)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoEnableClosedCaptioningContext","title":" VideoEnableClosedCaptioningContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video enable closed captioning context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoEnableClosedCaptioningContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoEnableClosedCaptioningContext(BaseVideoContext):\n \"\"\"Pydantic model for video enable closed captioning `context` property.\n\n Attributes:\n extensions (dict): See VideoEnableClosedCaptioningContextExtensions.\n \"\"\"\n\n extensions: VideoEnableClosedCaptioningContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoEnableClosedCaptioningContextExtensions","title":" VideoEnableClosedCaptioningContextExtensions (VideoContextExtensions)
pydantic-model
","text":"Represents the context.extensions field for video interacted
xAPI statement.
Attributes:
Name Type DescriptionccSubtitleLanguage
str
Consists of the language of subtitle or closed captioning.
Source code inralph/models/xapi/video/contexts.py
class VideoEnableClosedCaptioningContextExtensions(VideoContextExtensions):\n \"\"\"Represents the context.extensions field for video `interacted` xAPI statement.\n\n Attributes:\n ccSubtitleLanguage (str): Consists of the language of subtitle or closed\n captioning.\n \"\"\"\n\n ccSubtitleLanguage: str = Field(alias=CONTEXT_EXTENSION_CC_SUBTITLE_LANG)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoInitializedContext","title":" VideoInitializedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video initialized context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoInitializedContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoInitializedContext(BaseVideoContext):\n \"\"\"Pydantic model for video initialized `context` property.\n\n Attributes:\n extensions (dict): See VideoInitializedContextExtensions.\n \"\"\"\n\n extensions: VideoInitializedContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoInitializedContextExtensions","title":" VideoInitializedContextExtensions (VideoContextExtensions)
pydantic-model
","text":"Pydantic model for video initialized context
extensions
property.
Attributes:
Name Type Descriptionlength
float
Consists of the length of the video.
ccSubtitleEnabled
bool
Indicates whether subtitle or closed captioning is enabled.
ccSubtitleLanguage
str
Consists of the language of subtitle or closed captioning.
fullScreen
bool
Indicates whether the video is played in full screen mode.
screenSize
str
Consists of the device playback screen size or the maximum available screen size for Video playback.
videoPlaybackSize
str
Consists of the size in Width x Height of the video as viewed by the user.
speed
str
Consists of the play back speed.
userAgent
str
Consists of the User Agent string of the browser, if the video is launched in browser.
volume
int
Consists of the volume of the video.
completionThreshold
float
Consists of the percentage of media that should be consumed to trigger a completion.
Source code inralph/models/xapi/video/contexts.py
class VideoInitializedContextExtensions(VideoContextExtensions):\n \"\"\"Pydantic model for video initialized `context` `extensions` property.\n\n Attributes:\n length (float): Consists of the length of the video.\n ccSubtitleEnabled (bool): Indicates whether subtitle or closed captioning is\n enabled.\n ccSubtitleLanguage (str): Consists of the language of subtitle or closed\n captioning.\n fullScreen (bool): Indicates whether the video is played in full screen mode.\n screenSize (str): Consists of the device playback screen size or the maximum\n available screen size for Video playback.\n videoPlaybackSize (str): Consists of the size in Width x Height of the video as\n viewed by the user.\n speed (str): Consists of the play back speed.\n userAgent (str): Consists of the User Agent string of the browser,\n if the video is launched in browser.\n volume (int): Consists of the volume of the video.\n completionThreshold (float): Consists of the percentage of media that should be\n consumed to trigger a completion.\n \"\"\"\n\n length: NonNegativeFloat = Field(alias=CONTEXT_EXTENSION_LENGTH)\n ccSubtitleEnabled: Optional[bool] = Field(alias=CONTEXT_EXTENSION_CC_ENABLED)\n ccSubtitleLang: Optional[str] = Field(alias=CONTEXT_EXTENSION_CC_SUBTITLE_LANG)\n fullScreen: Optional[bool] = Field(alias=CONTEXT_EXTENSION_FULL_SCREEN)\n screenSize: Optional[str] = Field(alias=CONTEXT_EXTENSION_SCREEN_SIZE)\n videoPlaybackSize: Optional[str] = Field(\n alias=CONTEXT_EXTENSION_VIDEO_PLAYBACK_SIZE\n )\n speed: Optional[str] = Field(alias=CONTEXT_EXTENSION_SPEED)\n userAgent: Optional[str] = Field(alias=CONTEXT_EXTENSION_USER_AGENT)\n volume: Optional[int] = Field(alias=CONTEXT_EXTENSION_VOLUME)\n completionThreshold: Optional[float] = Field(\n alias=CONTEXT_EXTENSION_COMPLETION_THRESHOLD\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoPausedContext","title":" VideoPausedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video paused context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoBrowsingContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoPausedContext(BaseVideoContext):\n \"\"\"Pydantic model for video paused `context` property.\n\n Attributes:\n extensions (dict): See VideoBrowsingContextExtensions.\n \"\"\"\n\n extensions: VideoBrowsingContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoPlayedContext","title":" VideoPlayedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video played context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoPlayedContext(BaseVideoContext):\n \"\"\"Pydantic model for video played `context` property.\n\n Attributes:\n extensions (dict): See VideoContextExtensions.\n \"\"\"\n\n extensions: Optional[VideoContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoProfileActivity","title":" VideoProfileActivity (ProfileActivity)
pydantic-model
","text":"Pydantic model for video profile Activity
type.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/video
.
ralph/models/xapi/video/contexts.py
class VideoProfileActivity(ProfileActivity):\n \"\"\"Pydantic model for video profile `Activity` type.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/video`.\n \"\"\"\n\n id: Literal[\"https://w3id.org/xapi/video\"] = \"https://w3id.org/xapi/video\"\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoScreenChangeInteractionContext","title":" VideoScreenChangeInteractionContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video screen change interaction context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoScreenChangeInteractionContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoScreenChangeInteractionContext(BaseVideoContext):\n \"\"\"Pydantic model for video screen change interaction `context` property.\n\n Attributes:\n extensions (dict): See VideoScreenChangeInteractionContextExtensions.\n \"\"\"\n\n extensions: VideoScreenChangeInteractionContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoScreenChangeInteractionContextExtensions","title":" VideoScreenChangeInteractionContextExtensions (VideoContextExtensions)
pydantic-model
","text":"Pydantic model for video screen change interaction context
.extensions
property.
Attributes:
Name Type DescriptionfullScreen
bool
Indicates whether the video is played in full screen mode.
screenSize
str
Expresses the total available screen size for Video playback.
videoPlaybackSize
str
Consists of the size in Width x Height of the video as viewed by the user.
Source code inralph/models/xapi/video/contexts.py
class VideoScreenChangeInteractionContextExtensions(VideoContextExtensions):\n # noqa: D205, D415\n \"\"\"Pydantic model for video screen change interaction `context`.`extensions`\n property.\n\n Attributes:\n fullScreen (bool): Indicates whether the video is played in full screen mode.\n screenSize (str): Expresses the total available screen size for Video playback.\n videoPlaybackSize (str): Consists of the size in Width x Height of the video as\n viewed by the user.\n \"\"\"\n\n fullScreen: bool = Field(alias=CONTEXT_EXTENSION_FULL_SCREEN)\n screenSize: str = Field(alias=CONTEXT_EXTENSION_SCREEN_SIZE)\n videoPlaybackSize: str = Field(alias=CONTEXT_EXTENSION_VIDEO_PLAYBACK_SIZE)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoSeekedContext","title":" VideoSeekedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video seeked context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoSeekedContext(BaseVideoContext):\n \"\"\"Pydantic model for video seeked `context` property.\n\n Attributes:\n extensions (dict): See VideoContextExtensions.\n \"\"\"\n\n extensions: Optional[VideoContextExtensions]\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoTerminatedContext","title":" VideoTerminatedContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video terminated context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoBrowsingContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoTerminatedContext(BaseVideoContext):\n \"\"\"Pydantic model for video terminated `context` property.\n\n Attributes:\n extensions (dict): See VideoBrowsingContextExtensions.\n \"\"\"\n\n extensions: VideoBrowsingContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoVolumeChangeInteractionContext","title":" VideoVolumeChangeInteractionContext (BaseVideoContext)
pydantic-model
","text":"Pydantic model for video volume change interaction context
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoVolumeChangeInteractionContextExtensions.
Source code inralph/models/xapi/video/contexts.py
class VideoVolumeChangeInteractionContext(BaseVideoContext):\n \"\"\"Pydantic model for video volume change interaction `context` property.\n\n Attributes:\n extensions (dict): See VideoVolumeChangeInteractionContextExtensions.\n \"\"\"\n\n extensions: VideoVolumeChangeInteractionContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.contexts.VideoVolumeChangeInteractionContextExtensions","title":" VideoVolumeChangeInteractionContextExtensions (VideoContextExtensions)
pydantic-model
","text":"Pydantic model for video volume change interaction context
.extensions
property.
Attributes:
Name Type Descriptionvolume
int
Consists of the volume of the video.
Source code inralph/models/xapi/video/contexts.py
class VideoVolumeChangeInteractionContextExtensions(VideoContextExtensions):\n # noqa: D205, D415\n \"\"\"Pydantic model for video volume change interaction `context`.`extensions`\n property.\n\n Attributes:\n volume (int): Consists of the volume of the video.\n \"\"\"\n\n volume: int = Field(alias=CONTEXT_EXTENSION_VOLUME)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results","title":"results
","text":"Video xAPI events result fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoCompletedResult","title":" VideoCompletedResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video completed result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoCompletedResultExtensions.
completion
bool
Consists of the value True
.
duration
str
Consists of the total time spent consuming the video under current registration.
Source code inralph/models/xapi/video/results.py
class VideoCompletedResult(BaseXapiResult):\n \"\"\"Pydantic model for video completed `result` property.\n\n Attributes:\n extensions (dict): See VideoCompletedResultExtensions.\n completion (bool): Consists of the value `True`.\n duration (str): Consists of the total time spent consuming the video under\n current registration.\n \"\"\"\n\n extensions: VideoCompletedResultExtensions\n completion: Optional[Literal[True]]\n duration: Optional[timedelta]\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoCompletedResultExtensions","title":" VideoCompletedResultExtensions (VideoResultExtensions)
pydantic-model
","text":"Pydantic model for video completed result
.extensions
property.
Attributes:
Name Type Descriptionprogress
float
Consists of the percentage of media consumed by the actor.
Source code inralph/models/xapi/video/results.py
class VideoCompletedResultExtensions(VideoResultExtensions):\n \"\"\"Pydantic model for video completed `result`.`extensions` property.\n\n Attributes:\n progress (float): Consists of the percentage of media consumed by the actor.\n \"\"\"\n\n progress: NonNegativeFloat = Field(alias=RESULT_EXTENSION_PROGRESS)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoEnableClosedCaptioningResult","title":" VideoEnableClosedCaptioningResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video enable closed captioning result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoEnableClosedCaptioningResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoEnableClosedCaptioningResult(BaseXapiResult):\n \"\"\"Pydantic model for video enable closed captioning `result` property.\n\n Attributes:\n extensions (dict): See VideoEnableClosedCaptioningResultExtensions.\n \"\"\"\n\n extensions: VideoEnableClosedCaptioningResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoEnableClosedCaptioningResultExtensions","title":" VideoEnableClosedCaptioningResultExtensions (VideoResultExtensions)
pydantic-model
","text":"Pydantic model for video enable closed captioning result
.extensions
property.
Attributes:
Name Type DescriptionccEnabled
bool
Indicates whether subtitles are enabled.
Source code inralph/models/xapi/video/results.py
class VideoEnableClosedCaptioningResultExtensions(VideoResultExtensions):\n \"\"\"Pydantic model for video enable closed captioning `result`.`extensions` property.\n\n Attributes:\n ccEnabled (bool): Indicates whether subtitles are enabled.\n \"\"\"\n\n ccEnabled: bool = Field(alias=CONTEXT_EXTENSION_CC_ENABLED)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoPausedResult","title":" VideoPausedResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video paused result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoPausedResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoPausedResult(BaseXapiResult):\n \"\"\"Pydantic model for video paused `result` property.\n\n Attributes:\n extensions (dict): See VideoPausedResultExtensions.\n \"\"\"\n\n extensions: VideoPausedResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoPausedResultExtensions","title":" VideoPausedResultExtensions (VideoResultExtensions)
pydantic-model
","text":"Pydantic model for video paused result
.extensions
property.
Attributes:
Name Type Descriptionprogress
float
Consists of the ratio of media consumed by the actor.
Source code inralph/models/xapi/video/results.py
class VideoPausedResultExtensions(VideoResultExtensions):\n \"\"\"Pydantic model for video paused `result`.`extensions` property.\n\n Attributes:\n progress (float): Consists of the ratio of media consumed by the actor.\n \"\"\"\n\n progress: Optional[NonNegativeFloat] = Field(alias=RESULT_EXTENSION_PROGRESS)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoPlayedResult","title":" VideoPlayedResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video played result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoPlayedResult(BaseXapiResult):\n \"\"\"Pydantic model for video played `result` property.\n\n Attributes:\n extensions (dict): See VideoResultExtensions.\n \"\"\"\n\n extensions: VideoResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoResultExtensions","title":" VideoResultExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for video result
.extensions
property.
Attributes:
Name Type DescriptionplayedSegments
str
Consists of parts of the video the actor watched during current registration in chronological order (for example, \u201c0[.]5[,]12[.]22[,]15[.]55[,]55[.]99.33[,]99.33\u201d).
time
float
Consists of the video time code when the event was emitted.
Source code inralph/models/xapi/video/results.py
class VideoResultExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for video `result`.`extensions` property.\n\n Attributes:\n playedSegments (str): Consists of parts of the video the actor watched during\n current registration in chronological order (for example,\n \"0[.]5[,]12[.]22[,]15[.]55[,]55[.]99.33[,]99.33\").\n time (float): Consists of the video time code when the event was emitted.\n \"\"\"\n\n time: NonNegativeFloat = Field(alias=RESULT_EXTENSION_TIME)\n playedSegments: Optional[str] = Field(alias=CONTEXT_EXTENSION_PLAYED_SEGMENTS)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoScreenChangeInteractionResult","title":" VideoScreenChangeInteractionResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video screen change interaction result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoScreenChangeInteractionResult(BaseXapiResult):\n \"\"\"Pydantic model for video screen change interaction `result` property.\n\n Attributes:\n extensions (dict): See VideoResultExtensions.\n \"\"\"\n\n extensions: VideoResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoSeekedResult","title":" VideoSeekedResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video seeked result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoSeekedResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoSeekedResult(BaseXapiResult):\n \"\"\"Pydantic model for video seeked `result` property.\n\n Attributes:\n extensions (dict): See VideoSeekedResultExtensions.\n \"\"\"\n\n extensions: VideoSeekedResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoSeekedResultExtensions","title":" VideoSeekedResultExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for video seeked result
.extensions
property.
Attributes:
Name Type DescriptiontimeFrom
float
Consists of the point in time the actor changed from in a media object during a seek operation.
timeTo
float
Consists of the point in time the actor changed to in a media object during a seek operation.
Source code inralph/models/xapi/video/results.py
class VideoSeekedResultExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for video seeked `result`.`extensions` property.\n\n Attributes:\n timeFrom (float): Consists of the point in time the actor changed from in a\n media object during a seek operation.\n timeTo (float): Consists of the point in time the actor changed to in a media\n object during a seek operation.\n \"\"\"\n\n timeFrom: NonNegativeFloat = Field(alias=RESULT_EXTENSION_TIME_FROM)\n timeTo: NonNegativeFloat = Field(alias=RESULT_EXTENSION_TIME_TO)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoTerminatedResult","title":" VideoTerminatedResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video terminated result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoTerminatedResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoTerminatedResult(BaseXapiResult):\n \"\"\"Pydantic model for video terminated `result` property.\n\n Attributes:\n extensions (dict): See VideoTerminatedResultExtensions.\n \"\"\"\n\n extensions: VideoTerminatedResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoTerminatedResultExtensions","title":" VideoTerminatedResultExtensions (VideoResultExtensions)
pydantic-model
","text":"Pydantic model for video terminated result
.extensions
property.
Attributes:
Name Type Descriptionprogress
float
Consists of the percentage of media consumed by the actor.
Source code inralph/models/xapi/video/results.py
class VideoTerminatedResultExtensions(VideoResultExtensions):\n \"\"\"Pydantic model for video terminated `result`.`extensions` property.\n\n Attributes:\n progress (float): Consists of the percentage of media consumed by the actor.\n \"\"\"\n\n progress: NonNegativeFloat = Field(alias=RESULT_EXTENSION_PROGRESS)\n
"},{"location":"models/xapi/#ralph.models.xapi.video.results.VideoVolumeChangeInteractionResult","title":" VideoVolumeChangeInteractionResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for video volume change interaction result
property.
Attributes:
Name Type Descriptionextensions
dict
See VideoResultExtensions.
Source code inralph/models/xapi/video/results.py
class VideoVolumeChangeInteractionResult(BaseXapiResult):\n \"\"\"Pydantic model for video volume change interaction `result` property.\n\n Attributes:\n extensions (dict): See VideoResultExtensions.\n \"\"\"\n\n extensions: VideoResultExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements","title":"statements
","text":"Video xAPI event definitions.
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.BaseVideoStatement","title":" BaseVideoStatement (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for video core statements.
Attributes:
Name Type Descriptionobject
dict
See VideoActivity.
Source code inralph/models/xapi/video/statements.py
class BaseVideoStatement(BaseXapiStatement):\n \"\"\"Pydantic model for video core statements.\n\n Attributes:\n object (dict): See VideoActivity.\n \"\"\"\n\n object: VideoActivity\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoCompleted","title":" VideoCompleted (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video completed statement.
Example: John completed a video by watching major parts of the video at least once.
Attributes:
Name Type Descriptionverb
dict
See CompletedVerb.
result
dict
See VideoCompletedResult.
context
dict
See VideoCompletedContext.
Source code inralph/models/xapi/video/statements.py
class VideoCompleted(BaseVideoStatement):\n \"\"\"Pydantic model for video completed statement.\n\n Example: John completed a video by watching major parts of the video at least once.\n\n Attributes:\n verb (dict): See CompletedVerb.\n result (dict): See VideoCompletedResult.\n context (dict): See VideoCompletedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/completed\",\n )\n\n verb: CompletedVerb = CompletedVerb()\n result: VideoCompletedResult\n context: VideoCompletedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoEnableClosedCaptioning","title":" VideoEnableClosedCaptioning (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video enable closed captioning statement.
Example: John interacted with the player to enable closed captioning.
Attributes:
Name Type Descriptionverb
dict
See InteractedVerb.
result
dict
See VideoEnableClosedCaptioningResult.
context
dict
See VideoEnableClosedCaptioningContext.
Source code inralph/models/xapi/video/statements.py
class VideoEnableClosedCaptioning(BaseVideoStatement):\n \"\"\"Pydantic model for video enable closed captioning statement.\n\n Example: John interacted with the player to enable closed captioning.\n\n Attributes:\n verb (dict): See InteractedVerb.\n result (dict): See VideoEnableClosedCaptioningResult.\n context (dict): See VideoEnableClosedCaptioningContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/interacted\",\n )\n\n verb: InteractedVerb = InteractedVerb()\n result: VideoEnableClosedCaptioningResult\n context: VideoEnableClosedCaptioningContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoInitialized","title":" VideoInitialized (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video initialized statement.
Example: A video has been fully initialized.
Attributes:
Name Type Descriptionverb
dict
See InitializedVerb.
context
dict
See VideoInitializedContext.
Source code inralph/models/xapi/video/statements.py
class VideoInitialized(BaseVideoStatement):\n \"\"\"Pydantic model for video initialized statement.\n\n Example: A video has been fully initialized.\n\n Attributes:\n verb (dict): See InitializedVerb.\n context (dict): See VideoInitializedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/initialized\",\n )\n\n verb: InitializedVerb = InitializedVerb()\n context: VideoInitializedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoPaused","title":" VideoPaused (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video paused statement.
Example: John paused the video or clicked the pause button.
Attributes:
Name Type Descriptionverb
dict
See PausedVerb.
result
dict
See VideoPausedResult.
context
dict
See VideoPausedContext.
Source code inralph/models/xapi/video/statements.py
class VideoPaused(BaseVideoStatement):\n \"\"\"Pydantic model for video paused statement.\n\n Example: John paused the video or clicked the pause button.\n\n Attributes:\n verb (dict): See PausedVerb.\n result (dict): See VideoPausedResult.\n context (dict): See VideoPausedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/paused\",\n )\n\n verb: PausedVerb = PausedVerb()\n result: VideoPausedResult\n context: VideoPausedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoPlayed","title":" VideoPlayed (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video played statement.
Example: John played the video or clicked the play button.
Attributes:
Name Type Descriptionverb
dict
See PlayedVerb.
result
dict
See VideoPlayedResult.
context
dict
See VideoPlayedContext.
Source code inralph/models/xapi/video/statements.py
class VideoPlayed(BaseVideoStatement):\n \"\"\"Pydantic model for video played statement.\n\n Example: John played the video or clicked the play button.\n\n Attributes:\n verb (dict): See PlayedVerb.\n result (dict): See VideoPlayedResult.\n context (dict): See VideoPlayedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/played\",\n )\n\n verb: PlayedVerb = PlayedVerb()\n result: VideoPlayedResult\n context: VideoPlayedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoScreenChangeInteraction","title":" VideoScreenChangeInteraction (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video screen change interaction statement.
Example: John interacted with the player to activate or deactivate full screen.
Attributes:
Name Type Descriptionverb
dict
See InteractedVerb.
result
dict
See VideoScreenChangeInteractionResult.
context
dict
See VideoScreenChangeInteractionContext.
Source code inralph/models/xapi/video/statements.py
class VideoScreenChangeInteraction(BaseVideoStatement):\n \"\"\"Pydantic model for video screen change interaction statement.\n\n Example: John interacted with the player to activate or deactivate full screen.\n\n Attributes:\n verb (dict): See InteractedVerb.\n result (dict): See VideoScreenChangeInteractionResult.\n context (dict): See VideoScreenChangeInteractionContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/interacted\",\n )\n\n verb: InteractedVerb = InteractedVerb()\n result: VideoScreenChangeInteractionResult\n context: VideoScreenChangeInteractionContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoSeeked","title":" VideoSeeked (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video seeked statement.
!!! example \u201cJohn moved the progress bar forward or backward to a specific time in the\u201d video.
Attributes:
Name Type Descriptionverb
dict
See SeekedVerb.
result
dict
See VideoSeekedResult.
context
dict
See VideoSeekedContext.
Source code inralph/models/xapi/video/statements.py
class VideoSeeked(BaseVideoStatement):\n \"\"\"Pydantic model for video seeked statement.\n\n Example: John moved the progress bar forward or backward to a specific time in the\n video.\n\n Attributes:\n verb (dict): See SeekedVerb.\n result (dict): See VideoSeekedResult.\n context (dict): See VideoSeekedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"https://w3id.org/xapi/video/verbs/seeked\",\n )\n\n verb: SeekedVerb = SeekedVerb()\n result: VideoSeekedResult\n context: VideoSeekedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoTerminated","title":" VideoTerminated (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video terminated statement.
Example: John ended a video (quit the player).
Attributes:
Name Type Descriptionverb
dict
See TerminatedVerb.
result
dict
See VideoTerminatedResult.
context
dict
See VideoTerminatedContext.
Source code inralph/models/xapi/video/statements.py
class VideoTerminated(BaseVideoStatement):\n \"\"\"Pydantic model for video terminated statement.\n\n Example: John ended a video (quit the player).\n\n Attributes:\n verb (dict): See TerminatedVerb.\n result (dict): See VideoTerminatedResult.\n context (dict): See VideoTerminatedContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/terminated\",\n )\n\n verb: TerminatedVerb = TerminatedVerb()\n result: VideoTerminatedResult\n context: VideoTerminatedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.video.statements.VideoVolumeChangeInteraction","title":" VideoVolumeChangeInteraction (BaseVideoStatement)
pydantic-model
","text":"Pydantic model for video volume change interaction statement.
Example: John interacted with the player to change the volume.
Attributes : verb (dict): See InteractedVerb. result (dict): See VideoVolumeChangeInteractionResult. context (dict): See VideoVolumeChangeInteractionContext.
Source code inralph/models/xapi/video/statements.py
class VideoVolumeChangeInteraction(BaseVideoStatement):\n \"\"\"Pydantic model for video volume change interaction statement.\n\n Example: John interacted with the player to change the volume.\n\n Attributes :\n verb (dict): See InteractedVerb.\n result (dict): See VideoVolumeChangeInteractionResult.\n context (dict): See VideoVolumeChangeInteractionContext.\n \"\"\"\n\n __selector__ = selector(\n object__definition__type=\"https://w3id.org/xapi/video/activity-type/video\",\n verb__id=\"http://adlnet.gov/expapi/verbs/interacted\",\n )\n\n verb: InteractedVerb = InteractedVerb()\n result: VideoVolumeChangeInteractionResult\n context: VideoVolumeChangeInteractionContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom","title":"virtual_classroom
special
","text":""},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts","title":"contexts
","text":"Virtual classroom xAPI events context fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomAnsweredPollContext","title":" VirtualClassroomAnsweredPollContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom answered poll context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomContextExtensions.
contextActivities
dict
see VirtualClassroomAnsweredPollContextActivities.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomAnsweredPollContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom answered poll `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomContextExtensions.\n contextActivities (dict): see VirtualClassroomAnsweredPollContextActivities.\n \"\"\"\n\n extensions: VirtualClassroomContextExtensions\n contextActivities: VirtualClassroomAnsweredPollContextActivities\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomAnsweredPollContextActivities","title":" VirtualClassroomAnsweredPollContextActivities (VirtualClassroomContextContextActivities)
pydantic-model
","text":"Pydantic model for virtual classroom answered poll context
.contextActivities
property.
Attributes:
Name Type Descriptionparent
list
see VirtualClassroomActivity.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomAnsweredPollContextActivities(\n VirtualClassroomContextContextActivities\n):\n # noqa: D205, D415\n \"\"\"Pydantic model for virtual classroom answered poll `context`.`contextActivities`\n property.\n\n Attributes:\n parent (list): see VirtualClassroomActivity.\n \"\"\"\n\n parent: Union[VirtualClassroomActivity, List[VirtualClassroomActivity]]\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomContext","title":" VirtualClassroomContext (BaseXapiContext)
pydantic-model
","text":"Pydantic model for virtual classroom base context
property.
Attributes:
Name Type Descriptionregistration
uuid
the registration that the Statement is associated with.
extensions
dict
see VirtualClassroomContextExtensions.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomContext(BaseXapiContext):\n \"\"\"Pydantic model for virtual classroom base `context` property.\n\n Attributes:\n registration (uuid): the registration that the Statement is associated with.\n extensions (dict): see VirtualClassroomContextExtensions.\n \"\"\"\n\n contextActivities: VirtualClassroomContextContextActivities\n registration: UUID\n extensions: VirtualClassroomContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomContextContextActivities","title":" VirtualClassroomContextContextActivities (BaseXapiContextContextActivities)
pydantic-model
","text":"Pydantic model for virtual classroom context
.contextActivities
property.
Attributes:
Name Type Descriptioncategory
dict or list
see VirtualClassroomProfileActivity.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomContextContextActivities(BaseXapiContextContextActivities):\n \"\"\"Pydantic model for virtual classroom `context`.`contextActivities` property.\n\n Attributes:\n category (dict or list): see VirtualClassroomProfileActivity.\n \"\"\"\n\n category: Union[\n VirtualClassroomProfileActivity,\n List[Union[VirtualClassroomProfileActivity, BaseXapiActivity]],\n ]\n\n @validator(\"category\")\n @classmethod\n def check_presence_of_profile_activity_category(\n cls,\n value: Union[\n VirtualClassroomProfileActivity,\n List[Union[VirtualClassroomProfileActivity, BaseXapiActivity]],\n ],\n ):\n \"\"\"Check that the category list contains a `VirtualClassroomProfileActivity`.\"\"\"\n if isinstance(value, VirtualClassroomProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, VirtualClassroomProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `VirtualClassroomProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomContextContextActivities.check_presence_of_profile_activity_category","title":"check_presence_of_profile_activity_category(value)
classmethod
","text":"Check that the category list contains a VirtualClassroomProfileActivity
.
ralph/models/xapi/virtual_classroom/contexts.py
@validator(\"category\")\n@classmethod\ndef check_presence_of_profile_activity_category(\n cls,\n value: Union[\n VirtualClassroomProfileActivity,\n List[Union[VirtualClassroomProfileActivity, BaseXapiActivity]],\n ],\n):\n \"\"\"Check that the category list contains a `VirtualClassroomProfileActivity`.\"\"\"\n if isinstance(value, VirtualClassroomProfileActivity):\n return value\n for activity in value:\n if isinstance(activity, VirtualClassroomProfileActivity):\n return value\n raise ValueError(\n \"The `context.contextActivities.category` field should contain at least \"\n \"one valid `VirtualClassroomProfileActivity`\"\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomContextExtensions","title":" VirtualClassroomContextExtensions (BaseExtensionModelWithConfig)
pydantic-model
","text":"Pydantic model for virtual classroom base context
.extensions
property.
Attributes:
Name Type Descriptionsession_id
str
Consists of the ID of the active session.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomContextExtensions(BaseExtensionModelWithConfig):\n \"\"\"Pydantic model for virtual classroom base `context`.`extensions` property.\n\n Attributes:\n session_id (str): Consists of the ID of the active session.\n \"\"\"\n\n session_id: str = Field(alias=CONTEXT_EXTENSION_SESSION_ID, default=\"\")\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomInitializedContext","title":" VirtualClassroomInitializedContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom initialized context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomInitializedContextExtensions.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomInitializedContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom initialized `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomInitializedContextExtensions.\n \"\"\"\n\n extensions: VirtualClassroomInitializedContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomInitializedContextExtensions","title":" VirtualClassroomInitializedContextExtensions (VirtualClassroomContextExtensions)
pydantic-model
","text":"Pydantic model for virtual classroom initialized context
.extensions
property.
Attributes:
Name Type Descriptionplanned_duration
datetime
Consists of the estimated duration of the scheduled virtual classroom.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomInitializedContextExtensions(VirtualClassroomContextExtensions):\n \"\"\"Pydantic model for virtual classroom initialized `context`.`extensions` property.\n\n Attributes:\n planned_duration (datetime): Consists of the estimated duration of the scheduled\n virtual classroom.\n \"\"\"\n\n planned_duration: Optional[datetime] = Field(\n alias=CONTEXT_EXTENSION_PLANNED_DURATION\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomJoinedContext","title":" VirtualClassroomJoinedContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom joined context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomJoinedContextExtensions.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomJoinedContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom joined `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomJoinedContextExtensions.\n \"\"\"\n\n extensions: VirtualClassroomJoinedContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomJoinedContextExtensions","title":" VirtualClassroomJoinedContextExtensions (VirtualClassroomContextExtensions)
pydantic-model
","text":"Pydantic model for virtual classroom initialized context
.extensions
property.
Attributes:
Name Type Descriptionplanned_duration
datetime
Consists of the estimated duration of the scheduled virtual classroom.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomJoinedContextExtensions(VirtualClassroomContextExtensions):\n \"\"\"Pydantic model for virtual classroom initialized `context`.`extensions` property.\n\n Attributes:\n planned_duration (datetime): Consists of the estimated duration of the scheduled\n virtual classroom.\n \"\"\"\n\n planned_duration: Optional[datetime] = Field(\n alias=CONTEXT_EXTENSION_PLANNED_DURATION\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomPostedPublicMessageContext","title":" VirtualClassroomPostedPublicMessageContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom posted public message context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomContextExtensions.
contextActivities
list
see VirtualClassroomPostedPublicMessageContextActivities.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomPostedPublicMessageContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom posted public message `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomContextExtensions.\n contextActivities (list): see\n VirtualClassroomPostedPublicMessageContextActivities.\n \"\"\"\n\n extensions: VirtualClassroomContextExtensions\n contextActivities: VirtualClassroomPostedPublicMessageContextActivities\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomPostedPublicMessageContextActivities","title":" VirtualClassroomPostedPublicMessageContextActivities (VirtualClassroomContextContextActivities)
pydantic-model
","text":"Pydantic model for virtual classroom posted public message context
.contextActivities
property.
Attributes:
Name Type Descriptionparent
list
see VirtualClassroomActivity.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomPostedPublicMessageContextActivities(\n VirtualClassroomContextContextActivities\n):\n # noqa: D205, D415\n \"\"\"Pydantic model for virtual classroom posted public message\n `context`.`contextActivities` property.\n\n Attributes:\n parent (list): see VirtualClassroomActivity.\n \"\"\"\n\n parent: Union[VirtualClassroomActivity, List[VirtualClassroomActivity]]\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomProfileActivity","title":" VirtualClassroomProfileActivity (ProfileActivity)
pydantic-model
","text":"Pydantic model for virtual classroom profile Activity
type.
Attributes:
Name Type Descriptionid
str
Consists of the value https://w3id.org/xapi/virtual-classroom
.
ralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomProfileActivity(ProfileActivity):\n \"\"\"Pydantic model for virtual classroom profile `Activity` type.\n\n Attributes:\n id (str): Consists of the value `https://w3id.org/xapi/virtual-classroom`.\n \"\"\"\n\n id: Literal[\n \"https://w3id.org/xapi/virtual-classroom\"\n ] = \"https://w3id.org/xapi/virtual-classroom\"\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomStartedPollContext","title":" VirtualClassroomStartedPollContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom started poll context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomContextExtensions.
contextActivities
dict
see VirtualClassroomStartedPollContextActivities.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomStartedPollContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom started poll `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomContextExtensions.\n contextActivities (dict): see\n VirtualClassroomStartedPollContextActivities.\n \"\"\"\n\n extensions: VirtualClassroomContextExtensions\n contextActivities: VirtualClassroomStartedPollContextActivities\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomStartedPollContextActivities","title":" VirtualClassroomStartedPollContextActivities (VirtualClassroomContextContextActivities)
pydantic-model
","text":"Pydantic model for virtual classroom started poll context
.contextActivities
property.
Attributes:
Name Type Descriptionparent
list
see VirtualClassroomActivity.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomStartedPollContextActivities(\n VirtualClassroomContextContextActivities\n):\n # noqa: D205, D415\n \"\"\"Pydantic model for virtual classroom started poll `context`.`contextActivities`\n property.\n\n Attributes:\n parent (list): see VirtualClassroomActivity.\n \"\"\"\n\n parent: Union[VirtualClassroomActivity, List[VirtualClassroomActivity]]\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomTerminatedContext","title":" VirtualClassroomTerminatedContext (VirtualClassroomContext)
pydantic-model
","text":"Pydantic model for virtual classroom terminated context
property.
Attributes:
Name Type Descriptionextensions
dict
see VirtualClassroomInitializedContextExtensions.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomTerminatedContext(VirtualClassroomContext):\n \"\"\"Pydantic model for virtual classroom terminated `context` property.\n\n Attributes:\n extensions (dict): see VirtualClassroomInitializedContextExtensions.\n \"\"\"\n\n extensions: VirtualClassroomTerminatedContextExtensions\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.contexts.VirtualClassroomTerminatedContextExtensions","title":" VirtualClassroomTerminatedContextExtensions (VirtualClassroomContextExtensions)
pydantic-model
","text":"Pydantic model for virtual classroom terminated context
.extensions
property.
Attributes:
Name Type Descriptionplanned_duration
datetime
Consists of the estimated duration of the scheduled virtual classroom.
Source code inralph/models/xapi/virtual_classroom/contexts.py
class VirtualClassroomTerminatedContextExtensions(VirtualClassroomContextExtensions):\n \"\"\"Pydantic model for virtual classroom terminated `context`.`extensions` property.\n\n Attributes:\n planned_duration (datetime): Consists of the estimated duration of the scheduled\n virtual classroom.\n \"\"\"\n\n planned_duration: Optional[datetime] = Field(\n alias=CONTEXT_EXTENSION_PLANNED_DURATION\n )\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.results","title":"results
","text":"Virtual classroom xAPI events result fields definitions.
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.results.VirtualClassroomAnsweredPollResult","title":" VirtualClassroomAnsweredPollResult (BaseXapiResult)
pydantic-model
","text":"Pydantic model for virtual classroom answered poll result
property.
Attributes:
Name Type Descriptionresponse
str
Consists of the response for the given Activity.
Source code inralph/models/xapi/virtual_classroom/results.py
class VirtualClassroomAnsweredPollResult(BaseXapiResult):\n \"\"\"Pydantic model for virtual classroom answered poll `result` property.\n\n Attributes:\n response (str): Consists of the response for the given Activity.\n \"\"\"\n\n response: StrictStr # = StrictStr()\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements","title":"statements
","text":"Virtual classroom xAPI event definitions.
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.BaseVirtualClassroomStatement","title":" BaseVirtualClassroomStatement (BaseXapiStatement)
pydantic-model
","text":"Pydantic model for Virtual Classroom core statements.
Attributes:
Name Type Descriptiontimestamp
datetime
Consists of the timestamp of when the event occurred.
Source code inralph/models/xapi/virtual_classroom/statements.py
class BaseVirtualClassroomStatement(BaseXapiStatement):\n \"\"\"Pydantic model for Virtual Classroom core statements.\n\n Attributes:\n timestamp (datetime): Consists of the timestamp of when the event occurred.\n \"\"\"\n\n timestamp: datetime\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomAnsweredPoll","title":" VirtualClassroomAnsweredPoll (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom answered poll statement.
Example: John answered to a poll question.
Attributes:
Name Type Descriptionverb
dict
See AskedVerb.
object
dict
See CMIInteractionActivity.
context
dict
See VirtualClassroomAnsweredPollContext.
result
dict
See AnsweredPollResult.
result
dict
See AnsweredPollResult.
timestamp
datetime
Consists of the timestamp of when the event occurred.
result
dict
See AnsweredPollResult.
timestamp
datetime
Consists of the timestamp of when the event occurred.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomAnsweredPoll(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom answered poll statement.\n\n Example: John answered to a poll question.\n\n Attributes:\n verb (dict): See AskedVerb.\n object (dict): See CMIInteractionActivity.\n context (dict): See VirtualClassroomAnsweredPollContext.\n result (dict): See AnsweredPollResult.\n result (dict): See AnsweredPollResult.\n timestamp (datetime): Consists of the timestamp of when the event occurred.\n result (dict): See AnsweredPollResult.\n timestamp (datetime): Consists of the timestamp of when the event occurred.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/answered\",\n object__definition__type=(\n \"http://adlnet.gov/expapi/activities/cmi.interaction\"\n ),\n )\n\n verb: AnsweredVerb = AnsweredVerb()\n object: CMIInteractionActivity\n context: VirtualClassroomAnsweredPollContext\n result: VirtualClassroomAnsweredPollResult\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomInitialized","title":" VirtualClassroomInitialized (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom initialized statement.
Example: John has entered the virtual classroom as the first user.
Attributes:
Name Type Descriptionverb
dict
See InitializedVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomInitializedContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomInitialized(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom initialized statement.\n\n Example: John has entered the virtual classroom as the first user.\n\n Attributes:\n verb (dict): See InitializedVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomInitializedContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/initialized\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: InitializedVerb = InitializedVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomInitializedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomJoined","title":" VirtualClassroomJoined (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom joined statement.
Example: Jane has entered the virtual classroom.
Attributes:
Name Type Descriptionverb
dict
See JoinVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomJoinedContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomJoined(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom joined statement.\n\n Example: Jane has entered the virtual classroom.\n\n Attributes:\n verb (dict): See JoinVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomJoinedContext.\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://activitystrea.ms/join\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: JoinVerb = JoinVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomJoinedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomLeft","title":" VirtualClassroomLeft (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom joined statement.
Example: Jane has left the virtual classroom.
Attributes:
Name Type Descriptionverb
dict
See LeaveVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomLeft(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom joined statement.\n\n Example: Jane has left the virtual classroom.\n\n Attributes:\n verb (dict): See LeaveVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://activitystrea.ms/leave\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: LeaveVerb = LeaveVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomLoweredHand","title":" VirtualClassroomLoweredHand (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom lowered hand statement.
Example: Jane has lowered the hand.
Attributes:
Name Type Descriptionverb
dict
See LoweredHandVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomLoweredHandContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomLoweredHand(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom lowered hand statement.\n\n Example: Jane has lowered the hand.\n\n Attributes:\n verb (dict): See LoweredHandVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomLoweredHandContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/lowered-hand\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: LoweredHandVerb = LoweredHandVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomMuted","title":" VirtualClassroomMuted (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom muted statement.
Example: Jane has muted herself or has been muted.
Attributes:
Name Type Descriptionverb
dict
See MutedVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomMutedContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomMuted(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom muted statement.\n\n Example: Jane has muted herself or has been muted.\n\n Attributes:\n verb (dict): See MutedVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomMutedContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/muted\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: MutedVerb = MutedVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomPostedPublicMessage","title":" VirtualClassroomPostedPublicMessage (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom posted public message statement.
Example: John sent a message in the public chat.
Attributes:
Name Type Descriptionverb
dict
See PostedVerb.
object
dict
See MessageActivity.
context
dict
See VirtualClassroomPostedPublicMessageContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomPostedPublicMessage(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom posted public message statement.\n\n Example: John sent a message in the public chat.\n\n Attributes:\n verb (dict): See PostedVerb.\n object (dict): See MessageActivity.\n context (dict): See VirtualClassroomPostedPublicMessageContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/acrossx/verbs/posted\",\n object__definition__type=\"https://w3id.org/xapi/acrossx/activities/message\",\n )\n\n verb: PostedVerb = PostedVerb()\n object: MessageActivity\n context: VirtualClassroomPostedPublicMessageContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomRaisedHand","title":" VirtualClassroomRaisedHand (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom raised hand statement.
Example: Jane has raised the hand.
Attributes:
Name Type Descriptionverb
dict
See RaisedHandVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomRaisedHandContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomRaisedHand(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom raised hand statement.\n\n Example: Jane has raised the hand.\n\n Attributes:\n verb (dict): See RaisedHandVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomRaisedHandContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/raised-hand\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: RaisedHandVerb = RaisedHandVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomSharedScreen","title":" VirtualClassroomSharedScreen (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom shared screen statement.
Example: Jane has shared her screen.
Attributes:
Name Type Descriptionverb
dict
See SharedScreenVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomSharedScreenContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomSharedScreen(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom shared screen statement.\n\n Example: Jane has shared her screen.\n\n Attributes:\n verb (dict): See SharedScreenVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomSharedScreenContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/shared-screen\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: SharedScreenVerb = SharedScreenVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomStartedCamera","title":" VirtualClassroomStartedCamera (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom started camera statement.
Example: Jane has started her camera.
Attributes:
Name Type Descriptionverb
dict
See StartedCameraVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomStartedCamera(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom started camera statement.\n\n Example: Jane has started her camera.\n\n Attributes:\n verb (dict): See StartedCameraVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/started-camera\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: StartedCameraVerb = StartedCameraVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomStartedPoll","title":" VirtualClassroomStartedPoll (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom started poll statement.
Example: A poll has been started in the virtual classroom in order to collect participants opinions about a given question.
Attributes:
Name Type Descriptionverb
dict
See AskedVerb.
object
dict
See CMIInteractionActivity.
context
dict
See VirtualClassroomLoweredHandContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomStartedPoll(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom started poll statement.\n\n Example: A poll has been started in the virtual classroom in order\n to collect participants opinions about a given question.\n\n Attributes:\n verb (dict): See AskedVerb.\n object (dict): See CMIInteractionActivity.\n context (dict): See VirtualClassroomLoweredHandContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/asked\",\n object__definition__type=(\n \"http://adlnet.gov/expapi/activities/cmi.interaction\"\n ),\n )\n\n verb: AskedVerb = AskedVerb()\n object: CMIInteractionActivity\n context: VirtualClassroomStartedPollContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomStoppedCamera","title":" VirtualClassroomStoppedCamera (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom stopped camera statement.
Example: Jane has stopped her camera.
Attributes:
Name Type Descriptionverb
dict
See StoppedCameraVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomStoppedCameraContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomStoppedCamera(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom stopped camera statement.\n\n Example: Jane has stopped her camera.\n\n Attributes:\n verb (dict): See StoppedCameraVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomStoppedCameraContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/stopped-camera\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: StoppedCameraVerb = StoppedCameraVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomTerminated","title":" VirtualClassroomTerminated (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom terminated statement.
Example: Jane has terminated the virtual classroom.
Attributes:
Name Type Descriptionverb
dict
See TerminatedVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomTerminatedContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomTerminated(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom terminated statement.\n\n Example: Jane has terminated the virtual classroom.\n\n Attributes:\n verb (dict): See TerminatedVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomTerminatedContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"http://adlnet.gov/expapi/verbs/terminated\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: TerminatedVerb = TerminatedVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomTerminatedContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomUnmuted","title":" VirtualClassroomUnmuted (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom unmuted statement.
Example: Jane has unmuted herself or has been unmuted.
Attributes:
Name Type Descriptionverb
dict
See UnmutedVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomUnmuted(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom unmuted statement.\n\n Example: Jane has unmuted herself or has been unmuted.\n\n Attributes:\n verb (dict): See UnmutedVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/unmuted\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: UnmutedVerb = UnmutedVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"},{"location":"models/xapi/#ralph.models.xapi.virtual_classroom.statements.VirtualClassroomUnsharedScreen","title":" VirtualClassroomUnsharedScreen (BaseVirtualClassroomStatement)
pydantic-model
","text":"Pydantic model for virtual classroom unshared screen statement.
Example: Jane has unshared her screen or her screen has been unshared by the moderator.
Attributes:
Name Type Descriptionverb
dict
See UnsharedScreenVerb.
object
dict
See VirtualClassroomActivity.
context
dict
See VirtualClassroomUnsharedScreenContext.
Source code inralph/models/xapi/virtual_classroom/statements.py
class VirtualClassroomUnsharedScreen(BaseVirtualClassroomStatement):\n \"\"\"Pydantic model for virtual classroom unshared screen statement.\n\n Example: Jane has unshared her screen or her screen has been unshared by the\n moderator.\n\n Attributes:\n verb (dict): See UnsharedScreenVerb.\n object (dict): See VirtualClassroomActivity.\n context (dict): See VirtualClassroomUnsharedScreenContext.\n\n \"\"\"\n\n __selector__ = selector(\n verb__id=\"https://w3id.org/xapi/virtual-classroom/verbs/unshared-screen\",\n object__definition__type=(\n \"https://w3id.org/xapi/virtual-classroom/activity-types/virtual-classroom\"\n ),\n )\n\n verb: UnsharedScreenVerb = UnsharedScreenVerb()\n object: VirtualClassroomActivity\n context: VirtualClassroomContext\n
"}]}
\ No newline at end of file
diff --git a/sitemap.xml b/sitemap.xml
index b062bdb60..05eb44503 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -2,52 +2,52 @@