Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fields.md #1142

Closed
wants to merge 2 commits into from
Closed

Update fields.md #1142

wants to merge 2 commits into from

Conversation

kainaat0110
Copy link

No description provided.

Copy link

netlify bot commented Oct 2, 2024

Deploy Preview for moodledevdocs failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit cae9ede
🔍 Latest deploy log https://app.netlify.com/sites/moodledevdocs/deploys/66fd240fd26094000885ce08

Copy link
Member

@andrewnicols andrewnicols left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Thank you for taking the time to work on this documentation.

I'm afraid that, in its current form, it doesn't really add much to our documentation. A lot of the information mentions a specific version of Moodle, details general best-practice, and adds a lot of 'fluff'.

We try to keep our developer documentation as clear and concise as possible.

I would suggest you take a look at other documentation in this repository to see how we structure things. I'd suggest looking at some of our more complete pages as a starting point like, for example, the Hooks API.

Thanks again


The [Database activity](https://docs.moodle.org/en/Database_module) included with Moodle includes support for several predefined [field types](./fields.md), including text, date, and URL. It is also possible to create new field types. For example, you might like to create:
# Database Fields for Moodle 4.4.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove version details from docs.

The [Database activity](https://docs.moodle.org/en/Database_module) included with Moodle includes support for several predefined [field types](./fields.md), including text, date, and URL. It is also possible to create new field types. For example, you might like to create:
# Database Fields for Moodle 4.4.3

*This documentation is a work-in-progress. Feel free to contribute.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove.

This is already a draft document, though you've removed that in your efforts.

Comment on lines 1 to -9
---
title: Database fields
tags:
- mod_data
- datafield
- plugintype
- subplugin
documentationDraft: true
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not remove this. This is the page information, tags, title, and other metadata.


## Custom Field Types Examples

- **Discipline-specific field types**:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use sub-headings here.

Using Bold/Strong does not create semantic markup. Instead it creates content which is visually styled only.


*This documentation is a work-in-progress. Feel free to contribute.*

The **Database activity** in Moodle allows users to create structured collections of data. It supports various predefined field types like **text**, **date**, and **URL**. Developers can extend Moodle by creating custom field types, which are beneficial for specialized uses like discipline-specific, institution-specific, or module-specific needs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think any of these things need to be bolded. THe individual types could use backticks.

Suggested change
The **Database activity** in Moodle allows users to create structured collections of data. It supports various predefined field types like **text**, **date**, and **URL**. Developers can extend Moodle by creating custom field types, which are beneficial for specialized uses like discipline-specific, institution-specific, or module-specific needs.
The **Database activity** in Moodle allows users to create structured collections of data. It supports various predefined field types like `text`, `date`, and `URL`. Developers can extend Moodle by creating custom field types, which are beneficial for specialized uses like discipline-specific, institution-specific, or module-specific needs.

Comment on lines +68 to +75
Custom field plugins should be tested for compatibility across Moodle 4.4.3's supported environments, including:

- **PHP 8.1**
- **MariaDB 10.6.7**
- **MySQL 8.0**
- **PostgreSQL 13**
- **MSSQL 2017**
- **Oracle 19c**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove. This information will very quickly go out-of-date. It is also true of all features of Moodle. We do not write this on every page.


:::danger Class locations
Use Moodle's [unit testing framework](https://moodledev.io/docs/apis/core/testing/phpunit) for automated testing to ensure functionality across different environments.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not use full links. See other examples in the documentation.

Comment on lines +109 to +113
---

**Last Updated**: 2 October 2024

---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove. This is automatically tracked by our documentation systems and version control.

Comment on lines +100 to +107
## Key Considerations for Moodle 4.4.3:

:::
- Use **updated coding standards** to align with Moodle's guidelines for PHP 8.1.
- Implement **security features** to avoid vulnerabilities.
- Ensure **compatibility** across Moodle's supported environments.
- Follow **best practices** for form creation and plugin configuration management.

By following these guidelines, developers can ensure their custom field types are secure, modern, and compatible with future Moodle releases.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove - unnecessary and standard across all code.

Comment on lines +93 to +98
- Use Moodle's **Git version control** system.
- Maintain proper versioning for compatibility with Moodle's plugin directory and version upgrades.

Developers should submit and maintain their plugins in the [Moodle Plugin Directory](https://moodle.org/plugins).

---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove. Standard across Moodle

@andrewnicols andrewnicols mentioned this pull request Oct 2, 2024
@andrewnicols
Copy link
Member

Closing due to lack of information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants