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 = `

Constructive Alignment Explanation

Learning Activity: "${activity.name}"

In this activity, students will ${activity.types.join(', ')}.

${activity.description}

Alignment Explanation:

a) This activity helps students achieve the ILO by:

${alignment.achieveExplanation}

b) This activity supports students in constructing knowledge by:

${alignment.constructExplanation}

`; setOutput(explanation); }; const resetForm = () => { setActivity({ name: '', types: [], description: '' }); setAlignment({ achieve: [], construct: [], achieveExplanation: '', constructExplanation: '' }); setOutput(''); }; const Section = ({ title, children }) => (

{title}

{children}
); const Button = ({ onClick, children, color = '#3498db', icon }) => ( ); const Checkbox = ({ checked, onChange, label }) => ( ); return (

Constructive Alignment Generator

Introduction

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 => ( handleActivityTypesChange(type)} label={type} /> ))}