Tutorlms_Helpers::get_percentage_scored( object $attempt )
Calculates percentage scored.
Parameters Parameters
- $attempt
-
(object) (Required) The quiz attempt object.
Return Return
(int)
Source Source
File: src/integrations/tutorlms/helpers/tutorlms-helpers.php
public function get_percentage_scored( $attempt ) { return number_format( ( $attempt->earned_marks * 100 ) / $attempt->total_marks ); }
Expand full source code Collapse full source code View on Github
Changelog Changelog
Version | Description |
---|---|
2.4.0 | Introduced. |