Code Monkey home page Code Monkey logo

canvassisdiffs's Introduction

What it does:

This Python script automates the process of identifying newly added error messages in a Student Information System (SIS) and Canvas Learning Management System (LMS) integration. It helps detect potential enrollment errors related to non-existent sections.

How it works:

  1. Directory Discovery:
    • The script searches a specified directory structure for subdirectories containing three required CSV files:
      • errors.csv
      • enrollments.csv
      • sections.csv
  2. Error Message Comparison:
    • It compares the timestamps of these directories and focuses on the one with the latest modification time (assumed to be the most recent).
    • The script then compares the 'message' field in errors.csv files from the newest directory with a previous version (determined by timestamp).
    • This comparison identifies newly added error messages.
  3. Error Validation and Reporting:
    • For each newly added message, the script attempts to extract a section number.
    • If a section number is found, it checks the enrollments.csv file within the latest directory for a matching 'section_id'.
    • If a matching enrollment record exists and its status is 'active', the script prints an error message indicating a potential discrepancy: an active enrollment referencing a potentially non-existent section.

How to use it:

  1. Update the parent_directory variable at the bottom of the script to point to the root directory containing the subdirectories with the required CSV files.
  2. Run the script using: python sis_canvas_error_checker.py

Notes:

  • This script assumes a specific directory structure and CSV file format. Anpassments might be necessary for different configurations.
  • Error handling is not explicitly implemented. Consider adding checks for potential file access or parsing errors.

canvassisdiffs's People

Contributors

dvaishna avatar

Watchers

Jeff Henline avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.