19 declare(strict_types=1);
31 require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
40 public function init(): void
42 $this->static_link_enabled =
true;
43 $this->delete_enabled =
true;
44 $this->cut_enabled =
true;
45 $this->copy_enabled =
true;
46 $this->subscribe_enabled =
true;
47 $this->link_enabled =
true;
48 $this->info_screen_enabled =
true;
50 $this->gui_class_name =
"ilobjtestgui";
64 if (
ilTestDIC::dic()[
'main_settings_repository']->getForObjFi($obj_id)
65 ->getAdditionalSettings()->getHideInfoTab()) {
110 $props = parent::getProperties();
114 if ($onlineaccess !==
true) {
115 $props[] = [
"alert" =>
true,
"property" => $this->
lng->txt(
"status"),
116 "value" => $onlineaccess];
124 $cmd = explode(
'::', $cmd);
126 if (count($cmd) == 2) {
127 $cmd_link = $this->
ctrl->getLinkTargetByClass([
'ilRepositoryGUI',
'ilObjTestGUI', $cmd[0]], $cmd[1]);
129 $cmd_link = $this->
ctrl->getLinkTargetByClass(
'ilObjTestGUI', $cmd[0]);
132 $params = array_merge([
'ref_id' => $this->ref_id], $this->command_link_params);
144 if ($this->
access->checkAccess(
'read',
'', $this->ref_id)) {
166 if ($command[
'cmd'] ==
'userResultsGateway') {
196 $this->command_link_params = $a_param;
203 return parent::modifyTitleLink($default_link);
206 $path = $this->tree->getPathFull($this->ref_id);
208 while ($parent = array_pop(
$path)) {
209 if ($parent[
'type'] ===
'crs') {
210 $parent_crs_ref_id = $parent[
'ref_id'];
215 $this->
ctrl->setParameterByClass(
"ilrepositorygui",
'ref_id', $parent_crs_ref_id);
216 $this->
ctrl->setParameterByClass(
"ilrepositorygui",
'tid', $this->ref_id);
217 $cmd_link = $this->
ctrl->getLinkTargetByClass(
"ilrepositorygui",
'redirectLocToTest');
218 $this->
ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->ref_id);
219 $this->
ctrl->clearParametersByClass(
'ilrepositorygui');
221 return parent::modifyTitleLink($cmd_link);
getCommandFrame(string $cmd)
Get command target frame.
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
initItem(int $ref_id, int $obj_id, string $type, string $title='', string $description='')
getProperties()
Get item properties.
enableInfoScreen(bool $info_screen)
modifyTitleLink(string $default_link)
static _lookupOnlineTestAccess($a_test_id, $a_user_id)
Checks if a user is allowd to run an online exam.
addCommandLinkParameter($a_param)
add command link parameters
removeUserResultsCommand($commands)
handleUserResultsCommand($commands)
static isObjectiveTest(int $a_trst_ref_id)
Check if test ref_id is used in an objective course.
createDefaultCommand(array $command)
overwritten from base class for course objectives
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
getCommandLink(string $cmd)
static visibleUserResultExists($test_obj_id, $user_id)