|
| __construct (protected int int $decimals, protected grade_grade grade_grade $grade, protected bool bool $showfinalgrade=false, protected bool bool $showgrademax=false, protected array|null ?array $penaltyicon=null) |
| The class constructor.
|
|
| export_for_template (renderer_base $output) |
| Function to export the renderer data in a format that is suitable for a mustache template.
|
|
| get_template () |
| Returns the template for the actions bar.
|
|
◆ __construct()
core_grades\output\penalty_indicator::__construct |
( |
protected int int | $decimals, |
|
|
protected grade_grade grade_grade | $grade, |
|
|
protected bool bool | $showfinalgrade = false, |
|
|
protected bool bool | $showgrademax = false, |
|
|
protected array|null ?array | $penaltyicon = null ) |
The class constructor.
- Parameters
-
int | $decimals | the decimal places |
grade_grade | $grade | user grade |
bool | $showfinalgrade | whether to show the final grade (or show icon only) |
bool | $showgrademax | whether to show the max grade |
array | null | $penaltyicon | icon to show if penalty is applied |
- Parameters
-
$decimals | $decimals the decimal places |
$grade | $grade user grade |
$showfinalgrade | $showfinalgrade whether to show the final grade (or show icon only) |
$showgrademax | $showgrademax whether to show the max grade |
$penaltyicon | $penaltyicon icon to show if penalty is applied |
◆ export_for_template()
core_grades\output\penalty_indicator::export_for_template |
( |
renderer_base | $output | ) |
|
Function to export the renderer data in a format that is suitable for a mustache template.
This means:
- No complex types - only stdClass, array, int, string, float, bool
- Any additional info that is required for the template is pre-calculated (e.g. capability checks).
- Parameters
-
renderer_base | $output | Used to do a final render of any components that need to be rendered for export. |
- Return values
-
Implements core\output\templatable.
◆ get_template()
core_grades\output\penalty_indicator::get_template |
( |
| ) |
|
Returns the template for the actions bar.
- Return values
-
The documentation for this class was generated from the following file:
- grade/classes/output/penalty_indicator.php