diff --git a/content/chapters/test-heavy-stress.json b/content/chapters/test-heavy-stress.json index 060aa7f..6c05959 100644 --- a/content/chapters/test-heavy-stress.json +++ b/content/chapters/test-heavy-stress.json @@ -208,15 +208,111 @@ "lessons": { "lesson1": { "title": "Foundations of Research Methodology", - "content": "Research methodology constitutes the systematic theoretical analysis of the methods applied to a field of study. It encompasses the comprehensive framework of epistemological, ontological, and phenomenological considerations that guide rigorous academic inquiry. Contemporary researchers must navigate complex paradigmatic tensions between positivist empirical approaches and constructivist interpretive methodologies. The theoretical foundations of quantitative research emphasize statistical significance, experimental control, and generalizability of findings across diverse populations. Conversely, qualitative investigation prioritizes comprehensive understanding, contextual interpretation, and the nuanced exploration of subjective phenomena. Modern academic discourse increasingly advocates for sophisticated mixed-methods approaches that synthesize both quantitative measurement and qualitative analysis. Triangulation strategies enhance validity through multiple data sources, theoretical perspectives, and methodological approaches. Researchers must demonstrate meticulous attention to bias reduction, sample representativeness, and ethical considerations throughout the investigation process. The operationalization of abstract concepts requires precise definitional frameworks and robust measurement instruments. Contemporary methodology emphasizes reproducibility, transparency, and rigorous peer review processes. Advanced statistical techniques including regression modeling, multivariate analysis, and machine learning algorithms enable sophisticated pattern recognition and predictive modeling. Researchers increasingly utilize computational processing power for extensive dataset analysis and complex simulation procedures." + "content": "Research methodology constitutes the systematic theoretical analysis of the methods applied to a field of study. It encompasses the comprehensive framework of epistemological, ontological, and phenomenological considerations that guide rigorous academic inquiry. Contemporary researchers must navigate complex paradigmatic tensions between positivist empirical approaches and constructivist interpretive methodologies. The theoretical foundations of quantitative research emphasize statistical significance, experimental control, and generalizability of findings across diverse populations. Conversely, qualitative investigation prioritizes comprehensive understanding, contextual interpretation, and the nuanced exploration of subjective phenomena. Modern academic discourse increasingly advocates for sophisticated mixed-methods approaches that synthesize both quantitative measurement and qualitative analysis. Triangulation strategies enhance validity through multiple data sources, theoretical perspectives, and methodological approaches. Researchers must demonstrate meticulous attention to bias reduction, sample representativeness, and ethical considerations throughout the investigation process. The operationalization of abstract concepts requires precise definitional frameworks and robust measurement instruments. Contemporary methodology emphasizes reproducibility, transparency, and rigorous peer review processes. Advanced statistical techniques including regression modeling, multivariate analysis, and machine learning algorithms enable sophisticated pattern recognition and predictive modeling. Researchers increasingly utilize computational processing power for extensive dataset analysis and complex simulation procedures.", + "questions": [ + { + "question": "What are the key differences between positivist and constructivist research paradigms?", + "options": [ + "Positivist emphasizes statistical significance while constructivist prioritizes contextual interpretation", + "Positivist uses qualitative methods while constructivist uses quantitative methods", + "Positivist focuses on subjective phenomena while constructivist emphasizes empirical control", + "There are no significant differences between these paradigms" + ], + "correct_answer": 0 + }, + { + "question": "According to the text, what is the primary purpose of triangulation in research methodology?", + "options": [ + "To reduce research costs", + "To enhance validity through multiple data sources, theoretical perspectives, and methodological approaches", + "To simplify data collection procedures", + "To eliminate the need for peer review" + ], + "correct_answer": 1 + }, + { + "question": "What does 'operationalization' refer to in research methodology?", + "options": [ + "The process of conducting surgical research", + "The management of research laboratories", + "Defining abstract concepts with precise frameworks and robust measurement instruments", + "The automation of data collection procedures" + ], + "correct_answer": 2 + } + ] }, "lesson2": { "title": "Advanced Statistical Analysis and Data Interpretation", - "content": "Statistical analysis represents the cornerstone of empirical research methodology, encompassing sophisticated techniques for data exploration, hypothesis testing, and inferential reasoning. Contemporary researchers utilize advanced algorithms for pattern recognition, anomaly detection, and predictive modeling across extensive datasets. The distribution characteristics of variables determine appropriate statistical procedures, including parametric and non-parametric approaches for hypothesis evaluation. Correlation analysis reveals relationships between variables, while causation requires controlled experimental manipulation and rigorous confounding variable elimination. Regression modeling enables prediction and explanation of dependent variable variance through multiple independent predictors. Cluster analysis identifies natural groupings within populations, facilitating targeted intervention strategies and segmentation approaches. Longitudinal studies track cohorts across time, revealing developmental patterns and causal sequences. Cross-sectional comparative designs enable efficient population sampling at specific temporal points. Measurement validity encompasses content, construct, and criterion-related approaches for instrument development. Reliability coefficients assess consistency across time, interrater agreement, and internal consistency measures. Confidence intervals provide probability-based ranges for population parameter estimation. Effect sizes quantify practical significance beyond statistical significance testing. Meta-analysis synthesizes findings across multiple independent studies, enhancing generalizability and statistical power. Advanced modeling techniques including structural equation modeling, hierarchical linear modeling, and machine learning algorithms enable sophisticated hypothesis testing with complex nested data structures." + "content": "Statistical analysis represents the cornerstone of empirical research methodology, encompassing sophisticated techniques for data exploration, hypothesis testing, and inferential reasoning. Contemporary researchers utilize advanced algorithms for pattern recognition, anomaly detection, and predictive modeling across extensive datasets. The distribution characteristics of variables determine appropriate statistical procedures, including parametric and non-parametric approaches for hypothesis evaluation. Correlation analysis reveals relationships between variables, while causation requires controlled experimental manipulation and rigorous confounding variable elimination. Regression modeling enables prediction and explanation of dependent variable variance through multiple independent predictors. Cluster analysis identifies natural groupings within populations, facilitating targeted intervention strategies and segmentation approaches. Longitudinal studies track cohorts across time, revealing developmental patterns and causal sequences. Cross-sectional comparative designs enable efficient population sampling at specific temporal points. Measurement validity encompasses content, construct, and criterion-related approaches for instrument development. Reliability coefficients assess consistency across time, interrater agreement, and internal consistency measures. Confidence intervals provide probability-based ranges for population parameter estimation. Effect sizes quantify practical significance beyond statistical significance testing. Meta-analysis synthesizes findings across multiple independent studies, enhancing generalizability and statistical power. Advanced modeling techniques including structural equation modeling, hierarchical linear modeling, and machine learning algorithms enable sophisticated hypothesis testing with complex nested data structures.", + "questions": [ + { + "question": "What is the fundamental difference between correlation and causation according to the text?", + "options": [ + "Correlation and causation are the same thing", + "Correlation reveals relationships while causation requires controlled experimental manipulation and confounding variable elimination", + "Causation is easier to establish than correlation", + "Correlation requires more data than causation" + ], + "correct_answer": 1 + }, + { + "question": "What advantage do longitudinal studies have over cross-sectional designs?", + "options": [ + "They are cheaper to conduct", + "They require fewer participants", + "They track cohorts across time, revealing developmental patterns and causal sequences", + "They are simpler to analyze statistically" + ], + "correct_answer": 2 + }, + { + "question": "What does meta-analysis accomplish in research?", + "options": [ + "It replaces the need for new research", + "It synthesizes findings across multiple independent studies, enhancing generalizability and statistical power", + "It reduces the cost of individual studies", + "It eliminates the need for statistical significance testing" + ], + "correct_answer": 1 + } + ] }, "lesson3": { "title": "Qualitative Research and Interpretive Methodologies", - "content": "Qualitative research methodology embraces interpretive paradigms that prioritize comprehensive understanding of complex social phenomena through detailed narrative analysis and contextual interpretation. Ethnographic approaches involve extensive participant observation, immersive fieldwork, and cultural interpretation through prolonged engagement with research participants. Phenomenological investigations explore lived experiences, consciousness structures, and subjective meaning-making processes through in-depth interview techniques. Grounded theory methodology emphasizes systematic data collection, theoretical sampling, and iterative analysis for theory development from empirical observations. Hermeneutical approaches focus on textual interpretation, discourse analysis, and the historical contextualization of cultural artifacts. Narrative research examines personal stories, biographical accounts, and identity construction through temporal sequence analysis. Case study methodology provides comprehensive investigation of specific instances, organizations, or phenomena within natural settings. Action research integrates investigation with practical intervention, emphasizing collaborative participation and social change objectives. Data collection techniques include semi-structured interviews, focus group discussions, participant observation, and document analysis procedures. Coding procedures involve open, axial, and selective approaches for pattern identification and categorical development. Triangulation strategies enhance credibility through multiple data sources, investigator perspectives, and theoretical frameworks. Member checking validates interpretations through participant feedback and collaborative meaning verification. Transferability replaces generalizability through detailed contextual description and theoretical conceptualization. Confirmability ensures objectivity through reflexive journaling, audit trails, and peer debriefing processes. Advanced qualitative analysis software facilitates systematic coding, pattern recognition, and theoretical model development." + "content": "Qualitative research methodology embraces interpretive paradigms that prioritize comprehensive understanding of complex social phenomena through detailed narrative analysis and contextual interpretation. Ethnographic approaches involve extensive participant observation, immersive fieldwork, and cultural interpretation through prolonged engagement with research participants. Phenomenological investigations explore lived experiences, consciousness structures, and subjective meaning-making processes through in-depth interview techniques. Grounded theory methodology emphasizes systematic data collection, theoretical sampling, and iterative analysis for theory development from empirical observations. Hermeneutical approaches focus on textual interpretation, discourse analysis, and the historical contextualization of cultural artifacts. Narrative research examines personal stories, biographical accounts, and identity construction through temporal sequence analysis. Case study methodology provides comprehensive investigation of specific instances, organizations, or phenomena within natural settings. Action research integrates investigation with practical intervention, emphasizing collaborative participation and social change objectives. Data collection techniques include semi-structured interviews, focus group discussions, participant observation, and document analysis procedures. Coding procedures involve open, axial, and selective approaches for pattern identification and categorical development. Triangulation strategies enhance credibility through multiple data sources, investigator perspectives, and theoretical frameworks. Member checking validates interpretations through participant feedback and collaborative meaning verification. Transferability replaces generalizability through detailed contextual description and theoretical conceptualization. Confirmability ensures objectivity through reflexive journaling, audit trails, and peer debriefing processes. Advanced qualitative analysis software facilitates systematic coding, pattern recognition, and theoretical model development.", + "questions": [ + { + "question": "What is the primary focus of phenomenological investigations?", + "options": [ + "Statistical analysis of large datasets", + "Exploring lived experiences, consciousness structures, and subjective meaning-making processes", + "Experimental manipulation of variables", + "Cost-benefit analysis of interventions" + ], + "correct_answer": 1 + }, + { + "question": "How does 'transferability' differ from 'generalizability' in qualitative research?", + "options": [ + "They are identical concepts", + "Transferability is less rigorous than generalizability", + "Transferability replaces generalizability through detailed contextual description and theoretical conceptualization", + "Generalizability is only used in qualitative research" + ], + "correct_answer": 2 + }, + { + "question": "What is the purpose of 'member checking' in qualitative research?", + "options": [ + "To reduce research costs", + "To validate interpretations through participant feedback and collaborative meaning verification", + "To recruit new participants", + "To analyze statistical data" + ], + "correct_answer": 1 + } + ] } }, "dialogs": [ @@ -241,6 +337,38 @@ "Dr. Rodriguez: The implications extend beyond immediate findings to broader theoretical frameworks and practical applications in educational policy development and implementation.", "Prof. Chen: Longitudinal tracking enables causal inference through temporal sequence analysis, but correlation does not necessarily establish definitive causation relationships.", "Dr. Williams: Meta-analysis synthesis across multiple studies enhances generalizability while acknowledging contextual variations and methodological differences between investigations." + ], + "questions": [ + { + "question": "According to the discussion, what research approach did Dr. Rodriguez's team use?", + "options": [ + "Only quantitative methods", + "Only qualitative methods", + "Mixed-methods triangulation", + "Pure theoretical analysis" + ], + "correct_answer": 2 + }, + { + "question": "What concern did Prof. Chen raise about the quantitative approach?", + "options": [ + "It was too expensive", + "The qualitative interpretation lacked phenomenological depth and hermeneutical rigor", + "It used too many participants", + "It was too time-consuming" + ], + "correct_answer": 1 + }, + { + "question": "What is the relationship between correlation and causation according to the dialog?", + "options": [ + "They are the same thing", + "Correlation proves causation", + "Correlation does not necessarily establish definitive causation relationships", + "Causation is easier to prove than correlation" + ], + "correct_answer": 2 + } ] }, { diff --git a/src/DRS/UnifiedDRS.js b/src/DRS/UnifiedDRS.js index d9d6ffb..99726f2 100644 --- a/src/DRS/UnifiedDRS.js +++ b/src/DRS/UnifiedDRS.js @@ -6,6 +6,7 @@ import Module from '../core/Module.js'; import componentRegistry from '../components/ComponentRegistry.js'; import ContentDependencyAnalyzer from './services/ContentDependencyAnalyzer.js'; +import exerciseFactory from './factories/ExerciseFactory.js'; class UnifiedDRS extends Module { constructor(name, dependencies, config) { @@ -1081,7 +1082,7 @@ class UnifiedDRS extends Module { } /** - * Load Word Discovery Module + * Load Word Discovery Module using ExerciseFactory */ async _loadWordDiscoveryModule(exerciseType, config) { try { @@ -1090,40 +1091,13 @@ class UnifiedDRS extends Module { // Get chapter content const chapterContent = await this._contentLoader.getContent(config.chapterId); - // Import and initialize Word Discovery Module - const { default: WordDiscoveryModule } = await import('./exercise-modules/WordDiscoveryModule.js'); - - // Get shared services from orchestrator if available - let prerequisiteEngine = null; - try { - const moduleLoader = window.app.getCore().moduleLoader; - const orchestrator = moduleLoader.getModule('smartPreviewOrchestrator'); - if (orchestrator) { - prerequisiteEngine = orchestrator.sharedServices?.prerequisiteEngine; - } - } catch (error) { - console.log('Could not get prerequisite engine:', error); - } - - if (!prerequisiteEngine) { - throw new Error('PrerequisiteEngine not available'); - } - - // Initialize the word discovery module - const wordDiscoveryModule = new WordDiscoveryModule( - this, // orchestrator reference - null, // llmValidator (not needed for discovery) - prerequisiteEngine, - null // contextMemory (not needed for discovery) - ); - - // Present the word discovery interface - await wordDiscoveryModule.present(this._container, { + const content = { chapterContent: chapterContent, exerciseType: exerciseType - }); + }; - console.log('โ Word Discovery Module loaded successfully'); + // Use generic helper + await this._loadExerciseViaFactory('vocabulary-discovery', config, content); } catch (error) { console.error('โ Error loading Word Discovery Module:', error); @@ -1132,11 +1106,11 @@ class UnifiedDRS extends Module { } /** - * Load DRS VocabularyModule (integrated flashcard system) + * Load DRS VocabularyModule (integrated flashcard system) using ExerciseFactory */ async _loadVocabularyModule(exerciseType, config) { try { - console.log('๐ Loading DRS VocabularyModule (flashcard system)...'); + console.log('๐ Loading DRS VocabularyModule...'); // Load content for vocabulary exercises const chapterContent = await this._contentLoader.getContent(config.chapterId); @@ -1146,64 +1120,6 @@ class UnifiedDRS extends Module { throw new Error('No vocabulary content found for flashcards'); } - // Import VocabularyModule from DRS - const { default: VocabularyModule } = await import('./exercise-modules/VocabularyModule.js'); - - // Get shared services from orchestrator or create fallbacks - let prerequisiteEngine = null; - let contextMemory = null; - try { - const moduleLoader = window.app.getCore().moduleLoader; - const orchestrator = moduleLoader.getModule('smartPreviewOrchestrator'); - if (orchestrator && orchestrator.sharedServices) { - prerequisiteEngine = orchestrator.sharedServices.prerequisiteEngine; - contextMemory = orchestrator.sharedServices.contextMemory; - } - } catch (error) { - console.log('Could not get shared services, will create fallbacks:', error); - } - - // Create PrerequisiteEngine if not available - if (!prerequisiteEngine) { - console.log('๐ Creating enhanced PrerequisiteEngine for VocabularyModule'); - - // Import and create enhanced PrerequisiteEngine - const PrerequisiteEngine = (await import('./services/PrerequisiteEngine.js')).default; - prerequisiteEngine = new PrerequisiteEngine(); - - // Initialize with persistent data for this chapter - await prerequisiteEngine.init(config.bookId, config.chapterId); - - // Initialize with chapter content - if (chapterContent) { - prerequisiteEngine.analyzeChapter(chapterContent); - console.log(`๐ Initialized PrerequisiteEngine with chapter content`); - } - } - - if (!contextMemory) { - console.log('๐ Creating fallback ContextMemory for VocabularyModule'); - contextMemory = { - recordInteraction: (interaction) => { - console.log('๐ Interaction recorded (fallback):', interaction.type); - } - }; - } - - // Create VocabularyModule instance - const vocabularyModule = new VocabularyModule( - this, // orchestrator reference - null, // llmValidator (not needed for local validation) - prerequisiteEngine, - contextMemory - ); - - // Store reference for cleanup - this._currentModule = vocabularyModule; - - // Initialize the module - await vocabularyModule.init(); - // Prepare exercise data - convert vocabulary to expected format const vocabularyArray = Object.entries(chapterContent.vocabulary).map(([word, data]) => { // Extract translation string from various possible formats @@ -1232,14 +1148,14 @@ class UnifiedDRS extends Module { }; }); - // Present vocabulary exercises - await vocabularyModule.present(this._container, { + const content = { vocabulary: vocabularyArray, chapterId: config.chapterId, exerciseType: exerciseType - }); + }; - console.log('โ DRS VocabularyModule (flashcards) started successfully'); + // Use generic helper - always use 'vocabulary-flashcards' type for vocabulary module + await this._loadExerciseViaFactory('vocabulary-flashcards', config, content); } catch (error) { console.error('โ Failed to load DRS VocabularyModule:', error); @@ -1254,16 +1170,16 @@ class UnifiedDRS extends Module { } /** - * Load and initialize AI Analysis Module + * Load and initialize AI Analysis Module using ExerciseFactory */ async _loadAIAnalysisModule(exerciseType, config) { try { - console.log('๐ค Loading AI Analysis Module for real chapter content...'); + console.log('๐ค Loading AI Analysis Module...'); // Load real chapter content first const contentRequest = { type: 'exercise', - subtype: 'reading-comprehension-AI', + subtype: exerciseType, bookId: config.bookId, chapterId: config.chapterId, difficulty: config.difficulty || 'medium' @@ -1272,17 +1188,10 @@ class UnifiedDRS extends Module { let chapterContent; try { chapterContent = await this._contentLoader.loadExercise(contentRequest); - console.log('๐ Chapter content loaded - FULL STRUCTURE:', chapterContent); - console.log('๐ Chapter content analysis:', { + console.log('๐ Chapter content loaded:', { contentKeys: Object.keys(chapterContent), hasDialogs: !!chapterContent.dialogs, - dialogCount: chapterContent.dialogs ? Object.keys(chapterContent.dialogs).length : 0, - hasConversations: !!chapterContent.conversations, - hasSteps: !!chapterContent.steps, - stepsCount: chapterContent.steps ? chapterContent.steps.length : 0, - hasContent: !!chapterContent.content, - hasVocabulary: !!chapterContent.vocabulary, - vocabCount: chapterContent.vocabulary ? chapterContent.vocabulary.length : 0 + hasVocabulary: !!chapterContent.vocabulary }); } catch (error) { console.warn('โ ๏ธ Failed to load chapter content:', error); @@ -1295,61 +1204,15 @@ class UnifiedDRS extends Module { throw new Error('No real content found in chapter. AI Analysis requires real chapter content - no fallback available.'); } - // Setup container with proper AI interface - this._container.innerHTML = ` -
- Chapter: ${config.chapterId || 'Unknown'} | - Real Dialogues: ${dialogues.length} found -
-