Skip to content

Commit 1b6bd8f

Browse files
committed
[docs] Create Developer quick start and Contribute pages
- Created /general/development/gettingstarted. It contains links to help developers to start coding Moodle. - Renamed Policies navbar to Coding. Moved Tools from navbar to new Coding section too. - Created /general/community/contribute page. It contains a few of the ways developers can contribute Moodle and also a link to the FAQ in moodle.com where other options are explained too. - Removed old gettingstarted pages in docs, as they finally won't be required there (they have been moved to general).
1 parent 4e43410 commit 1b6bd8f

File tree

20 files changed

+142
-264
lines changed

20 files changed

+142
-264
lines changed

config/navbar.js

+9-14
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,24 @@ const navbar = {
3232
items: [
3333
{
3434
type: 'doc',
35-
docId: 'gettingstarted/quickstart',
35+
docId: 'apis',
3636
position: 'left',
3737
label: 'Guides',
3838
},
3939
{
40-
to: '/general/community',
40+
to: '/general/community/contribute',
4141
label: 'Community',
42-
position: 'left'
43-
},
44-
{
45-
to: '/general/development/process',
46-
label: 'Process',
47-
position: 'left'
42+
position: 'left',
4843
},
4944
{
50-
to: '/general/development/policies/codingstyle',
51-
label: 'Policies',
52-
position: 'left'
45+
to: '/general/development/gettingstarted',
46+
label: 'Coding',
47+
position: 'left',
5348
},
5449
{
55-
to: '/general/development/tools',
56-
label: 'Tools',
57-
position: 'left'
50+
to: '/general/development/process',
51+
label: 'Process',
52+
position: 'left',
5853
},
5954

6055
// Right.

data/migratedPages.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,9 @@ Security:Unauthorised_access:
12251225
Sending_custom_Push_Notifications_to_the_Moodle_App:
12261226
- filePath: "/docs/moodleapp/development/custom-push-notifications.md"
12271227
slug: "/docs/moodleapp/development/custom-push-notifications"
1228+
Setting_up_development_environment:
1229+
- filePath: "general/development/gettingstarted.md"
1230+
slug: "general/development/gettingstarted"
12281231
Setting_up_your_development_environment_for_the_Moodle_App:
12291232
- filePath: "/docs/moodleapp/development/setup/index.md"
12301233
slug: "/docs/moodleapp/development/setup"

docs/gettingstarted/quickstart.md

-55
This file was deleted.

docs/moodleapp/development/testing/acceptance-testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tags:
1010

1111
In order to run tests that carry out automated functionality testing for the Moodle App, you can write [Acceptance tests](https://docs.moodle.org/dev/Acceptance_testing). This can be useful if you want to test plugins that are compatible with the app, or you're contributing to the app core. Behat tests for the app work the same way as tests for Moodle core, but they are not run as part of a normal Behat execution and there are some differences that we'll go through in this page.
1212

13-
A key point is that these tests are run using the Moodle Behat infrastructure, and don't depend only on the app codebase. Therefore, you will need a Moodle development setup as described in [Setting up development environment](https://docs.moodle.org/dev/Setting_up_development_environment).
13+
A key point is that these tests are run using the Moodle Behat infrastructure, and don't depend only on the app codebase. Therefore, you will need a Moodle development setup as described in [Setting up development environment](/general/development/gettingstarted).
1414

1515
The main advantages of this approach are:
1616

@@ -30,7 +30,7 @@ Nevertheless, if you still have to run the projects in your local machine, you c
3030

3131
### Configuring the Moodle site
3232

33-
You can learn how to run a Moodle site locally in [Setting up development environment](https://docs.moodle.org/dev/Setting_up_development_environment).
33+
You can learn how to run a Moodle site locally in [Setting up development environment](/general/development/gettingstarted).
3434

3535
Remember to install the [local_moodlemobileapp](https://github.com/moodlehq/moodle-local_moodlemobileapp/) plugin with the same version that you're using for the mobile app.
3636

general/community/contribute.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Contributing
3+
tags:
4+
- Core development
5+
- Processes
6+
- Community
7+
---
8+
9+
If you want to contribute to Moodle, you can start looking at the following:
10+
11+
- **Found a bug?** [Report an issue](/general/development/tracker#reporting-an-issue) in our bug tracker.
12+
- **Want to learn and extend your Moodle development skills**? Sign up to free self-paced courses in our [Moodle Academy Developer Learning Pathway](https://learn.moodle.org/).
13+
- **Ready to help coding**? Check the [getting started](/general/development/gettingstarted) page.
14+
- **Share your plugins** in the [Plugins directory](https://moodle.org/plugins).
15+
- **Adopt an existing plugin**. Look at the [list of plugins seeking a new maintainer](https://moodle.org/plugins/browse.php?list=set&id=61) and read the [Plugins adoption programme](https://moodle.org/mod/forum/discuss.php?d=260354).
16+
- **Assist with the translation** of Moodle. See [Translation](/general/development/process/translation) page.
17+
- **Get involved in the developer resources**, [contributing](/general/documentation/contributing) for fixing typos and errors, migrating pages, expanding the content, etc.
18+
19+
:::tip Searching for other ways to contribute?
20+
21+
You'll find them in the [How do I contribute to Moodle?](https://moodle.com/faq/how-do-i-contribute-to-moodle/) page.
22+
23+
:::
24+
25+
### See also
26+
27+
- [Releases](/general/releases) - versions of Moodle that have already been released
28+
- [Process](/general/development/process)

general/development/gettingstarted.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Getting started
3+
tags:
4+
- Core development
5+
- Processes
6+
---
7+
8+
:::info Ready to code?
9+
10+
- [Set up your development environment](#a-quick-start-to-moodle-development)
11+
- See the [list of relatively easy Moodle bugs](https://tracker.moodle.org/issues/?jql=project%20%3D%20MDL%20AND%20type%20in%20(bug)%20AND%20status%20%3D%20open%20AND%20Difficulty%20%3D%20Easy%20AND%20labels%20not%20in%20(patch)%20ORDER%20BY%20created%20DESC)
12+
- [Prepare a patch](https://docs.moodle.org/dev/Git_for_developers#Preparing_a_patch)
13+
- Read the [Coding style](/general/development/policies/codingstyle) policy
14+
- Send your patch to [peer review](/general/development/process/peer-review) and learn more about the [Moodle processes](/general/development/process).
15+
- Create your custom plugins looking at the information in the [Plugin contribution](https://docs.moodle.org/dev/Plugin_contribution) page.
16+
17+
:::
18+
19+
<!-- cspell:ignore adminer -->
20+
21+
## A quick start to Moodle development
22+
23+
1. Create an account on [Moodle.org](https://moodle.org/). You will need this to access the [Moodle General Developer forum](https://moodle.org/mod/forum/view.php?f=33) and download [Moodle plugins](https://moodle.org/plugins). You can also sign up to free self-paced courses in our [Moodle Academy Developer Learning Pathway](https://learn.moodle.org/)
24+
1. Create an account on [GitHub](https://github.com/) and [install Git on your computer](https://docs.moodle.org/dev/Git_for_developers). This is the source code version control repository tool of choice for Moodle development.
25+
1. [Install Moodle on your machine](https://docs.moodle.org/en/Installing_Moodle) or use a container environment like [moodle-docker](https://github.com/moodlehq/moodle-docker). You can also use [Moodle Development Kit (MDK)](/general/development/tools/mdk).
26+
27+
:::tip
28+
29+
We highly recommend that you use a database administration tool such as [adminer](https://www.adminer.org/) to help you manage your development databases.
30+
31+
:::
32+
33+
1. Set-up Moodle for development:
34+
35+
- Enable the [Moodle Debugger](https://docs.moodle.org/en/Debugging).
36+
37+
:::tip
38+
39+
When developing in Moodle, it's recommended to turn debugging on. Only turn it off for demonstration purposes as it does have a considerable impact on the performance of your Moodle website.
40+
41+
:::
42+
43+
:::danger Attention
44+
45+
Always resolve all errors and warnings that show up with **Moodle debugging turned on**. Errors and warnings imply that something isn't working as it is supposed to which means your code isn't doing what you intended it to, or may be fragile and could break in the future.
46+
47+
:::
48+
49+
- Install the [Moodle PHP CodeSniffer](/general/development/tools/phpcs). This will be used to test your plugin for conformance with Moodle coding standards. Use this to develop good coding skills.
50+
- Install the Moodle [PHPdoc check plugin](https://moodle.org/plugins/local_moodlecheck). This will be used to test your source code documentation. This will also help improve your coding skills.
51+
52+
:::info Advanced
53+
54+
You can use Xdebug to enable step-by-step debugging in PHP. Integrations are built into many popular editors.
55+
[Learn more](https://docs.moodle.org/dev/Profiling_PHP#Xdebug)
56+
57+
:::
58+
59+
And finally remember these wise words from [Michael Milette](https://moodle.org/user/view.php?id=1615960&course=5) in the [General developer forum](https://moodle.org/mod/forum/discuss.php?d=355789):
60+
61+
> Learning how to code in Moodle involves a lot of learning by example and reading other people's source code including Moodle core code. If you have a particular type of plugin in mind that you would like to create, it's recommended that you start by finding a plugin which provides similar functionality and use the process outlined above to clone it. Then customize it to suit your needs. You can even do this with 3rd party plugins found on the [plugins directory](https://moodle.org/plugins). That's just one of the many advantages of developing with open source. Just always remember to give credit to the original author for his/her original hard work. [...]
62+
>
63+
> Learning all of Moodle and its database takes time - maybe even years. In fact you may never come across parts of it and that's OK. Take it one step at a time and don't be afraid to ask for help when you get stuck. The only expectation by the worldwide community is that you will have tried to figure things out on your own before asking a question. Google is your friend. Just start your query with the word "moodle".
64+
65+
## Communication
66+
67+
If you have any question or want to share your ideas, there are several channels you can use to communicate with other developers:
68+
69+
- [Moodle community forums](https://moodle.org/course/), available in different languages.
70+
- [A Matrix room](https://matrix.to/#/%23moodledev:moodle.com) available for real-time communication. Read the [chat policies](https://docs.moodle.org/dev/Chat) before joining.
71+
- [Developer meetings](/general/community/meetings), organised periodically and open to anyone interested in Moodle development.
72+
73+
## See also
74+
75+
- [Releases](/general/releases) - versions of Moodle that have already been released
76+
- [Process](/general/development/process)
77+
- [API guides](/docs/apis)
78+
- [Contributing](/general/community/contribute)
79+
- [A (july 2017) forum thread](https://moodle.org/mod/forum/discuss.php?d=355789) about Getting Started with Moodle Development.

general/development/process/testing/integrated-issues.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ For changing to a theme named "yay" add **?theme=yay** to the url.
102102

103103
## Notes
104104

105-
- If the issue requires an Oracle or MSSQL installation for testing, and you don't have one, [docker](/docs/gettingstarted/quickstart#docker) may help you.
105+
- If the issue requires an Oracle or MSSQL installation for testing, and you don't have one, docker may help you.
106106
- Any update should be added as a comment on the tracker issue being tested.
107107
- If testers pass or fail an issue by mistake, then please request the integration team to reopen it for testing.
108108
- Testers should not be involved in the bug fixing or review process.

project-words.txt

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ TODO
4747
Triaged
4848
Untriaged
4949
WCAG
50+
Xdebug
5051
XMLDB
5152
XMPPHP
5253
accessallgroups

sidebars/docs.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ const sidebars = {
2323
'introduction',
2424
{
2525
label: 'Getting started',
26-
type: 'category',
27-
items: [
28-
'gettingstarted/quickstart',
29-
'gettingstarted/requirements',
30-
],
26+
type: 'link',
27+
href: '/general/development/gettingstarted',
3128
},
3229
{
3330
label: 'Developer guides',

sidebars/general.js

+14-11
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const sidebars = {
2626
community: [
2727
'community/intro',
2828
'community/mission',
29+
'community/contribute',
2930
'community/roadmap',
3031
'community/channels',
3132
{
@@ -143,7 +144,12 @@ const sidebars = {
143144
},
144145
],
145146

146-
policies: [
147+
coding: [
148+
{
149+
label: 'Getting started',
150+
type: 'doc',
151+
id: 'development/gettingstarted',
152+
},
147153
{
148154
label: 'Policies',
149155
type: 'category',
@@ -154,16 +160,6 @@ const sidebars = {
154160
},
155161
],
156162
},
157-
],
158-
159-
documentation: [
160-
'documentation/index',
161-
'documentation/contributing',
162-
'documentation/code-of-conduct',
163-
'documentation/style-guides',
164-
],
165-
166-
tools: [
167163
{
168164
label: 'Tools',
169165
type: 'category',
@@ -179,6 +175,13 @@ const sidebars = {
179175
},
180176
],
181177

178+
documentation: [
179+
'documentation/index',
180+
'documentation/contributing',
181+
'documentation/code-of-conduct',
182+
'documentation/style-guides',
183+
],
184+
182185
releaseNotes: [
183186
getReleaseNotes(),
184187
],

src/components/HomepageFeatures/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Link from '@docusaurus/Link';
2424

2525
const FeatureList = [
2626
{
27-
link: '/docs/gettingstarted/quickstart',
27+
link: '/general/development/gettingstarted',
2828
title: 'Quick start',
2929
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
3030
description: (

src/pages/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function HomepageHeader() {
3333
<div className={styles.buttons}>
3434
<Link
3535
className="button button--secondary button--lg"
36-
to="/docs/gettingstarted/quickstart"
36+
to="/general/development/gettingstarted"
3737
>
3838
Quick start - 5min ⏱️
3939
</Link>

versioned_docs/version-4.0/gettingstarted/quickstart.md

-13
This file was deleted.

0 commit comments

Comments
 (0)