Skip to main content

Datacurso Ratings plugin permissions

The following table summarises the main permissions used by the Datacurso Ratings plugin and their default role assignments.

Technical permissionDescriptionDefault roles
local/datacurso_ratings:viewcoursereportView the Datacurso ratings report inside a course and call the supporting AJAX services (activity comments, AI summaries, etc.).Manager, Editing teacher, Teacher, Course creator
local/datacurso_ratings:viewgeneralreportIntended to guard the global ratings dashboard and plugin settings, although the current UI still checks moodle/site:config.Manager
local/datacurso_ratings:generateanalysisgeneralMarks users who are allowed to generate the global AI analysis when contacting the Datacurso AI provider.Manager
local/datacurso_ratings:generateanalysiscourseMarks users who are allowed to trigger the course-level AI analysis endpoints.Manager, Editing teacher, Course creator
local/datacurso_ratings:generateanalysisactivityMarks users who are allowed to request AI analyses focused on individual activities.Manager, Editing teacher, Course creator

local/datacurso_ratings:viewcoursereport

Allows users to access the Activity ratings report inside each course (local/datacurso_ratings/admin/report_ratings_course.php) and the navigation shortcut injected via local_datacurso_ratings_extend_navigation_course() in lib.php.

With this permission, a user can:

  • Open the in-course report UI to inspect likes, dislikes, and comments per activity.
  • Use the AJAX services that power the report (get_activity_comments, get_ai_analysis_comments, get_ai_analysis_course, get_ratings_report_course, and related AMD modules), because each service checks this capability before returning data.
  • Be included in the course picker returned by get_courses_by_category, which allows the global dashboard to list only courses where the user has this capability or moodle/course:view.

local/datacurso_ratings:viewgeneralreport

Designed to protect the site-wide ratings dashboard and settings (admin/report.php and settings.php). The string description ("Manage datacurso ratings settings") reflects that intent. At the moment those entry points still call require_capability('moodle/site:config'), so this capability is not enforced yet. You can assign it to custom roles in preparation for when the plugin switches the checks to this capability.

local/datacurso_ratings:generateanalysisgeneral

Identifies who is allowed to ask the Datacurso AI provider for a global analysis (/rating/general). The AI provider plugin (ai/provider/datacurso/classes/local/ratelimit/local_datacurso_ratings.php) uses this capability to build the list of eligible users when configuring rate limits, so only users with this permission can be whitelisted for the service.

With this permission a user can:

  • Appear as an eligible account in the "General analysts" autocomplete when administrators restrict who can call the /rating/general endpoint.
  • Request global AI summaries once the Datacurso AI service is configured.

local/datacurso_ratings:generateanalysiscourse

Marks the users that can request course-level AI analyses through the Datacurso AI services (/rating/course). The rate-limit settings of the Datacurso AI provider read this capability to populate the "Course analysts" autocomplete list, ensuring that only privileged roles can be allowed through when throttling is active.

With this permission, a user can:

  • Be whitelisted in the AI provider settings to ask for course summaries.
  • Generate the "AI analysis" visible in the course report once the permissions are granted.

local/datacurso_ratings:generateanalysisactivity

Complements the previous permission by signalling which users can send activity-level AI analysis requests (/rating/query). It shares the same rate-limit configuration entry as the course permission, so both are required to appear in the allowed users autocomplete for that endpoint.

With this permission, a user can:

  • Be selected as an allowed analyst for the /rating/query endpoint in the AI provider configuration.
  • Trigger the activity comment analysis widget that appears next to the ratings report once the AI integration is enabled.