You are here

public static function LPStatus::isCertificateExpired in Opigno Learning path 3.x

Same name and namespace in other branches
  1. 8 src/Entity/LPStatus.php \Drupal\opigno_learning_path\Entity\LPStatus::isCertificateExpired()

Returns flag if training certificate expired for the user.

Parameters

\Drupal\group\Entity\Group $group: Group object.

int $uid: User ID.

Return value

bool True if training certificate expired for the user, false otherwise.

4 calls to LPStatus::isCertificateExpired()
DefaultTwigExtension::get_start_link in src/TwigExtension/DefaultTwigExtension.php
Returns group start link.
Progress::buildSummary in src/Progress.php
Progress::getProgressBuildAchievementsPage in src/Progress.php
Get get progress for achievements page.
Progress::getProgressBuildGroupPage in src/Progress.php
Get get progress for group page.

File

src/Entity/LPStatus.php, line 419

Class

LPStatus
Defines the User Learning Path attempt status entity.

Namespace

Drupal\opigno_learning_path\Entity

Code

public static function isCertificateExpired(Group $group, $uid) : bool {
  $expiration = self::getCertificateExpireTimestamp((int) $group
    ->id(), $uid);
  return $expiration && $expiration < time();
}