Certification Status Block
What is the certification status block
Added in totara-20.0 (previously called the current compliance block) the certification status block displays certification completion grouped by organisation, and limited to the viewing users staff members.
Capabilities
The block uses two capabilities:
totara/certification:viewcompliance
This allows users to view the blocks contents based on the content restrictions enabled on the overview reporttotara/certification:viewallcompliance
This allows users to view the blocks full contents with no restrictions
Reports
Two embedded have been added to certifications:
The overview report showing compliance grouped by organisation
Source: server/totara/certification/rb_sources/rb_certification_compliance_overview_embedded.php
Page: server/totara/certification/certification_compliance_overview.php
The details report showing more detailed user level information
Source: server/totara/certification/rb_sources/rb_certification_compliance_detail_embedded.php
Page: server/totara/certification/certification_compliance_detail.php
Key classes, templates and API
The block is located in server/blocks/compliance_current_report
Class / Template | Purpose |
|---|---|
block_compliance_current_report.php | This is the blocks main class where the blocks settings and defaults are defined |
cache_helper | This helps keep the block performant by implementing a session based cache. |
Data providers used by the block located in server/totara/certification/
Class / Template | Purpose |
|---|---|
compliance_filter_factory | A helper class to apply the entity filters |
entity\filter\compliance_filter_factory | The entity filters for certification ids |
data_provider\compliance | The data_provider used by graphql to fetch the relevant compliance records |
usagedata\completion | Usage data to track the compliance rates of certifications |
webapi\resolver\query\current_compliance | The resolver for the totara_certification_current_compliance graphql query used to fetch data for the block |
webapi\schema_objects\compliance | The data/schema object for current_compliance results |
Graphql APIs located in server/totara/certification/
API | Purpose |
|---|---|
Query: totara_certification_current_compliance | The query that fetches the data for the block via the data_providers |
Type: totara_certification_current_compliance_result | The return type of the query |
Type: totara_certification_current_compliance_node | A sub-type of the return type |
Input: totara_certification_current_compliance_filter | The input for the query, allowing passthrough of the selected default filters |