ynh_extension_meeo/libs/bulletin/Note.lib.php

37 lines
652 B
PHP
Raw Normal View History

2024-07-13 18:39:43 +00:00
<?php
namespace YesWiki\Meeo\Bulletin;
2024-07-13 18:39:43 +00:00
class Note {
private $intitule;
private $note;
private $coef;
2024-09-11 06:47:50 +00:00
private $max;
2024-07-13 18:39:43 +00:00
2024-09-11 06:47:50 +00:00
public function __construct(string $intitule, int $note, int $max, float $coef = 1.0) {
2024-07-13 18:39:43 +00:00
$this->intitule = $intitule;
$this->note = $note;
$this->coef = $coef;
2024-09-11 06:47:50 +00:00
$this->max = $max;
2024-07-13 18:39:43 +00:00
}
public function getIntitule() {
return $this->intitule;
}
public function getNote() {
return $this->note;
}
2024-09-11 07:27:45 +00:00
public function getNoteOn20() {
return ($this->note / $this->max) * 20;
}
2024-07-13 18:39:43 +00:00
public function getCoef() {
return $this->coef;
}
2024-09-11 06:47:50 +00:00
public function getMax() {
return $this->max;
}
2024-07-13 18:39:43 +00:00
}