This guide documents the complete process for creating interactive DepEd-aligned modules in the MathGaling Intelligent Tutoring System. Follow this systematic approach to add new modules with proper database integration, frontend components, and educational content.
- Identify Knowledge Components (KCs) from DepEd curriculum
- Extract MELC codes (e.g., M3NS-Ia-9.1, M3NS-Ib-5.1-2)
- Collect learning objectives and detailed content
- Document practice activities and real-world contexts
- Note Filipino terminology and cultural elements
Module X: [Filipino Title]
βββ KC#: [Knowledge Component Title]
β βββ Learning Objectives
β βββ Key Concepts
β βββ Practice Activities
β βββ Assessment Criteria
βββ KC#: [Next Knowledge Component]
- Module 1: Numero At Ang Kahulugan Nito (KC1, KC2, KC3)
- Module 2: Paghahambing at Pagkakaayos ng mga Numero (KC4, KC5, KC6)
- Module 3: Ordinal Numbers at Pera (KC7, KC8)
File: /scripts/fix-seed-deped-modules-safe.sql
-- Insert new module
INSERT INTO deped_modules (quarter_id, module_number, title, description, estimated_weeks, order_index, is_active) VALUES
(
(SELECT id FROM deped_quarters WHERE quarter_number = X AND grade_level = 3),
MODULE_NUMBER,
'Module Title in Filipino',
'English description of module content',
ESTIMATED_WEEKS,
ORDER_INDEX,
true
);-- Insert competencies for each KC
INSERT INTO learning_competencies (module_id, melc_code, competency_text, learning_objectives, difficulty_level) VALUES
(
module_id,
'MELC_CODE',
'KC#: Knowledge Component Title',
ARRAY[
'Learning objective 1',
'Learning objective 2',
'...'
],
DIFFICULTY_LEVEL
);- Quarter 1: Modules 1, 2 (Unang Markahan)
- Quarter 2: Module 3+ (Ikalawang Markahan)
- Auto-create quarters if they don't exist
const moduleContent = {
MODULE_NUMBER: {
title: "Module X: Filipino Title",
description: "English description",
lessons: [
{
id: KC_NUMBER,
title: "KC#: Knowledge Component Title",
melc_code: "MELC_CODE",
steps: [
{
type: "introduction|explanation|interactive|practice",
title: "Step Title",
content: "Step content with markdown support",
visual: "π’", // Emoji icon
// Additional properties based on type
}
]
}
]
}
};- Introduction Steps:
{
type: "introduction",
title: "Welcome Message",
content: "Motivating introduction content",
visual: "π―"
}- Explanation Steps:
{
type: "explanation",
title: "Concept Explanation",
content: "Detailed rules and concepts with markdown",
visual: "π",
example: {
number: "Example title",
breakdown: [
{ step: "Step 1", check: "What to check", result: "Outcome" },
{ position: "21st", filipino: "Ika-dalawampu't isa", rule: "ends in 1 β st" },
{ format: "Symbol form", result: "PhP 36.75", explanation: "Use PhP notation" }
],
fullWords: "Complete example in words",
ascending: "Ordered sequence",
numbers: "Number list"
}
}- Interactive Steps:
{
type: "interactive",
title: "Interactive Challenge",
question: "Question text here?",
hint: "Helpful hint for students",
correctAnswer: "EXACT_ANSWER",
options: ["Option 1", "Option 2", "Option 3", "Option 4"],
explanation: "Why this answer is correct"
}- Practice Steps:
{
type: "practice",
title: "Practice Exercise",
content: "Practice context",
question: "Practice question?",
hint: "Practice hint",
correctAnswer: "ANSWER",
explanation: "Detailed explanation"
}// Update quarter assignment
quarter_number: moduleId === "1" ? 1 : moduleId === "2" ? 1 : 2,
estimated_weeks: moduleId === "1" ? 3 : moduleId === "2" ? 4 : 3,- All functions use
moduleContent[moduleId]for dynamic content - Progress calculation across all steps in all lessons
- Proper step and lesson advancement logic
// Allow access to implemented modules for testing
const isAccessible = module.module_number <= 3 || index === 0 || previousModule?.is_completed || module.completion_percentage > 0;// Add debug logging for module fetching
console.log('Fetched DepEd modules:', modulesResponse.data);
console.log('Module count:', modulesResponse.data.length);- Netlify Function:
/api/students/:id/deped-modules - View:
deped_module_overviewincludes all modules automatically - Progressive Loading: Fetches from database view with competency counts
-
Language: Extensive Filipino terminology
- Ordinal: "ika-", "una", "ikalawa"
- Money: "piso", "sentimo", "at"
- Directions: "pataas", "pababa"
-
Cultural Contexts:
- Philippine heroes on currency
- Filipino alphabet (28 letters with NG, Γ)
- Local scenarios (schools, markets, holidays)
-
Real-World Applications:
- Tree planting comparisons
- Market weight ordering
- Birthday celebrations
- Shopping scenarios
- Introduction: Motivating context with visual icons
- Explanation: Detailed rules with structured examples
- Interactive: Guided practice with immediate feedback
- Practice: Independent application with hints
- Immediate Feedback: 4-second display with explanations
- Positive Reinforcement: "π Excellent!" for correct answers
- Gentle Correction: Hints and proper solutions for errors
- Auto-Advancement: Seamless progression through content
/client/src/components/student/
βββ ModuleLearningView.js # Main interactive tutoring component
βββ ModuleLearningView.css # Styling for tutoring interface
βββ DepEdModuleDashboard.js # Module selection dashboard
/scripts/
βββ fix-seed-deped-modules-safe.sql # Database setup script
/netlify/functions/
βββ api.js # API endpoints (already configured)
/
βββ MODULE_1_IMPLEMENTATION.md
βββ MODULE_2_IMPLEMENTATION.md
βββ MODULE_3_IMPLEMENTATION.md
βββ INTERACTIVE_MODULE_CREATION_GUIDE.md (this file)
npm run build
# Verify no compilation errors
# Check bundle size increase is reasonable- Database Setup: Run SQL script successfully
- Dashboard Display: Module appears in correct quarter
- Navigation:
/student/module/Xroutes properly - Content Flow: All steps advance correctly
- Interactions: Questions and feedback work properly
- Cultural Elements: Filipino terms display correctly
- MELC Alignment: Content matches curriculum codes
- Age Appropriateness: Grade 3 cognitive level suitable
- Cultural Sensitivity: Respectful Filipino integration
- Learning Progression: Logical step-by-step advancement
- Always start with introduction for context setting
- Use visual icons consistently across step types
- Include Filipino terminology with English explanations
- Provide real-world contexts familiar to students
- Structure examples with clear breakdowns
- Dynamic property handling in example rendering
- Consistent step type logic across all modules
- Proper quarter assignment based on module number
- Debug logging for development troubleshooting
- Scalable architecture for unlimited module addition
- Use DO $$ blocks for safe script execution
- Check existence before inserting records
- Handle conflicts with proper deletion/re-insertion
- Include verification queries for confirmation
- Join tables properly for complex queries
- DepEd curriculum data collected and organized
- MELC codes identified and validated
- Filipino terminology researched and verified
- Real-world contexts planned and culturally appropriate
- Module entry added to seed script
- Learning competencies defined with objectives array
- Quarter assignment configured correctly
- Verification queries updated to include new module
- Module content object structured properly
- All step types implemented (intro, explanation, interactive, practice)
- Filipino cultural elements integrated throughout
- Example breakdowns use appropriate property names
- Module logic updated for new module number
- Module accessibility updated in DepEdModuleDashboard
- Debug logging confirms module fetching
- Quarter navigation works properly
- Progressive access maintains educational sequence
- Build compiles without errors
- Database script executes successfully
- Module appears in dashboard under correct quarter
- Navigation to module works properly
- All interactive elements function correctly
- Cultural content displays appropriately
- Educational progression flows logically
- Implementation documentation created
- Technical patterns documented
- Cultural elements explained
- Testing results verified
- Copy Module 3 structure in ModuleLearningView.js
- Update module number, title, and quarter assignment
- Replace KC content with new curriculum data
- Add database entries to seed script
- Update dashboard accessibility for new module number
- Test full implementation following checklist
- Document new module following established patterns
- Module 1-2: Quarter 1 (Foundation concepts)
- Module 3+: Quarter 2+ (Advanced concepts)
- KC Numbering: Sequential (KC7, KC8, KC9, KC10...)
- MELC Codes: Match official DepEd curriculum
This guide provides the complete framework for creating interactive, culturally-authentic, DepEd-aligned modules in the MathGaling Intelligent Tutoring System. Each module follows consistent patterns while allowing for unique educational content and cultural integration. The system is designed for scalability and maintains high educational standards throughout the development process.
Current Status: 3 modules implemented (9 knowledge components total) Next Steps: Follow this guide to add Module 4+ with additional DepEd curriculum content