Skip to content

YfengJ/course-analysis-system

Repository files navigation

Course Attainment Report System

English | 中文

A local web system for course objective attainment analysis, report generation, and evidence archiving. It connects syllabi, course objectives, assessment weights, student scores, analysis results, report versions, and archive packages into a traceable workflow for course evaluation and continuous improvement.

Screenshots

Compact Course Workbench

The dashboard prioritizes current course status, evidence readiness, report progress, and the next actionable step. Course records are presented as a scan-friendly work queue instead of a marketing-style hero page.

Course Dashboard

Evidence-Led Attainment Analysis

The analysis page keeps scope filters, provenance notes, key metrics, charts, calculation tables, and manual revisions in a consistent operational hierarchy.

Attainment Analysis

Report Review And Export

The report workspace separates review actions from report content and keeps source labels visible before Word export, quality checks, or archive packaging.

Report Preview

Features

  • Teacher-oriented workbench: compact course queue, explicit next actions, consistent workflow tabs, responsive navigation, keyboard focus states, and mobile-safe report tables.
  • Course management: maintain course metadata, objectives, graduation requirement indicators, and assessment weights.
  • Syllabus parsing: extract course information, objective descriptions, requirement mappings, and assessment support relationships from .docx syllabi.
  • Score import precheck: supports .xls/.xlsx/.xlsm/.csv and multiple class files in one import; the system previews student count, classes, sheets, column mappings, duplicate student numbers, and score issues before writing the whole batch atomically.
  • Attainment analysis: calculates quantitative attainment, qualitative attainment, statistical indicators, passing counts, distribution bands, and overall course attainment.
  • Manual revision: adjust qualitative counts and explanatory notes on the analysis page, then reuse those revisions in the report.
  • Chapter 5 editing: generate improvement suggestions with an optional LLM integration, or edit and save the text manually.
  • Report export and archive: preview reports, export Word files, keep report versions, archive final versions, and compare adjacent versions.
  • Report quality check: checks course owner, objectives, score data, chapter 4 calculation, chapter 5 text, and archive status before export or final archive.
  • Course archive package: exports a course evidence package with analysis summary, quality check result, syllabus parsing result, import logs, analysis snapshots, and generated Word reports.
  • Backup and restore: create system backup packages from the Data Maintenance page and preserve the current database before restore.
  • Operational safeguards: role-based course access, CSRF protection for write operations, generated persistent session secrets, validated backup archives, and isolated runtime data directories.

Typical Workflow

  1. Create a course and fill in basic course information.
  2. Upload a syllabus and review parsed objectives, indicators, and assessment mappings.
  3. Upload one or more class score files, run the precheck, and confirm the import.
  4. Run attainment calculation on the analysis page and revise results when needed.
  5. Edit chapter 5 evaluation and improvement content.
  6. Preview the report and run the report quality check.
  7. Export the Word report, archive the final version, or download the course archive package.

When a syllabus, score batch, objective, or expected value changes, the current calculation and editable analysis are invalidated. Recalculate before exporting the next report; historical snapshots and reports remain available as evidence.

Tech Stack

  • Backend: Python, Flask, SQLAlchemy, WTForms
  • Frontend: Jinja2, Bootstrap 5, ECharts, Mermaid
  • Data processing: pandas, openpyxl
  • Document export: python-docx
  • Database: SQLite

Quick Start

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python init_db.py
python app.py

Open http://127.0.0.1:5000.

On first startup, the system creates an administrator account. The default username is admin, and the default password is admin123. The system requires changing the initial password before entering course data pages. For real deployment, configure a temporary strong password through environment variables.

python init_db.py only creates database tables by default. It does not delete existing data or write demo courses.

To reset the local SQLite database and load sanitized demo data:

python init_db.py --reset-demo

Before resetting, the script backs up the old database as a .bak file.

Optional Environment Variables

LLM-based suggestions are optional. Course creation, score import, attainment calculation, manual editing, and report export work without an LLM key.

export COURSE_SYSTEM_DATA_DIR="/path/to/course-system-data"
export DEFAULT_ADMIN_USERNAME="admin"
export DEFAULT_ADMIN_PASSWORD="replace-with-a-temporary-strong-password"
export SESSION_COOKIE_SECURE="false"
export LLM_API_BASE="https://api.deepseek.com"
export LLM_API_KEY="your-model-service-key"
export LLM_MODEL="deepseek-v4-flash"
export LLM_TIMEOUT="45"
export LLM_VERIFY_SSL="true"

LLM_TIMEOUT is measured in seconds. If SECRET_KEY is not configured, the application creates a random key under the runtime data directory and reuses it on later starts. Set SESSION_COOKIE_SECURE=true when the application is served through HTTPS. Remote LLM endpoints must use HTTPS; keep TLS verification enabled in production.

Data And Privacy

This repository should contain only source code, templates, and sanitized samples. The following content is excluded by .gitignore and the release packaging script:

  • .env, API keys, database files, and backup files
  • instance/, uploads/, exports/, datasoruce/, tmp/, output/
  • Real syllabi, score sheets, student information, and exported reports
  • Local virtual environments, browser binaries, IDE settings, and caches

For deployment, set COURSE_SYSTEM_DATA_DIR so databases, uploads, reports, and backups live outside the source directory. In a fresh environment, the system uses var/ by default; if a legacy instance/attainment_system.db already exists, the system keeps the legacy path to avoid hiding existing courses after upgrade.

Release Package

Create a release package without real course data:

python scripts/build_release.py

The archive is written to dist/course-system-release.zip by default. It excludes databases, uploads, exported reports, real score and syllabus files, local helper scripts, and local caches.

Tests

python scripts/run_tests.py

Repository maintainers can run the same cross-platform entry point used by CI:

npm ci
npm test

If local course test files are available, you can also run:

python -m unittest tests/test_real_fixture_import.py

Project Structure

coursesystem/
├── app.py
├── config.py
├── forms.py
├── init_db.py
├── models.py
├── routes/
├── services/
├── static/
├── templates/
├── sample_data/
├── docs/
├── tests/
└── README.md

Runtime directories such as uploads/, exports/, and instance/ are created automatically. When COURSE_SYSTEM_DATA_DIR is configured, they are created under that data directory instead.

More Documentation

About

Course objective attainment analysis, report generation, and evidence archiving system.

Topics

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors