Skip to content

Latest commit

 

History

History
254 lines (203 loc) · 9.41 KB

File metadata and controls

254 lines (203 loc) · 9.41 KB

QR Code Generation System Documentation

Overview

The QR Code Generation System for the ISO Quality Education Survey provides a comprehensive solution for generating, managing, and distributing QR codes that link directly to the survey landing page. This system enables students to easily access surveys via mobile devices by scanning QR codes.

Features Implemented

1. QR Code Generation

  • Dynamic Generation: Creates unique QR codes for different CSS sections, grades, and academic years
  • Customization Options:
    • Custom colors (foreground and background)
    • Multiple formats (PNG, SVG)
    • Size options for different use cases
  • Automated URL Creation: Automatically generates URLs pointing to the survey landing page

2. Admin Interface

  • QR Management Dashboard: Full CRUD operations for QR codes
  • Batch Generation: Generate QR codes for multiple CSS sections simultaneously
  • Real-time Preview: Preview QR codes before saving
  • Search and Filter: Easy QR code discovery and management

3. Integration Points

  • Admin Dashboard: Direct access to QR code management from the main admin interface
  • Reports Section: QR codes displayed in weekly/monthly reports for easy access
  • Analytics Integration: QR code scan tracking and analytics
  • Print Functionality: Print-ready formats for posters and classroom display

4. Technical Implementation

  • QR Code Library: Uses simplesoftwareio/simple-qrcode for generation
  • Database Storage: Full QR code metadata stored in the database
  • File Storage: Generated QR codes stored in Laravel storage system
  • Security: Proper access controls and validation

File Structure

Models

  • QrCode Model (app/Models/QrCode.php): Main QR code entity with relationships and attributes

Controllers

  • QrCodeController (app/Http/Controllers/QrCodeController.php): Handles all QR code operations
    • index(): Display all QR codes with search/filter
    • create(): Show QR code creation form
    • store(): Generate and save new QR code
    • show(): Display QR code details
    • edit(): Edit QR code properties
    • update(): Update QR code
    • destroy(): Delete QR code
    • batchGenerate(): Generate multiple QR codes
    • download(): Download QR code file
    • showPublic(): Public QR code view for scanning
    • statistics(): QR code usage analytics

Services

  • QrCodeService (app/Services/QrCodeService.php): Core QR code generation logic
    • generateQRCode(): Generate QR code with options
    • saveQRCode(): Save QR code to database and storage
    • updateQRCode(): Update existing QR code
    • deleteQRCode(): Remove QR code and files
    • generateBatch(): Create multiple QR codes

Views

  • Admin Views (resources/views/admin/qr-codes/):
    • index.blade.php: Main QR codes listing
    • create.blade.php: QR code creation form
    • edit.blade.php: QR code editing form
    • show.blade.php: QR code details view

Database

  • Migration (database/migrations/2025_10_29_215050_create_qr_codes_table.php): QR codes table structure

Routes

  • Web Routes: All QR code routes defined in routes/web.php

Database Schema

The qr_codes table contains the following fields:

Field Type Description
id Big Integer Primary key
name String QR code name/identifier
track String Academic track (CSS)
grade_level String Grade level (11, 12)
section String Section identifier (A, B, C, etc.)
academic_year String Academic year
semester String Semester (1st, 2nd)
target_url String URL the QR code links to
file_path String Path to QR code image file
file_url String Public URL for QR code file
foreground_color String QR code foreground color
background_color String QR code background color
version String QR code version identifier
is_active Boolean Active/inactive status
expires_at Timestamp Expiration date
scan_count Integer Number of times scanned
created_at Timestamp Creation timestamp
updated_at Timestamp Last update timestamp

Usage Instructions

For Administrators

1. Accessing QR Code Management

  1. Log in to the admin dashboard
  2. Click on "QR Code Management" in the action cards section
  3. This takes you to the QR codes index page

2. Creating a Single QR Code

  1. Click "Create QR Code" button
  2. Fill in the required fields:
    • Name: Descriptive name (e.g., "CSS Grade 11 Section A - Survey Access")
    • Track: Select "CSS"
    • Grade Level: Choose Grade 11 or 12
    • Section: Select section (A, B, C, D, E, F)
    • Academic Year: Enter current academic year
    • Semester: Select 1st or 2nd semester
    • Target URL: The survey URL (auto-populated for welcome page)
  3. Customize colors if desired:
    • Foreground Color: QR code color
    • Background Color: Background color
  4. Click "Generate QR Code" to save

