- Readability Score Moodle Block
The Readability Score block is a Moodle plugin developed as part of a Master's dissertation in Computer Science. It allows users to analyse the readability of text content within Moodle courses using the Gunning Fog Index. The plugin aims to address limitations in existing Web Accessibility Evaluation Tools (WAETs), particularly in their coverage of WCAG 2.1 success criterion 3.1.5, which relates to reading level.
The primary objectives of this research project were:
- Analyse the effectiveness of various readability scoring algorithms.
- Design and develop a Moodle plugin that implements the most effective readability scoring algorithm.
- Evaluate the plugin's effectiveness in identifying complex text and its ability to provide suggestions for improvement.
- The Gunning Fog Index demonstrated the strongest positive correlation (0.64) with human-generated text readability levels among the evaluated algorithms.
- The plugin achieved an overall accuracy of 50.97% in classifying text difficulty levels when compared to the OneStopEnglish Corpus.
- Performance varied across difficulty levels: Intermediate (56.61%), Advanced (55.56%), and Elementary (40.74%).
- A strong correlation (0.90) was observed between the plugin's Gunning Fog Index scores and the corpus difficulty levels.
- The plugin demonstrated efficient performance with an average execution time of 0.0143 seconds and low memory utilisation.
- Calculate readability scores using the Gunning Fog Index
- Provide instant feedback on text complexity
- Offer targeted suggestions for improving readability
- Store and display historical readability data
- Dashboard for viewing readability statistics across pages
- Moodle 3.9 or higher
- PHP 7.3 or higher
-
Open a terminal and navigate to your Moodle installation's
blocksdirectory:cd /path/to/your/moodle/blocks/ -
Clone the repository:
git clone https://github.com/anrichp/moodle-block_readabilityscore.git readabilityscore -
Log in to your Moodle site as an admin and go to Site administration > Notifications.
-
Follow the on-screen instructions to complete the installation.
-
Once installed, you should see a success message.
- Turn editing on in your course.
- Click "Add a block" and select "Readability Score" from the list.
- The block will appear in your course sidebar.
- Click the "Scan" button in the Readability Score block.
- Select the text you want to analyse on the page.
- The block will display the Gunning Fog Index score and readability level.
- Review the suggestions provided to improve the text's readability if needed.
- Click the "Dashboard" button in the Readability Score block.
- Select a page URL from the dropdown to view its readability statistics.
- Review the Gunning Fog Index scores and other details for the selected page.
- 6: Readable by a Year 7 pupil (11-12 years old)
- 7: Fairly easy - Year 8 (12-13 years old)
- 8: Standard - Year 9 (13-14 years old)
- 9: Fairly difficult - Year 10 (14-15 years old)
- 10-11: Difficult - Year 11 to Year 12 (15-17 years old)
- 12: Very difficult - Year 13 (17-18 years old)
- 13-16: University level
- 17+: Postgraduate level
The Readability Score block is designed with a modular architecture to ensure maintainability and separation of concerns. Below are UML diagrams that illustrate the structure and interactions within the plugin.
This class diagram shows the main components of the Readability Score block and their relationships:
classDiagram
class block_readabilityscore {
+init()
+get_content()
+applicable_formats()
+specialisation()
}
class TextStatistics {
+word_count(text)
+sentence_count(text)
+complex_word_count(text)
+gunning_fog(text)
-is_complex_word(word)
-syllable_count(word)
}
class block_readabilityscore_external {
+process_text_parameters()
+process_text(selectedtext, pageurl)
+process_text_returns()
-generate_remediation_suggestions(score, debug_info)
}
block_readabilityscore ..> TextStatistics : uses
block_readabilityscore_external ..> TextStatistics : uses
This sequence diagram illustrates the process of analysing text and generating a readability score:
sequenceDiagram
participant User
participant Block as Readability Score Block
participant API as External API
participant Stats as TextStatistics
participant DB as Database
User->>Block: Clicks "Scan" button
Block->>User: Prompts to select text
User->>Block: Selects text
Block->>API: Sends selected text
API->>Stats: Calculates readability
Stats-->>API: Returns statistics
API->>API: Generates suggestions
API->>DB: Stores score and text
API-->>Block: Returns score and suggestions
Block->>User: Displays results
This component diagram shows the high-level structure of the Readability Score block and its interactions with Moodle core:
graph TB
subgraph "Moodle Core"
DB[Database]
Auth[Authentication]
end
subgraph "Readability Score Block"
UI[Block UI]
Calc[Score Calculator]
API[External API]
Suggest[Suggestion Generator]
end
UI --> Calc
UI --> API
Calc --> TextStats[TextStatistics Library]
API --> Calc
API --> Suggest
API --> DB
UI --> Auth
These diagrams provide a visual representation of the plugin's architecture:
- The Class Diagram shows the main classes in the plugin and their relationships.
- The Sequence Diagram illustrates the process flow when a user analyses text.
- The Component Diagram provides a high-level view of the plugin's components and their interactions with Moodle core.
This project employed the Design Science Research Methodology (DSRM) framework, consisting of six phases:
- Problem Identification and Motivation
- Definition of Objectives for a Solution
- Design and Development
- Demonstration
- Evaluation
- Communication
The evaluation phase utilised the OneStopEnglish Corpus as a benchmark for assessing the plugin's accuracy in classifying text difficulty levels.
- The evaluation relied solely on the OneStopEnglish Corpus, which may not represent the full diversity of educational texts.
- Classification thresholds for the Gunning Fog Index require further refinement.
- Future work could explore integrating multiple readability metrics and incorporating machine learning techniques for improved accuracy.
We welcome contributions to the Readability Score block. Please submit pull requests to our GitHub repository at https://github.com/anrichp/moodle-block_readabilityscore.
This plugin is licensed under the GNU GPL v3 or later.
For support, please open an issue in our GitHub repository
Developed by Anrich Potgieter.