71 if (self::$instance_variant_scorm) {
72 return self::$instance_variant_scorm;
77 if (self::$instance_variant_short) {
78 return self::$instance_variant_short;
83 if (self::$instance_variant_long) {
84 return self::$instance_variant_long;
89 throw new ilLPException(
"No such variant of the LP icons exists.");
109 $this->image_path_in_progress =
ilUtil::getImagePath(
'learning_progress/short/in_progress.svg');
111 $this->image_path_not_attempted =
ilUtil::getImagePath(
'learning_progress/short/not_attempted.svg');
125 throw new ilLPException(
"No such variant of the LP icons exists.");
154 if ($this->image_path_asset) {
157 throw new ilLPException(
"A long variant of the 'asset' LP icon does not exist.");
165 if ($this->image_path_running) {
168 throw new ilLPException(
"A long variant of the 'running' LP icon does not exist.");
171 public function renderIcon(
string $path,
string $alt) : string
173 if ($this === self::$instance_variant_scorm) {
174 throw new ilLPException(
"SCORM variants of the LP icons cannot be rendered.");
182 return $this->factory->symbol()->icon()->custom($path, $alt, \
ILIAS\
UI\
Component\Symbol\Icon\Icon::SMALL);
const LP_STATUS_COMPLETED_NUM
static $instance_variant_short
static $instance_variant_long
Class ChatMainBarProvider .
const LP_STATUS_NOT_ATTEMPTED
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
getImagePathNotAttempted()
const LP_STATUS_IN_PROGRESS_NUM
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
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 getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
renderIcon(string $path, string $alt)
static $instance_variant_scorm
$image_path_not_attempted
const LP_STATUS_NOT_ATTEMPTED_NUM
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
const LP_STATUS_FAILED_NUM
getImagePathForStatus(int $a_status)