You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Composer integration and improve Moodle settings configuration
Enhanced MoodleSettingsForm to integrate Composer operations, including Moodle CS setup and PHP_CodeSniffer configuration. Added tests for ComposerUtil and MoodleSettingsForm. Updated documentation and streamlined plugin installation instructions.
This plugin will help Moodle Developers to work quickly and according to Moodle requirements
9
+
This plugin helps Moodle Developers work efficiently by providing development tools and ensuring compliance with Moodle coding standards and requirements.
10
10
<!-- Plugin description end -->
11
11
12
+
## Requirements
13
+
14
+
Before installing the plugin, ensure you have:
15
+
16
+
1. PHP 7.4 or later installed and available in PATH
17
+
2. Composer installed globally and available in PATH
18
+
3. Git (optional, but recommended for version control)
19
+
12
20
## Installation
13
21
14
-
- Using IDE built-in plugin system:
15
-
16
-
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "moodle-dev"</kbd> >
17
-
<kbd>Install Plugin</kbd>
18
-
19
-
- Manually:
22
+
### Using IDE built-in plugin system:
23
+
24
+
1. Open IntelliJ IDEA
25
+
2. Go to <kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd>
26
+
3. Search for "moodle-dev"
27
+
4. Click <kbd>Install Plugin</kbd>
28
+
5. Restart IDE when prompted
29
+
30
+
### Manual Installation:
31
+
32
+
1. Download the [latest release](https://github.com/SysBind/moodle-dev/releases/latest)
33
+
2. Open IntelliJ IDEA
34
+
3. Go to <kbd>Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
35
+
4. Select the downloaded plugin file
36
+
5. Restart IDE when prompted
37
+
38
+
## Configuration
39
+
40
+
### Option 1: Auto Settings (Recommended)
41
+
42
+
1. Open your Moodle project in IntelliJ IDEA
43
+
2. Right-click on the project in the Project Explorer
44
+
3. Select "Moodle" > "Auto Settings"
45
+
4. The plugin will automatically:
46
+
- Enable all required features
47
+
- Configure your developer information
48
+
- Set up PHP_CodeSniffer with Moodle standards
49
+
- Set Composer's minimum-stability to dev
50
+
- Install moodlehq/moodle-cs globally
51
+
- Configure all necessary paths
52
+
53
+
### Option 2: Manual Configuration
54
+
55
+
If you need to adjust settings manually:
56
+
57
+
1. For PHP_CodeSniffer settings:
58
+
- Go to <kbd>Settings/Preferences</kbd> > <kbd>PHP</kbd> > <kbd>Quality Tools</kbd> > <kbd>PHP_CodeSniffer</kbd>
59
+
- Configure paths to phpcs and phpcbf executables
60
+
- Set up coding standards
61
+
62
+
2. For other Moodle-specific settings:
63
+
- Go to <kbd>Settings/Preferences</kbd> > <kbd>PHP</kbd> > <kbd>Frameworks</kbd>
64
+
- Find the "Moodle" section
65
+
- Adjust settings as needed
66
+
67
+
## Features
68
+
69
+
- Moodle-specific code templates and generators
70
+
- Automatic code style configuration for:
71
+
- PHP
72
+
- JavaScript
73
+
- LESS
74
+
- SCSS
75
+
- Integration with Moodle Code Sniffer
76
+
- Support for Moodle project structure:
77
+
- PHP classes in 'classes/' directory
78
+
- Mustache templates in 'templates/'
79
+
- Database files in 'db/'
80
+
- Language files in 'lang/'
81
+
- JavaScript files in 'amd/src/'
82
+
- CLI scripts in 'cli/'
83
+
- Backup files in 'backup/'
84
+
- Images in 'pix/'
85
+
86
+
## Troubleshooting
87
+
88
+
### Common Issues
89
+
90
+
1.**Plugin not detecting Moodle directory**
91
+
- Ensure the directory contains a valid Moodle installation
92
+
- Check if version.php exists in the root directory
93
+
- Verify directory permissions
94
+
95
+
2.**PHP_Codesniffer not working**
96
+
- Verify Composer is installed and in PATH
97
+
- Check Composer global installation directory permissions
98
+
- Try running `composer global require moodlehq/moodle-cs` manually
99
+
100
+
3.**Code style not applying**
101
+
- Ensure the plugin is enabled
102
+
- Verify the Moodle project directory is correctly set
103
+
- Try restarting the IDE
20
104
21
-
Download the [latest release](https://github.com/SysBind/moodle-dev/releases/latest) and install it manually using
22
-
<kbd>Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
105
+
### Getting Help
23
106
107
+
- Check the [plugin issues page](https://github.com/SysBind/moodle-dev/issues)
108
+
- Submit a new issue if you encounter problems
109
+
- Include relevant logs and configuration details when reporting issues
24
110
25
111
---
26
112
Plugin based on the [IntelliJ Platform Plugin Template][template].
0 commit comments