Moodle Plugins directory: Global Embed: Versions: 1.1.0 | Moodle.org
Global Embed
Local plugins ::: local_globalembed
Maintained by
Flavio Araújo
Global Embed is a Moodle plugin that allows administrators to configure and display embedded content globally to authorized users. The plugin adds functionality for embedding dashboards, reports, or any content via iframe or script in the Moodle environment.
Global Embed 1.1.0
Moodle 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1
Released: marți, 9 decembrie 2025, 21:04
Global Embed Plugin for Moodle
Description
The Global Embed is a Moodle plugin that allows administrators to configure and display embedded content globally for authorized users. The plugin adds functionality to embed dashboards, reports, or any content via iframe/script within the Moodle environment.
Features
- ✅ Global Embed Content: Configure an embed code that will be displayed to all authorized users
- ✅ Permission Control: Uses Moodle's capability system to control who can view the content
- ✅ Profile Integration: Option to add a link in the user profile
- ✅ Flexible Configuration: Supports any type of embed code (iframe, script, etc.)
- ✅ Multilingual: Support for Portuguese (Brazil) and English
- ✅ Compatibility: Moodle 4.0+
Installation
Method 1: Upload via Web Interface
- Download the plugin or create a ZIP file with all files
- Go to Site Administration > Plugins > Install plugins
- Upload the ZIP file
- Follow the on-screen instructions to complete the installation
Method 2: Manual Installation
- Extract the files to the
/local/globalembed/folder of your Moodle - Go to Site Administration > Notifications
- Run the database upgrade process
Plugin Structure
local/globalembed/
├── db/
│ └── access.php # Capability definitions
├── lang/
│ ├── en/
│ │ └── local_globalembed.php # English strings
│ └── pt_br/
│ └── local_globalembed.php # Portuguese strings
├── lib.php # Main functions and hooks
├── settings.php # Administrative settings
├── version.php # Version information
├── view.php # Embed viewing page
└── .gitignore # Git ignored files
Configuration
1. Administrative Settings
Go to Site Administration > Plugins > Local plugins > Global Embed
Embed Code
- Field: Large text area to insert the embed code
- Format: Accepts HTML, iframe, JavaScript, etc.
- Example:
<iframe
src="https://example.com/dashboard"
width="100%"
height="600"
frameborder="0"
>
</iframe>
Show Profile Link
- Option: Checkbox to enable/disable
- Function: Adds a "View Dashboard" link in authorized users' profiles
- Default: Enabled
2. Permissions
The plugin creates the local/globalembed:viewembed capability that controls who can view the embedded content.
Permission Configuration:
- Go to Site Administration > Users > Permissions > Define roles
- Select the desired role (e.g., Manager, Teacher, etc.)
- Search for "View embedded content"
- Configure as Allow
Roles with Default Access:
- Manager: Automatic access
- Other roles: Need to be configured manually
Usage
For Administrators
- Configure Embed:
- Go to plugin settings
- Paste the desired embed code
- Save settings
- Manage Permissions:
- Configure which roles can view the content
- Test with different users
For Users
- Via Profile:
- Access your user profile
- Click "View Dashboard" (if enabled)
- Via Direct URL:
- Access:
/local/globalembed/view.php?id=USER_ID - Replace
USER_IDwith the user ID
- Access:
Usage Examples
Power BI Dashboard
<iframe
width="100%"
height="600"
src="https://app.powerbi.com/view?r=YOUR_REPORT_ID"
frameborder="0"
allowfullscreen="true"
>
</iframe>
Troubleshooting
Common Issues
- "No embed code configured"
- Cause: No embed code has been configured
- Solution: Go to settings and add the embed code
- User cannot see the content
- Cause: User doesn't have the necessary permission
- Solution: Configure the
local/globalembed:viewembedcapability for the user's role
- Link doesn't appear in profile
- Cause: "Show profile link" option is disabled
- Solution: Enable the option in plugin settings
- Iframe doesn't load
- Cause: Possible blocking by CORS or X-Frame-Options
- Solution: Check if the site allows iframe embedding
Logs and Debugging
To debug issues:
Enable Debug in Moodle:
// In config.php $CFG->debug = DEBUG_DEVELOPER; $CFG->debugdisplay = 1;Check Logs:
- Go to Site Administration > Reports > Logs
- Filter by user and plugin-related activity
Security
Important Considerations
- Content Validation: The plugin accepts raw HTML - be careful with inserted content
- Permissions: Always configure permissions appropriately
- HTTPS: Always use secure connections for external content
- CSP (Content Security Policy): May need to adjust security policies
Recommendations
- Test all embed code before applying in production
- Regularly monitor who has access to content
- Keep the plugin updated
- Use trusted sources for embed content
Development
Requirements
- PHP 7.4+
- Moodle 4.0+
- Basic Moodle development knowledge
Support
For support and questions:
- Check the complete documentation
- Consult the troubleshooting section
- Check Moodle logs
- Contact the system administrator
License
This plugin follows the Moodle license (GPL v3).
Contributing
Contributions are welcome! To contribute:
- Fork the project
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Developed for Moodle 4.0+ | Stable Version
Version information
- Version build number
- 2025092401
- Version release name
- 1.1.0
- Maturity
- Versiune stabilă
- MD5 Sum
- 88b5ac4b1505153671c677cdd6b04e52
- Supported software
- Moodle 4.0, Moodle 4.1, Moodle 4.2, Moodle 4.3, Moodle 4.4, Moodle 4.5, Moodle 5.0, Moodle 5.1
- Latest release for Moodle 4.0
- Latest release for Moodle 4.1
- Latest release for Moodle 4.2
- Latest release for Moodle 4.3
- Latest release for Moodle 4.4
- Latest release for Moodle 4.5
- Latest release for Moodle 5.0
- Latest release for Moodle 5.1
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
Default installation instructions for plugins of the type Local plugins
- Make sure you have all the required versions.
- Download and unpack the module.
- Place the folder in the "local" subdirectory.
- Visit http://yoursite.com/admin to finish the installation.