56 if (self::$instance_variant_scorm) {
62 if (self::$instance_variant_short) {
68 if (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);
Base class for learning progress exceptions.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
string $image_path_running
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
string $image_path_failed
string $image_path_in_progress
static self $instance_variant_short
string $image_path_not_attempted
const ICON_VARIANT_DEFAULT
getIconComponent(string $path, string $alt)
ILIAS UI Renderer $renderer
renderIconForStatus(int $a_status, ?ilLanguage $a_lng=null)
Returns the rendered icon with alt text.
ILIAS UI Factory $factory
getImagePathRunning()
A long variant of this icon is not available.
static self $instance_variant_scorm
renderIcon(string $path, string $alt)
getImagePathForStatus(int $a_status)
__construct(int $variant, \ILIAS\UI\Renderer $renderer, \ILIAS\UI\Factory $factory)
getImagePathAsset()
A long variant of this icon is not available.
lookupNumStatus(string $a_status)
Transforms the string constants for the status to their interger equivalent.
static self $instance_variant_long
getImagePathNotAttempted()
string $image_path_completed
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_COMPLETED
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_NOT_ATTEMPTED_NUM
const LP_STATUS_FAILED_NUM
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.