Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_User_Permissions::handle_cap_view_grades( bool[] $allcaps, array $args )

Modify a users ability to view_grades


Description Description

Users can view the grades (quiz results) if one of the following conditions is met:

  • Users can view their own grades.
  • Admins and LMS Managers can view anyone’s grade.
  • Any user who has been explicitly granted the view_grades cap can view anyone’s grade (via custom code).
  • Any instructor/assistant who can edit_post for the course the quiz belongs to can view grades of the students within that course.

Parameters Parameters

$allcaps

(Required) Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability.

$args

(Required) Arguments that accompany the requested capability check.

  • (string) Requested capability: 'view_grades'.
  • '1'
    (int) Current User ID.
  • '2'
    (int) Requested User ID.
  • '3'
    (int) WP_Post ID of the quiz.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.user.permissions.php



Top ↑

Changelog Changelog

Changelog
Version Description
4.21.2 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.