Skip to main content

lms-harmonizer

Utility / process for linking LMS data with SIS data in an Ed-Fi ODS. Assumes that LMS data have been retrieved from an LMS via an LMS Extractors and uploaded into tables in the lms schema via LMS Data Store Loader.

Harmonization Process

The primary duty of the LMS Harmonizer is to match Student and Sections found in the data extracted from upstream Learning Management Systems (LMS) with the same entities in an Ed-Fi ODS database, which are sourced from a Student Information System (SIS). These systems often do not have perfect alignment, so that the "harmonization" process used by this tool is imperfect and may need customization to fit your implementation.

Any LMS records that cannot be matched to SIS records are considered "exceptions"; you can generate CSV exports listing the exceptions by using one of the command line options described below. With that information, you can then either update the LMS source system by providing it with additional information, or you can customize this process.

The out-of-the box solution has the following mapping logic:

Student Mapping

For Canvas and Schoology, the default assumption is that the SIS's unique identifier for the student, which has been loaded into the Student.StudentUniqueId field via the Ed-FI ODS / PAI, has also been loaded into the LMS in the following field:

Google Classroom does not have such a field. Instead, the Harmonizer assumes that the student's email address used in Google Classroom is also recorded in the SIS and loaded into the ODS. The Harmonizer then does a simple matching of records by that email address, under the assumption that no two students have the same email address.

Section Mapping

The solution currently assumes that the SIS has a globally-unique identifier, which has been loaded into the Section.SectionIdentifier field in the ODS / API. This same value is then assumed to be loaded into the following field for each LMS:

Customization

If your implementation does not match the logic described above, then you can clone this repository and modify the stored procedures to fit alternate logic.

Getting Started

  1. Requires Python 3.9+ and Poetry.

  2. Requires that you have the ODS/API Suite 3, Version 5.2 or Version 5.3 and have installed the Ed-Fi-LMS extension.

  3. Install required Python packages:

    poetry install
    
  4. Create a .env file, or plan to pass all configuration via command line arguments. See .env.example.

Configuration

Supported parameters:

Description Required Command Line Argument Environment Variable
DB Engine no -g or --engine (mssql postgresql)
DB Server yes -s or --server DB_SERVER
DB Port no (default: 1433) --port DB_PORT
DB Name yes -d or --dbname DB_NAME
Exceptions report directory no (no default) -e or --exceptions-report-directory EXCEPTIONS_REPORT_DIRECTORY
DB Username ** no (no default) -u or --username DB_USERNAME
DB Password ** no (no default) -p or --password DB_PASSWORD
Use integrated security ** no (default: false) -i or --useintegratedsecurity USE_INTEGRATED_SECURITY
Log level* no (default: INFO) -l or --log-level LOG_LEVEL
Encrypt db connection no (default: False) -n or --encrypt ENCRYPT_SQL_CONNECTION
Trust db server certificate no (default: False) -t or --trust-certificate TRUST_SERVER_CERTIFICATE

* Valid values for the optional log level:

  • DEBUG
  • INFO(default)
  • WARNING
  • ERROR
  • CRITICAL

** If using integrated security, DB Username and password won't be required, otherwise they are required.

Running the Tool

For detailed help, execute poetry run python edfi_lms_harmonizer -h.

Sample call using full integrated security, loading from the sample files directory:

poetry run python edfi_lms_harmonizer --server localhost --dbname lms_toolkit --useintegratedsecurity

Developer Notes

Dev Operations

  1. Style check: poetry run flake8
  2. Static typing check: poetry run mypy .
  3. Run unit tests: poetry run pytest tests
  4. Run unit tests with code coverage: poetry run coverage run -m pytest tests
  5. View code coverage: poetry run coverage report
  6. Run SQL Server integration tests: poetry run pytest tests_integration_mssql
  7. Run PostgreSQL integration tests: poetry run pytest tests_integration_pgsql

Also see build.py for use of the build script.

Integration Testing

See Integration test setup instructions (SQL Server | PostgreSQL) for information on configuring integration testing to work in various environments.

Copyright (c) 2022 Ed-Fi Alliance, LLC and contributors.

Licensed under the Apache License, Version 2.0 (the "License").

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

See NOTICES for additional copyright and license notifications.

Metadata

Release files for edfi-lms-harmonizer 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for edfi-lms-harmonizer 1.2.2
File Size Uploaded Provenance Actions
edfi_lms_harmonizer-1.2.2.tar.gz 17.0 kB Without provenance Details for edfi_lms_harmonizer-1.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for edfi-lms-harmonizer 1.2.2
File Interpreter ABI Platform Actions
edfi_lms_harmonizer-1.2.2-py3-none-any.whl Python 3 none any Details for edfi_lms_harmonizer-1.2.2-py3-none-any.whl

Total release size: 53.5 kB

Release files / edfi_lms_harmonizer-1.2.2.tar.gz

Download URL edfi_lms_harmonizer-1.2.2.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4a03dc9642da7d4a0c8f2764ddaf723ff95e25023e38f6d0b2328acec283538e
BLAKE2b-256 checksum
How to use checksums
cc57004b482d941f0494e965f0cc850f0bd574bee440d861f81458835da84e97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/44.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.3.0 tqdm/4.67.1 importlib-metadata/8.6.1 keyring/25.6.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.5

Release files / edfi_lms_harmonizer-1.2.2-py3-none-any.whl

Download URL edfi_lms_harmonizer-1.2.2-py3-none-any.whl
Size 36.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c4fd4eb33a9b30007bdc18156a014063e2e241132416788983f4f07cc079772
BLAKE2b-256 checksum
How to use checksums
a6013824eed6b5b0bbd5d8568fc9dcbd53cbf67fc71a7b47d70893aac15b2cce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/44.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.3.0 tqdm/4.67.1 importlib-metadata/8.6.1 keyring/25.6.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.5

Security for edfi-lms-harmonizer 1.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page