import React, { useState } from 'react'; import { Check, RefreshCw } from 'lucide-react'; const ConstructiveAlignmentGenerator = () => { const [activity, setActivity] = useState({ name: '', types: [], description: '' }); const [alignment, setAlignment] = useState({ achieve: [], construct: [], achieveExplanation: '', constructExplanation: '' }); const [output, setOutput] = useState(''); const activityTypes = ['solve problems', 'discuss in groups', 'create a project', 'give presentations', 'analyze case studies', 'conduct experiments']; const achieveOptions = ['providing hands-on practice', 'encouraging critical thinking', 'allowing for peer learning', 'applying concepts to real-world situations']; const constructOptions = ['actively engaging with the material', 'discussing ideas with peers', 'applying concepts in new contexts', 'reflecting on their learning process', 'connecting new information to prior knowledge']; const handleActivityChange = (e) => setActivity({ ...activity, [e.target.name]: e.target.value }); const handleActivityTypesChange = (type) => { setActivity(prev => ({ ...prev, types: prev.types.includes(type) ? prev.types.filter(t => t !== type) : [...prev.types, type] })); }; const handleAlignmentChange = (option, category) => { setAlignment(prev => ({ ...prev, [category]: prev[category].includes(option) ? prev[category].filter(item => item !== option) : [...prev[category], option] })); }; const handleExplanationChange = (e, category) => { setAlignment(prev => ({ ...prev, [`${category}Explanation`]: e.target.value })); }; const generateExplanation = () => { const explanation = `
In this activity, students will ${activity.types.join(', ')}.
${activity.description}
${alignment.achieveExplanation}
${alignment.constructExplanation}
`; setOutput(explanation); }; const resetForm = () => { setActivity({ name: '', types: [], description: '' }); setAlignment({ achieve: [], construct: [], achieveExplanation: '', constructExplanation: '' }); setOutput(''); }; const Section = ({ title, children }) => (This generator will help you create a constructive alignment explanation for your learning activity. Fill in the details about your activity and how it aligns with your Intended Learning Outcomes (ILOs). The generator will then produce a formatted explanation that you can use in your lesson plan.
In this activity, students will:
{activityTypes.map(type => (