19 declare(strict_types=1);
    33     protected \ilLanguage 
$lng;
    45         $this->domain = $domain_service;
    46         $this->repo = $repo_service->
assignment()->assignments();
    47         $this->
lng = $domain_service->lng();
    58         if (!in_array($mode, [self::TYPE_ONGOING,self::TYPE_FUTURE,self::TYPE_PAST,self::TYPE_ALL])) {
    59             return self::TYPE_ONGOING;
    67             self::TYPE_ONGOING => $this->
lng->txt(
"exc_ongoing"),
    68             self::TYPE_FUTURE => $this->
lng->txt(
"exc_future"),
    69             self::TYPE_PAST => $this->
lng->txt(
"exc_past"),
    70             self::TYPE_ALL => $this->
lng->txt(
"exc_all")
    77         return $modes[$mode] ?? 
"";
    85         foreach ($this->repo->getList($this->getExcId()) as $ass) {
    86             $state = $this->domain->assignment()->state($ass->getId(), 
$this->user_id);
    87             if ($mode === self::TYPE_PAST && $state->hasEnded()) {
    90             if ($mode === self::TYPE_FUTURE && $state->isFuture()) {
    93             if ($mode === self::TYPE_ONGOING && !$state->hasEnded() && !$state->isFuture()) {
   104         foreach ($this->repo->getList($this->getExcId()) as $ass) {
   113             throw new \ilExerciseException(
"Assignment not found (" . $this->
getExcId() . 
"," . 
$ass_id . 
").");
 __construct(InternalRepoService $repo_service, InternalDomainService $domain_service, int $obj_id, int $user_id)
 
AssignmentsDBRepository $repo
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getListModeLabel(string $mode)
 
getValidListMode(string $mode)
 
InternalDomainService $domain