Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[docs] Error in version.php

Đang mở
#787 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
50/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php
Lĩnh vực
documentation

Hướng nghiên cứu

Mở phần “supported-versions” tại https://moodledev.io/docs/apis/commonfiles/version.php#supported-versions và tìm nguồn của phần này trong repository devdocs. Cập nhật phần giải thích và các ví dụ để nêu rõ rằng $plugin->supported phải chứa chính xác hai giá trị, đồng thời làm rõ hành vi khi có một hoặc nhiều hơn hai giá trị.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug documentation help wanted needs-triage
What is the URL of the page?

https://moodledev.io/docs/apis/commonfiles/version.php#supported-versions

What is the issue with this page?

The docs stated, that the property for $plugin->supported should be integer[] and

A set of branch numbers to specify the lowest and highest branches of Moodle that the plugin supports. These value are inclusive.

grafik

But it does not state that there has to be exactly two values. If you provide 3 or more values, only the first 2 values (or more correctly: only values with the keys 0 and 1) will taken into account. One could think that you can also provide a list of all supported versions:

$plugin->supported = [

    // Support from the Moodle 3.11 series.
    311,
    401,
    402,
    // To the Moodle 4.3 series.
    403,
];

If one provides only one value Moodle will fail with an error while installation of the plugin.

$plugin->supported = [
    // Support only the Moodle 4.3 series.
    403,
];
Are you able to provide a patch for this?

Yes - I will create one if requested.

Ngôn ngữ chính
TypeScript
Star
74
Fork
652
Merge trung bình
2 ngày 50 phút
Pull request đã merge (30 ngày)
12

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của moodle/devdocs

Tất cả issue của moodle/devdocs

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.