3. Batch Generation

  1. From the QR codes index page, click "Batch Generate"
  2. Select parameters:
    • Grade Levels: Choose grades (11, 12, or both)
    • Sections: Select sections (A, B, C, D, E, F)
    • Semester: Choose semester
    • Academic Year: Enter year
  3. Click "Generate Batch" to create all QR codes

4. Managing QR Codes

  • View: Click on any QR code to see details
  • Edit: Click "Edit" to modify QR code properties
  • Download: Click "Download" to save QR code image
  • Print: Use print functionality for poster creation
  • Delete: Remove QR codes that are no longer needed

5. Using QR Codes in Reports

  1. Go to "Reports" section in admin dashboard
  2. Weekly and monthly reports now include QR code display
  3. QR codes show scan counts and status
  4. Direct links to view/download QR codes

For Students

Scanning QR Codes

  1. Open camera app on mobile device
  2. Point camera at QR code
  3. Tap notification to open survey link
  4. Follow the survey completion process

Integration with Survey System

Welcome Page Integration

  • QR codes link directly to the survey welcome page (resources/views/welcome.blade.php)
  • Students can scan QR codes to access the survey form
  • Integration maintains the existing flow: QR → Welcome → Registration/Login → Survey

Analytics Integration

  • QR code scan tracking is available
  • Analytics show which QR codes are most effective
  • Integration with existing survey response tracking

Security and Privacy

Access Control

  • Only authenticated administrators can create/modify QR codes
  • QR codes are properly secured and only accessible through approved routes
  • File access controlled through Laravel's file system

Data Privacy

  • QR code usage tracked but no personal data collected
  • Scan counts used for analytics only
  • Compliance with data protection requirements

Customization Options

Visual Customization

  • Colors: Customize foreground and background colors
  • Sizes: Different resolution options available
  • Formats: PNG and SVG format support

Content Customization

  • URL Targeting: Custom URLs for different survey periods
  • Versioning: QR code version control for different time periods
  • Expiration: Optional expiration dates for time-limited surveys

Testing the System

Manual Testing

  1. Create a test QR code through admin interface
  2. Download the QR code image
  3. Scan using mobile device camera
  4. Verify redirect to welcome page
  5. Test print functionality
  6. Verify batch generation creates multiple codes

Automated Testing

  • Unit tests for QrCodeService
  • Feature tests for QR code controller methods
  • Integration tests for QR code to survey flow

Troubleshooting

Common Issues

QR Code Not Scanning

  • Ensure QR code image is clear and high resolution
  • Check that target URL is correct and accessible
  • Verify QR code is not expired

Generation Fails

  • Check database permissions
  • Ensure storage directory is writable
  • Verify QR code library is properly installed

Download Issues

  • Confirm file exists in storage
  • Check file permissions
  • Verify storage disk configuration

Error Handling

  • Graceful error handling for all QR code operations
  • User-friendly error messages
  • Logging of all QR code activities

Maintenance

Regular Tasks

  • Monitor QR code scan statistics
  • Clean up expired or inactive QR codes
  • Update QR code URLs when survey targets change
  • Backup QR code files and database

Updates and Improvements

  • QR code format enhancements
  • Additional customization options
  • Enhanced analytics and reporting
  • Integration with other survey tools

Conclusion

The QR Code Generation System provides a robust, user-friendly solution for distributing survey access through QR codes. The system integrates seamlessly with the existing ISO Quality Education Survey infrastructure and provides administrators with comprehensive tools for managing survey access.

Key benefits:

  • Easy Access: Students can quickly access surveys via mobile devices
  • Efficient Distribution: Generate and distribute QR codes for multiple classes
  • Tracking: Monitor QR code effectiveness through scan analytics
  • Integration: Seamless integration with existing admin dashboard and reports
  • Customization: Flexible options for different use cases and requirements

The system is now ready for production use and will significantly improve student engagement with the ISO 21001 quality education survey process.