Moodle PHP Documentation 5.0
Moodle 5.0.1+ (Build: 20250711) (61af040cd5f)
gradepenalty_duedate\penalty_calculator Class Reference
Inheritance diagram for gradepenalty_duedate\penalty_calculator:
core_grades\penalty_calculator

Static Public Member Functions

static calculate_penalty (penalty_container $container)
 Calculate the penalty for the given activity.
 
static get_penalty_from_rules (cm_info $cm, int $submissiondate, int $duedate)
 Get the penalty percentage from the most appropriate penalty rule based on the submission date and the due date.
 

Member Function Documentation

◆ calculate_penalty()

static gradepenalty_duedate\penalty_calculator::calculate_penalty ( penalty_container $container)
static

Calculate the penalty for the given activity.

Parameters
penalty_container$containerThe penalty container.

Reimplemented from core_grades\penalty_calculator.

◆ get_penalty_from_rules()

static gradepenalty_duedate\penalty_calculator::get_penalty_from_rules ( cm_info $cm,
int $submissiondate,
int $duedate )
static

Get the penalty percentage from the most appropriate penalty rule based on the submission date and the due date.

Parameters
cm_info$cmThe course module object.
int$submissiondateThe submission date.
int$duedateThe due date.
Return values
floatthe deducted percentage.

The documentation for this class was generated from the following file: