Skip to content

This project demonstrates the power of **Generative AI** in educational technology by providing an intelligent platform that transforms any topic into comprehensive learning materials and interactive assessments. Built with OpenAI's cutting-edge models, it showcases how AI can revolutionize content creation in education.

License

Notifications You must be signed in to change notification settings

ettorecar/ai-learning-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI-Powered E-Learning Course & Quiz Generator

An intelligent web platform that leverages Generative AI to create personalized educational content and interactive quizzes in seconds. Transform any topic into a comprehensive learning experience with AI-generated courses, custom assessments, and multilingual support.

πŸš€ Key Features

πŸ€– Generative AI Integration

  • OpenAI GPT Integration: Powered by OpenAI's advanced language models for content generation
  • AI Image Generation: Automatic topic-relevant image creation using DALL-E
  • Smart Content Creation: Generates comprehensive course summaries (~500 words) with contextual accuracy
  • Intelligent Quiz Generation: Creates relevant questions with plausible distractors

πŸ“š Multi-Source Learning

  • Topic-Based Generation: Enter any subject and get instant course content
  • Article Processing: Paste existing articles for quiz generation
  • URL Content Extraction: Extract and process content from web URLs
  • Random Topic Discovery: AI suggests and creates content for random educational topics

🌍 Multilingual Support

  • 4 Languages Available: Italian, English, French, and Spanish
  • Localized Interface: Complete UI translation for all supported languages
  • Content Generation: AI generates course materials in the selected language

πŸ“ Customizable Assessment

  • Flexible Quiz Configuration:
    • Custom number of questions (1-N)
    • Variable answer options per question (2-N)
    • Single-answer or multiple-choice formats
    • Adjustable passing threshold (1-100%)
  • Real-time Preview: Interactive quiz preview before generation
  • Instant Scoring: Automated grading with detailed feedback

🎨 Modern Web Interface

  • Responsive Design: Bootstrap-based responsive layout
  • Interactive UI: Dynamic form validation and real-time updates
  • Visual Feedback: Loading animations and progress indicators
  • Professional Styling: Modern CSS with Font Awesome icons

πŸ›  Technology Stack

Backend

  • Python Flask: RESTful API server
  • OpenAI API: GPT models for text generation and DALL-E for images
  • Flask-CORS: Cross-origin resource sharing support

Frontend

  • HTML5/CSS3: Modern semantic markup and styling
  • JavaScript ES6: Modular JavaScript with import/export
  • Bootstrap 5: Responsive grid system and components
  • jQuery: DOM manipulation and AJAX requests

Styling & Assets

  • Font Awesome: Professional icon library
  • Custom CSS: Branded styling and animations
  • Web Fonts: Poppins font family for modern typography

πŸ“‹ User Input Parameters

Content Source Selection (Required - Choose One)

  1. Topic: Free text input for any subject area
  2. Article: Paste existing article content
  3. URL: Provide web link for content extraction
  4. Random Topic: Let AI choose a random educational topic

Quiz Configuration (Required)

  • Number of Questions: Integer input (recommended: 1-20)
  • Number of Answer Options: Integer input (recommended: 2-5)
  • Answer Type:
    • Single Answer (radio buttons)
    • Multiple Choice (checkboxes)
  • Passing Threshold: Percentage slider (1-100%)
  • Language: Dropdown selection (Italian/English/French/Spanish)

πŸš€ Quick Start

Prerequisites

  • Python 3.7+
  • OpenAI API key
  • Modern web browser

Installation

  1. Clone the repository
git clone https://github.com/ettorecar/ai-learning-generator.git
cd ai-learning-generator
  1. Install Python dependencies
pip install -r requirements.txt
  1. Configure OpenAI API
# Update openai_mw.py with your API key
openai.api_key = 'your-openai-api-key-here'
  1. Start the Flask server
python openai_mw.py
  1. Launch the web interface
# Open index.html in your web browser
# Or serve with a local web server on port 5500

πŸ”§ Configuration

API Endpoint Configuration

The application expects the Flask API to run on http://127.0.0.1:8080 by default. Update the endpoint in quiz.js if needed:

fetch('http://your-api-endpoint/api/v.1.0/middleware_chatgpt', requestOptions)

CORS Configuration

The Flask server is configured to accept requests from http://127.0.0.1:5500. Update the CORS settings in openai_mw.py for different origins:

CORS(app, resources={r"/*": {"origins": "http://your-frontend-url"}})

πŸ“ Project Structure

β”œβ”€β”€ index.html              # Main landing page and quiz configuration
β”œβ”€β”€ quiz.html              # Quiz display and interaction page
β”œβ”€β”€ openai_mw.py           # Flask API server with OpenAI integration
β”œβ”€β”€ quiz.js                # Quiz logic and API communication
β”œβ”€β”€ constants.js           # Multilingual constants and translations
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ css/                   # Stylesheets and frameworks
β”‚   β”œβ”€β”€ bootstrap.min.css  # Bootstrap framework
β”‚   β”œβ”€β”€ style.css         # Custom styles
β”‚   └── index.css         # Page-specific styles
β”œβ”€β”€ js/                    # JavaScript libraries
β”‚   β”œβ”€β”€ jquery.min.js     # jQuery library
β”‚   └── custom.js         # Custom interactions
β”œβ”€β”€ images/                # Static assets and generated images
└── fonts/                 # Web fonts and icon fonts

🎯 Use Cases

Educational Institutions

  • Rapid course material development
  • Automated assessment creation
  • Multilingual educational content
  • Student self-assessment tools

Corporate Training

  • Employee skill assessment
  • Training material generation
  • Compliance testing
  • Onboarding quizzes

Content Creators

  • Educational content generation
  • Blog post quizzes
  • Learning verification tools
  • Audience engagement

Self-Learners

  • Topic exploration
  • Knowledge testing
  • Study material creation
  • Progress tracking

πŸ”’ Security Considerations

  • API Key Protection: Store OpenAI API keys securely (environment variables recommended)
  • Input Validation: Implement proper validation for user inputs
  • Rate Limiting: Consider implementing rate limiting for API calls
  • CORS Policy: Configure appropriate CORS policies for production

πŸš€ Future Enhancements

  • User Authentication: Login system for personalized learning
  • Progress Tracking: Learning analytics and progress monitoring
  • Advanced AI Features: Integration with newer OpenAI models
  • Export Capabilities: PDF/SCORM export for generated content
  • Database Integration: Persistent storage for courses and results
  • Mobile App: Native mobile applications
  • Collaborative Features: Course sharing and collaboration tools

οΏ½β€πŸ’» Authors

  • [Ettore Carpinella] - Project Creator & Lead Developer
  • [Maria Rosaria Lorito, Raffaella Tuozzolo] - Senior developers

οΏ½πŸ“„ License

This project is open source and available under the MIT License.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

πŸ“ž Support

For support, questions, or feature requests, please open an issue on GitHub or contact the development team at [ettorecar.git at gmail ]


Powered by OpenAI GPT & DALL-E | Built with ❀️ for Educational Innovation

About

This project demonstrates the power of **Generative AI** in educational technology by providing an intelligent platform that transforms any topic into comprehensive learning materials and interactive assessments. Built with OpenAI's cutting-edge models, it showcases how AI can revolutionize content creation in education.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published