48 if (!$renderer || !$factory) {
50 $renderer = $DIC->ui()->renderer();
51 $factory = $DIC->ui()->factory();
56 if (self::$instance_variant_scorm) {
57 return self::$instance_variant_scorm;
62 if (self::$instance_variant_short) {
63 return self::$instance_variant_short;
68 if (self::$instance_variant_long) {
69 return self::$instance_variant_long;
74 throw new ilLPException(
"No such variant of the LP icons exists.");
96 $this->image_path_not_attempted =
ilUtil::getImagePath(
'learning_progress/short/not_attempted.svg');
110 throw new ilLPException(
"No such variant of the LP icons exists.");
139 if ($this->image_path_asset) {
142 throw new ilLPException(
"A long variant of the 'asset' LP icon does not exist.");
150 if ($this->image_path_running) {
153 throw new ilLPException(
"A long variant of the 'running' LP icon does not exist.");
158 if ($this === self::$instance_variant_scorm) {
159 throw new ilLPException(
"SCORM variants of the LP icons cannot be rendered.");
167 return $this->factory->symbol()->icon()->custom($path, $alt, \
ILIAS\
UI\
Component\Symbol\Icon\Icon::SMALL);
const LP_STATUS_COMPLETED_NUM
string $image_path_failed
string $image_path_completed
string $image_path_running
Class ChatMainBarProvider .
const LP_STATUS_NOT_ATTEMPTED
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
getImagePathNotAttempted()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const LP_STATUS_IN_PROGRESS_NUM
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
static self $instance_variant_scorm
string $image_path_in_progress
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Base class for learning progress exceptions.
renderIconForStatus(int $a_status, ?ilLanguage $a_lng=null)
Returns the rendered icon with alt text.
const LP_STATUS_IN_PROGRESS
getIconComponent(string $path, string $alt)
__construct(int $variant, \ILIAS\UI\Renderer $renderer, \ILIAS\UI\Factory $factory)
const ICON_VARIANT_DEFAULT
getImagePathRunning()
A long variant of this icon is not available.
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
renderIcon(string $path, string $alt)
ILIAS UI Factory $factory
ILIAS UI Renderer $renderer
static self $instance_variant_long
const LP_STATUS_NOT_ATTEMPTED_NUM
string $image_path_not_attempted
lookupNumStatus(string $a_status)
Transforms the string constants for the status to their interger equivalent.
getImagePathAsset()
A long variant of this icon is not available.
const LP_STATUS_COMPLETED
static self $instance_variant_short
const LP_STATUS_FAILED_NUM
getImagePathForStatus(int $a_status)