3 declare(strict_types=1);
16 $ui_factory = $DIC->ui()->factory();
17 $data_factory = new \ILIAS\Data\Factory();
19 $spacer = $ui_factory->divider()->horizontal();
21 $url = $data_factory->uri($DIC->http()->request()->getUri()->__toString());
23 $target = $data_factory->link(
'Start Test',
$url);
24 $launcher = $ui_factory->launcher()
26 ->withDescription(
'<p>You will have <strong>90 minutes to answer all questions.</strong></p><p>Please make sure that you have the time to complete the test and that you will be undisturbed. There is no way for you to pause or re-take this test.</p>');
28 $icon = $ui_factory->symbol()->icon()->standard(
'ps',
'',
'large');
30 $status_message = $ui_factory->messageBox()->failure(
"You have to complete all preconditions first.")
32 $ui_factory->link()->standard(
"Do this first",
"#"),
33 $ui_factory->link()->standard(
"And this is mandatory, too",
"#")
36 $launcher2 = $launcher
37 ->withDescription(
'<p>This course goes into advanced knowledge for students preparing for the final exam. You should have a firm understanding of the basics before enrolling.</p>')
38 ->withButtonLabel(
'Course is locked',
false)
39 ->withStatusIcon($icon)
40 ->withStatusMessageBox($status_message);
42 $target = $data_factory->link(
'Continue Survey',
$url);
43 $progressmeter = $ui_factory->chart()->progressMeter()->mini(100, 50, 100);
44 $status_message = $ui_factory->messageBox()->info(
"There are still 8 questions left in the survey.");
45 $launcher3 = $ui_factory->launcher()
47 ->withStatusIcon($progressmeter)
48 ->withStatusMessageBox($status_message)
49 ->withDescription(
'');
51 $target = $data_factory->link(
'Repeat Test',
$url);
52 $status_message = $ui_factory->messageBox()->success(
"You have completed this test already. If you want you can try it again.");
53 $icon = $ui_factory->symbol()->icon()->standard(
'task',
'',
'large');
54 $launcher4 = $ui_factory->launcher()
56 ->withStatusIcon($icon)
57 ->withStatusMessageBox($status_message);
base()
expected output: > ILIAS shows the rendered Component.