---
title: "Database path" component_type: script version: "1.0.0" audience: contributor status: stable summary: "CODITECT Learning Management System Query Interface" keywords: ['database', 'learning', 'query', 'review'] tokens: ~500 created: 2025-12-22 updated: 2025-12-22 script_name: "learning_db_query.py" language: python executable: true usage: "python3 scripts/learning_db_query.py [options]" python_version: "3.10+" dependencies: [] modifies_files: false network_access: false requires_auth: false
CODITECT Learning Management System Query Interface
Query learning progress, modules, badges, and achievements from the LMS database. Integrates with /cxq via the --onboarding and --learning flags.
Usage: python3 scripts/learning-db-query.py --progress # Show learning progress python3 scripts/learning-db-query.py --badges # Show earned badges python3 scripts/learning-db-query.py --modules # List available modules python3 scripts/learning-db-query.py --next # Recommend next module python3 scripts/learning-db-query.py --stats # Learning statistics python3 scripts/learning-db-query.py --search "commands" # Search learning content
Version: 1.0.0
File: learning_db_query.py
Functions
get_db()
Get database connection.
get_learning_progress(user_id)
Get user's learning progress across all modules.
get_earned_badges(user_id)
Get user's earned badges.
get_available_badges()
Get all available badges.
get_available_modules(category)
Get available learning modules.
get_next_module(user_id)
Get recommended next module based on progress.
get_learning_stats(user_id)
Get learning statistics.
search_learning_content(query, limit)
Search learning modules and resources.
format_progress_display(progress)
Format progress for display.
format_badges_display(badges, all_badges)
Format badges for display.
format_modules_display(modules)
Format modules for display.
format_stats_display(stats)
Format statistics for display.
format_next_display(next_module)
Format next module recommendation.
main()
No description
Usage
python learning_db_query.py