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] Improve documentation around capability contextlevel in the docs

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

Maintainer thường phản hồi trong vòng 1 ngày

@NeillM đang làm issue này rồi.

Từ ngày 9/5/2025.

  • #1349 của @NeillM — đang mở
  • #1615 của @ded-furby — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
55/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Lĩnh vực
documentation

Hướng nghiên cứu

Mở trang tài liệu về capabilities được liên kết và bắt đầu từ “How to define new capabilities in plugins”, xem lại các hướng dẫn hiện có về contextlevel. Thêm phần giải thích rõ ràng về những gì contextlevel kiểm soát, bao gồm lý do các capabilities cấp hệ thống không thể bị ghi đè ở cấp thấp hơn trong hệ thống phân cấp context, sau đó kiểm tra tài liệu đã được kết xuất.

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/5.0/apis/subsystems/access#how-to-define-new-capabilities-in-plugins

What is the issue with this page?

In the dev chat there was a discussion around what contextlevel on capabilities does and means we seemed to come up with a good description that is not included in the docs at the moment:

It indicates what context you intend to check the capability at, and does control where it appears, for instance moodle/site:config is defined as CONTEXT_SYSTEM and that means you can't change it at lower levels. If you go to a course (or category, or module or block, or user for that matter) and try to override capabilities there, that one doesn't show on the list. Because if you did override it in a course, it wouldn't make any difference when you check it as context system.

It seems that adding this or something similar will help people understand what contextlevel they should choose to use better.

Are you able to provide a patch for this?

If no one picks this up sooner, I'll likely do it next week

Ngôn ngữ chính
TypeScript
Star
74
Fork
652
Merge trung bình
4 ngày 13 giờ
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

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.