19 declare(strict_types=1);
    77     public function getHTML(
int $objective_id = null): string
    79         $this->
lng->loadLanguageModule(
'crs');
    89         $panel = $this->ui_factory->panel()->standard(
    90             $this->
lng->txt($this->getHeaderLangVar($objective_id)),
    94         return $this->ui_renderer->render($panel);
    99         if ($objective_id !== null) {
   100             return 'tst_objective_progress_header';
   103         return 'tst_objectives_progress_header';
   114         foreach ($lo_status_data as $objtv) {
   115             if ($objective_id !== null && $objtv[
'id'] !== $objective_id) {
   120             $compare_value = null;
   122                 && $loc_settings->getInitialTest() === 1
   123                 && isset($objtv[
'initial'][
'result_perc'])) {
   124                 $compare_value = $objtv[
'initial'][
'result_perc'];
   127             $items[] = $this->ui_factory->item()->standard($objtv[
"title"])
   129                     $this->ui_factory->symbol()->icon()->custom(
   131                         $this->
lng->txt(
"crs_objectives")
   134                     $this->ui_factory->chart()->progressMeter()->standard(
   136                         $objtv[
'result_perc'],
   137                         $objtv[
'limit_perc'],
   145             $this->
ctrl->setParameterByClass(
'ilObjTestGUI', 
'ref_id', $this->testrequest->getRefId());
   154         $objective_items = $collection_of_objectives->getItems();
   156         if ($objective_items === []) {
   165         foreach ($objective_items as $objective_id) {
   168             $tmp[$objective_id] = [
   169                 "id" => $objective_id,
   170                 "title" => $title[
"title"],
   171                 "desc" => $title[
"description"],
   178             if (array_key_exists($objective_id, $lo_results)) {
   179                 $lo_result = $lo_results[$objective_id];
   180                 $tmp[$objective_id][
"user_id"] = $lo_result[
"user_id"];
   181                 $tmp[$objective_id][
"result_perc"] = $lo_result[
"result_perc"];
   182                 $tmp[$objective_id][
"limit_perc"] = $lo_result[
"limit_perc"];
   183                 $tmp[$objective_id][
"status"] = $lo_result[
"status"];
   184                 $tmp[$objective_id][
"type"] = $lo_result[
"type"];
   185                 $tmp[$objective_id][
"initial"] = $lo_result[
"initial"] ?? null;
   190         foreach ($objective_items as $objtv_id) {
   191             $res[] = $tmp[$objtv_id];
   200         $initial_status = null;
   203         foreach ($lur->getCourseResultsForUserPresentation() as $objective_id => $types) {
   219             $result[
"initial_status"] = $initial_status;
   221             $res[$objective_id] = $result;
 
getHeaderLangVar(?int $objective_id)
 
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item. 
 
LP collection of objectives. 
 
getUsersObjectivesResults(int $crs_obj_id, int $usr_id)
 
getHTML(int $objective_id=null)
 
static lookupObjectiveTitle(int $a_objective_id, bool $a_add_description=false)
 
static getInstanceByObjId(int $a_obj_id)
 
buildStatusItems(?int $objective_id, array $lo_status_data)
 
getUsersObjectivesStatus($crs_obj_id, $usr_id)
 
static getInstance(int $a_container_id)
 
const TYPE_TEST_QUALIFIED
 
__construct(private ilLanguage $lng, private ilCtrl $ctrl, private UIFactory $ui_factory, private UIRenderer $ui_renderer, private InternalRequestService $testrequest)