ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
class.ilAssQuestionProcessLockFileStorage.php
Go to the documentation of this file.
1
<?php
24
class
ilAssQuestionProcessLockFileStorage
extends
ilFileSystemAbstractionStorage
25
{
26
private
string
$sub_path
;
27
28
public
function
__construct
(
int
$question_id,
int
$user_id
)
29
{
30
parent::__construct
(
ilFileSystemAbstractionStorage::STORAGE_DATA
,
true
, $question_id);
31
32
$this->
initSubPath
($user_id);
33
}
34
43
protected
function
getPathPrefix
(): string
44
{
45
return
'ilAssQuestionProcessLocks'
;
46
}
47
57
protected
function
getPathPostfix
(): string
58
{
59
return
'question'
;
60
}
61
62
public
function
getPath
(): string
63
{
64
return
parent::getPath() .
'/'
.
$this->sub_path
;
65
}
66
67
public
function
create
(): void
68
{
69
set_error_handler(
function
($severity,
$message
, $file, $line):
void
{
70
throw
new
ErrorException(
$message
, $severity, 0, $file, $line);
71
});
72
73
try
{
74
parent::create($this->
getPath
());
75
restore_error_handler();
76
}
catch
(Exception
$e
) {
77
restore_error_handler();
78
}
79
80
if
(!$this->
getFileSystemService
()->
has
($this->path)) {
81
throw
new
ErrorException(sprintf(
'Could not find directory: %s'
, $this->
getPath
()));
82
}
83
}
84
85
private
function
initSubPath
(
int
$user_id
): void
86
{
87
$user_id
= (string)
$user_id
;
88
89
$path
= [];
90
91
for
($i = 0, $max = strlen(
$user_id
); $i < $max; $i++) {
92
$path
[] = substr(
$user_id
, $i, 1);
93
}
94
95
$this->sub_path = implode(
'/'
,
$path
);
96
}
97
}
ilAssQuestionProcessLockFileStorage
Definition:
class.ilAssQuestionProcessLockFileStorage.php:25
ilAssQuestionProcessLockFileStorage\getPath
getPath()
Definition:
class.ilAssQuestionProcessLockFileStorage.php:62
ilAssQuestionProcessLockFileStorage\__construct
__construct(int $question_id, int $user_id)
Definition:
class.ilAssQuestionProcessLockFileStorage.php:28
ilAssQuestionProcessLockFileStorage\getPathPostfix
getPathPostfix()
Get directory name.
Definition:
class.ilAssQuestionProcessLockFileStorage.php:57
ilAssQuestionProcessLockFileStorage\getPathPrefix
getPathPrefix()
Get path prefix.
Definition:
class.ilAssQuestionProcessLockFileStorage.php:43
ilAssQuestionProcessLockFileStorage\initSubPath
initSubPath(int $user_id)
Definition:
class.ilAssQuestionProcessLockFileStorage.php:85
ilAssQuestionProcessLockFileStorage\create
create()
Definition:
class.ilAssQuestionProcessLockFileStorage.php:67
ilAssQuestionProcessLockFileStorage\$sub_path
string $sub_path
Definition:
class.ilAssQuestionProcessLockFileStorage.php:26
ilFileSystemAbstractionStorage
Definition:
class.ilFileSystemAbstractionStorage.php:28
ilFileSystemAbstractionStorage\$path
string $path
Definition:
class.ilFileSystemAbstractionStorage.php:35
ilFileSystemAbstractionStorage\STORAGE_DATA
const STORAGE_DATA
Definition:
class.ilFileSystemAbstractionStorage.php:30
ilFileSystemAbstractionStorage\getFileSystemService
getFileSystemService()
Definition:
class.ilFileSystemAbstractionStorage.php:69
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Definition:
PluginProviderHelper.php:38
ILIAS\GlobalScreen\has
has(string $class_name)
Definition:
SingletonTrait.php:62
Vendor\Package\$e
$e
Definition:
example_cleaned.php:49
$user_id
int $user_id
Definition:
trait.ilExAssignmentTypeGUIBase.php:38
$message
$message
Definition:
xapiexit.php:31
components
ILIAS
TestQuestionPool
classes
class.ilAssQuestionProcessLockFileStorage.php
Generated on Sat Oct 18 2025 23:04:34 for ILIAS by
1.9.4 (using
Doxyfile
)